Serialization interfaces (#62)
This commit is contained in:
parent
5e2be2d7b6
commit
5c8821b11c
2406 changed files with 10100 additions and 9350 deletions
|
|
@ -439,14 +439,14 @@ namespace Server.Factions
|
|||
|
||||
public override string ToString() => Definition.FriendlyName;
|
||||
|
||||
public static void WriteReference(GenericWriter writer, Town town)
|
||||
public static void WriteReference(IGenericWriter writer, Town town)
|
||||
{
|
||||
int idx = Towns.IndexOf(town);
|
||||
|
||||
writer.WriteEncodedInt(idx + 1);
|
||||
}
|
||||
|
||||
public static Town ReadReference(GenericReader reader)
|
||||
public static Town ReadReference(IGenericReader reader)
|
||||
{
|
||||
int idx = reader.ReadEncodedInt() - 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue