Fixed bug in Arcade with client manager.
This commit is contained in:
parent
41c4d5a0a8
commit
9514f6391e
@ -69,19 +69,19 @@ public class Arcade extends JavaPlugin
|
||||
|
||||
//Static Modules
|
||||
CommandCenter.Initialize(this);
|
||||
CoreClientManager clientManager = new CoreClientManager(this, webServerAddress);
|
||||
CommandCenter.Instance.setClientManager(clientManager);
|
||||
_clientManager = new CoreClientManager(this, webServerAddress);
|
||||
CommandCenter.Instance.setClientManager(_clientManager);
|
||||
|
||||
ItemStackFactory.Initialize(this, false);
|
||||
Recharge.Initialize(this);
|
||||
|
||||
_donationManager = new DonationManager(this, webServerAddress);
|
||||
_donationManager = new DonationManager(this, webServerAddress);
|
||||
|
||||
PreferencesManager preferenceManager = new PreferencesManager(this, _clientManager, _donationManager);
|
||||
new MessageManager(this, _clientManager, preferenceManager);
|
||||
|
||||
AntiStack antistack = new AntiStack(this);
|
||||
Portal portal = new Portal(this, clientManager);
|
||||
Portal portal = new Portal(this, _clientManager);
|
||||
Creature creature = new Creature(this);
|
||||
Spawn spawn = new Spawn(this);
|
||||
Teleport teleport = new Teleport(this, _clientManager, spawn);
|
||||
|
@ -17,6 +17,7 @@
|
||||
[StringLength(40)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[StringLength(100)]
|
||||
public string Uuid { get; set; }
|
||||
|
||||
public Rank Rank { get; set; }
|
||||
|
@ -69,7 +69,7 @@
|
||||
{
|
||||
var account = repository.Where<Account>(x => x.Uuid == loginToken.Uuid).FirstOrDefault() ?? CreateAccount(loginToken, repository);
|
||||
account.LoadNavigationProperties(repository.Context);
|
||||
account.LastLogin = (long)TimeUtil.GetCurrentMilliseconds();
|
||||
bool edited = false;
|
||||
|
||||
// Expire punishments
|
||||
if (account.Punishments != null)
|
||||
@ -77,6 +77,7 @@
|
||||
foreach (var expiredPunishment in account.Punishments.Where(x => x.Active && (x.Duration - 0d) > 0 && TimeUtil.GetCurrentMilliseconds() > (x.Time + (x.Duration * 3600000))))
|
||||
{
|
||||
expiredPunishment.Active = false;
|
||||
edited = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,6 +85,7 @@
|
||||
if (String.IsNullOrEmpty(account.Uuid) && !String.IsNullOrEmpty(loginToken.Uuid))
|
||||
{
|
||||
account.Uuid = loginToken.Uuid;
|
||||
edited = true;
|
||||
}
|
||||
|
||||
// Expire ranks
|
||||
@ -91,9 +93,11 @@
|
||||
{
|
||||
account.Rank = repository.Where<Rank>(x => x.Name == "ALL").First();
|
||||
repository.Attach(account.Rank);
|
||||
edited = true;
|
||||
}
|
||||
|
||||
repository.CommitChanges();
|
||||
if (edited)
|
||||
repository.CommitChanges();
|
||||
|
||||
return account;
|
||||
}
|
||||
@ -511,7 +515,7 @@
|
||||
|
||||
repository.CommitChanges();
|
||||
|
||||
return rank.Name;
|
||||
return rank.Name.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user