mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 16:16:27 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -708,6 +708,15 @@ void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
|
||||
// PlayerScript Hook for checking traded items if we want to filter them in a custom module
|
||||
if (!sScriptMgr->CanSetTradeItem(_player, item, tradeSlot))
|
||||
{
|
||||
// Do not send TRADE_STATUS_TRADE_CANCELED because it will cause double display of "Transaction canceled" notification
|
||||
// On the trade initiator screen
|
||||
SendTradeStatus(TRADE_STATUS_CLOSE_WINDOW);
|
||||
return;
|
||||
}
|
||||
|
||||
my_trade->SetItem(TradeSlots(tradeSlot), item);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user