Пример #1
0
 public Item(Creature_item CItem)
 {
     _SlotId = CItem.SlotId;
     _ModelId = CItem.ModelId;
     _EffectId = CItem.EffectId;
     _Count = 1;
 }
Пример #2
0
        public static bool EquipAdd(Player Plr, ref List<string> Values)
        {
            int Model = GetInt(ref Values);
            int Slot = GetInt(ref Values);
            int Save = GetInt(ref Values);

            Creature Obj = GetObjectTarget(Plr) as Creature;
            if (Obj == null)
                return false;

            Creature_item item = new Creature_item();
            item.SlotId = (ushort)Slot;
            item.ModelId = (ushort)Model;
            item.Entry = Obj.Entry;
            item.EffectId = 0;
            Obj.ItmInterface.AddCreatureItem(item);
            Plr.SendMessage(0, "", "Item Added :" + (ushort)Slot, SystemData.ChatLogFilters.CHATLOGFILTERS_SHOUT);
            if (Save > 0)
            {
                WorldMgr.AddCreatureItem(item);
            }

            return true;
        }
Пример #3
0
 public void AddCreatureItem(Creature_item Item)
 {
     if (Item.SlotId < Items.Length && Item.SlotId >= 0)
     {
         Item Itm = new Item(Item);
         AddCreatureItem(Itm);
     }
 }
Пример #4
0
        static public void AddCreatureItem(Creature_item Item)
        {
            RemoveCreatureItem(Item.Entry, Item.SlotId);

            List<Creature_item> Items = GetCreatureItems(Item.Entry);
            Items.Add(Item);
            Database.AddObject(Item);
        }