fix(Core/ItemHandler): Prevent client bug from OnPlayerCanSellItem (#24400)
This commit is contained in:
parent
5ed3e533f1
commit
bad46ba2f2
1 changed files with 3 additions and 0 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue