Mooege.Core.GS.Items.Item.SetInventoryLocation C# (CSharp) Method

SetInventoryLocation() public method

public SetInventoryLocation ( int equipmentSlot, int column, int row ) : void
equipmentSlot int
column int
row int
return void
        public void SetInventoryLocation(int equipmentSlot, int column, int row)
        {
            this.EquipmentSlot = equipmentSlot;
            this.InventoryLocation.X = column;
            this.InventoryLocation.Y = row;
            if (this.Owner is GS.Players.Player)
            {
                var player = (this.Owner as GS.Players.Player);
                if (!this.Reveal(player))
                {
                    player.InGameClient.SendMessage(this.ACDInventoryPositionMessage);
                }
            }
        }

Usage Example

Example #1
0
 /// <summary>
 /// Equips an item in an equipment slot
 /// </summary>
 public void EquipItem(Item item, int slot)
 {
     _equipment[slot] = item.DynamicID;
     if (!Items.ContainsKey(item.DynamicID))
         Items.Add(item.DynamicID, item);
     item.Owner = _owner;
     item.Attributes[GameAttribute.Item_Equipped] = true; // Probaly should be handled by Equipable class /fasbat
     item.Attributes.SendChangedMessage(_owner.InGameClient);
     item.SetInventoryLocation(slot, 0, 0);            
 }
All Usage Examples Of Mooege.Core.GS.Items.Item::SetInventoryLocation