fix: Deletes Account serialization extensions since they are incompatible. (#1903)
This commit is contained in:
parent
3e70d073ad
commit
6a476e6254
1 changed files with 0 additions and 29 deletions
|
|
@ -1,29 +0,0 @@
|
|||
using Server.Accounting;
|
||||
|
||||
namespace Server;
|
||||
|
||||
public static class SerializationExt
|
||||
{
|
||||
public static IAccount ReadAccount(this IGenericReader reader)
|
||||
{
|
||||
return reader.ReadByte() switch
|
||||
{
|
||||
0 => null,
|
||||
1 => Accounts.GetAccount(reader.ReadStringRaw()),
|
||||
2 => Accounts.FindAccount(reader.ReadSerial())
|
||||
};
|
||||
}
|
||||
|
||||
public static void Write(this IGenericWriter writer, IAccount acct)
|
||||
{
|
||||
if (acct == null)
|
||||
{
|
||||
writer.Write((byte)0);
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write((byte)2);
|
||||
writer.Write(acct.Serial);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue