public PvPBattleRestrictions() { Items = new PvPBattleItemRestrictions(); Pets = new PvPBattlePetRestrictions(); Skills = new PvPBattleSkillRestrictions(); Spells = new PvPBattleSpellRestrictions(); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.GetVersion(); switch (version) { case 0: { reader.ReadBlock( r => Items = reader.ReadTypeCreate<PvPBattleItemRestrictions>(r) ?? new PvPBattleItemRestrictions(r)); reader.ReadBlock( r => Pets = reader.ReadTypeCreate<PvPBattlePetRestrictions>(r) ?? new PvPBattlePetRestrictions(r)); reader.ReadBlock( r => Skills = reader.ReadTypeCreate<PvPBattleSkillRestrictions>(r) ?? new PvPBattleSkillRestrictions(r)); reader.ReadBlock( r => Spells = reader.ReadTypeCreate<PvPBattleSpellRestrictions>(r) ?? new PvPBattleSpellRestrictions(r)); } break; } }