Skip to content

Commit c7d20d9

Browse files
ShaurenXenphis
authored andcommitted
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
1 parent cb5a22c commit c7d20d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/server/game/Entities/Item/Item.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ uint32 Item::GetSellPrice(bool forVendor /*= false*/) const
11491149
{
11501150
ItemTemplate const* itemTemplate = GetTemplate();
11511151
int32 price = Item::GetSellPrice(itemTemplate);
1152-
if (forVendor)
1152+
if (price && forVendor)
11531153
{
11541154
auto effectWithCharges = std::ranges::find_if(itemTemplate->Effects,
11551155
[](ItemEffect const& itemEffect) { return itemEffect.SpellID && itemEffect.TriggerType == ITEM_SPELLTRIGGER_ON_USE && itemEffect.Charges < 0; });

0 commit comments

Comments
 (0)