Core/Items: Skip calculating durability and spell charges sell price reduction for items that have no base sell price
Fixes selling items with no price to vendors for 1c (cherry picked from commit 7624defa92e1d07000806dcdbbee6be9e27be547)
This commit is contained in:
@@ -2235,7 +2235,7 @@ uint32 Item::GetSellPrice(Player const* owner, bool forVendor /*= false*/) const
|
||||
{
|
||||
ItemTemplate const* itemTemplate = GetTemplate();
|
||||
int64 price = Item::GetSellPrice(itemTemplate, GetQuality(), GetItemLevel(owner));
|
||||
if (forVendor)
|
||||
if (price && forVendor)
|
||||
{
|
||||
std::span<ItemEffectEntry const* const> effects = GetEffects();
|
||||
auto effectWithCharges = std::ranges::find_if(effects,
|
||||
|
||||
Reference in New Issue
Block a user