Project cleanup pre merge.

This commit is contained in:
2023-07-15 09:23:48 -04:00
parent 134b651df8
commit 9bbdef224d
747 changed files with 99704 additions and 101200 deletions
+13 -12
View File
@@ -25,28 +25,29 @@ public class DisconnectTrashTask extends TimerTask {
// Pass it a list of characters and it will disconnect them
// 5 seconds in the future.
public DisconnectTrashTask(ArrayList<PlayerCharacter> trashList)
{
public DisconnectTrashTask(ArrayList<PlayerCharacter> trashList) {
this.trashList = new ArrayList<>(trashList);
}
public void run() {
Logger.info("Disconnecting actives from pool of: " + trashList.size());
Logger.info("Disconnecting actives from pool of: " + trashList.size());
Session trashSession;
int accountUID;
for (PlayerCharacter trashPlayer:trashList) {
trashSession = SessionManager.getSession(trashPlayer);
accountUID = trashPlayer.getAccount().getObjectUUID();
for (PlayerCharacter trashPlayer : trashList) {
trashSession = SessionManager.getSession(trashPlayer);
accountUID = trashPlayer.getAccount().getObjectUUID();
if (trashSession != null)
trashSession.getConn().disconnect();
if (trashSession != null)
trashSession.getConn().disconnect();
// Remove account from cache
// Remove account from cache
DbManager.removeFromCache(Enum.GameObjectType.Account, accountUID);
}
};
DbManager.removeFromCache(Enum.GameObjectType.Account, accountUID);
}
}
;
}