Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!CanBuyItemFromVendorSlot(vendorguid, creature->GetEntry(), item, count))
- return false;
- if ((bag == NULL_BAG && slot == NULL_SLOT) || IsInventoryPos(bag, slot))
- {
- if (!_StoreOrEquipNewItem(vendorslot, item, count, bag, slot, price, pProto, creature, crItem, true))
- return false;
- }
- else if (IsEquipmentPos(bag, slot))
- {
- if (pProto->BuyCount * count != 1)
- {
- SendEquipError(EQUIP_ERR_ITEM_CANT_BE_EQUIPPED, nullptr, nullptr);
- return false;
- }
- if (!_StoreOrEquipNewItem(vendorslot, item, count, bag, slot, price, pProto, creature, crItem, false))
- return false;
- }
- else
- {
- SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, nullptr, nullptr);
- return false;
- }
- return crItem->maxcount != 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement