public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); MTitle = new TitleCollection(); _mValorItems = new ValorItemCollection(); switch (version) { case 2: { int categoryCount = reader.ReadInt(); if (categoryCount > 0) { Categories = new Dictionary <int, string>(); for (int i = 0; i < categoryCount; i++) { int num = reader.ReadInt(); string title = reader.ReadString(); Categories.Add(num, title); } } goto case 1; } case 1: { int count = reader.ReadInt(); if (count > 0) { for (int i = 0; i < count; i++) { var r = (ValorItem)reader.ReadItem(); _mValorItems.Add(r); } } goto case 0; } case 0: { int count = reader.ReadInt(); if (count > 0) { for (int i = 0; i < count; i++) { var r = (ValorTitleItem)reader.ReadItem(); MTitle.Add(r); } } } _mInstance = this; break; } }
public void AddValorItem(ValorItem r, Mobile from) { _mValorItems.Add(r); }