From 59baaeec48fdd92d8b4067152772e5806be9ff53 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Sat, 13 Sep 2014 20:41:31 +0200 Subject: Core/Chat: cleanup MonsterText methods --- .../Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp | 2 +- .../CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src/server/scripts/Kalimdor') diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index a7fa54b12e1..b5c226b15cb 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -940,7 +940,7 @@ void hyjalAI::WaypointReached(uint32 waypointId) { if (waypointId == 1 || (waypointId == 0 && me->GetEntry() == THRALL)) { - me->MonsterYell(YELL_HURRY, LANG_UNIVERSAL, NULL); + me->Yell(YELL_HURRY, LANG_UNIVERSAL); WaitForTeleport = true; TeleportTimer = 20000; if (me->GetEntry() == JAINA) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 6c718a4a16a..69eba98f406 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -29,7 +29,6 @@ EndScriptData */ #include "hyjal_trash.h" #include "Player.h" #include "WorldPacket.h" -#include "Opcodes.h" #include "Chat.h" /* Battle of Mount Hyjal encounters: @@ -185,15 +184,12 @@ public: for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { - if (i->GetSource()) + if (Player* player = i->GetSource()) { WorldPacket packet; - ChatHandler::BuildChatPacket(packet, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, unit, i->GetSource(), YELL_EFFORTS); - i->GetSource()->GetSession()->SendPacket(&packet); - - WorldPacket data2(SMSG_PLAY_SOUND, 4); - data2 << 10986; - i->GetSource()->GetSession()->SendPacket(&data2); + ChatHandler::BuildChatPacket(packet, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, unit, player, YELL_EFFORTS); + player->SendDirectMessage(&packet); + player->PlayDirectSound(10986, player); } } } -- cgit v1.2.3