From 516564a89698dba991e12a88ed4475682600f9d1 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Tue, 27 Jun 2017 17:31:17 -0400 Subject: [PATCH] Refactored world server. --- FFXIVClassic Map Server/actors/Actor.cs | 5 ++- .../Actor/battle/BattleActionX01Packet.cs | 2 -- .../DataObjects/ClientConnection.cs | 5 ++- .../DataObjects/Group/Group.cs | 16 +++++----- .../DataObjects/Group/Linkshell.cs | 8 ++--- .../DataObjects/Group/Party.cs | 6 ++-- .../DataObjects/Group/Relation.cs | 4 +-- .../DataObjects/Group/RetainerGroup.cs | 4 +-- .../DataObjects/Session.cs | 16 +++++----- FFXIVClassic World Server/PacketProcessor.cs | 8 ++--- .../Send/Subpackets/GameMessagePacket.cs | 32 +++++++++---------- .../Subpackets/Groups/CreateNamedGroup.cs | 2 +- .../Groups/CreateNamedGroupMultiple.cs | 2 +- .../Subpackets/Groups/DeleteGroupPacket.cs | 2 +- .../Subpackets/Groups/GroupHeaderPacket.cs | 2 +- .../Groups/GroupMembersBeginPacket.cs | 2 +- .../Groups/GroupMembersEndPacket.cs | 2 +- .../Groups/GroupMembersX08Packet.cs | 2 +- .../Groups/GroupMembersX16Packet.cs | 2 +- .../Groups/GroupMembersX32Packet.cs | 2 +- .../Groups/GroupMembersX64Packet.cs | 2 +- .../Groups/SetActiveLinkshellPacket.cs | 2 +- .../Groups/SynchGroupWorkValuesPacket.cs | 4 +-- .../Send/Subpackets/SendMessagePacket.cs | 2 +- .../Packets/Send/_0x2Packet.cs | 2 +- .../Packets/Send/_0x7Packet.cs | 2 +- .../Packets/Send/_0x8PingPacket.cs | 2 +- .../Packets/WorldPackets/Send/ErrorPacket.cs | 2 +- .../Send/Group/PartySyncPacket.cs | 2 +- .../WorldPackets/Send/SessionBeginPacket.cs | 2 +- .../WorldPackets/Send/SessionEndPacket.cs | 4 +-- FFXIVClassic World Server/Server.cs | 2 +- FFXIVClassic World Server/WorldMaster.cs | 14 ++++---- 33 files changed, 83 insertions(+), 83 deletions(-) diff --git a/FFXIVClassic Map Server/actors/Actor.cs b/FFXIVClassic Map Server/actors/Actor.cs index 6361199d..a7d87166 100644 --- a/FFXIVClassic Map Server/actors/Actor.cs +++ b/FFXIVClassic Map Server/actors/Actor.cs @@ -321,9 +321,8 @@ namespace FFXIVClassic_Map_Server.Actors public void ChangeState(ushort newState) { currentMainState = newState; - SubPacket ChangeStatePacket = SetActorStatePacket.BuildPacket(actorId, newState, currentSubState); - //TODO: Fill this out! - SubPacket battleActionPacket = BattleActionX01Packet.BuildPacket(actorId, actorId, actorId, 0, 0, 0, 0, 0, 0); + SubPacket ChangeStatePacket = SetActorStatePacket.BuildPacket(actorId, newState, currentSubState); + SubPacket battleActionPacket = BattleActionX01Packet.BuildPacket(actorId, actorId, actorId, 0x72000062, 1, 0, 0x05209, 0, 0); zone.BroadcastPacketAroundActor(this, ChangeStatePacket); zone.BroadcastPacketAroundActor(this, battleActionPacket); } diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs index 28f5ef29..c172791e 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/BattleActionX01Packet.cs @@ -2,8 +2,6 @@ using System; using System.IO; -using FFXIVClassic.Common; - namespace FFXIVClassic_Map_Server.packets.send.actor.battle { class BattleActionX01Packet diff --git a/FFXIVClassic World Server/DataObjects/ClientConnection.cs b/FFXIVClassic World Server/DataObjects/ClientConnection.cs index 282dd52f..928506b6 100644 --- a/FFXIVClassic World Server/DataObjects/ClientConnection.cs +++ b/FFXIVClassic World Server/DataObjects/ClientConnection.cs @@ -23,8 +23,11 @@ namespace FFXIVClassic_World_Server SendPacketQueue.Add(packet); } - public void QueuePacket(SubPacket subpacket, bool isAuthed, bool isEncrypted) + public void QueuePacket(SubPacket subpacket) { + bool isAuthed = true; + bool isEncrypted = false; + subpacket.SetTargetId(owner.sessionId); SendPacketQueue.Add(BasePacket.CreatePacket(subpacket, isAuthed, isEncrypted)); } diff --git a/FFXIVClassic World Server/DataObjects/Group/Group.cs b/FFXIVClassic World Server/DataObjects/Group/Group.cs index 2cef6f9e..a60de10a 100644 --- a/FFXIVClassic World Server/DataObjects/Group/Group.cs +++ b/FFXIVClassic World Server/DataObjects/Group/Group.cs @@ -97,33 +97,33 @@ namespace FFXIVClassic_World_Server.DataObjects.Group ulong time = Utils.MilisUnixTimeStampUTC(); List members = BuildMemberList(session.sessionId); - session.clientConnection.QueuePacket(GroupHeaderPacket.buildPacket(session.sessionId, session.currentZoneId, time, this), true, false); - session.clientConnection.QueuePacket(GroupMembersBeginPacket.buildPacket(session.sessionId, session.currentZoneId, time, this), true, false); + session.clientConnection.QueuePacket(GroupHeaderPacket.buildPacket(session.sessionId, session.currentZoneId, time, this)); + session.clientConnection.QueuePacket(GroupMembersBeginPacket.buildPacket(session.sessionId, session.currentZoneId, time, this)); int currentIndex = 0; while (true) { if (GetMemberCount() - currentIndex >= 64) - session.clientConnection.QueuePacket(GroupMembersX64Packet.buildPacket(session.sessionId, session.currentZoneId, time, members, ref currentIndex), true, false); + session.clientConnection.QueuePacket(GroupMembersX64Packet.buildPacket(session.sessionId, session.currentZoneId, time, members, ref currentIndex)); else if (GetMemberCount() - currentIndex >= 32) - session.clientConnection.QueuePacket(GroupMembersX32Packet.buildPacket(session.sessionId, session.currentZoneId, time, members, ref currentIndex), true, false); + session.clientConnection.QueuePacket(GroupMembersX32Packet.buildPacket(session.sessionId, session.currentZoneId, time, members, ref currentIndex)); else if (GetMemberCount() - currentIndex >= 16) - session.clientConnection.QueuePacket(GroupMembersX16Packet.buildPacket(session.sessionId, session.currentZoneId, time, members, ref currentIndex), true, false); + session.clientConnection.QueuePacket(GroupMembersX16Packet.buildPacket(session.sessionId, session.currentZoneId, time, members, ref currentIndex)); else if (GetMemberCount() - currentIndex > 0) - session.clientConnection.QueuePacket(GroupMembersX08Packet.buildPacket(session.sessionId, session.currentZoneId, time, members, ref currentIndex), true, false); + session.clientConnection.QueuePacket(GroupMembersX08Packet.buildPacket(session.sessionId, session.currentZoneId, time, members, ref currentIndex)); else break; } - session.clientConnection.QueuePacket(GroupMembersEndPacket.buildPacket(session.sessionId, session.currentZoneId, time, this), true, false); + session.clientConnection.QueuePacket(GroupMembersEndPacket.buildPacket(session.sessionId, session.currentZoneId, time, this)); } public void SendDeletePacket(Session session) { if (session != null) - session.clientConnection.QueuePacket(DeleteGroupPacket.buildPacket(session.sessionId, this), true, false); + session.clientConnection.QueuePacket(DeleteGroupPacket.buildPacket(session.sessionId, this)); } public virtual void SendInitWorkValues(Session session) diff --git a/FFXIVClassic World Server/DataObjects/Group/Linkshell.cs b/FFXIVClassic World Server/DataObjects/Group/Linkshell.cs index 27748ab7..a49178dc 100644 --- a/FFXIVClassic World Server/DataObjects/Group/Linkshell.cs +++ b/FFXIVClassic World Server/DataObjects/Group/Linkshell.cs @@ -120,9 +120,9 @@ namespace FFXIVClassic_World_Server.DataObjects.Group } groupWork.setTarget("/_init"); - SubPacket test = groupWork.buildPacket(session.sessionId, session.sessionId); + SubPacket test = groupWork.buildPacket(session.sessionId); test.DebugPrintSubPacket(); - session.clientConnection.QueuePacket(test, true, false); + session.clientConnection.QueuePacket(test); } public void ResendWorkValues() @@ -148,8 +148,8 @@ namespace FFXIVClassic_World_Server.DataObjects.Group Session session = Server.GetServer().GetSession(members[i].charaId); if (session != null) { - SubPacket test = groupWork.buildPacket(session.sessionId, session.sessionId); - session.clientConnection.QueuePacket(test, true, false); + SubPacket test = groupWork.buildPacket(session.sessionId); + session.clientConnection.QueuePacket(test); } } } diff --git a/FFXIVClassic World Server/DataObjects/Group/Party.cs b/FFXIVClassic World Server/DataObjects/Group/Party.cs index 7fc1a9eb..da7e4ea4 100644 --- a/FFXIVClassic World Server/DataObjects/Group/Party.cs +++ b/FFXIVClassic World Server/DataObjects/Group/Party.cs @@ -189,7 +189,7 @@ namespace FFXIVClassic_World_Server.DataObjects.Group if (session == null) continue; else - session.clientConnection.QueuePacket(leaderUpdate.buildPacket(session.sessionId, session.sessionId), true, false); + session.clientConnection.QueuePacket(leaderUpdate.buildPacket(session.sessionId)); } } @@ -226,8 +226,8 @@ namespace FFXIVClassic_World_Server.DataObjects.Group groupWork.addProperty(this, "partyGroupWork._globalTemp.owner"); groupWork.setTarget("/_init"); - SubPacket test = groupWork.buildPacket(session.sessionId, session.sessionId); - session.clientConnection.QueuePacket(test, true, false); + SubPacket test = groupWork.buildPacket(session.sessionId); + session.clientConnection.QueuePacket(test); test.DebugPrintSubPacket(); } diff --git a/FFXIVClassic World Server/DataObjects/Group/Relation.cs b/FFXIVClassic World Server/DataObjects/Group/Relation.cs index 8564ee8a..f38727c3 100644 --- a/FFXIVClassic World Server/DataObjects/Group/Relation.cs +++ b/FFXIVClassic World Server/DataObjects/Group/Relation.cs @@ -66,9 +66,9 @@ namespace FFXIVClassic_World_Server.DataObjects.Group groupWork.addProperty(this, "work._globalTemp.variableCommand"); groupWork.setTarget("/_init"); - SubPacket test = groupWork.buildPacket(session.sessionId, session.sessionId); + SubPacket test = groupWork.buildPacket(session.sessionId); test.DebugPrintSubPacket(); - session.clientConnection.QueuePacket(test, true, false); + session.clientConnection.QueuePacket(test); } } diff --git a/FFXIVClassic World Server/DataObjects/Group/RetainerGroup.cs b/FFXIVClassic World Server/DataObjects/Group/RetainerGroup.cs index bf440579..bfe5c69f 100644 --- a/FFXIVClassic World Server/DataObjects/Group/RetainerGroup.cs +++ b/FFXIVClassic World Server/DataObjects/Group/RetainerGroup.cs @@ -49,8 +49,8 @@ namespace FFXIVClassic_World_Server.DataObjects.Group groupWork.setTarget("/_init"); - SubPacket test = groupWork.buildPacket(session.sessionId, session.sessionId); - session.clientConnection.QueuePacket(test, true, false); + SubPacket test = groupWork.buildPacket(session.sessionId); + session.clientConnection.QueuePacket(test); } public override int GetMemberCount() diff --git a/FFXIVClassic World Server/DataObjects/Session.cs b/FFXIVClassic World Server/DataObjects/Session.cs index 966d3248..0358c9e5 100644 --- a/FFXIVClassic World Server/DataObjects/Session.cs +++ b/FFXIVClassic World Server/DataObjects/Session.cs @@ -38,34 +38,34 @@ namespace FFXIVClassic_World_Server.DataObjects { if (msgParams == null || msgParams.Length == 0) { - clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, sessionId, actorId, 0x5FF80001, textId, log), true, false); + clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, actorId, 0x5FF80001, textId, log)); } else - clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, sessionId, actorId, 0x5FF80001, textId, log, LuaUtils.CreateLuaParamList(msgParams)), true, false); + clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, actorId, 0x5FF80001, textId, log, LuaUtils.CreateLuaParamList(msgParams))); } public void SendGameMessage( ushort textId, byte log, params object[] msgParams) { if (msgParams == null || msgParams.Length == 0) - clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, sessionId, 0x5FF80001, textId, log), true, false); + clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, 0x5FF80001, textId, log)); else - clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, sessionId, 0x5FF80001, textId, log, LuaUtils.CreateLuaParamList(msgParams)), true, false); + clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, 0x5FF80001, textId, log, LuaUtils.CreateLuaParamList(msgParams))); } public void SendGameMessage( ushort textId, byte log, string customSender, params object[] msgParams) { if (msgParams == null || msgParams.Length == 0) - clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, sessionId, 0x5FF80001, textId, customSender, log), true, false); + clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, 0x5FF80001, textId, customSender, log)); else - clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, sessionId, 0x5FF80001, textId, customSender, log, LuaUtils.CreateLuaParamList(msgParams)), true, false); + clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, 0x5FF80001, textId, customSender, log, LuaUtils.CreateLuaParamList(msgParams))); } public void SendGameMessage(ushort textId, byte log, uint displayId, params object[] msgParams) { if (msgParams == null || msgParams.Length == 0) - clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, sessionId, 0x5FF80001, textId, displayId, log), true, false); + clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, 0x5FF80001, textId, displayId, log)); else - clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, sessionId, 0x5FF80001, textId, displayId, log, LuaUtils.CreateLuaParamList(msgParams)), true, false); + clientConnection.QueuePacket(GameMessagePacket.BuildPacket(0x5FF80001, 0x5FF80001, textId, displayId, log, LuaUtils.CreateLuaParamList(msgParams))); } diff --git a/FFXIVClassic World Server/PacketProcessor.cs b/FFXIVClassic World Server/PacketProcessor.cs index 3049cdf5..abf41fd6 100644 --- a/FFXIVClassic World Server/PacketProcessor.cs +++ b/FFXIVClassic World Server/PacketProcessor.cs @@ -61,8 +61,8 @@ namespace FFXIVClassic_World_Server else if (packet.header.connectionType == BasePacket.TYPE_CHAT) mServer.AddSession(client, Session.Channel.CHAT, hello.sessionId); - client.QueuePacket(_0x7Packet.BuildPacket(0x0E016EE5), true, false); - client.QueuePacket(_0x2Packet.BuildPacket(hello.sessionId), true, false); + client.QueuePacket(_0x7Packet.BuildPacket(0x0E016EE5)); + client.QueuePacket(_0x2Packet.BuildPacket(hello.sessionId)); } //Ping from World Server else if (subpacket.header.type == 0x07) @@ -162,7 +162,7 @@ namespace FFXIVClassic_World_Server Session thatSession = mServer.GetSession(playerParty.members[i]); if (thatSession != null && !session.Equals(thatSession)) { - thatSession.clientConnection.QueuePacket(SendMessagePacket.BuildPacket(session.sessionId, thatSession.sessionId, SendMessagePacket.MESSAGE_TYPE_PARTY, mServer.GetNameForId(session.sessionId), partyChatMessagePacket.message), true, false); + thatSession.clientConnection.QueuePacket(SendMessagePacket.BuildPacket(session.sessionId, thatSession.sessionId, SendMessagePacket.MESSAGE_TYPE_PARTY, mServer.GetNameForId(session.sessionId), partyChatMessagePacket.message)); } } break; @@ -173,7 +173,7 @@ namespace FFXIVClassic_World_Server case 0x133: GroupCreatedPacket groupCreatedPacket = new GroupCreatedPacket(subpacket.data); if (!mServer.GetWorldManager().SendGroupInit(session, groupCreatedPacket.groupId)) - session.clientConnection.QueuePacket(subpacket, true, false); + session.clientConnection.QueuePacket(subpacket); break; } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/GameMessagePacket.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/GameMessagePacket.cs index 9f27c67d..6a049e5a 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/GameMessagePacket.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/GameMessagePacket.cs @@ -58,7 +58,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets private const ushort SIZE_GAMEMESSAGE_WITHOUT_ACTOR4 = 0x48; private const ushort SIZE_GAMEMESSAGE_WITHOUT_ACTOR5 = 0x68; - public static SubPacket BuildPacket(uint sourceId, uint targetId, uint actorId, uint textOwnerActorId, ushort textId, byte log) + public static SubPacket BuildPacket(uint sourceId, uint actorId, uint textOwnerActorId, ushort textId, byte log) { byte[] data = new byte[SIZE_GAMEMESSAGE_WITH_ACTOR1 - 0x20]; @@ -73,10 +73,10 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets } } - return new SubPacket(OPCODE_GAMEMESSAGE_WITH_ACTOR1, sourceId, targetId, data); + return new SubPacket(OPCODE_GAMEMESSAGE_WITH_ACTOR1, sourceId, data); } - public static SubPacket BuildPacket(uint sourceId, uint targetId, uint actorId, uint textOwnerActorId, ushort textId, byte log, List lParams) + public static SubPacket BuildPacket(uint sourceId, uint actorId, uint textOwnerActorId, ushort textId, byte log, List lParams) { int lParamsSize = findSizeOfParams(lParams); byte[] data; @@ -121,10 +121,10 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets } } - return new SubPacket(opcode, sourceId, targetId, data); + return new SubPacket(opcode, sourceId, data); } - public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, string sender, byte log) + public static SubPacket BuildPacket(uint sourceId, uint textOwnerActorId, ushort textId, string sender, byte log) { byte[] data = new byte[SIZE_GAMEMESSAGE_WITH_CUSTOM_SENDER1 - 0x20]; @@ -139,10 +139,10 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets } } - return new SubPacket(OPCODE_GAMEMESSAGE_WITH_CUSTOM_SENDER1, sourceId, targetId, data); + return new SubPacket(OPCODE_GAMEMESSAGE_WITH_CUSTOM_SENDER1, sourceId, data); } - public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, string sender, byte log, List lParams) + public static SubPacket BuildPacket(uint sourceId, uint textOwnerActorId, ushort textId, string sender, byte log, List lParams) { int lParamsSize = findSizeOfParams(lParams); byte[] data; @@ -187,10 +187,10 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets } } - return new SubPacket(opcode, sourceId, targetId, data); + return new SubPacket(opcode, sourceId, data); } - public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log) + public static SubPacket BuildPacket(uint sourceId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log) { byte[] data = new byte[SIZE_GAMEMESSAGE_WITH_DISPID_SENDER1 - 0x20]; @@ -205,10 +205,10 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets } } - return new SubPacket(OPCODE_GAMEMESSAGE_WITH_DISPID_SENDER1, sourceId, targetId, data); + return new SubPacket(OPCODE_GAMEMESSAGE_WITH_DISPID_SENDER1, sourceId, data); } - public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log, List lParams) + public static SubPacket BuildPacket(uint sourceId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log, List lParams) { int lParamsSize = findSizeOfParams(lParams); byte[] data; @@ -253,10 +253,10 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets } } - return new SubPacket(opcode, sourceId, targetId, data); + return new SubPacket(opcode, sourceId, data); } - public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, byte log) + public static SubPacket BuildPacket(uint sourceId, uint textOwnerActorId, ushort textId, byte log) { byte[] data = new byte[SIZE_GAMEMESSAGE_WITHOUT_ACTOR1 - 0x20]; @@ -270,10 +270,10 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets } } - return new SubPacket(OPCODE_GAMEMESSAGE_WITHOUT_ACTOR1, sourceId, targetId, data); + return new SubPacket(OPCODE_GAMEMESSAGE_WITHOUT_ACTOR1, sourceId, data); } - public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, byte log, List lParams) + public static SubPacket BuildPacket(uint sourceId, uint textOwnerActorId, ushort textId, byte log, List lParams) { int lParamsSize = findSizeOfParams(lParams); byte[] data; @@ -317,7 +317,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets } } - return new SubPacket(opcode, sourceId, targetId, data); + return new SubPacket(opcode, sourceId, data); } private static int findSizeOfParams(List lParams) diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/CreateNamedGroup.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/CreateNamedGroup.cs index 0e883163..9081283d 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/CreateNamedGroup.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/CreateNamedGroup.cs @@ -35,7 +35,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, sessionId, sessionId, data); + return new SubPacket(OPCODE, sessionId, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/CreateNamedGroupMultiple.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/CreateNamedGroupMultiple.cs index c6a5f7e8..98d9ad13 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/CreateNamedGroupMultiple.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/CreateNamedGroupMultiple.cs @@ -49,7 +49,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, playerActorID, playerActorID, data); + return new SubPacket(OPCODE, playerActorID, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/DeleteGroupPacket.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/DeleteGroupPacket.cs index 1d1f7fe9..d661ae52 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/DeleteGroupPacket.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/DeleteGroupPacket.cs @@ -38,7 +38,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, sessionId, sessionId, data); + return new SubPacket(OPCODE, sessionId, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupHeaderPacket.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupHeaderPacket.cs index d1d46a3a..c28fe084 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupHeaderPacket.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupHeaderPacket.cs @@ -56,7 +56,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, playerActorID, playerActorID, data); + return new SubPacket(OPCODE, playerActorID, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersBeginPacket.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersBeginPacket.cs index 5717d77b..46f15905 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersBeginPacket.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersBeginPacket.cs @@ -31,7 +31,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, playerActorID, playerActorID, data); + return new SubPacket(OPCODE, playerActorID, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersEndPacket.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersEndPacket.cs index f3ed55e8..3d095b8b 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersEndPacket.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersEndPacket.cs @@ -31,7 +31,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, sessionId, sessionId, data); + return new SubPacket(OPCODE, sessionId, data); } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX08Packet.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX08Packet.cs index abc6e747..734e843c 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX08Packet.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX08Packet.cs @@ -48,7 +48,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, playerActorID, playerActorID, data); + return new SubPacket(OPCODE, playerActorID, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX16Packet.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX16Packet.cs index 6a12581c..f3181570 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX16Packet.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX16Packet.cs @@ -45,7 +45,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, playerActorID, playerActorID, data); + return new SubPacket(OPCODE, playerActorID, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX32Packet.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX32Packet.cs index 1453353b..f6669f08 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX32Packet.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX32Packet.cs @@ -45,7 +45,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, playerActorID, playerActorID, data); + return new SubPacket(OPCODE, playerActorID, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX64Packet.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX64Packet.cs index 6787c1fa..5a18d0cd 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX64Packet.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/GroupMembersX64Packet.cs @@ -45,7 +45,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, playerActorID, playerActorID, data); + return new SubPacket(OPCODE, playerActorID, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/SetActiveLinkshellPacket.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/SetActiveLinkshellPacket.cs index 8c21a21b..d387a029 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/SetActiveLinkshellPacket.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/SetActiveLinkshellPacket.cs @@ -36,7 +36,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } } - return new SubPacket(OPCODE, sessionId, sessionId, data); + return new SubPacket(OPCODE, sessionId, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/SynchGroupWorkValuesPacket.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/SynchGroupWorkValuesPacket.cs index 3ff485d3..57f100cf 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/SynchGroupWorkValuesPacket.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/Groups/SynchGroupWorkValuesPacket.cs @@ -195,14 +195,14 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups } - public SubPacket buildPacket(uint playerActorID, uint actorID) + public SubPacket buildPacket(uint playerActorID) { binWriter.Seek(0x8, SeekOrigin.Begin); binWriter.Write((byte)runningByteTotal); closeStreams(); - SubPacket packet = new SubPacket(OPCODE, playerActorID, actorID, data); + SubPacket packet = new SubPacket(OPCODE, playerActorID, data); return packet; } diff --git a/FFXIVClassic World Server/Packets/Send/Subpackets/SendMessagePacket.cs b/FFXIVClassic World Server/Packets/Send/Subpackets/SendMessagePacket.cs index 1830f50e..55127d65 100644 --- a/FFXIVClassic World Server/Packets/Send/Subpackets/SendMessagePacket.cs +++ b/FFXIVClassic World Server/Packets/Send/Subpackets/SendMessagePacket.cs @@ -51,7 +51,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets } } - return new SubPacket(OPCODE, playerActorID, targetID, data); + return new SubPacket(OPCODE, playerActorID, data); } } diff --git a/FFXIVClassic World Server/Packets/Send/_0x2Packet.cs b/FFXIVClassic World Server/Packets/Send/_0x2Packet.cs index 7ded2ec9..1fc6ef98 100644 --- a/FFXIVClassic World Server/Packets/Send/_0x2Packet.cs +++ b/FFXIVClassic World Server/Packets/Send/_0x2Packet.cs @@ -41,7 +41,7 @@ namespace FFXIVClassic_World_Server.Packets.Send 0xB8, 0x8D, 0xF0, 0x2B, 0x88, 0xAF, 0x5E, 0x26 */ - return new SubPacket(false, OPCODE, 0, 0, data); + return new SubPacket(false, OPCODE, 0, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/_0x7Packet.cs b/FFXIVClassic World Server/Packets/Send/_0x7Packet.cs index f0854229..f7d6d452 100644 --- a/FFXIVClassic World Server/Packets/Send/_0x7Packet.cs +++ b/FFXIVClassic World Server/Packets/Send/_0x7Packet.cs @@ -31,7 +31,7 @@ namespace FFXIVClassic_World_Server.Packets.Send } } - return new SubPacket(false, OPCODE, 0, 0, data); + return new SubPacket(false, OPCODE, 0, data); } } } diff --git a/FFXIVClassic World Server/Packets/Send/_0x8PingPacket.cs b/FFXIVClassic World Server/Packets/Send/_0x8PingPacket.cs index 21061c7e..3b18b3b7 100644 --- a/FFXIVClassic World Server/Packets/Send/_0x8PingPacket.cs +++ b/FFXIVClassic World Server/Packets/Send/_0x8PingPacket.cs @@ -27,7 +27,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Login } } - return new SubPacket(false, OPCODE, 0, 0, data); + return new SubPacket(false, OPCODE, 0, data); } } } diff --git a/FFXIVClassic World Server/Packets/WorldPackets/Send/ErrorPacket.cs b/FFXIVClassic World Server/Packets/WorldPackets/Send/ErrorPacket.cs index 2a7d4c4f..5b8fe43a 100644 --- a/FFXIVClassic World Server/Packets/WorldPackets/Send/ErrorPacket.cs +++ b/FFXIVClassic World Server/Packets/WorldPackets/Send/ErrorPacket.cs @@ -31,7 +31,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send } } - return new SubPacket(true, OPCODE, 0, session.sessionId, data); + return new SubPacket(true, OPCODE, 0, data); } } } diff --git a/FFXIVClassic World Server/Packets/WorldPackets/Send/Group/PartySyncPacket.cs b/FFXIVClassic World Server/Packets/WorldPackets/Send/Group/PartySyncPacket.cs index a142e461..5d60db34 100644 --- a/FFXIVClassic World Server/Packets/WorldPackets/Send/Group/PartySyncPacket.cs +++ b/FFXIVClassic World Server/Packets/WorldPackets/Send/Group/PartySyncPacket.cs @@ -27,7 +27,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send.Group } } - return new SubPacket(true, OPCODE, 0, session.sessionId, data); + return new SubPacket(true, OPCODE, 0, data); } } } diff --git a/FFXIVClassic World Server/Packets/WorldPackets/Send/SessionBeginPacket.cs b/FFXIVClassic World Server/Packets/WorldPackets/Send/SessionBeginPacket.cs index d77a1634..2d462ce2 100644 --- a/FFXIVClassic World Server/Packets/WorldPackets/Send/SessionBeginPacket.cs +++ b/FFXIVClassic World Server/Packets/WorldPackets/Send/SessionBeginPacket.cs @@ -29,7 +29,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send } } - return new SubPacket(true, OPCODE, 0, session.sessionId, data); + return new SubPacket(true, OPCODE, 0, data); } } } diff --git a/FFXIVClassic World Server/Packets/WorldPackets/Send/SessionEndPacket.cs b/FFXIVClassic World Server/Packets/WorldPackets/Send/SessionEndPacket.cs index 868f65bd..ac0b6573 100644 --- a/FFXIVClassic World Server/Packets/WorldPackets/Send/SessionEndPacket.cs +++ b/FFXIVClassic World Server/Packets/WorldPackets/Send/SessionEndPacket.cs @@ -31,7 +31,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send } } - return new SubPacket(true, OPCODE, 0, session.sessionId, data); + return new SubPacket(true, OPCODE, 0, data); } public static SubPacket BuildPacket(Session session, uint destinationZoneId, string destinationPrivateArea, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation) @@ -57,7 +57,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send } } - return new SubPacket(true, OPCODE, 0, session.sessionId, data); + return new SubPacket(true, OPCODE, 0, data); } } } diff --git a/FFXIVClassic World Server/Server.cs b/FFXIVClassic World Server/Server.cs index 884d2618..ea072af8 100644 --- a/FFXIVClassic World Server/Server.cs +++ b/FFXIVClassic World Server/Server.cs @@ -337,7 +337,7 @@ namespace FFXIVClassic_World_Server else if (mZoneSessionList.ContainsKey(sessionId)) { ClientConnection conn = mZoneSessionList[sessionId].clientConnection; - conn.QueuePacket(subpacket, true, false); + conn.QueuePacket(subpacket); conn.FlushQueuedSendPackets(); } diff --git a/FFXIVClassic World Server/WorldMaster.cs b/FFXIVClassic World Server/WorldMaster.cs index 01cdddab..58948af3 100644 --- a/FFXIVClassic World Server/WorldMaster.cs +++ b/FFXIVClassic World Server/WorldMaster.cs @@ -237,15 +237,15 @@ namespace FFXIVClassic_World_Server } } SubPacket activeLsPacket = SetActiveLinkshellPacket.BuildPacket(session.sessionId, activeGroupIndex); - session.clientConnection.QueuePacket(activeLsPacket, true, false); + session.clientConnection.QueuePacket(activeLsPacket); } private void SendMotD(Session session) { - session.clientConnection.QueuePacket(SendMessagePacket.BuildPacket(session.sessionId, session.sessionId, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", "-------- Login Message --------"), true, false); - session.clientConnection.QueuePacket(SendMessagePacket.BuildPacket(session.sessionId, session.sessionId, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", String.Format("Welcome to {0}!", ConfigConstants.PREF_SERVERNAME)), true, false); - session.clientConnection.QueuePacket(SendMessagePacket.BuildPacket(session.sessionId, session.sessionId, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", "Welcome to Eorzea!"), true, false); - session.clientConnection.QueuePacket(SendMessagePacket.BuildPacket(session.sessionId, session.sessionId, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", "Here is a test Message of the Day from the World Server!"), true, false); + session.clientConnection.QueuePacket(SendMessagePacket.BuildPacket(session.sessionId, session.sessionId, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", "-------- Login Message --------")); + session.clientConnection.QueuePacket(SendMessagePacket.BuildPacket(session.sessionId, session.sessionId, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", String.Format("Welcome to {0}!", ConfigConstants.PREF_SERVERNAME))); + session.clientConnection.QueuePacket(SendMessagePacket.BuildPacket(session.sessionId, session.sessionId, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", "Welcome to Eorzea!")); + session.clientConnection.QueuePacket(SendMessagePacket.BuildPacket(session.sessionId, session.sessionId, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", "Here is a test Message of the Day from the World Server!")); } public void SendPartySync(Party party) @@ -433,7 +433,7 @@ namespace FFXIVClassic_World_Server { requestSession.SetActiveLS(lsName); SubPacket activeLsPacket = SetActiveLinkshellPacket.BuildPacket(requestSession.sessionId, 0); - requestSession.clientConnection.QueuePacket(activeLsPacket, true, false); + requestSession.clientConnection.QueuePacket(activeLsPacket); requestSession.SendGameMessage(25132, 0x20, (object)1); } else @@ -448,7 +448,7 @@ namespace FFXIVClassic_World_Server { requestSession.SetActiveLS(lsName); SubPacket activeLsPacket = SetActiveLinkshellPacket.BuildPacket(requestSession.sessionId, ls.groupIndex); - requestSession.clientConnection.QueuePacket(activeLsPacket, true, false); + requestSession.clientConnection.QueuePacket(activeLsPacket); requestSession.SendGameMessage(25131, 0x20, (object)1, (object)lsName); } }