mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-26 04:18:22 +02:00
mass replaced all methods to pascal case
This commit is contained in:
parent
ed0a0a58f7
commit
24f55139dd
179 changed files with 1585 additions and 1585 deletions
|
@ -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];
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue