public static void Save() { Persistence.Serialize( _FilePath, writer => { writer.Write(1); // Version writer.Write(_Collections.Count); foreach (var kv in _Collections) { writer.Write(kv.Key); kv.Value.RemoveAll(ent => ent == null || ent.Deleted); writer.Write(kv.Value.Count); foreach (var ent in kv.Value) { writer.Write(ent.Serial); } } }); }
public static void OnSave(WorldSaveEventArgs e) { Persistence.Serialize( FilePath, writer => { writer.Write((int)0); writer.Write(LastReset); writer.Write(ROTTable.Count); foreach (KeyValuePair <PlayerMobile, Dictionary <SkillName, DateTime> > kvp in ROTTable) { writer.Write(kvp.Key); writer.Write(kvp.Value.Count); foreach (KeyValuePair <SkillName, DateTime> kvp2 in kvp.Value) { writer.Write((int)kvp2.Key); writer.Write(kvp2.Value); } } writer.Write(StatsTable.Count); foreach (KeyValuePair <PlayerMobile, int> kvp in StatsTable) { writer.Write(kvp.Key); writer.Write(kvp.Value); } }); }
public static void OnSave(WorldSaveEventArgs e) { Persistence.Serialize( FilePath, writer => { writer.Write((int)2); }); }
public static void OnSave(WorldSaveEventArgs e) { Persistence.Serialize( FilePath, writer => { writer.Write((int)8); writer.Write(false); writer.Write(_SpawnsConverted); }); }
public static void OnSave(WorldSaveEventArgs e) { Persistence.Serialize(FilePath, OnSerialize); }