mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Refactored world server.
This commit is contained in:
@@ -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<LuaParam> lParams)
|
||||
public static SubPacket BuildPacket(uint sourceId, uint actorId, uint textOwnerActorId, ushort textId, byte log, List<LuaParam> 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<LuaParam> lParams)
|
||||
public static SubPacket BuildPacket(uint sourceId, uint textOwnerActorId, ushort textId, string sender, byte log, List<LuaParam> 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<LuaParam> lParams)
|
||||
public static SubPacket BuildPacket(uint sourceId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log, List<LuaParam> 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<LuaParam> lParams)
|
||||
public static SubPacket BuildPacket(uint sourceId, uint textOwnerActorId, ushort textId, byte log, List<LuaParam> 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<LuaParam> lParams)
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -51,7 +51,7 @@ namespace FFXIVClassic_World_Server.Packets.Send.Subpackets
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, playerActorID, targetID, data);
|
||||
return new SubPacket(OPCODE, playerActorID, data);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user