mooege/mooege — Issue #168: Inventory visual bug (equipped items shown as disabled)
Author: xsochor
Created: 2011-10-13 00:25:18+00:00
State: open

missing sent messages to ITEM in Equipment.cs

```csharp
///

/// Equips an item in an equipment slot
///

public void EquipItem(Item item, int slot)
{
_equipment[slot] = item.DynamicID;
item.Owner = _owner;
item.SetInventoryLocation(slot, 0, 0);
GameAttributeMap map = new GameAttributeMap();
map[GameAttributeB.Item_Equipped] = true;
map.SendMessage(_owner.InGameClient, item.DynamicID; // send to update visual/info on item
}

///

/// Removes an item from the equipment slot it uses
/// returns the used equipmentSlot
///

public int UnequipItem(Item item)
{
for (int i = 0; i < EquipmentSlots; i++)
{
if (_equipment[i] == item.DynamicID)
{
_equipment[i] = 0;
item.SetInventoryLocation(-1, -1, -1);
GameAttributeMap map = new GameAttributeMap();
map[GameAttributeB.Item_Equipped] = false;
map.SendMessage(item.Owner.InGameClient, item.DynamicID; // send to update visual/info on item
item.Owner = null;
return i;
}
}

return 0;
}

```