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

@ -103,7 +103,7 @@ namespace FFXIVClassic_Lobby_Server.packets
this.data = data;
}
public List<SubPacket> getSubpackets()
public List<SubPacket> GetSubpackets()
{
List<SubPacket> subpackets = new List<SubPacket>(header.numSubpackets);
@ -115,7 +115,7 @@ namespace FFXIVClassic_Lobby_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)
@ -129,7 +129,7 @@ namespace FFXIVClassic_Lobby_Server.packets
return header;
}
public byte[] getHeaderBytes()
public byte[] GetHeaderBytes()
{
int size = Marshal.SizeOf(header);
byte[] arr = new byte[size];
@ -141,16 +141,16 @@ namespace FFXIVClassic_Lobby_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))
{
@ -173,7 +173,7 @@ namespace FFXIVClassic_Lobby_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))
{
@ -196,7 +196,7 @@ namespace FFXIVClassic_Lobby_Server.packets
}
#region Utility Functions
public static BasePacket createPacket(List<SubPacket> subpackets, bool isAuthed, bool isEncrypted)
public static BasePacket CreatePacket(List<SubPacket> subpackets, bool isAuthed, bool isEncrypted)
{
//Create Header
BasePacketHeader header = new BasePacketHeader();
@ -218,7 +218,7 @@ namespace FFXIVClassic_Lobby_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;
}
@ -229,7 +229,7 @@ namespace FFXIVClassic_Lobby_Server.packets
return packet;
}
public static BasePacket createPacket(SubPacket subpacket, bool isAuthed, bool isEncrypted)
public static BasePacket CreatePacket(SubPacket subpacket, bool isAuthed, bool isEncrypted)
{
//Create Header
BasePacketHeader header = new BasePacketHeader();
@ -247,7 +247,7 @@ namespace FFXIVClassic_Lobby_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);
@ -256,7 +256,7 @@ namespace FFXIVClassic_Lobby_Server.packets
return packet;
}
public static BasePacket createPacket(byte[] data, bool isAuthed, bool isEncrypted)
public static BasePacket CreatePacket(byte[] data, bool isAuthed, bool isEncrypted)
{
Debug.Assert(data != null);
@ -277,7 +277,7 @@ namespace FFXIVClassic_Lobby_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;
@ -304,7 +304,7 @@ namespace FFXIVClassic_Lobby_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;
@ -331,16 +331,16 @@ namespace FFXIVClassic_Lobby_Server.packets
}
#endregion
public void debugPrintPacket()
public void DebugPrintPacket()
{
#if DEBUG
Console.BackgroundColor = ConsoleColor.DarkYellow;
Program.Log.Debug("IsAuth: {0} Size: 0x{1:X}, NumSubpackets: {2}{3}{4}", header.isAuthenticated, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()));
Program.Log.Debug("IsAuth: {0} Size: 0x{1:X}, NumSubpackets: {2}{3}{4}", header.isAuthenticated, 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;