mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Creatures: Removed vendor item check during loading, MAX_VENDOR_ITEMS should apply to filtered list of items depending on player opening the vendor, not global list size
Closes #10330
This commit is contained in:
@@ -8362,15 +8362,6 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
|
||||
return false;
|
||||
}
|
||||
|
||||
if (vItems->GetItemCount() >= MAX_VENDOR_ITEMS)
|
||||
{
|
||||
if (player)
|
||||
ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
|
||||
else
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vItems->GetItemCount(), MAX_VENDOR_ITEMS, vendor_entry);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -784,8 +784,6 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
|
||||
continue;
|
||||
}
|
||||
|
||||
++count;
|
||||
|
||||
// reputation discount
|
||||
int32 price = item->IsGoldRequired(itemTemplate) ? uint32(floor(itemTemplate->BuyPrice * discountMod)) : 0;
|
||||
|
||||
@@ -797,6 +795,9 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
|
||||
data << uint32(itemTemplate->MaxDurability);
|
||||
data << uint32(itemTemplate->BuyCount);
|
||||
data << uint32(item->ExtendedCost);
|
||||
|
||||
if (++count >= MAX_VENDOR_ITEMS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user