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)
|
if (!target)
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
BroadcastText const* bct = sObjectMgr->GetBroadcastText(textId);
|
BroadcastText const* bct = sObjectMgr->GetBroadcastText(textId);
|
||||||
if (!bct)
|
if (!bct)
|
||||||
@@ -9380,7 +9378,10 @@ void Player::Whisper(uint32 textId, Player* target, bool /*isBossWhisper = false
|
|||||||
|
|
||||||
LocaleConstant locale = target->GetSession()->GetSessionDbLocaleIndex();
|
LocaleConstant locale = target->GetSession()->GetSessionDbLocaleIndex();
|
||||||
WorldPacket data;
|
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);
|
target->SendDirectMessage(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user