mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
mass replaced all methods to pascal case
This commit is contained in:
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x00E1;
|
||||
public const uint PACKET_SIZE = 0x30;
|
||||
|
||||
public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, uint targettedActorId, uint emoteID)
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, uint targettedActorId, uint emoteID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
}
|
||||
|
||||
SubPacket packet = new SubPacket(OPCODE, sourceActorId, targetActorId, data);
|
||||
packet.debugPrintSubPacket();
|
||||
packet.DebugPrintSubPacket();
|
||||
return packet;
|
||||
}
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x00CC;
|
||||
public const uint PACKET_SIZE = 0x128;
|
||||
|
||||
public static SubPacket buildPacket(uint sourceActorID, uint targetActorID, string objectName, string className, List<LuaParam> initParams)
|
||||
public static SubPacket BuildPacket(uint sourceActorID, uint targetActorID, string objectName, string className, List<LuaParam> initParams)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
binWriter.BaseStream.Seek(0x24, SeekOrigin.Begin);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(className), 0, Encoding.ASCII.GetByteCount(className) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(className));
|
||||
binWriter.BaseStream.Seek(0x44, SeekOrigin.Begin);
|
||||
LuaUtils.writeLuaParams(binWriter, initParams);
|
||||
LuaUtils.WriteLuaParams(binWriter, initParams);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x00E3;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, int iconCode)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, int iconCode)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
public const ushort OPCODE = 0x00CA;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint actorID, byte val)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint actorID, byte val)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE-0x20];
|
||||
data[0] = val; //Why?
|
||||
|
@@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x0139;
|
||||
public const uint PACKET_SIZE = 0x58;
|
||||
|
||||
public static SubPacket buildPacket(uint sourceId, uint targetId)
|
||||
public static SubPacket BuildPacket(uint sourceId, uint targetId)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
public const ushort OPCODE = 0x0007;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID)
|
||||
public static SubPacket BuildPacket(uint playerActorID)
|
||||
{
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, new byte[8]);
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x00CF;
|
||||
public const uint PACKET_SIZE = 0x50;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, float x, float y, float z, float rot, ushort moveState)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, float x, float y, float z, float rot, ushort moveState)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x00CB;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint actorId)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint actorId)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -51,7 +51,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
appearanceIDs = appearanceTable;
|
||||
}
|
||||
|
||||
public SubPacket buildPacket(uint playerActorID, uint actorID)
|
||||
public SubPacket BuildPacket(uint playerActorID, uint actorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -12,7 +12,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x0145;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint iconCode)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, uint iconCode)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x144;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetID, uint idleAnimationId)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetID, uint idleAnimationId)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
public const ushort OPCODE = 0x017B;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, bool isDimmed)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, bool isDimmed)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
data[0] = (byte)(isDimmed ? 1 : 0);
|
||||
|
@@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x013D;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint displayNameID, string customName)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, uint displayNameID, string customName)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -22,7 +22,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const float INNPOS_Z = 165.050003f;
|
||||
public const float INNPOS_ROT = -1.530000f;
|
||||
|
||||
public static SubPacket buildPacket(uint sourceActorID, uint targetActorID, uint actorId, float x, float y, float z, float rotation, uint spawnType, bool isZoningPlayer)
|
||||
public static SubPacket BuildPacket(uint sourceActorID, uint targetActorID, uint actorId, float x, float y, float z, float rotation, uint spawnType, bool isZoningPlayer)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE-0x20];
|
||||
|
||||
|
@@ -34,13 +34,13 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
currentTarget = startingTarget;
|
||||
}
|
||||
|
||||
public void closeStreams()
|
||||
public void CloseStreams()
|
||||
{
|
||||
binWriter.Dispose();
|
||||
mem.Dispose();
|
||||
}
|
||||
|
||||
public bool addByte(uint id, byte value)
|
||||
public bool AddByte(uint id, byte value)
|
||||
{
|
||||
if (runningByteTotal + 6 + (1 + Encoding.ASCII.GetByteCount(currentTarget)) > MAXBYTES)
|
||||
return false;
|
||||
@@ -53,7 +53,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool addShort(uint id, ushort value)
|
||||
public bool AddShort(uint id, ushort value)
|
||||
{
|
||||
if (runningByteTotal + 7 + (1 + Encoding.ASCII.GetByteCount(currentTarget)) > MAXBYTES)
|
||||
return false;
|
||||
@@ -66,7 +66,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool addInt(uint id, uint value)
|
||||
public bool AddInt(uint id, uint value)
|
||||
{
|
||||
if (runningByteTotal + 9 + (1 + Encoding.ASCII.GetByteCount(currentTarget)) > MAXBYTES)
|
||||
return false;
|
||||
@@ -79,7 +79,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool addBuffer(uint id, byte[] buffer)
|
||||
public bool AddBuffer(uint id, byte[] buffer)
|
||||
{
|
||||
if (runningByteTotal + 5 + buffer.Length + (1 + Encoding.ASCII.GetByteCount(currentTarget)) > MAXBYTES)
|
||||
return false;
|
||||
@@ -92,7 +92,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool addBuffer(uint id, byte[] buffer, int index, int length, int page)
|
||||
public bool AddBuffer(uint id, byte[] buffer, int index, int length, int page)
|
||||
{
|
||||
if (runningByteTotal + 5 + length + (1 + Encoding.ASCII.GetByteCount(currentTarget)) > MAXBYTES)
|
||||
return false;
|
||||
@@ -106,7 +106,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool addProperty(FFXIVClassic_Map_Server.Actors.Actor actor, string name)
|
||||
public bool AddProperty(FFXIVClassic_Map_Server.Actors.Actor actor, string name)
|
||||
{
|
||||
string[] split = name.Split('.');
|
||||
int arrayIndex = 0;
|
||||
@@ -151,43 +151,43 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
if (curObj == null)
|
||||
return false;
|
||||
|
||||
//Cast to the proper object and add to packet
|
||||
//Cast to the proper object and Add to packet
|
||||
uint id = Utils.MurmurHash2(name, 0);
|
||||
if (curObj is bool)
|
||||
return addByte(id, (byte)(((bool)curObj) ? 1 : 0));
|
||||
return AddByte(id, (byte)(((bool)curObj) ? 1 : 0));
|
||||
else if (curObj is byte)
|
||||
return addByte(id, (byte)curObj);
|
||||
return AddByte(id, (byte)curObj);
|
||||
else if (curObj is ushort)
|
||||
return addShort(id, (ushort)curObj);
|
||||
return AddShort(id, (ushort)curObj);
|
||||
else if (curObj is short)
|
||||
return addShort(id, (ushort)(short)curObj);
|
||||
return AddShort(id, (ushort)(short)curObj);
|
||||
else if (curObj is uint)
|
||||
return addInt(id, (uint)curObj);
|
||||
return AddInt(id, (uint)curObj);
|
||||
else if (curObj is int)
|
||||
return addInt(id, (uint)(int)curObj);
|
||||
return AddInt(id, (uint)(int)curObj);
|
||||
else if (curObj is float)
|
||||
return addBuffer(id, BitConverter.GetBytes((float)curObj));
|
||||
return AddBuffer(id, BitConverter.GetBytes((float)curObj));
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void setIsArrayMode(bool flag)
|
||||
public void SetIsArrayMode(bool flag)
|
||||
{
|
||||
isArrayMode = flag;
|
||||
}
|
||||
|
||||
public void setIsMore(bool flag)
|
||||
public void SetIsMore(bool flag)
|
||||
{
|
||||
isMore = flag;
|
||||
}
|
||||
|
||||
public void setTarget(string target)
|
||||
public void SetTarget(string target)
|
||||
{
|
||||
currentTarget = target;
|
||||
}
|
||||
|
||||
public void addTarget()
|
||||
public void AddTarget()
|
||||
{
|
||||
if (isArrayMode)
|
||||
binWriter.Write((byte)(0xA4 + currentTarget.Length));
|
||||
@@ -197,7 +197,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
runningByteTotal += (ushort)(1 + Encoding.ASCII.GetByteCount(currentTarget));
|
||||
}
|
||||
|
||||
public void addTarget(string newTarget)
|
||||
public void AddTarget(string newTarget)
|
||||
{
|
||||
binWriter.Write((byte)(isMore ? 0x60 + currentTarget.Length : 0x82 + currentTarget.Length));
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(currentTarget));
|
||||
@@ -205,12 +205,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
currentTarget = newTarget;
|
||||
}
|
||||
|
||||
public SubPacket buildPacket(uint playerActorID, uint actorID)
|
||||
public SubPacket BuildPacket(uint playerActorID, uint actorID)
|
||||
{
|
||||
binWriter.Seek(0, SeekOrigin.Begin);
|
||||
binWriter.Write((byte)runningByteTotal);
|
||||
|
||||
closeStreams();
|
||||
CloseStreams();
|
||||
|
||||
SubPacket packet = new SubPacket(OPCODE, actorID, playerActorID, data);
|
||||
return packet;
|
||||
|
@@ -12,7 +12,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const float DEFAULT_WALK = 2.0f;
|
||||
public const float DEFAULT_RUN = 5.0f;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
return new SubPacket(OPCODE, playerActorID, targetActorID, data);
|
||||
}
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, float stopSpeed, float walkSpeed, float runSpeed)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, float stopSpeed, float walkSpeed, float runSpeed)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -27,7 +27,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x134;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetID, uint mainState, uint subState)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetID, uint mainState, uint subState)
|
||||
{
|
||||
ulong combined = (mainState & 0xFF) | ((subState & 0xFF) << 8);
|
||||
return new SubPacket(OPCODE, playerActorID, targetID, BitConverter.GetBytes(combined));
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x0179;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, ushort[] statusIds)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, ushort[] statusIds)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x0177;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, ushort index, ushort statusCode)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, ushort index, ushort statusCode)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x00D3;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint targetID)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, uint targetID)
|
||||
{
|
||||
return new SubPacket(OPCODE, playerActorID, targetID, BitConverter.GetBytes((ulong)targetID));
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x00DB;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint targetID)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, uint targetID)
|
||||
{
|
||||
return new SubPacket(OPCODE, playerActorID, targetID, BitConverter.GetBytes((ulong)targetID));
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x132;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, ushort number, string function)
|
||||
public static SubPacket BuildPacket(uint playerActorID, ushort number, string function)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
public const ushort OPCODE = 0x000F;
|
||||
public const uint PACKET_SIZE = 0x38;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint targetActorID)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle
|
||||
public const ushort OPCODE = 0x013C;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorId, uint targetActorId, uint animationId, ushort commandId)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorId, uint targetActorId, uint animationId, ushort commandId)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle
|
||||
public const ushort OPCODE = 0x0139;
|
||||
public const uint PACKET_SIZE = 0x58;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorId, uint targetActorId, uint animationId, uint effectId, ushort worldMasterTextId, ushort commandId, ushort amount, byte param)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorId, uint targetActorId, uint animationId, uint effectId, ushort worldMasterTextId, ushort commandId, ushort amount, byte param)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle
|
||||
public const ushort OPCODE = 0x013A;
|
||||
public const uint PACKET_SIZE = 0xD8;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorId, uint animationId, ushort commandId, BattleAction[] actionList)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorId, uint animationId, ushort commandId, BattleAction[] actionList)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle
|
||||
public const ushort OPCODE = 0x013B;
|
||||
public const uint PACKET_SIZE = 0x148;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorId, uint animationId, ushort commandId, BattleAction[] actionList)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorId, uint animationId, ushort commandId, BattleAction[] actionList)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x016C;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.EmoteEventCondition condition)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.EmoteEventCondition condition)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x0136;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, bool enabled, byte unknown2, string conditionName)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, bool enabled, byte unknown2, string conditionName)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x016B;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.NoticeEventCondition condition)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.NoticeEventCondition condition)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x016F;
|
||||
public const uint PACKET_SIZE = 0x58;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.PushCircleEventCondition condition)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.PushCircleEventCondition condition)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x0170;
|
||||
public const uint PACKET_SIZE = 0x60;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.PushFanEventCondition condition)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.PushFanEventCondition condition)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(condition.conditionName), 0, Encoding.ASCII.GetByteCount(condition.conditionName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(condition.conditionName));
|
||||
}
|
||||
}
|
||||
new SubPacket(OPCODE, sourceActorID, playerActorID, data).debugPrintSubPacket();
|
||||
new SubPacket(OPCODE, sourceActorID, playerActorID, data).DebugPrintSubPacket();
|
||||
return new SubPacket(OPCODE, sourceActorID, playerActorID, data);
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x0175;
|
||||
public const uint PACKET_SIZE = 0x60;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.PushBoxEventCondition condition)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.PushBoxEventCondition condition)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
public const ushort OPCODE = 0x012E;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, EventList.TalkEventCondition condition)
|
||||
public static SubPacket BuildPacket(uint playerActorID, uint sourceActorID, EventList.TalkEventCondition condition)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x014D;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, ushort equipSlot, uint itemSlot)
|
||||
public static SubPacket BuildPacket(uint playerActorID, ushort equipSlot, uint itemSlot)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x14E;
|
||||
public const uint PACKET_SIZE = 0x58;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x14F;
|
||||
public const uint PACKET_SIZE = 0x80;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x150;
|
||||
public const uint PACKET_SIZE = 0xE0;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x151;
|
||||
public const uint PACKET_SIZE = 0x194;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorId, InventoryItem[] equipment, List<ushort> slotsToUpdate, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -5,14 +5,14 @@
|
||||
public const ushort OPCODE = 0x016D;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint sourceActorId, uint targetActorId)
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId)
|
||||
{
|
||||
byte[] data = new byte[8];
|
||||
data[0] = 2;
|
||||
return new SubPacket(OPCODE, sourceActorId, targetActorId, data);
|
||||
}
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID)
|
||||
public static SubPacket BuildPacket(uint playerActorID)
|
||||
{
|
||||
byte[] data = new byte[8];
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, data);
|
||||
|
@@ -5,12 +5,12 @@
|
||||
public const ushort OPCODE = 0x016E;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint sourceActorId, uint targetActorId)
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId)
|
||||
{
|
||||
return new SubPacket(OPCODE, sourceActorId, targetActorId, new byte[8]);
|
||||
}
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID)
|
||||
public static SubPacket BuildPacket(uint playerActorID)
|
||||
{
|
||||
return new SubPacket(OPCODE, playerActorID, playerActorID, new byte[8]);
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x0149;
|
||||
public const uint PACKET_SIZE = 0x90;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, List<InventoryItem> items, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorID, List<InventoryItem> items, ref int listOffset)
|
||||
{
|
||||
byte[] data;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
{
|
||||
for (int i = listOffset; i < items.Count; i++)
|
||||
{
|
||||
binWriter.Write(items[i].toPacketBytes());
|
||||
binWriter.Write(items[i].ToPacketBytes());
|
||||
listOffset++;
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x014A;
|
||||
public const uint PACKET_SIZE = 0x90;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, List<InventoryItem> items, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorID, List<InventoryItem> items, ref int listOffset)
|
||||
{
|
||||
byte[] data;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
{
|
||||
for (int i = listOffset; i < items.Count; i++)
|
||||
{
|
||||
binWriter.Write(items[i].toPacketBytes());
|
||||
binWriter.Write(items[i].ToPacketBytes());
|
||||
listOffset++;
|
||||
}
|
||||
}
|
||||
|
@@ -8,12 +8,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||
public const ushort OPCODE = 0x0148;
|
||||
public const uint PACKET_SIZE = 0x90;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorId, InventoryItem item)
|
||||
public static SubPacket BuildPacket(uint playerActorId, InventoryItem item)
|
||||
{
|
||||
return buildPacket(playerActorId, playerActorId, item);
|
||||
return BuildPacket(playerActorId, playerActorId, item);
|
||||
}
|
||||
|
||||
public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, InventoryItem item)
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, InventoryItem item)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write(item.toPacketBytes());
|
||||
binWriter.Write(item.ToPacketBytes());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -10,12 +10,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||
public const ushort OPCODE = 0x0149;
|
||||
public const uint PACKET_SIZE = 0x3A8;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorId, List<InventoryItem> items, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorId, List<InventoryItem> items, ref int listOffset)
|
||||
{
|
||||
return buildPacket(playerActorId, playerActorId, items, ref listOffset);
|
||||
return BuildPacket(playerActorId, playerActorId, items, ref listOffset);
|
||||
}
|
||||
|
||||
public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, List<InventoryItem> items, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, List<InventoryItem> items, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
binWriter.Write(items[listOffset].toPacketBytes());
|
||||
binWriter.Write(items[listOffset].ToPacketBytes());
|
||||
listOffset++;
|
||||
}
|
||||
|
||||
|
@@ -9,12 +9,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||
public const ushort OPCODE = 0x014A;
|
||||
public const uint PACKET_SIZE = 0x720;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorId, List<InventoryItem> items, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorId, List<InventoryItem> items, ref int listOffset)
|
||||
{
|
||||
return buildPacket(playerActorId, playerActorId, items, ref listOffset);
|
||||
return BuildPacket(playerActorId, playerActorId, items, ref listOffset);
|
||||
}
|
||||
|
||||
public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, List<InventoryItem> items, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, List<InventoryItem> items, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
binWriter.Write(items[listOffset].toPacketBytes());
|
||||
binWriter.Write(items[listOffset].ToPacketBytes());
|
||||
listOffset++;
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||
public const ushort OPCODE = 0x014B;
|
||||
public const uint PACKET_SIZE = 0xE20;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, List<InventoryItem> items, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorID, List<InventoryItem> items, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
binWriter.Write(items[listOffset].toPacketBytes());
|
||||
binWriter.Write(items[listOffset].ToPacketBytes());
|
||||
listOffset++;
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||
public const ushort OPCODE = 0x014C;
|
||||
public const uint PACKET_SIZE = 0x1C20;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, List<InventoryItem> items, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorID, List<InventoryItem> items, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.inventory
|
||||
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
binWriter.Write(items[listOffset].toPacketBytes());
|
||||
binWriter.Write(items[listOffset].ToPacketBytes());
|
||||
listOffset++;
|
||||
}
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x0152;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, ushort slot)
|
||||
public static SubPacket BuildPacket(uint playerActorID, ushort slot)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x0153;
|
||||
public const uint PACKET_SIZE = 0x38;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, List<ushort> slots, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorID, List<ushort> slots, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x154;
|
||||
public const uint PACKET_SIZE = 0x40;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, List<ushort> slots, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorID, List<ushort> slots, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x0155;
|
||||
public const uint PACKET_SIZE = 0x60;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, List<ushort> slots, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorID, List<ushort> slots, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x156;
|
||||
public const uint PACKET_SIZE = 0xA0;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorID, List<ushort> slots, ref int listOffset)
|
||||
public static SubPacket BuildPacket(uint playerActorID, List<ushort> slots, ref int listOffset)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@@ -8,12 +8,12 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
public const ushort OPCODE = 0x0146;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorId, ushort size, ushort code)
|
||||
public static SubPacket BuildPacket(uint playerActorId, ushort size, ushort code)
|
||||
{
|
||||
return buildPacket(playerActorId, playerActorId, size, code);
|
||||
return BuildPacket(playerActorId, playerActorId, size, code);
|
||||
}
|
||||
|
||||
public static SubPacket buildPacket(uint sourceActorId, uint targetActorId, ushort size, ushort code)
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorId, ushort size, ushort code)
|
||||
{
|
||||
byte[] data = new byte[8];
|
||||
|
||||
|
@@ -6,12 +6,12 @@
|
||||
public const ushort OPCODE = 0x0147;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket buildPacket(uint playerActorId)
|
||||
public static SubPacket BuildPacket(uint playerActorId)
|
||||
{
|
||||
return new SubPacket(OPCODE, playerActorId, playerActorId, new byte[8]);
|
||||
}
|
||||
|
||||
public static SubPacket buildPacket(uint sourceActorId, uint targetActorID)
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint targetActorID)
|
||||
{
|
||||
return new SubPacket(OPCODE, sourceActorId, targetActorID, new byte[8]);
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
equipment[i] = UNEQUIPPED; //We will use this as "Unequipped"
|
||||
}
|
||||
|
||||
public void setItem(int slot, uint itemSlot)
|
||||
public void SetItem(int slot, uint itemSlot)
|
||||
{
|
||||
if (slot >= equipment.Length)
|
||||
return;
|
||||
@@ -50,7 +50,7 @@ namespace FFXIVClassic_Map_Server.packets.send.Actor.inventory
|
||||
equipment[slot] = itemSlot;
|
||||
}
|
||||
|
||||
public List<SubPacket> buildPackets(uint playerActorID)
|
||||
public List<SubPacket> BuildPackets(uint playerActorID)
|
||||
{
|
||||
List<SubPacket> packets = new List<SubPacket>();
|
||||
int packetCount = 0;
|
||||
|
Reference in New Issue
Block a user