mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
fix(Core/Items): Item sell prices are affected by durability loss. So… (#13801)
...urce: Vmangos.
This commit is contained in:
@@ -1316,7 +1316,7 @@ public:
|
||||
void DestroyZoneLimitedItem(bool update, uint32 new_zone);
|
||||
void SplitItem(uint16 src, uint16 dst, uint32 count);
|
||||
void SwapItem(uint16 src, uint16 dst);
|
||||
void AddItemToBuyBackSlot(Item* pItem);
|
||||
void AddItemToBuyBackSlot(Item* pItem, uint32 money);
|
||||
Item* GetItemFromBuyBackSlot(uint32 slot);
|
||||
void RemoveItemFromBuyBackSlot(uint32 slot, bool del);
|
||||
[[nodiscard]] uint32 GetMaxKeyringSize() const { return KEYRING_SLOT_END - KEYRING_SLOT_START; }
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user