public bool Remove(Item item)
{
lock (_pockets)
{
if (_pockets.Values.Any(pocket => pocket.Remove(item)))
{
Send.ItemRemove(_creature, item);
this.OnItemLeavesInventory(item);
ChannelServer.Instance.Events.OnPlayerRemovesItem(_creature, item.Info.Id, item.Info.Amount);
if (item.Info.Pocket.IsEquip())
{
this.CheckLeftHand(item, item.Info.Pocket, Pocket.None);
this.CheckRightHand(item, item.Info.Pocket, Pocket.None);
this.UpdateEquipReferences();
this.OnUnequip(item);
this.UpdateEquipStats();
if (_creature.Region != Region.Limbo)
Send.EquipmentMoved(_creature, item.Info.Pocket);
}
return true;
}
}
return false;
}