Exemple #1
0
        public void TestAddSet()
        {
            ItemMgr.ForceInitialize();
            var setId      = ItemSetId.VolcanicArmor;
            var setBagSlot = 0;

            // make sure the first slot is empty so the set will be added to it
            m_char.Inventory.EquippedContainers.Destroy(setBagSlot + (int)EquipmentSlot.Bag1);

            var set = ItemMgr.GetSet(setId);

            Assert.IsNotNull(set);
            var result = ItemSet.CreateSet(m_char, setId);

            Assert.IsTrue(result);

            var bag = m_char.Inventory.EquippedContainers.GetBag(setBagSlot);

            Assert.IsNotNull(bag);

            Assert.AreEqual(set.Templates.Length, bag.BaseInventory.Count);
        }