fix(Scripts/IcecrownCitadel): Lich King Whispers uses localized languages (#18125)

This commit is contained in:
daobashun
2024-01-14 22:09:04 +08:00
committed by GitHub
parent e8c45a447f
commit bd296db80c
2 changed files with 75 additions and 6 deletions

View File

@@ -64,6 +64,11 @@ enum Spells
VOID_ZONE_VISUAL = 69422
};
enum Say
{
SAY_SOULS_LICH_KING_RAND_WHISPER = 5
};
BossBoundaryData const boundaries =
{
{ DATA_LORD_MARROWGAR, new CircleBoundary(Position(-428.0f,2211.0f), 95.0) },
@@ -461,6 +466,9 @@ public:
case NPC_THE_LICH_KING_VALITHRIA:
ValithriaLichKingGUID = creature->GetGUID();
break;
case NPC_THE_LICH_KING_LH:
TheLichKingLhGUID = creature->GetGUID();
break;
case NPC_GREEN_DRAGON_COMBAT_TRIGGER:
ValithriaTriggerGUID = creature->GetGUID();
break;
@@ -1694,12 +1702,10 @@ public:
if (Player* player = players.begin()->GetSource())
if (player->GetQuestStatus(QUEST_A_FEAST_OF_SOULS) == QUEST_STATUS_INCOMPLETE)
{
uint8 id = urand(0, 15);
std::string const& text = sCreatureTextMgr->GetLocalizedChatString(NPC_THE_LICH_KING_LH, 0, 20 + id, 0, LOCALE_enUS);
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_MONSTER_WHISPER, LANG_UNIVERSAL, ObjectGuid::Empty, player->GetGUID(), text, CHAT_TAG_NONE, "The Lich King");
player->PlayDirectSound(17235 + id);
player->SendDirectMessage(&data);
if (Creature* theLichKing = instance->GetCreature(TheLichKingLhGUID))
{
theLichKing->AI()->Talk(SAY_SOULS_LICH_KING_RAND_WHISPER, player);
}
}
}
else
@@ -1981,6 +1987,7 @@ public:
ObjectGuid RimefangGUID;
ObjectGuid TheLichKingTeleportGUID;
ObjectGuid TheLichKingGUID;
ObjectGuid TheLichKingLhGUID;
ObjectGuid HighlordTirionFordringGUID;
ObjectGuid TerenasMenethilGUID;
ObjectGuid ArthasPlatformGUID;