mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Player): Sometimes Player whisper is sent as boss whisper (#18128)
* fix(Core/Player): Sometimes Player emot is sent as boss whisper * actually change it to whisper as it is boss whisper * Update Player.cpp
This commit is contained in:
@@ -9364,12 +9364,10 @@ void Player::Whisper(std::string_view text, Language language, Player* target, b
|
||||
}
|
||||
}
|
||||
|
||||
void Player::Whisper(uint32 textId, Player* target, bool /*isBossWhisper = false*/)
|
||||
void Player::Whisper(uint32 textId, Player* target, bool isBossWhisper)
|
||||
{
|
||||
if (!target)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BroadcastText const* bct = sObjectMgr->GetBroadcastText(textId);
|
||||
if (!bct)
|
||||
@@ -9380,7 +9378,10 @@ void Player::Whisper(uint32 textId, Player* target, bool /*isBossWhisper = false
|
||||
|
||||
LocaleConstant locale = target->GetSession()->GetSessionDbLocaleIndex();
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_WHISPER, LANG_UNIVERSAL, this, target, bct->GetText(locale, getGender()), 0, "", locale);
|
||||
if (isBossWhisper)
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID_BOSS_WHISPER, LANG_UNIVERSAL, this, target, bct->GetText(locale, getGender()), 0, "", locale);
|
||||
else
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_WHISPER, LANG_UNIVERSAL, this, target, bct->GetText(locale, getGender()), 0, "", locale);
|
||||
target->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user