Exemplo n.º 1
0
        public Inventory(List <string> InvString, List <string> WarriorGearString, List <string> MageGearString)
        {
            this.InvString         = InvString ?? new List <string>();
            this.WarriorGearString = WarriorGearString ?? new List <string>();
            this.MageGearString    = MageGearString ?? new List <string>();

            Inv         = ItemDatabase.GetItems(InvString);
            WarriorGear = ItemDatabase.GetItems(WarriorGearString);
            MageGear    = ItemDatabase.GetItems(MageGearString);
        }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
 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());
 }
Exemplo n.º 4
0
        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 = Inv.Where(i => WarriorGearString.Contains(i.Name)).ToList();
            MageGear    = Inv.Where(i => MageGearString.Contains(i.Name)).ToList();
            //WarriorGear = ItemDatabase.GetItems(WarriorGearString);
            //MageGear = ItemDatabase.GetItems(MageGearString);
        }