mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[10207] Implement ITEM_FLAGS2_EXT_COST_REQUIRES_GOLD use instead sign of ExtendedCost field.
This commit is contained in:
parent
9882bc811f
commit
20a5551739
13 changed files with 42 additions and 35 deletions
|
|
@ -18539,7 +18539,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
|
|||
return false;
|
||||
}
|
||||
|
||||
if (uint32 extendedCostId = crItem->GetExtendedCostId())
|
||||
if (uint32 extendedCostId = crItem->ExtendedCost)
|
||||
{
|
||||
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(extendedCostId);
|
||||
if (!iece)
|
||||
|
|
@ -18581,7 +18581,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
|
|||
}
|
||||
}
|
||||
|
||||
uint32 price = crItem->IsExcludeMoneyPrice() ? 0 : pProto->BuyPrice * count;
|
||||
uint32 price = (crItem->ExtendedCost == 0 || pProto->Flags2 & ITEM_FLAGS2_EXT_COST_REQUIRES_GOLD) ? pProto->BuyPrice * count : 0;
|
||||
|
||||
// reputation discount
|
||||
if (price)
|
||||
|
|
@ -18604,7 +18604,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
|
|||
}
|
||||
|
||||
ModifyMoney( -(int32)price );
|
||||
if (uint32 extendedCostId = crItem->GetExtendedCostId())
|
||||
if (uint32 extendedCostId = crItem->ExtendedCost)
|
||||
{
|
||||
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(extendedCostId);
|
||||
if (iece->reqhonorpoints)
|
||||
|
|
@ -18649,7 +18649,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
|
|||
}
|
||||
|
||||
ModifyMoney( -(int32)price );
|
||||
if (uint32 extendedCostId = crItem->GetExtendedCostId())
|
||||
if (uint32 extendedCostId = crItem->ExtendedCost)
|
||||
{
|
||||
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(extendedCostId);
|
||||
if (iece->reqhonorpoints)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue