예제 #1
0
            public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
            {
                var  id      = trigger.Text.NextEnum(ItemSetId.TheHighlandersWill);
                bool created = ItemSet.CreateSet(((Character)trigger.Args.Target), id);

                trigger.Reply("ItemSet {0}created.", created ? "" : "could not be ");
                if (!created)
                {
                    trigger.Reply("Make sure that the id is valid and you have a free bag slot.");
                }
            }
예제 #2
0
        public void TestAddSet()
        {
            uint setId      = 1;
            var  setBagSlot = 0;

            // make sure the first slot is empty so the set will be added to it
            m_char.Inventory.EquippedContainers.RemoveBag(setBagSlot);

            var set = ItemMgr.Sets[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);
        }
예제 #3
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);
        }