mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 13:34:38 +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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue