fix(Core/ItemHandler): Prevent client bug from OnPlayerCanSellItem (#24400)

This commit is contained in:
UndeadRogue
2026-01-15 06:01:36 +00:00
committed by GitHub
parent 5ed3e533f1
commit bad46ba2f2

View File

@@ -602,7 +602,10 @@ void WorldSession::HandleSellItemOpcode(WorldPackets::Item::SellItem& packet)
if (pItem)
{
if (!sScriptMgr->OnPlayerCanSellItem(_player, pItem, creature))
{
_player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, packet.ItemGuid, 0);
return;
}
// prevent sell not owner item
if (_player->GetGUID() != pItem->GetOwnerGUID())