diff --git a/FFXIVClassic Map Server/PacketProcessor.cs b/FFXIVClassic Map Server/PacketProcessor.cs index d8a748c3..568c43c6 100644 --- a/FFXIVClassic Map Server/PacketProcessor.cs +++ b/FFXIVClassic Map Server/PacketProcessor.cs @@ -61,7 +61,7 @@ namespace FFXIVClassic_Map_Server session = mServer.AddSession(subpacket.header.targetId); - if (beginSessionPacket.isLogin) + if (!beginSessionPacket.isLogin) Server.GetWorldManager().DoZoneIn(session.GetActor(), false, session.GetActor().destinationSpawnType); Program.Log.Info("{0} has been added to the session list.", session.GetActor().customDisplayName); @@ -121,7 +121,7 @@ namespace FFXIVClassic_Map_Server //Langauge Code (Client safe to send packets to now) case 0x0006: LangaugeCodePacket langCode = new LangaugeCodePacket(subpacket.data); - session = mServer.AddSession(subpacket.header.targetId); + session = mServer.GetSession(subpacket.header.targetId); LuaEngine.GetInstance().CallLuaFunction(session.GetActor(), session.GetActor(), "onBeginLogin", true); Server.GetWorldManager().DoZoneIn(session.GetActor(), true, 0x1); diff --git a/FFXIVClassic Map Server/WorldManager.cs b/FFXIVClassic Map Server/WorldManager.cs index ecefd024..f6cd0e17 100644 --- a/FFXIVClassic Map Server/WorldManager.cs +++ b/FFXIVClassic Map Server/WorldManager.cs @@ -737,7 +737,7 @@ namespace FFXIVClassic_Map_Server { player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId), true, false); player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x2), true, false); - player.SendZoneInPackets(this, spawnType); + //player.SendZoneInPackets(this, spawnType); } player.SendZoneInPackets(this, spawnType); diff --git a/FFXIVClassic World Server/Server.cs b/FFXIVClassic World Server/Server.cs index 557ed80a..884d2618 100644 --- a/FFXIVClassic World Server/Server.cs +++ b/FFXIVClassic World Server/Server.cs @@ -83,7 +83,7 @@ namespace FFXIVClassic_World_Server Console.ForegroundColor = ConsoleColor.White; Program.Log.Info("World Server accepting connections @ {0}:{1}", (mServerSocket.LocalEndPoint as IPEndPoint).Address, (mServerSocket.LocalEndPoint as IPEndPoint).Port); - Console.ForegroundColor = ConsoleColor.Gray; + Console.ForegroundColor = ConsoleColor.Gray; return true; } @@ -98,9 +98,11 @@ namespace FFXIVClassic_World_Server //New character since world server loaded if (!mIdToNameMap.ContainsKey(id)) AddNameToMap(id, session.characterName); + //TODO: this is technically wrong!!! Should kick out player and wait till auto-removed. + if (mZoneSessionList.ContainsKey(id)) + mZoneSessionList.Remove(id); - if (!mZoneSessionList.ContainsKey(id)) - mZoneSessionList.Add(id, session); + mZoneSessionList.Add(id, session); break; case Session.Channel.CHAT: if (!mChatSessionList.ContainsKey(id))