public bool AddEquipment(ConquerItem Item, ItemPosition Position) { Item.Position = Position; Equipment.ThreadSafeAdd(Position, Item); Item.Send(this); return(true); }
public bool TryGetEquipment(ItemPosition Position, out ConquerItem Item) { Item = default(ConquerItem); if (Equipment.ContainsKey(Position)) { Item = Equipment[Position]; return(true); } return(false); }
public bool TryGetInventory(uint UID, out ConquerItem Item) { Item = default(ConquerItem); lock (Inventory) { Item = Inventory.Find((item) => { return(item.UID == UID); }); if (Item != null) { return(true); } } return(false); }
public bool RemoveInventory(ConquerItem Item) { bool Removed = false; lock (Inventory) { Removed = Inventory.Remove(Item); if (Removed) { Item.RemoveInventory(this); } } return(Removed); }
public bool AddInventory(ConquerItem Item) { lock (Inventory) { if (Inventory.Count < 40) { Item.Position = ItemPosition.Inventory; Item.Send(this); Inventory.Add(Item); return(true); } return(false); } }
public void Unequip(ConquerItem Item, ItemPosition Position) { Item.Position = Position; Item.Unequip(this); Equipment.ThreadSafeRemove(Position); }
public bool AddEquipment(ConquerItem Item, ItemPosition Position) { Item.Position = Position; Equipment.ThreadSafeAdd(Position, Item); Item.Send(this); return true; }
public bool TryGetInventory(uint UID, out ConquerItem Item) { Item = default(ConquerItem); lock (Inventory) { Item = Inventory.Find((item) => { return item.UID == UID; }); if (Item != null) return true; } return false; }
public bool TryGetEquipment(ItemPosition Position, out ConquerItem Item) { Item = default(ConquerItem); if (Equipment.ContainsKey(Position)) { Item = Equipment[Position]; return true; } return false; }
public bool RemoveInventory(ConquerItem Item) { bool Removed = false; lock (Inventory) { Removed = Inventory.Remove(Item); if (Removed) { Item.RemoveInventory(this); } } return Removed; }
public bool AddInventory(ConquerItem Item) { lock (Inventory) { if (Inventory.Count < 40) { Item.Position = ItemPosition.Inventory; Item.Send(this); Inventory.Add(Item); return true; } return false; } }