more work on AI, added odb for object id(should hopefully fix object id duplicates), fixed tons of bugs

This commit is contained in:
Light2
2014-03-10 00:33:34 +01:00
parent 072106b6a6
commit 807025ec0b
47 changed files with 1365 additions and 212 deletions
+6 -9
View File
@@ -79,8 +79,8 @@ public class ConnectionService implements INetworkDispatch {
synchronized(core.getActiveConnectionsMap()) {
for(Client c : core.getActiveConnectionsMap().values()) {
if(c.getParent() != null) {
if ((System.currentTimeMillis() - c.getSession().getLastReadTime()) > 300000 && c.getSession().getAttribute("disconnectTask") == null) {
disconnect(c.getSession());
if ((System.currentTimeMillis() - c.getSession().getLastReadTime()) > 300000) {
disconnect(c);
}
}
}
@@ -176,13 +176,10 @@ public class ConnectionService implements INetworkDispatch {
}
public void disconnect(IoSession session) {
Client client = core.getClient(session);
if(client == null)
return;
if(client.getParent() == null)
public void disconnect(Client client) {
//Client client = core.getClient(session);
IoSession session = client.getSession();
if(session == null || client.getParent() == null)
return;
CreatureObject object = (CreatureObject) client.getParent();