mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Packet refactoring.
This commit is contained in:
1 parent
96641865bc
commit
0ec9c5576c
22 files changed
+115
-109
No files matched your search
@@ -265,6 +265,15 @@ namespace Meteor.Common
|
||||
return secondDigit + firstDigit;
|
||||
}
|
||||
|
||||
public static string ReadNullTermString(BinaryReader reader, int maxSize = 0x20)
|
||||
{
|
||||
return Encoding.ASCII.GetString(reader.ReadBytes(maxSize)).Trim(new[] { '\0' });
|
||||
}
|
||||
|
||||
public static void WriteNullTermString(BinaryWriter writer, string value, int maxSize = 0x20)
|
||||
{
|
||||
writer.Write(Encoding.ASCII.GetBytes(value), 0, Encoding.ASCII.GetByteCount(value) >= maxSize ? maxSize : Encoding.ASCII.GetByteCount(value));
|
||||
}
|
||||
|
||||
public static string FFXIVLoginStringDecodeBinary(string path)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user