fix(Core/ItemHandler): Prevent client bug from OnPlayerCanSellItem (#24400)
This commit is contained in:
@@ -602,7 +602,10 @@ void WorldSession::HandleSellItemOpcode(WorldPackets::Item::SellItem& packet)
|
|||||||
if (pItem)
|
if (pItem)
|
||||||
{
|
{
|
||||||
if (!sScriptMgr->OnPlayerCanSellItem(_player, pItem, creature))
|
if (!sScriptMgr->OnPlayerCanSellItem(_player, pItem, creature))
|
||||||
|
{
|
||||||
|
_player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, packet.ItemGuid, 0);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// prevent sell not owner item
|
// prevent sell not owner item
|
||||||
if (_player->GetGUID() != pItem->GetOwnerGUID())
|
if (_player->GetGUID() != pItem->GetOwnerGUID())
|
||||||
|
|||||||
Reference in New Issue
Block a user