fix(Core/Items): Item sell prices are affected by durability loss. So… (#13801)
...urce: Vmangos.
This commit is contained in:
parent
cb475290b4
commit
8f697bdaee
3 changed files with 52 additions and 8 deletions
|
|
@ -3961,7 +3961,7 @@ void Player::SwapItem(uint16 src, uint16 dst)
|
|||
AutoUnequipOffhandIfNeed();
|
||||
}
|
||||
|
||||
void Player::AddItemToBuyBackSlot(Item* pItem)
|
||||
void Player::AddItemToBuyBackSlot(Item* pItem, uint32 money)
|
||||
{
|
||||
if (pItem)
|
||||
{
|
||||
|
|
@ -4003,10 +4003,7 @@ void Player::AddItemToBuyBackSlot(Item* pItem)
|
|||
uint32 eslot = slot - BUYBACK_SLOT_START;
|
||||
|
||||
SetGuidValue(PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), pItem->GetGUID());
|
||||
if (ItemTemplate const* proto = pItem->GetTemplate())
|
||||
SetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, proto->SellPrice * pItem->GetCount());
|
||||
else
|
||||
SetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, 0);
|
||||
SetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, money);
|
||||
SetUInt32Value(PLAYER_FIELD_BUYBACK_TIMESTAMP_1 + eslot, (uint32)etime);
|
||||
|
||||
// move to next (for non filled list is move most optimized choice)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue