public virtual void OnRequestBuyItem(Player player, uint itemId) { Item item = _vendorGrid.GetItem(itemId); if (item == null) { return; } if (!player.Inventory.HasInventorySpace(item)) { return; } player.Inventory.BuyItem(item); player.Inventory.RemoveGoldAmount(item.ItemDefinition.BaseGoldValue); }
public virtual void OnRequestBuyItem(Players.Player player, uint itemId) { // TODO: Check gold here Item item = _vendorGrid.GetItem(itemId); if (item == null) { return; } if (!player.Inventory.HasInventorySpace(item)) { return; } // TODO: Remove the gold player.Inventory.BuyItem(item); }
public virtual void OnRequestBuyItem(Player player, uint itemId) { // TODO: Check gold here Item item = _vendorGrid.GetItem(itemId); if (item == null) { return; } if (!player.Inventory.HasInventorySpace(item)) { return; } player.Inventory.BuyItem(item); player.Inventory.RemoveGoldAmount(item.ItemDefinition.BaseGoldValue); // Remove the gold amount for buy a item [Necrosummon] }
public virtual void OnRequestBuyItem(Players.Player player, uint itemId) { // TODO: Check gold here // int $player_Gold = GetGoldAmount(); Item item = _vendorGrid.GetItem(itemId); if (item == null) { return; } if (!player.Inventory.HasInventorySpace(item)) { return; } // TODO: Remove the gold // RemoveGoldAmount($coast); player.Inventory.BuyItem(item); }