public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 2: KhaldunTastyTreat.Load(reader); PotionOfGloriousFortune.Load(reader); goto case 1; case 1: Enabled = reader.ReadBool(); QuestContentGenerated = reader.ReadBool(); goto case 0; case 0: int count = reader.ReadInt(); for (int i = 0; i < count; i++) { Mobile m = reader.ReadMobile(); int points = reader.ReadInt(); if (m != null && points > 0) { DungeonPoints[m] = points; } } break; } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 4: case 3: case 2: KhaldunTastyTreat.Load(reader); if (version < 4) { PotionOfGloriousFortune.OldLoad(reader); } goto case 1; case 1: if (version == 2) { reader.ReadBool(); var questGenerated = reader.ReadBool(); Timer.DelayCall(() => { var khaldun = SeasonalEventSystem.GetEvent <TreasuresOfKhaldunEvent>(); if (khaldun != null) { khaldun.QuestContentGenerated = questGenerated; } }); } goto case 0; case 0: int count = reader.ReadInt(); for (int i = 0; i < count; i++) { Mobile m = reader.ReadMobile(); int points = reader.ReadInt(); if (m != null && points > 0) { DungeonPoints[m] = points; } } break; } }