fix: Adds Poison to codegen (#1002)

This commit is contained in:
Kamron Batman 2022-04-18 00:05:44 -07:00 • committed by GitHub
parent 933c41070f
commit fc3d9b926d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 140 additions and 171 deletions

View file

@ -76,35 +76,5 @@ namespace Server
return null;
}
public static void Serialize(Poison p, IGenericWriter writer)
{
if (p == null)
{
writer.Write((byte)0);
}
else
{
writer.Write((byte)1);
writer.Write((byte)p.Level);
}
}
public static Poison Deserialize(IGenericReader reader)
{
switch (reader.ReadByte())
{
case 1: return GetPoison(reader.ReadByte());
case 2:
// no longer used, safe to remove?
reader.ReadInt();
reader.ReadDouble();
reader.ReadInt();
reader.ReadTimeSpan();
break;
}
return null;
}
}
}