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:
Shauren
2026-09-22 14:46:29 +02:00
parent 1da3bff081
commit 241cd2a1c2
+1 -1
View File
@@ -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,