mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-05 03:53:48 +00:00
fix(Core/PlayerScript) Align player script function names (#21020)
Co-authored-by: sudlud <sudlud@users.noreply.github.com>
This commit is contained in:
@@ -417,7 +417,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
|
||||
AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
|
||||
Player* player = GetPlayer();
|
||||
|
||||
if (!sScriptMgr->CanPlaceAuctionBid(player, auction))
|
||||
if (!sScriptMgr->OnPlayerCanPlaceAuctionBid(player, auction))
|
||||
{
|
||||
SendAuctionCommandResult(0, AUCTION_PLACE_BID, ERR_AUCTION_RESTRICTED_ACCOUNT);
|
||||
return;
|
||||
|
||||
@@ -140,7 +140,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
|
||||
// queue result (default ok)
|
||||
GroupJoinBattlegroundResult err = GroupJoinBattlegroundResult(bg->GetBgTypeID());
|
||||
|
||||
if (!sScriptMgr->CanJoinInBattlegroundQueue(_player, guid, bgTypeId, joinAsGroup, err) && err <= 0)
|
||||
if (!sScriptMgr->OnPlayerCanJoinInBattlegroundQueue(_player, guid, bgTypeId, joinAsGroup, err) && err <= 0)
|
||||
{
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
|
||||
@@ -424,7 +424,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket& recvData)
|
||||
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, arenaType);
|
||||
BattlegroundQueue& bgQueue = sBattlegroundMgr->GetBattlegroundQueue(bgQueueTypeId);
|
||||
|
||||
if (!sScriptMgr->CanBattleFieldPort(_player, arenaType, bgTypeId, action))
|
||||
if (!sScriptMgr->OnPlayerCanBattleFieldPort(_player, arenaType, bgTypeId, action))
|
||||
return;
|
||||
|
||||
// get group info from queue
|
||||
@@ -579,11 +579,11 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket& recvData)
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
sScriptMgr->OnBattlegroundDesertion(_player, BG_DESERTION_TYPE_LEAVE_QUEUE);
|
||||
sScriptMgr->OnPlayerBattlegroundDesertion(_player, BG_DESERTION_TYPE_LEAVE_QUEUE);
|
||||
}
|
||||
|
||||
if (bg->isArena() && (bg->GetStatus() == STATUS_IN_PROGRESS || bg->GetStatus() == STATUS_WAIT_JOIN))
|
||||
sScriptMgr->OnBattlegroundDesertion(_player, ARENA_DESERTION_TYPE_LEAVE_QUEUE);
|
||||
sScriptMgr->OnPlayerBattlegroundDesertion(_player, ARENA_DESERTION_TYPE_LEAVE_QUEUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -748,7 +748,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
|
||||
// queue result (default ok)
|
||||
GroupJoinBattlegroundResult err = GroupJoinBattlegroundResult(bgt->GetBgTypeID());
|
||||
|
||||
if (!sScriptMgr->CanJoinInArenaQueue(_player, guid, arenaslot, bgTypeId, asGroup, isRated, err) && err <= 0)
|
||||
if (!sScriptMgr->OnPlayerCanJoinInArenaQueue(_player, guid, arenaslot, bgTypeId, asGroup, isRated, err) && err <= 0)
|
||||
{
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
|
||||
|
||||
@@ -962,7 +962,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
|
||||
if (sWorld->IsFFAPvPRealm() && !pCurrChar->IsGameMaster() && !pCurrChar->HasPlayerFlag(PLAYER_FLAGS_RESTING))
|
||||
if (!pCurrChar->HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
|
||||
{
|
||||
sScriptMgr->OnFfaPvpStateUpdate(pCurrChar,true);
|
||||
sScriptMgr->OnPlayerFfaPvpStateUpdate(pCurrChar,true);
|
||||
pCurrChar->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
|
||||
}
|
||||
|
||||
@@ -1124,7 +1124,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
|
||||
if (pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST))
|
||||
{
|
||||
pCurrChar->RemoveAtLoginFlag(AT_LOGIN_FIRST);
|
||||
sScriptMgr->OnFirstLogin(pCurrChar);
|
||||
sScriptMgr->OnPlayerFirstLogin(pCurrChar);
|
||||
}
|
||||
|
||||
METRIC_EVENT("player_events", "Login", pCurrChar->GetName());
|
||||
|
||||
@@ -347,7 +347,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
++_addonMessageReceiveCount;
|
||||
}
|
||||
|
||||
sScriptMgr->OnBeforeSendChatMessage(_player, type, lang, msg);
|
||||
sScriptMgr->OnPlayerBeforeSendChatMessage(_player, type, lang, msg);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@@ -433,7 +433,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
if (type == CHAT_MSG_PARTY_LEADER && !group->IsLeader(sender->GetGUID()))
|
||||
return;
|
||||
|
||||
if (!sScriptMgr->CanPlayerUseChat(GetPlayer(), type, lang, msg, group))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -451,7 +451,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
{
|
||||
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId()))
|
||||
{
|
||||
if (!sScriptMgr->CanPlayerUseChat(GetPlayer(), type, lang, msg, guild))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, guild))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -469,7 +469,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
{
|
||||
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId()))
|
||||
{
|
||||
if (!sScriptMgr->CanPlayerUseChat(GetPlayer(), type, lang, msg, guild))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, guild))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -492,7 +492,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sScriptMgr->CanPlayerUseChat(GetPlayer(), type, lang, msg, group))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -515,7 +515,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sScriptMgr->CanPlayerUseChat(GetPlayer(), type, lang, msg, group))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -533,7 +533,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
if (!group || !group->isRaidGroup() || !(group->IsLeader(GetPlayer()->GetGUID()) || group->IsAssistant(GetPlayer()->GetGUID())) || group->isBGGroup())
|
||||
return;
|
||||
|
||||
if (!sScriptMgr->CanPlayerUseChat(GetPlayer(), type, lang, msg, group))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -553,7 +553,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
if (!group || !group->isBGGroup())
|
||||
return;
|
||||
|
||||
if (!sScriptMgr->CanPlayerUseChat(GetPlayer(), type, lang, msg, group))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -572,7 +572,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
if (!group || !group->isBGGroup() || !group->IsLeader(GetPlayer()->GetGUID()))
|
||||
return;
|
||||
|
||||
if (!sScriptMgr->CanPlayerUseChat(GetPlayer(), type, lang, msg, group))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(GetPlayer(), type, lang, msg, group))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -599,7 +599,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
{
|
||||
if (Channel* chn = cMgr->GetChannel(channel, sender))
|
||||
{
|
||||
if (!sScriptMgr->CanPlayerUseChat(sender, type, lang, msg, chn))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(sender, type, lang, msg, chn))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -632,7 +632,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
sender->ToggleAFK();
|
||||
}
|
||||
|
||||
if (!sScriptMgr->CanPlayerUseChat(sender, type, lang, msg))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(sender, type, lang, msg))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -660,7 +660,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
sender->ToggleDND();
|
||||
}
|
||||
|
||||
if (!sScriptMgr->CanPlayerUseChat(sender, type, lang, msg))
|
||||
if (!sScriptMgr->OnPlayerCanUseChat(sender, type, lang, msg))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sScriptMgr->CanGroupInvite(invitingPlayer, membername))
|
||||
if (!sScriptMgr->OnPlayerCanGroupInvite(invitingPlayer, membername))
|
||||
return;
|
||||
|
||||
if (invitingPlayer->IsSpectator() || invitedPlayer->IsSpectator())
|
||||
@@ -230,7 +230,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sScriptMgr->CanGroupAccept(GetPlayer(), group))
|
||||
if (!sScriptMgr->OnPlayerCanGroupAccept(GetPlayer(), group))
|
||||
return;
|
||||
|
||||
if (group->GetLeaderGUID() == GetPlayer()->GetGUID())
|
||||
|
||||
@@ -756,7 +756,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
|
||||
Item* pItem = _player->GetItemByGuid(itemguid);
|
||||
if (pItem)
|
||||
{
|
||||
if (!sScriptMgr->CanSellItem(_player, pItem, creature))
|
||||
if (!sScriptMgr->OnPlayerCanSellItem(_player, pItem, creature))
|
||||
return;
|
||||
|
||||
// prevent sell not owner item
|
||||
|
||||
@@ -93,7 +93,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData)
|
||||
loot = &creature->loot;
|
||||
}
|
||||
|
||||
sScriptMgr->OnAfterCreatureLoot(player);
|
||||
sScriptMgr->OnPlayerAfterCreatureLoot(player);
|
||||
|
||||
InventoryResult msg;
|
||||
LootItem* lootItem = player->StoreLootItem(lootSlot, loot, msg);
|
||||
@@ -179,7 +179,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
|
||||
|
||||
if (loot)
|
||||
{
|
||||
sScriptMgr->OnBeforeLootMoney(player, loot);
|
||||
sScriptMgr->OnPlayerBeforeLootMoney(player, loot);
|
||||
loot->NotifyMoneyRemoved();
|
||||
if (shareMoney && player->GetGroup()) //item, pickpocket and players can be looted only single player
|
||||
{
|
||||
@@ -211,7 +211,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
|
||||
}
|
||||
else
|
||||
{
|
||||
sScriptMgr->OnAfterCreatureLootMoney(player);
|
||||
sScriptMgr->OnPlayerAfterCreatureLootMoney(player);
|
||||
player->ModifyMoney(loot->gold);
|
||||
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, loot->gold);
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sScriptMgr->CanSendMail(player, receiverGuid, mailbox, subject, body, money, COD, item))
|
||||
if (!sScriptMgr->OnPlayerCanSendMail(player, receiverGuid, mailbox, subject, body, money, COD, item))
|
||||
{
|
||||
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_INTERNAL_ERROR);
|
||||
return;
|
||||
@@ -278,7 +278,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
|
||||
items[i] = item;
|
||||
}
|
||||
|
||||
if (!items_count && !sScriptMgr->CanSendMail(player, receiverGuid, mailbox, subject, body, money, COD, nullptr))
|
||||
if (!items_count && !sScriptMgr->OnPlayerCanSendMail(player, receiverGuid, mailbox, subject, body, money, COD, nullptr))
|
||||
{
|
||||
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_INTERNAL_ERROR);
|
||||
return;
|
||||
@@ -422,14 +422,14 @@ void WorldSession::HandleMailReturnToSender(WorldPacket& recvData)
|
||||
for (MailItemInfoVec::iterator itr = m->items.begin(); itr != m->items.end(); ++itr)
|
||||
{
|
||||
Item* item = player->GetMItem(itr->item_guid);
|
||||
if (item && !sScriptMgr->CanSendMail(player, ObjectGuid(HighGuid::Player, m->sender), mailbox, m->subject, m->body, m->money, m->COD, item))
|
||||
if (item && !sScriptMgr->OnPlayerCanSendMail(player, ObjectGuid(HighGuid::Player, m->sender), mailbox, m->subject, m->body, m->money, m->COD, item))
|
||||
{
|
||||
player->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!sScriptMgr->CanSendMail(player, ObjectGuid(HighGuid::Player, m->sender), mailbox, m->subject, m->body, m->money, m->COD, nullptr))
|
||||
else if (!sScriptMgr->OnPlayerCanSendMail(player, ObjectGuid(HighGuid::Player, m->sender), mailbox, m->subject, m->body, m->money, m->COD, nullptr))
|
||||
{
|
||||
player->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR);
|
||||
return;
|
||||
|
||||
@@ -181,7 +181,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
|
||||
}
|
||||
else
|
||||
{
|
||||
sScriptMgr->OnGossipSelectCode(_player, menuId, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str());
|
||||
sScriptMgr->OnPlayerGossipSelectCode(_player, menuId, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -204,7 +204,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
|
||||
}
|
||||
else
|
||||
{
|
||||
sScriptMgr->OnGossipSelect(_player, menuId, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
|
||||
sScriptMgr->OnPlayerGossipSelect(_player, menuId, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -742,7 +742,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data)
|
||||
if (player->HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
|
||||
{
|
||||
player->RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
|
||||
sScriptMgr->OnFfaPvpStateUpdate(player, false);
|
||||
sScriptMgr->OnPlayerFfaPvpStateUpdate(player, false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -904,7 +904,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
|
||||
// reputation discount
|
||||
float discountMod = _player->GetReputationPriceDiscount(unit);
|
||||
|
||||
sScriptMgr->OnBeforePlayerDurabilityRepair(_player, npcGUID, itemGUID, discountMod, guildBank);
|
||||
sScriptMgr->OnPlayerBeforeDurabilityRepair(_player, npcGUID, itemGUID, discountMod, guildBank);
|
||||
|
||||
if (itemGUID)
|
||||
{
|
||||
|
||||
@@ -126,7 +126,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
|
||||
}
|
||||
}
|
||||
|
||||
sScriptMgr->PetitionBuy(_player, creature, charterid, cost, type);
|
||||
sScriptMgr->OnPlayerPetitionBuy(_player, creature, charterid, cost, type);
|
||||
|
||||
if (type == GUILD_CHARTER_TYPE)
|
||||
{
|
||||
@@ -840,7 +840,7 @@ void WorldSession::SendPetitionShowList(ObjectGuid guid)
|
||||
|
||||
if (creature->IsTabardDesigner())
|
||||
{
|
||||
sScriptMgr->PetitionShowList(_player, creature, CharterEntry, CharterDispayID, CharterCost);
|
||||
sScriptMgr->OnPlayerPetitionShowList(_player, creature, CharterEntry, CharterDispayID, CharterCost);
|
||||
|
||||
data << uint8(1); // count
|
||||
data << uint32(1); // index
|
||||
@@ -859,7 +859,7 @@ void WorldSession::SendPetitionShowList(ObjectGuid guid)
|
||||
|
||||
// 2v2
|
||||
data << uint8(3); // count
|
||||
sScriptMgr->PetitionShowList(_player, creature, CharterEntry, CharterDispayID, CharterCost);
|
||||
sScriptMgr->OnPlayerPetitionShowList(_player, creature, CharterEntry, CharterDispayID, CharterCost);
|
||||
data << uint32(1); // index
|
||||
data << CharterEntry; // charter entry
|
||||
data << CharterDispayID; // charter display id
|
||||
@@ -873,7 +873,7 @@ void WorldSession::SendPetitionShowList(ObjectGuid guid)
|
||||
CharterCost = sWorld->getIntConfig(CONFIG_CHARTER_COST_ARENA_3v3);
|
||||
|
||||
// 3v3
|
||||
sScriptMgr->PetitionShowList(_player, creature, CharterEntry, CharterDispayID, CharterCost);
|
||||
sScriptMgr->OnPlayerPetitionShowList(_player, creature, CharterEntry, CharterDispayID, CharterCost);
|
||||
data << uint32(2); // index
|
||||
data << CharterEntry; // charter entry
|
||||
data << CharterDispayID; // charter display id
|
||||
@@ -887,7 +887,7 @@ void WorldSession::SendPetitionShowList(ObjectGuid guid)
|
||||
CharterCost = sWorld->getIntConfig(CONFIG_CHARTER_COST_ARENA_5v5);
|
||||
|
||||
// 5v5
|
||||
sScriptMgr->PetitionShowList(_player, creature, CharterEntry, CharterDispayID, CharterCost);
|
||||
sScriptMgr->OnPlayerPetitionShowList(_player, creature, CharterEntry, CharterDispayID, CharterCost);
|
||||
data << uint32(3); // index
|
||||
data << CharterEntry; // charter entry
|
||||
data << CharterDispayID; // charter display id
|
||||
|
||||
@@ -424,7 +424,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recvData)
|
||||
_player->RemoveActiveQuest(questId);
|
||||
_player->RemoveTimedAchievement(ACHIEVEMENT_TIMED_TYPE_QUEST, questId);
|
||||
|
||||
sScriptMgr->OnQuestAbandon(_player, questId);
|
||||
sScriptMgr->OnPlayerQuestAbandon(_player, questId);
|
||||
|
||||
LOG_DEBUG("network.opcode", "Player {} abandoned quest {}", _player->GetGUID().ToString(), questId);
|
||||
// check if Quest Tracker is enabled
|
||||
|
||||
@@ -268,7 +268,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
|
||||
}
|
||||
}
|
||||
|
||||
if (sScriptMgr->OnBeforeOpenItem(pUser, item))
|
||||
if (sScriptMgr->OnPlayerBeforeOpenItem(pUser, item))
|
||||
{
|
||||
if (item->IsWrapped())// wrapped?
|
||||
{
|
||||
|
||||
@@ -636,7 +636,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sScriptMgr->CanInitTrade(_player, pOther))
|
||||
if (!sScriptMgr->OnPlayerCanInitTrade(_player, pOther))
|
||||
return;
|
||||
|
||||
// OK start trade
|
||||
@@ -702,7 +702,7 @@ void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket)
|
||||
}
|
||||
|
||||
// PlayerScript Hook for checking traded items if we want to filter them in a custom module
|
||||
if (!sScriptMgr->CanSetTradeItem(_player, item, tradeSlot))
|
||||
if (!sScriptMgr->OnPlayerCanSetTradeItem(_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
|
||||
|
||||
Reference in New Issue
Block a user