public void Initialize() { if (IsInitialized) { return; } this.InvString = InvString ?? new List <string>(); this.WarriorGearString = WarriorGearString ?? new List <string>(); this.MageGearString = MageGearString ?? new List <string>(); Inv = ItemDatabase.GetItems(InvString); WarriorGear = WarriorGear ?? ItemDatabase.GetItems(WarriorGearString.Distinct()); MageGear = MageGear ?? ItemDatabase.GetItems(MageGearString.Distinct()); }
public void Initialize() { Inv = ItemDatabase.GetItems(InvString); WarriorGear = new List <Item>(); foreach (var warriorgear in WarriorGearString.Distinct()) { Equip(warriorgear, ArchType.Warrior); } MageGear = new List <Item>(); foreach (var magegear in MageGearString.Distinct()) { Equip(magegear, ArchType.Mage); } //WarriorGear = ItemDatabase.GetItems(WarriorGearString.Distinct()); //MageGear = ItemDatabase.GetItems(MageGearString.Distinct()); }