示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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]
        }
示例#4
0
        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);
        }