fix: Fixes static persistence of faction system (#1020)
This commit is contained in:
parent
eee8494558
commit
7b619f23b8
1 changed files with 2 additions and 4 deletions
|
|
@ -47,14 +47,12 @@ public static class FactionSystem
|
|||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
var factions = Faction.Factions;
|
||||
|
||||
for (var i = 0; i < factions.Count; i++)
|
||||
{
|
||||
factions[i].State.Serialize(writer);
|
||||
}
|
||||
|
||||
var towns = Town.Towns;
|
||||
|
||||
for (var i = 0; i < towns.Count; i++)
|
||||
{
|
||||
towns[i].State.Serialize(writer);
|
||||
|
|
@ -65,13 +63,13 @@ public static class FactionSystem
|
|||
{
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
var count = reader.ReadEncodedInt();
|
||||
var count = Faction.Factions.Count;
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
new FactionState(reader);
|
||||
}
|
||||
|
||||
count = reader.ReadEncodedInt();
|
||||
count = Town.Towns.Count;
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
new TownState(reader);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue