From 129e676106ccd18086e2fe60c0097f3cc2e733de Mon Sep 17 00:00:00 2001 From: Waverunner Date: Thu, 28 May 2015 08:16:41 -0400 Subject: [PATCH 1/8] Fixed getObjectAwareness including children objects sometimes leading to duplicate packets being sent. In order to get children object's included in the awareness list, you must now specifically call getChildrenAwareness() This commit fixes duplicate chat as well. --- src/resources/objects/SWGObject.java | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/resources/objects/SWGObject.java b/src/resources/objects/SWGObject.java index 3e777058d..e546cb4b4 100644 --- a/src/resources/objects/SWGObject.java +++ b/src/resources/objects/SWGObject.java @@ -50,6 +50,7 @@ import resources.network.BaselineBuilder; import resources.network.DeltaBuilder; import resources.player.Player; import resources.player.PlayerState; +import resources.server_info.Log; import utilities.Encoder.StringType; public class SWGObject implements Serializable, Comparable { @@ -175,7 +176,7 @@ public class SWGObject implements Serializable, Comparable { // TODO Slot occupation check, old version was not working properly, always returning SLOT_OCCUPIED // Get a pre-parent-removal list of the observers so we can send create/destroy/update messages - List oldObservers = getObjectsAware(); + List oldObservers = getChildrenAwareness(); // Remove this object from the old parent if one exists if (parent != null) { @@ -185,7 +186,7 @@ public class SWGObject implements Serializable, Comparable { container.addObject(this); // Observer notification - sendUpdatedContainment(oldObservers, new ArrayList<>(container.getObjectsAware())); + sendUpdatedContainment(oldObservers, new ArrayList<>(container.getChildrenAwareness())); return ContainerResult.SUCCESS; } @@ -472,6 +473,7 @@ public class SWGObject implements Serializable, Comparable { } protected void createObject(Player target) { + Log.i("ContainerPermissions", "Sending baselines for %s with owner %s to %s", this, this.getOwner(), target); sendSceneCreateObject(target); createChildrenObjects(target); target.sendPacket(new SceneEndBaselines(getObjectId())); @@ -487,14 +489,14 @@ public class SWGObject implements Serializable, Comparable { awarenessOutOfRange(o); } } - + public List getObjectsAware() { synchronized (objectsAware) { - return Collections.unmodifiableList(getChildrenAwareness()); + return Collections.unmodifiableList(objectsAware); } } - private List getChildrenAwareness() { + public List getChildrenAwareness() { List awareness = new ArrayList<>(objectsAware); if (getParent() != null && !(awareness.contains(getParent()))) @@ -519,6 +521,8 @@ public class SWGObject implements Serializable, Comparable { if (p == null || p.getPlayerState() != PlayerState.ZONED_IN) continue; p.sendPacket(packets); + + //System.out.println("Sent " + packets + " for " + this + " to objAware " + obj); } List childrenAwareness = getChildrenAwareness(); @@ -533,12 +537,16 @@ public class SWGObject implements Serializable, Comparable { if (p == null || p.getPlayerState() != PlayerState.ZONED_IN) continue; p.sendPacket(packets); + + //System.out.println("Sent " + packets + " of " + this + " to child " + childObserver); } SWGObject parent = getParent(); - if(parent != null) + if(parent != null) { parent.sendObservers(packets); + //System.out.println("Sent " + packets + " to observers of " + this); + } } } From 5b3b54c7d305e00380984434bd0f3ae53659e36d Mon Sep 17 00:00:00 2001 From: Waverunner Date: Thu, 28 May 2015 08:43:49 -0400 Subject: [PATCH 2/8] Cleaned up code for slots and containers, sending packets with sendObservers will check if the parent of a child observers is the same before sending packets --- src/resources/objects/SWGObject.java | 36 +++++++++++++--------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/resources/objects/SWGObject.java b/src/resources/objects/SWGObject.java index e546cb4b4..1a5052cbe 100644 --- a/src/resources/objects/SWGObject.java +++ b/src/resources/objects/SWGObject.java @@ -111,19 +111,17 @@ public class SWGObject implements Serializable, Comparable { int arrangementId = getArrangementId(object); if (arrangementId == -1) { containedObjects.put(object.getObjectId(), object); - object.parent = this; - object.containerPermissions.setOwner(objectId); - return true; - } - // Not a child object, so time to check the slots! + } else { + // Not a child object, so time to check the slots! - // Check to make sure this object is able to go into a slot in the parent - List requiredSlots = object.getArrangement().get(arrangementId - 4); - // Note that some objects don't have a descriptor, meaning it has no slots + // Check to make sure this object is able to go into a slot in the parent + List requiredSlots = object.getArrangement().get(arrangementId - 4); + // Note that some objects don't have a descriptor, meaning it has no slots - // Add object to the slot - for (String requiredSlot : requiredSlots) { - slots.put(requiredSlot, object); + // Add object to the slot + for (String requiredSlot : requiredSlots) { + slots.put(requiredSlot, object); + } } object.parent = this; @@ -140,13 +138,11 @@ public class SWGObject implements Serializable, Comparable { // This object is a container object, so remove it from the container if (object.getSlotArrangement() == -1) { containedObjects.remove(object.objectId); - object.parent = null; - return; - } - - for (String slot : (slotArrangement == -1 ? - object.getArrangement().get(0) : object.getArrangement().get(slotArrangement - 4))) { - slots.put(slot, null); + } else { + for (String slot : (slotArrangement == -1 ? + object.getArrangement().get(0) : object.getArrangement().get(slotArrangement - 4))) { + slots.put(slot, null); + } } object.parent = null; @@ -530,11 +526,11 @@ public class SWGObject implements Serializable, Comparable { childrenAwareness.remove(this); // Remove self since only observers being notified for (SWGObject childObserver : childrenAwareness) { - if (childObserver == null) + if (childObserver == null || childObserver == this) continue; Player p = childObserver.getOwner(); - if (p == null || p.getPlayerState() != PlayerState.ZONED_IN) + if (p == null || getOwner() == p || p.getPlayerState() != PlayerState.ZONED_IN) continue; p.sendPacket(packets); From 16cb3ccbc3231af3d78097db2219337f2c5b7c61 Mon Sep 17 00:00:00 2001 From: Obique PSWG Date: Thu, 28 May 2015 08:01:40 -0500 Subject: [PATCH 3/8] Updated nge.cfg --- .classpath | 2 +- .project | 6 ++++++ .settings/org.eclipse.jdt.core.prefs | 7 ++++--- nge.cfg | 15 +++++++++------ odb/placeholder.txt | 0 5 files changed, 20 insertions(+), 10 deletions(-) delete mode 100644 odb/placeholder.txt diff --git a/.classpath b/.classpath index e4494fb5d..c36afa942 100644 --- a/.classpath +++ b/.classpath @@ -2,7 +2,7 @@ - + diff --git a/.project b/.project index 85d4d32f5..159b3a7e2 100644 --- a/.project +++ b/.project @@ -5,6 +5,11 @@ + + org.python.pydev.PyDevBuilder + + + org.eclipse.jdt.core.javabuilder @@ -13,5 +18,6 @@ org.eclipse.jdt.core.javanature + org.python.pydev.pythonNature diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 7341ab168..a698e5967 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,11 +1,12 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/nge.cfg b/nge.cfg index a3f0978f9..903b1e911 100644 --- a/nge.cfg +++ b/nge.cfg @@ -1,17 +1,20 @@ -#Tue Apr 07 18:57:01 CEST 2015 +# 27/05/2015 08:17:38 CDT AUTO-LOGIN=0 -CLEAN-CHARACTER-DATA=1 -GALAXY-MAX-ONLINE=3000 +CLEAN-CHARACTER-DATA=0 +ENABLE-LOGGING=true GALAXY-MAX-CHARACTERS=2 +GALAXY-MAX-ONLINE=3000 +LOAD-BUILDOUTS=false LOCAL-DB=nge LOCAL-PASS=nge LOCAL-USER=nge LOGIN-PORT=44453 LOGIN-SERVER-ID=1 LOGIN-SERVER-NAME=LoginServer +LOGIN-VERSION-CHECKS=true MAX-PACKET-SIZE=496 +PACKET-DEBUG=true SESSION-TOKEN-LENGTH=24 -WIPE-ODB-FILES=1 +WIPE-ODB-FILES=0 ZONE-SERVER-ID=1 -ZONE-SERVER-NAME=ZoneServer -PACKET-DEBUG=true \ No newline at end of file +ZONE-SERVER-NAME=Localhost diff --git a/odb/placeholder.txt b/odb/placeholder.txt deleted file mode 100644 index e69de29bb..000000000 From 5203545382b91d0f25208c21d22feb4700f981e9 Mon Sep 17 00:00:00 2001 From: Obique PSWG Date: Thu, 28 May 2015 08:14:07 -0500 Subject: [PATCH 4/8] Accidentally left out a few config entries in nge.cfg --- nge.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nge.cfg b/nge.cfg index 5cc6ccaa9..51fd7911d 100644 --- a/nge.cfg +++ b/nge.cfg @@ -1,4 +1,4 @@ -# 27/05/2015 08:17:38 CDT +# 28/05/2015 08:11:30 CDT AUTO-LOGIN=0 CLEAN-CHARACTER-DATA=0 ENABLE-LOGGING=true @@ -8,6 +8,8 @@ LOAD-BUILDOUTS=false LOCAL-DB=nge LOCAL-PASS=nge LOCAL-USER=nge +LOGIN-PORT=44453 +LOGIN-SERVER-ID=1 LOGIN-SERVER-NAME=LoginServer LOGIN-VERSION-CHECKS=true MAX-PACKET-SIZE=496 From aa3c97ef78695b62afd0f9b84884dd4d5bb8b1eb Mon Sep 17 00:00:00 2001 From: Undercova PSWG Date: Thu, 28 May 2015 13:17:22 +0000 Subject: [PATCH 5/8] README.md edited online with Bitbucket --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fee7f4707..2a820266c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ ### **Branch** ### -**Development:** Upload your Pull Requests here so it can be tested +**Quality Assurance:** Upload your Pull Requests here so it can be tested + +**Development:** This is the main working space **Master:** Tested and approved commits will be moved to this branch (Test Center) -**Release:** This is the live version of latest code run on Live Server (Tydirium) - -------------------------------------------------------------------------------- ![holocore.png](https://bitbucket.org/repo/norXdj/images/3473411954-holocore.png) From 10a3ddfddd4f25685a0fae97116e4fcc6ae03c68 Mon Sep 17 00:00:00 2001 From: Waverunner Date: Thu, 28 May 2015 15:36:12 -0400 Subject: [PATCH 6/8] Fixed object destruction not updating the client --- src/services/objects/ObjectManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/services/objects/ObjectManager.java b/src/services/objects/ObjectManager.java index 1f1398ee0..96489e820 100644 --- a/src/services/objects/ObjectManager.java +++ b/src/services/objects/ObjectManager.java @@ -253,10 +253,12 @@ public class ObjectManager extends Manager { if (parent instanceof CreatureObject) { ((CreatureObject) parent).removeEquipment(object); } - parent.removeObject(object); - } + object.sendObserversAndSelf(new SceneDestroyObject(objId)); - object.sendObservers(new SceneDestroyObject(objId)); + parent.removeObject(object); + } else { + object.sendObservers(new SceneDestroyObject(objId)); + } // Finally, remove from the awareness tree deleteObject(object.getObjectId()); From 4bf73d0373aec16d893bb2b87abf42ce1c778dcb Mon Sep 17 00:00:00 2001 From: Obique PSWG Date: Fri, 29 May 2015 00:44:19 -0500 Subject: [PATCH 7/8] Added two additional config files and moved them into a cfg/ directory --- cfg/features.cfg | 1 + cfg/network.cfg | 10 ++++++++++ cfg/nge.cfg | 11 ++++++++++ nge.cfg | 20 ------------------- src/resources/config/ConfigFile.java | 7 ++++++- .../control/ServerPublicInterface.java | 2 +- .../network/NetworkClientManager.java | 2 +- .../network/NetworkListenerService.java | 12 +++++------ src/services/player/LoginService.java | 10 +++++----- src/services/player/ZoneService.java | 2 +- 10 files changed, 42 insertions(+), 35 deletions(-) create mode 100644 cfg/features.cfg create mode 100644 cfg/network.cfg create mode 100644 cfg/nge.cfg delete mode 100644 nge.cfg diff --git a/cfg/features.cfg b/cfg/features.cfg new file mode 100644 index 000000000..32dc51f66 --- /dev/null +++ b/cfg/features.cfg @@ -0,0 +1 @@ +# 29/05/2015 00:41:40 CDT diff --git a/cfg/network.cfg b/cfg/network.cfg new file mode 100644 index 000000000..fc9837ce2 --- /dev/null +++ b/cfg/network.cfg @@ -0,0 +1,10 @@ +# 29/05/2015 00:41:40 CDT +AUTO-LOGIN=0 +LOGIN-PORT=44453 +LOGIN-SERVER-ID=1 +LOGIN-SERVER-NAME=LoginServer +LOGIN-VERSION-CHECKS=true +MAX-PACKET-SIZE=496 +SESSION-TOKEN-LENGTH=24 +ZONE-SERVER-ID=1 +ZONE-SERVER-NAME=Localhost diff --git a/cfg/nge.cfg b/cfg/nge.cfg new file mode 100644 index 000000000..017c9ab1b --- /dev/null +++ b/cfg/nge.cfg @@ -0,0 +1,11 @@ +# 29/05/2015 00:41:40 CDT +CLEAN-CHARACTER-DATA=0 +ENABLE-LOGGING=true +GALAXY-MAX-CHARACTERS=2 +GALAXY-MAX-ONLINE=3000 +LOAD-BUILDOUTS=false +LOCAL-DB=nge +LOCAL-PASS=nge +LOCAL-USER=nge +PACKET-DEBUG=false +WIPE-ODB-FILES=0 diff --git a/nge.cfg b/nge.cfg deleted file mode 100644 index 51fd7911d..000000000 --- a/nge.cfg +++ /dev/null @@ -1,20 +0,0 @@ -# 28/05/2015 08:11:30 CDT -AUTO-LOGIN=0 -CLEAN-CHARACTER-DATA=0 -ENABLE-LOGGING=true -GALAXY-MAX-CHARACTERS=2 -GALAXY-MAX-ONLINE=3000 -LOAD-BUILDOUTS=false -LOCAL-DB=nge -LOCAL-PASS=nge -LOCAL-USER=nge -LOGIN-PORT=44453 -LOGIN-SERVER-ID=1 -LOGIN-SERVER-NAME=LoginServer -LOGIN-VERSION-CHECKS=true -MAX-PACKET-SIZE=496 -PACKET-DEBUG=true -SESSION-TOKEN-LENGTH=24 -WIPE-ODB-FILES=0 -ZONE-SERVER-ID=1 -ZONE-SERVER-NAME=Localhost diff --git a/src/resources/config/ConfigFile.java b/src/resources/config/ConfigFile.java index 31170c295..c2d066d9d 100644 --- a/src/resources/config/ConfigFile.java +++ b/src/resources/config/ConfigFile.java @@ -28,7 +28,12 @@ package resources.config; public enum ConfigFile { - PRIMARY ("nge.cfg"); + /** Meant for general purpose configuration or debugging */ + PRIMARY ("cfg/nge.cfg"), + /** Meant for networking-related configuration. Includes Login and Zone configuration */ + NETWORK ("cfg/network.cfg"), + /** Meant for specific in-game features that may be better disabled or tweaked */ + FEATURES("cfg/features.cfg"); private String filename; diff --git a/src/resources/control/ServerPublicInterface.java b/src/resources/control/ServerPublicInterface.java index 89e73041e..d27de8456 100644 --- a/src/resources/control/ServerPublicInterface.java +++ b/src/resources/control/ServerPublicInterface.java @@ -154,7 +154,7 @@ final class ServerPublicInterface { } private InetAddress getBindAddr() { - Config c = DataManager.getInstance().getConfig(ConfigFile.PRIMARY); + Config c = DataManager.getInstance().getConfig(ConfigFile.NETWORK); try { if (c.containsKey("BIND-ADDR")) return InetAddress.getByName(c.getString("BIND-ADDR", "127.0.0.1")); diff --git a/src/services/network/NetworkClientManager.java b/src/services/network/NetworkClientManager.java index 247e095c3..a35bc654b 100644 --- a/src/services/network/NetworkClientManager.java +++ b/src/services/network/NetworkClientManager.java @@ -122,7 +122,7 @@ public class NetworkClientManager extends Manager { outPacket.setCrcLength(2); outPacket.setEncryptionFlag((short) 1); outPacket.setXorLength((byte) 4); - outPacket.setUdpSize(getConfig(ConfigFile.PRIMARY).getInt("MAX-PACKET-SIZE", 496)); + outPacket.setUdpSize(getConfig(ConfigFile.NETWORK).getInt("MAX-PACKET-SIZE", 496)); sendPacket(client.getNetworkId(), outPacket); } diff --git a/src/services/network/NetworkListenerService.java b/src/services/network/NetworkListenerService.java index fb0ca7b14..7b28ad5f3 100644 --- a/src/services/network/NetworkListenerService.java +++ b/src/services/network/NetworkListenerService.java @@ -72,13 +72,13 @@ public class NetworkListenerService extends Service { @Override public boolean initialize() { - Config primary = getConfig(ConfigFile.PRIMARY); - int packetSize = primary.getInt("MAX-PACKET-SIZE", 496); - InetAddress loginBind = getBindAddr(primary, "LOGIN-BIND-ADDR", "BIND-ADDR"); - InetAddress zoneBind = getBindAddr(primary, "ZONE-BIND-ADDR", "BIND-ADDR"); - InetAddress pingBind = getBindAddr(primary, "PING-BIND-ADDR", "BIND-ADDR"); + Config network = getConfig(ConfigFile.NETWORK); + int packetSize = network.getInt("MAX-PACKET-SIZE", 496); + InetAddress loginBind = getBindAddr(network, "LOGIN-BIND-ADDR", "BIND-ADDR"); + InetAddress zoneBind = getBindAddr(network, "ZONE-BIND-ADDR", "BIND-ADDR"); + InetAddress pingBind = getBindAddr(network, "PING-BIND-ADDR", "BIND-ADDR"); boolean init = true; - init = login.initialize(loginBind, primary.getInt("LOGIN-PORT", 44453), packetSize) && init; + init = login.initialize(loginBind, network.getInt("LOGIN-PORT", 44453), packetSize) && init; init = zone.initialize(zoneBind, galaxy.getZonePort(), packetSize) && init; init = ping.initialize(pingBind, galaxy.getPingPort(), packetSize) && init; return super.initialize() && isOperational() && init; diff --git a/src/services/player/LoginService.java b/src/services/player/LoginService.java index 0b0525c87..157183b36 100644 --- a/src/services/player/LoginService.java +++ b/src/services/player/LoginService.java @@ -96,7 +96,7 @@ public class LoginService extends Service { getGalaxies = local.prepareStatement("SELECT * FROM galaxies"); getCharacters = local.prepareStatement("SELECT * FROM characters WHERE userid = ?"); deleteCharacter = local.prepareStatement("DELETE FROM CHARACTERS WHERE id = ?"); - autoLogin = (getConfig(ConfigFile.PRIMARY).getInt("AUTO-LOGIN", 0) == 1 ? true : false); + autoLogin = (getConfig(ConfigFile.NETWORK).getInt("AUTO-LOGIN", 0) == 1 ? true : false); return super.initialize(); } @@ -113,14 +113,14 @@ public class LoginService extends Service { } private String getServerString() { - Config c = getConfig(ConfigFile.PRIMARY); + Config c = getConfig(ConfigFile.NETWORK); String name = c.getString("LOGIN-SERVER-NAME", "LoginServer"); int id = c.getInt("LOGIN-SERVER-ID", 1); return name + ":" + id; } private void sendServerInfo(Player player) { - Config c = getConfig(ConfigFile.PRIMARY); + Config c = getConfig(ConfigFile.NETWORK); String name = c.getString("LOGIN-SERVER-NAME", "LoginServer"); int id = c.getInt("LOGIN-SERVER-ID", 1); sendPacket(player.getNetworkId(), new ServerString(name + ":" + id)); @@ -141,7 +141,7 @@ public class LoginService extends Service { System.err.println("Player cannot login when " + player.getPlayerState()); return; } - final boolean doClientCheck = getConfig(ConfigFile.PRIMARY).getBoolean("LOGIN-VERSION-CHECKS", true); + final boolean doClientCheck = getConfig(ConfigFile.NETWORK).getBoolean("LOGIN-VERSION-CHECKS", true); if (doClientCheck) Log.d("LoginService", "Running login checks for %s", id.getUsername()); else @@ -185,7 +185,7 @@ public class LoginService extends Service { private void onSuccessfulLogin(ResultSet user, Player player, LoginClientId id) throws SQLException { player.setUsername(id.getUsername()); player.setUserId(user.getInt("id")); - int tokenLength = getConfig(ConfigFile.PRIMARY).getInt("SESSION-TOKEN-LENGTH", 24); + int tokenLength = getConfig(ConfigFile.NETWORK).getInt("SESSION-TOKEN-LENGTH", 24); byte [] sessionToken = new byte[tokenLength]; random.nextBytes(sessionToken); player.setSessionToken(sessionToken); diff --git a/src/services/player/ZoneService.java b/src/services/player/ZoneService.java index 4707b28b3..e43b5032c 100644 --- a/src/services/player/ZoneService.java +++ b/src/services/player/ZoneService.java @@ -239,7 +239,7 @@ public class ZoneService extends Service { } private void sendServerInfo(Galaxy galaxy, long networkId) { - Config c = getConfig(ConfigFile.PRIMARY); + Config c = getConfig(ConfigFile.NETWORK); String name = c.getString("ZONE-SERVER-NAME", galaxy.getName()); int id = c.getInt("ZONE-SERVER-ID", galaxy.getId()); sendPacket(networkId, new ServerString(name + ":" + id)); From e193e7dab6a3eb902cedae03cdd2c174cfd6af9e Mon Sep 17 00:00:00 2001 From: Obique PSWG Date: Fri, 29 May 2015 00:44:38 -0500 Subject: [PATCH 8/8] Fixed minor issue where SessionRequests weren't sent to the ZoneService --- src/services/player/PlayerManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/player/PlayerManager.java b/src/services/player/PlayerManager.java index 503bd253c..0834cea3b 100644 --- a/src/services/player/PlayerManager.java +++ b/src/services/player/PlayerManager.java @@ -35,6 +35,7 @@ import java.util.Locale; import java.util.Map; import network.packets.Packet; +import network.packets.soe.SessionRequest; import network.packets.soe.Disconnect.DisconnectReason; import network.packets.swg.login.ClientIdMsg; import network.packets.swg.zone.insertion.SelectCharacter; @@ -238,7 +239,8 @@ public class PlayerManager extends Manager { loginService.handlePacket(gpi, player, packet); else if (type == ServerType.ZONE) zoneService.handlePacket(gpi, player, networkId, packet); - } + } else if (type == ServerType.ZONE && packet instanceof SessionRequest) + zoneService.handlePacket(gpi, player, networkId, packet); } private void onNotifyPlayersPacketIntent(NotifyPlayersPacketIntent nppi) {