mass replaced all methods to pascal case

This commit is contained in:
Tahir Akhlaq 2016-06-14 21:29:10 +01:00
parent ed0a0a58f7
commit 24f55139dd
179 changed files with 1585 additions and 1585 deletions

View file

@ -102,7 +102,7 @@ namespace FFXIVClassic_Map_Server.packets
this.data = data;
}
public List<SubPacket> getSubpackets()
public List<SubPacket> GetSubpackets()
{
List<SubPacket> subpackets = new List<SubPacket>(header.numSubpackets);
@ -114,7 +114,7 @@ namespace FFXIVClassic_Map_Server.packets
return subpackets;
}
public unsafe static BasePacketHeader getHeader(byte[] bytes)
public unsafe static BasePacketHeader GetHeader(byte[] bytes)
{
BasePacketHeader header;
if (bytes.Length < BASEPACKET_SIZE)
@ -128,7 +128,7 @@ namespace FFXIVClassic_Map_Server.packets
return header;
}
public byte[] getHeaderBytes()
public byte[] GetHeaderBytes()
{
int size = Marshal.SizeOf(header);
byte[] arr = new byte[size];
@ -140,16 +140,16 @@ namespace FFXIVClassic_Map_Server.packets
return arr;
}
public byte[] getPacketBytes()
public byte[] GetPacketBytes()
{
byte[] outBytes = new byte[header.packetSize];
Array.Copy(getHeaderBytes(), 0, outBytes, 0, BASEPACKET_SIZE);
Array.Copy(GetHeaderBytes(), 0, outBytes, 0, BASEPACKET_SIZE);
Array.Copy(data, 0, outBytes, BASEPACKET_SIZE, data.Length);
return outBytes;
}
//Replaces all instances of the sniffed actorID with the given one
public void replaceActorID(uint actorID)
public void ReplaceActorID(uint actorID)
{
using (MemoryStream mem = new MemoryStream(data))
{
@ -172,7 +172,7 @@ namespace FFXIVClassic_Map_Server.packets
}
//Replaces all instances of the sniffed actorID with the given one
public void replaceActorID(uint fromActorID, uint actorID)
public void ReplaceActorID(uint fromActorID, uint actorID)
{
using (MemoryStream mem = new MemoryStream(data))
{
@ -195,7 +195,7 @@ namespace FFXIVClassic_Map_Server.packets
}
#region Utility Functions
public static BasePacket createPacket(List<SubPacket> subpackets, bool isAuthed, bool isCompressed)
public static BasePacket CreatePacket(List<SubPacket> subpackets, bool isAuthed, bool isCompressed)
{
//Create Header
BasePacketHeader header = new BasePacketHeader();
@ -217,7 +217,7 @@ namespace FFXIVClassic_Map_Server.packets
int offset = 0;
foreach (SubPacket subpacket in subpackets)
{
byte[] subpacketData = subpacket.getBytes();
byte[] subpacketData = subpacket.GetBytes();
Array.Copy(subpacketData, 0, data, offset, subpacketData.Length);
offset += (ushort)subpacketData.Length;
}
@ -228,7 +228,7 @@ namespace FFXIVClassic_Map_Server.packets
return packet;
}
public static BasePacket createPacket(SubPacket subpacket, bool isAuthed, bool isCompressed)
public static BasePacket CreatePacket(SubPacket subpacket, bool isAuthed, bool isCompressed)
{
//Create Header
BasePacketHeader header = new BasePacketHeader();
@ -246,7 +246,7 @@ namespace FFXIVClassic_Map_Server.packets
data = new byte[header.packetSize - 0x10];
//Add Subpackets
byte[] subpacketData = subpacket.getBytes();
byte[] subpacketData = subpacket.GetBytes();
Array.Copy(subpacketData, 0, data, 0, subpacketData.Length);
Debug.Assert(data != null);
@ -255,7 +255,7 @@ namespace FFXIVClassic_Map_Server.packets
return packet;
}
public static BasePacket createPacket(byte[] data, bool isAuthed, bool isCompressed)
public static BasePacket CreatePacket(byte[] data, bool isAuthed, bool isCompressed)
{
Debug.Assert(data != null);
@ -276,7 +276,7 @@ namespace FFXIVClassic_Map_Server.packets
return packet;
}
public static unsafe void encryptPacket(Blowfish blowfish, BasePacket packet)
public static unsafe void EncryptPacket(Blowfish blowfish, BasePacket packet)
{
byte[] data = packet.data;
int size = packet.header.packetSize;
@ -302,7 +302,7 @@ namespace FFXIVClassic_Map_Server.packets
}
public static unsafe void decryptPacket(Blowfish blowfish, ref BasePacket packet)
public static unsafe void DecryptPacket(Blowfish blowfish, ref BasePacket packet)
{
byte[] data = packet.data;
int size = packet.header.packetSize;
@ -329,16 +329,16 @@ namespace FFXIVClassic_Map_Server.packets
}
#endregion
public void debugPrintPacket()
public void DebugPrintPacket()
{
#if DEBUG
Console.BackgroundColor = ConsoleColor.DarkYellow;
Program.Log.Debug("IsAuth: {0} IsEncrypted: {1}, Size: 0x{2:X}, NumSubpackets: {3}{4}{5}", header.isAuthenticated, header.isCompressed, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()));
Program.Log.Debug("IsAuth: {0} IsEncrypted: {1}, Size: 0x{2:X}, NumSubpackets: {3}{4}{5}", header.isAuthenticated, header.isCompressed, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes()));
foreach (SubPacket sub in getSubpackets())
foreach (SubPacket sub in GetSubpackets())
{
sub.debugPrintSubPacket();
sub.DebugPrintSubPacket();
}
Console.BackgroundColor = ConsoleColor.Black;

View file

@ -101,7 +101,7 @@ namespace FFXIVClassic_Map_Server.packets
data = original.data;
}
public byte[] getHeaderBytes()
public byte[] GetHeaderBytes()
{
int size = Marshal.SizeOf(header);
byte[] arr = new byte[size];
@ -113,7 +113,7 @@ namespace FFXIVClassic_Map_Server.packets
return arr;
}
public byte[] getGameMessageBytes()
public byte[] GetGameMessageBytes()
{
int size = Marshal.SizeOf(gameMessage);
byte[] arr = new byte[size];
@ -125,28 +125,28 @@ namespace FFXIVClassic_Map_Server.packets
return arr;
}
public byte[] getBytes()
public byte[] GetBytes()
{
byte[] outBytes = new byte[header.subpacketSize];
Array.Copy(getHeaderBytes(), 0, outBytes, 0, SUBPACKET_SIZE);
Array.Copy(GetHeaderBytes(), 0, outBytes, 0, SUBPACKET_SIZE);
if (header.type == 0x3)
Array.Copy(getGameMessageBytes(), 0, outBytes, SUBPACKET_SIZE, GAMEMESSAGE_SIZE);
Array.Copy(GetGameMessageBytes(), 0, outBytes, SUBPACKET_SIZE, GAMEMESSAGE_SIZE);
Array.Copy(data, 0, outBytes, SUBPACKET_SIZE + (header.type == 0x3 ? GAMEMESSAGE_SIZE : 0), data.Length);
return outBytes;
}
public void debugPrintSubPacket()
public void DebugPrintSubPacket()
{
#if DEBUG
Console.BackgroundColor = ConsoleColor.DarkRed;
Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()));
Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(GetHeaderBytes()));
if (header.type == 0x03)
{
Program.Log.Debug("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE));
Program.Log.Debug("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(GetGameMessageBytes(), SUBPACKET_SIZE));
Console.BackgroundColor = ConsoleColor.DarkMagenta;

View file

@ -63,7 +63,7 @@ namespace FFXIVClassic_Map_Server.packets.receive.events
binReader.BaseStream.Seek(0x31, SeekOrigin.Begin);
luaParams = LuaUtils.readLuaParams(binReader);
luaParams = LuaUtils.ReadLuaParams(binReader);
}
catch (Exception){
invalidPacket = true;

View file

@ -31,7 +31,7 @@ namespace FFXIVClassic_Map_Server.packets.receive.events
val1 = binReader.ReadUInt32();
val2 = binReader.ReadUInt32();
step = binReader.ReadByte();
luaParams = LuaUtils.readLuaParams(binReader);
luaParams = LuaUtils.ReadLuaParams(binReader);
}
catch (Exception){
invalidPacket = true;

View file

@ -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;
}
}

View file

@ -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);
}
}

View file

@ -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];

View file

@ -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?

View file

@ -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];

View file

@ -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]);
}

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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);

View file

@ -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];

View file

@ -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];

View file

@ -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;

View file

@ -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];

View file

@ -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));

View file

@ -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];

View file

@ -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];

View file

@ -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));
}

View file

@ -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));
}

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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);
}
}

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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);

View file

@ -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]);
}

View file

@ -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++;
}
}

View file

@ -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++;
}
}

View file

@ -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());
}
}

View file

@ -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++;
}

View file

@ -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++;
}
}

View file

@ -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++;
}
}

View file

@ -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++;
}
}

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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]);
}

View file

@ -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;

View file

@ -56,7 +56,7 @@ namespace FFXIVClassic_Map_Server.packets.send
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 targetId, uint actorId, uint textOwnerActorId, ushort textId, byte log)
{
byte[] data = new byte[SIZE_GAMEMESSAGE_WITH_ACTOR1 - 0x20];
@ -74,7 +74,7 @@ namespace FFXIVClassic_Map_Server.packets.send
return new SubPacket(OPCODE_GAMEMESSAGE_WITH_ACTOR1, sourceId, targetId, 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 targetId, uint actorId, uint textOwnerActorId, ushort textId, byte log, List<LuaParam> lParams)
{
int lParamsSize = findSizeOfParams(lParams);
byte[] data;
@ -109,7 +109,7 @@ namespace FFXIVClassic_Map_Server.packets.send
binWriter.Write((UInt32)textOwnerActorId);
binWriter.Write((UInt16)textId);
binWriter.Write((UInt16)log);
LuaUtils.writeLuaParams(binWriter, lParams);
LuaUtils.WriteLuaParams(binWriter, lParams);
if (lParamsSize <= 0x14-12)
{
@ -122,7 +122,7 @@ namespace FFXIVClassic_Map_Server.packets.send
return new SubPacket(opcode, sourceId, targetId, data);
}
public static SubPacket buildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, string sender, byte log)
public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, string sender, byte log)
{
byte[] data = new byte[SIZE_GAMEMESSAGE_WITH_CUSTOM_SENDER1 - 0x20];
@ -140,7 +140,7 @@ namespace FFXIVClassic_Map_Server.packets.send
return new SubPacket(OPCODE_GAMEMESSAGE_WITH_CUSTOM_SENDER1, sourceId, targetId, 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 targetId, uint textOwnerActorId, ushort textId, string sender, byte log, List<LuaParam> lParams)
{
int lParamsSize = findSizeOfParams(lParams);
byte[] data;
@ -175,7 +175,7 @@ namespace FFXIVClassic_Map_Server.packets.send
binWriter.Write((UInt16)textId);
binWriter.Write((UInt16)log);
binWriter.Write(Encoding.ASCII.GetBytes(sender), 0, Encoding.ASCII.GetByteCount(sender) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(sender));
LuaUtils.writeLuaParams(binWriter, lParams);
LuaUtils.WriteLuaParams(binWriter, lParams);
if (lParamsSize <= 0x14 - 12)
{
@ -188,7 +188,7 @@ namespace FFXIVClassic_Map_Server.packets.send
return new SubPacket(opcode, sourceId, targetId, data);
}
public static SubPacket buildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log)
public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log)
{
byte[] data = new byte[SIZE_GAMEMESSAGE_WITH_DISPID_SENDER1 - 0x20];
@ -206,7 +206,7 @@ namespace FFXIVClassic_Map_Server.packets.send
return new SubPacket(OPCODE_GAMEMESSAGE_WITH_DISPID_SENDER1, sourceId, targetId, 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 targetId, uint textOwnerActorId, ushort textId, uint senderDisplayNameId, byte log, List<LuaParam> lParams)
{
int lParamsSize = findSizeOfParams(lParams);
byte[] data;
@ -241,7 +241,7 @@ namespace FFXIVClassic_Map_Server.packets.send
binWriter.Write((UInt32)textOwnerActorId);
binWriter.Write((UInt16)textId);
binWriter.Write((UInt16)log);
LuaUtils.writeLuaParams(binWriter, lParams);
LuaUtils.WriteLuaParams(binWriter, lParams);
if (lParamsSize <= 0x14 - 12)
{
@ -254,7 +254,7 @@ namespace FFXIVClassic_Map_Server.packets.send
return new SubPacket(opcode, sourceId, targetId, data);
}
public static SubPacket buildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, byte log)
public static SubPacket BuildPacket(uint sourceId, uint targetId, uint textOwnerActorId, ushort textId, byte log)
{
byte[] data = new byte[SIZE_GAMEMESSAGE_WITHOUT_ACTOR1 - 0x20];
@ -271,7 +271,7 @@ namespace FFXIVClassic_Map_Server.packets.send
return new SubPacket(OPCODE_GAMEMESSAGE_WITHOUT_ACTOR1, sourceId, targetId, 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 targetId, uint textOwnerActorId, ushort textId, byte log, List<LuaParam> lParams)
{
int lParamsSize = findSizeOfParams(lParams);
byte[] data;
@ -305,7 +305,7 @@ namespace FFXIVClassic_Map_Server.packets.send
binWriter.Write((UInt32)textOwnerActorId);
binWriter.Write((UInt16)textId);
binWriter.Write((UInt16)log);
LuaUtils.writeLuaParams(binWriter, lParams);
LuaUtils.WriteLuaParams(binWriter, lParams);
if (lParamsSize <= 0x8)
{

View file

@ -5,7 +5,7 @@
public const ushort OPCODE = 0x000E;
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]);
}

View file

@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.receive
public const ushort OPCODE = 0x0001;
public const uint PACKET_SIZE = 0x40;
public static SubPacket buildPacket(uint playerActorID, uint pingTicks)
public static SubPacket BuildPacket(uint playerActorID, uint pingTicks)
{
byte[] data = new byte[PACKET_SIZE-0x20];

View file

@ -5,7 +5,7 @@
public const ushort OPCODE = 0x0011;
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]);
}

View file

@ -34,7 +34,7 @@ namespace FFXIVClassic_Map_Server.packets.send
public const ushort OPCODE = 0x0003;
public const uint PACKET_SIZE = 0x248;
public static SubPacket buildPacket(uint playerActorID, uint targetID, uint messageType, string sender, string message)
public static SubPacket BuildPacket(uint playerActorID, uint targetID, uint messageType, string sender, string message)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send
public const ushort OPCODE = 0x0005;
public const uint PACKET_SIZE = 0x30;
public static SubPacket buildPacket(uint playerActorID, uint mapID, uint regionID)
public static SubPacket BuildPacket(uint playerActorID, uint mapID, uint regionID)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -14,7 +14,7 @@ namespace FFXIVClassic_Map_Server.packets.send
public const ushort EFFECT_PLAY_NORMAL_CHANNEL = 0x5; //Only works for multi channeled music
public const ushort EFFECT_PLAY_BATTLE_CHANNEL = 0x6;
public static SubPacket buildPacket(uint playerActorID, ushort musicID, ushort musicTrackMode)
public static SubPacket BuildPacket(uint playerActorID, ushort musicID, ushort musicTrackMode)
{
ulong combined = (ulong)(musicID | (musicTrackMode << 16));
return new SubPacket(OPCODE, 0, playerActorID, BitConverter.GetBytes(combined));

View file

@ -35,7 +35,7 @@ namespace FFXIVClassic_Map_Server.packets.send
public const ushort OPCODE = 0x000D;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, ushort weatherId, ushort transitionTime)
public static SubPacket BuildPacket(uint playerActorID, ushort weatherId, ushort transitionTime)
{
ulong combined = (ulong)(weatherId | (transitionTime << 16));
return new SubPacket(OPCODE, 0, playerActorID, BitConverter.GetBytes(combined));

View file

@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send
public const ushort OPCODE = 0x0002;
public const uint PACKET_SIZE = 0x30;
public static SubPacket buildPacket(uint playerActorId, int val)
public static SubPacket BuildPacket(uint playerActorId, int val)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send
public const ushort OPCODE = 0x0010;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorId, int val)
public static SubPacket BuildPacket(uint playerActorId, int val)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send
public const ushort OPCODE = 0x00E2;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, int val)
public static SubPacket BuildPacket(uint playerActorID, int val)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
data[0] = (Byte) (val & 0xFF);

View file

@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events
public const ushort OPCODE = 0x0131;
public const uint PACKET_SIZE = 0x50;
public static SubPacket buildPacket(uint playerActorID, uint eventOwnerActorID, string eventStarter)
public static SubPacket BuildPacket(uint playerActorID, uint eventOwnerActorID, string eventStarter)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
int maxBodySize = data.Length - 0x80;

View file

@ -11,7 +11,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events
public const ushort OPCODE = 0x012F;
public const uint PACKET_SIZE = 0x90;
public static SubPacket buildPacket(uint playerActorId, uint targetActorId, string conditionName, List<LuaParam> luaParams)
public static SubPacket BuildPacket(uint playerActorId, uint targetActorId, string conditionName, List<LuaParam> luaParams)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
@ -30,7 +30,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events
binWriter.Seek(0x30, SeekOrigin.Begin);
LuaUtils.writeLuaParams(binWriter, luaParams);
LuaUtils.WriteLuaParams(binWriter, luaParams);
}
}

View file

@ -11,7 +11,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events
public const ushort OPCODE = 0x0130;
public const uint PACKET_SIZE = 0x2B8;
public static SubPacket buildPacket(uint playerActorID, uint eventOwnerActorID, string eventStarter, string callFunction, List<LuaParam> luaParams)
public static SubPacket BuildPacket(uint playerActorID, uint eventOwnerActorID, string eventStarter, string callFunction, List<LuaParam> luaParams)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
int maxBodySize = data.Length - 0x80;
@ -28,7 +28,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events
binWriter.Write(Encoding.ASCII.GetBytes(callFunction), 0, Encoding.ASCII.GetByteCount(callFunction) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(callFunction));
binWriter.Seek(0x49, SeekOrigin.Begin);
LuaUtils.writeLuaParams(binWriter, luaParams);
LuaUtils.WriteLuaParams(binWriter, luaParams);
}
}

View file

@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.list
public const ushort OPCODE = 0x017D;
public const uint PACKET_SIZE = 0x40;
public static SubPacket buildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId, int numEntries)
public static SubPacket BuildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId, int numEntries)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.list
public const ushort OPCODE = 0x017E;
public const uint PACKET_SIZE = 0x38;
public static SubPacket buildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId)
public static SubPacket BuildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.list
public const ushort OPCODE = 0x017F;
public const uint PACKET_SIZE = 0x1B8;
public static SubPacket buildPacket(uint playerActorID, uint locationCode, ulong sequenceId, List<ListEntry> entries, int offset)
public static SubPacket BuildPacket(uint playerActorID, uint locationCode, ulong sequenceId, List<ListEntry> entries, int offset)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -13,7 +13,7 @@ namespace FFXIVClassic_Map_Server.packets.send.list
public const ushort OPCODE = 0x017C;
public const uint PACKET_SIZE = 0x98;
public static SubPacket buildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId, uint listTypeId, int numEntries)
public static SubPacket BuildPacket(uint playerActorID, uint locationCode, ulong sequenceId, ulong listId, uint listTypeId, int numEntries)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
@ -34,7 +34,7 @@ namespace FFXIVClassic_Map_Server.packets.send.list
binWriter.Write((UInt64)0);
binWriter.Write((UInt64)listId);
//This seems to change depending on what the list is for
//This seems to Change depending on what the list is for
binWriter.Write((UInt32)listTypeId);
binWriter.Seek(0x40, SeekOrigin.Begin);

View file

@ -5,33 +5,33 @@ namespace FFXIVClassic_Map_Server.packets.send.list
class ListUtils
{
public static List<SubPacket> createList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, uint listTypeId, List<ListEntry> listEntries)
public static List<SubPacket> CreateList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, uint listTypeId, List<ListEntry> listEntries)
{
List<SubPacket> subpacketList = new List<SubPacket>();
subpacketList.Add(ListStartPacket.buildPacket(actorId, locationCode, sequenceId, listId, listTypeId, listEntries.Count));
subpacketList.Add(ListBeginPacket.buildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count));
subpacketList.Add(ListEntriesEndPacket.buildPacket(actorId, locationCode, sequenceId, listEntries, 0));
subpacketList.Add(ListEndPacket.buildPacket(actorId, locationCode, sequenceId, listId));
subpacketList.Add(ListStartPacket.BuildPacket(actorId, locationCode, sequenceId, listId, listTypeId, listEntries.Count));
subpacketList.Add(ListBeginPacket.BuildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count));
subpacketList.Add(ListEntriesEndPacket.BuildPacket(actorId, locationCode, sequenceId, listEntries, 0));
subpacketList.Add(ListEndPacket.BuildPacket(actorId, locationCode, sequenceId, listId));
return subpacketList;
}
public static List<SubPacket> createRetainerList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, List<ListEntry> listEntries)
public static List<SubPacket> CreateRetainerList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, List<ListEntry> listEntries)
{
List<SubPacket> subpacketList = new List<SubPacket>();
subpacketList.Add(ListStartPacket.buildPacket(actorId, locationCode, sequenceId, listId, ListStartPacket.TYPEID_RETAINER, listEntries.Count));
subpacketList.Add(ListBeginPacket.buildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count));
subpacketList.Add(ListEntriesEndPacket.buildPacket(actorId, locationCode, sequenceId, listEntries, 0));
subpacketList.Add(ListEndPacket.buildPacket(actorId, locationCode, sequenceId, listId));
subpacketList.Add(ListStartPacket.BuildPacket(actorId, locationCode, sequenceId, listId, ListStartPacket.TYPEID_RETAINER, listEntries.Count));
subpacketList.Add(ListBeginPacket.BuildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count));
subpacketList.Add(ListEntriesEndPacket.BuildPacket(actorId, locationCode, sequenceId, listEntries, 0));
subpacketList.Add(ListEndPacket.BuildPacket(actorId, locationCode, sequenceId, listId));
return subpacketList;
}
public static List<SubPacket> createPartyList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, List<ListEntry> listEntries)
public static List<SubPacket> CreatePartyList(uint actorId, uint locationCode, ulong sequenceId, ulong listId, List<ListEntry> listEntries)
{
List<SubPacket> subpacketList = new List<SubPacket>();
subpacketList.Add(ListStartPacket.buildPacket(actorId, locationCode, sequenceId, listId, ListStartPacket.TYPEID_PARTY, listEntries.Count));
subpacketList.Add(ListBeginPacket.buildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count));
subpacketList.Add(ListEntriesEndPacket.buildPacket(actorId, locationCode, sequenceId, listEntries, 0));
subpacketList.Add(ListEndPacket.buildPacket(actorId, locationCode, sequenceId, listId));
subpacketList.Add(ListStartPacket.BuildPacket(actorId, locationCode, sequenceId, listId, ListStartPacket.TYPEID_PARTY, listEntries.Count));
subpacketList.Add(ListBeginPacket.BuildPacket(actorId, locationCode, sequenceId, listId, listEntries.Count));
subpacketList.Add(ListEntriesEndPacket.BuildPacket(actorId, locationCode, sequenceId, listEntries, 0));
subpacketList.Add(ListEndPacket.BuildPacket(actorId, locationCode, sequenceId, listId));
return subpacketList;
}

View file

@ -29,13 +29,13 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
binWriter.Seek(1, SeekOrigin.Current);
}
public void closeStreams()
public void CloseStreams()
{
binWriter.Dispose();
mem.Dispose();
}
public bool addByte(uint id, byte value)
public bool AcceptCallback(uint id, byte value)
{
if (runningByteTotal + 6 > MAXBYTES)
return false;
@ -48,7 +48,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 > MAXBYTES)
return false;
@ -61,7 +61,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 > MAXBYTES)
return false;
@ -74,7 +74,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 > MAXBYTES)
return false;
@ -87,7 +87,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
return true;
}
public void addProperty(FFXIVClassic_Map_Server.Actors.Actor actor, string name)
public void AddProperty(FFXIVClassic_Map_Server.Actors.Actor actor, string name)
{
string[] split = name.Split('.');
int arrayIndex = 0;
@ -132,33 +132,33 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
if (curObj == null)
return;
//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)
addByte(id, (byte)(((bool)curObj) ? 1 : 0));
AcceptCallback(id, (byte)(((bool)curObj) ? 1 : 0));
else if (curObj is byte)
addByte(id, (byte)curObj);
AcceptCallback(id, (byte)curObj);
else if (curObj is ushort)
addShort(id, (ushort)curObj);
AddShort(id, (ushort)curObj);
else if (curObj is short)
addShort(id, (ushort)(short)curObj);
AddShort(id, (ushort)(short)curObj);
else if (curObj is uint)
addInt(id, (uint)curObj);
AddInt(id, (uint)curObj);
else if (curObj is int)
addInt(id, (uint)(int)curObj);
AddInt(id, (uint)(int)curObj);
else if (curObj is float)
addBuffer(id, BitConverter.GetBytes((float)curObj));
AddBuffer(id, BitConverter.GetBytes((float)curObj));
else
return;
}
}
public void setIsMore(bool flag)
public void SetIsMore(bool flag)
{
isMore = flag;
}
public void setTarget(string target)
public void SetTarget(string target)
{
binWriter.Write((byte)(isMore ? 0x62 + target.Length : 0x82 + target.Length));
binWriter.Write(Encoding.ASCII.GetBytes(target));
@ -166,12 +166,12 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
}
public SubPacket buildPacket(uint playerActorID, uint actorID)
public SubPacket BuildPacket(uint playerActorID, uint actorID)
{
binWriter.Seek(0x8, SeekOrigin.Begin);
binWriter.Write((byte)runningByteTotal);
closeStreams();
CloseStreams();
SubPacket packet = new SubPacket(OPCODE, playerActorID, actorID, data);
return packet;

View file

@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.login
public const ushort OPCODE = 0x0002;
public const uint PACKET_SIZE = 0x30;
public static SubPacket buildPacket(uint playerActorID)
public static SubPacket BuildPacket(uint playerActorID)
{
byte[] data = new byte[PACKET_SIZE-0x20];

View file

@ -5,7 +5,7 @@ namespace FFXIVClassic_Map_Server.packets.send.login
{
class Login0x7ResponsePacket
{
public static BasePacket buildPacket(uint actorID, uint time)
public static BasePacket BuildPacket(uint actorID, uint time)
{
byte[] data = new byte[0x18];
@ -30,7 +30,7 @@ namespace FFXIVClassic_Map_Server.packets.send.login
}
}
return BasePacket.createPacket(data, false, false);
return BasePacket.CreatePacket(data, false, false);
}
}
}

View file

@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public const ushort OPCODE = 0x019E;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, uint achievementID)
public static SubPacket BuildPacket(uint playerActorID, uint achievementID)
{
return new SubPacket(OPCODE, playerActorID, playerActorID, BitConverter.GetBytes((UInt64)achievementID));
}

View file

@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public const ushort OPCODE = 0x0133;
public const uint PACKET_SIZE = 0xE0;
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, List<LuaParam> luaParams)
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, List<LuaParam> luaParams)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
@ -17,7 +17,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
LuaUtils.writeLuaParams(binWriter, luaParams);
LuaUtils.WriteLuaParams(binWriter, luaParams);
}
}

View file

@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public const ushort OPCODE = 0x019F;
public const uint PACKET_SIZE = 0x30;
public static SubPacket buildPacket(uint playerActorID, uint achievementId, uint progressCount, uint progressFlags)
public static SubPacket BuildPacket(uint playerActorID, uint achievementId, uint progressCount, uint progressFlags)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public const ushort OPCODE = 0x019C;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, uint numAchievementPoints)
public static SubPacket BuildPacket(uint playerActorID, uint numAchievementPoints)
{
return new SubPacket(OPCODE, playerActorID, playerActorID, BitConverter.GetBytes((UInt64) numAchievementPoints));
}

View file

@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public const ushort OPCODE = 0x0198;
public const uint PACKET_SIZE = 0x40;
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, string name)
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, string name)
{
if (Encoding.Unicode.GetByteCount(name) >= 0x20)
name = "ERR: Too Long";

View file

@ -24,7 +24,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public bool[] achievementFlags = new bool[1024];
public SubPacket buildPacket(uint playerActorID)
public SubPacket BuildPacket(uint playerActorID)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public const ushort OPCODE = 0x01A4;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint sourceActorID, uint targetActorID, uint jobId)
public static SubPacket BuildPacket(uint sourceActorID, uint targetActorID, uint jobId)
{
return new SubPacket(OPCODE, sourceActorID, targetActorID, BitConverter.GetBytes((uint)jobId));
}

View file

@ -22,7 +22,7 @@
public const ushort OPCODE = 0x0197;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, int appearanceId)
public static SubPacket BuildPacket(uint playerActorID, int appearanceId)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
data[5] = (byte)(appearanceId & 0xFF);

View file

@ -6,7 +6,7 @@
public const ushort OPCODE = 0x01a0;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, int appearanceId)
public static SubPacket BuildPacket(uint playerActorID, int appearanceId)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
data[0] = (byte)(appearanceId & 0xFF);

View file

@ -60,7 +60,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public bool[] cutsceneFlags = new bool[2048];
public SubPacket buildPacket(uint playerActorID, string sNpcName, short sNpcActorIdOffset, byte sNpcSkin, byte sNpcPersonality)
public SubPacket BuildPacket(uint playerActorID, string sNpcName, short sNpcActorIdOffset, byte sNpcSkin, byte sNpcPersonality)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
public const ushort OPCODE = 0x0194;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint sourceActorID, uint targetActorID, ushort currentAllegiance, ushort rankLimsa, ushort rankGridania, ushort rankUldah)
public static SubPacket BuildPacket(uint sourceActorID, uint targetActorID, ushort currentAllegiance, ushort rankLimsa, ushort rankGridania, ushort rankUldah)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -5,7 +5,7 @@
public const ushort OPCODE = 0x0199;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, bool hasChocobo)
public static SubPacket BuildPacket(uint playerActorID, bool hasChocobo)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
data[0] = (byte)(hasChocobo ? 1 : 0);

View file

@ -5,7 +5,7 @@
public const ushort OPCODE = 0x01A1;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, bool hasGoobbue)
public static SubPacket BuildPacket(uint playerActorID, bool hasGoobbue)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
data[0] = (byte)(hasGoobbue ? 1 : 0);

View file

@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public const ushort OPCODE = 0x019B;
public const uint PACKET_SIZE = 0x40;
public static SubPacket buildPacket(uint playerActorID, uint[] latestAchievementIDs)
public static SubPacket BuildPacket(uint playerActorID, uint[] latestAchievementIDs)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

View file

@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public const ushort OPCODE = 0x01A7;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, uint dreamID)
public static SubPacket BuildPacket(uint playerActorID, uint dreamID)
{
dreamID += 0x20E;
return new SubPacket(OPCODE, playerActorID, playerActorID, BitConverter.GetBytes((uint)dreamID));

View file

@ -7,7 +7,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public const ushort OPCODE = 0x019D;
public const uint PACKET_SIZE = 0x28;
public static SubPacket buildPacket(uint playerActorID, uint targetActorID, uint titleID)
public static SubPacket BuildPacket(uint playerActorID, uint targetActorID, uint titleID)
{
return new SubPacket(OPCODE, playerActorID, targetActorID, BitConverter.GetBytes((UInt64)titleID));
}

View file

@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public const ushort OPCODE = 0x0196;
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];

View file

@ -10,7 +10,7 @@ namespace FFXIVClassic_Map_Server.packets.send.recruitment
public const ushort OPCODE = 0x01C8;
public const uint PACKET_SIZE = 0x218;
public static SubPacket buildPacket(uint playerActorID, RecruitmentDetails details)
public static SubPacket BuildPacket(uint playerActorID, RecruitmentDetails details)
{
byte[] data = new byte[PACKET_SIZE - 0x20];

Some files were not shown because too many files have changed in this diff Show more