mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user