diff options
| author | joschiwald <joschiwald.trinity@gmail.com> | 2014-09-13 20:41:31 +0200 |
|---|---|---|
| committer | joschiwald <joschiwald.trinity@gmail.com> | 2014-09-13 20:41:31 +0200 |
| commit | 59baaeec48fdd92d8b4067152772e5806be9ff53 (patch) | |
| tree | b4031184f1e16cfb9f87b8c8f5ec5ba5c7ba1f70 /src/server/scripts/EasternKingdoms | |
| parent | 11bb300c6977f32d5240a698a12e258dc121a513 (diff) | |
Core/Chat: cleanup MonsterText methods
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
7 files changed, 41 insertions, 49 deletions
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index c5f4f9cdbf9..4869ffc4756 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -28,7 +28,6 @@ EndScriptData */ #include "deadmines.h" #include "TemporarySummon.h" #include "WorldPacket.h" -#include "Opcodes.h" enum Sounds { @@ -101,9 +100,9 @@ class instance_deadmines : public InstanceMapScript case CANNON_GUNPOWDER_USED: CannonBlast_Timer = DATA_CANNON_BLAST_TIMER; // it's a hack - Mr. Smite should do that but his too far away - pIronCladDoor->SetName("Mr. Smite"); - pIronCladDoor->MonsterYell(SAY_MR_SMITE_ALARM1, LANG_UNIVERSAL, NULL); - DoPlaySound(pIronCladDoor, SOUND_MR_SMITE_ALARM1); + //pIronCladDoor->SetName("Mr. Smite"); + //pIronCladDoor->MonsterYell(SAY_MR_SMITE_ALARM1, LANG_UNIVERSAL, NULL); + pIronCladDoor->PlayDirectSound(SOUND_MR_SMITE_ALARM1); State = CANNON_BLAST_INITIATED; break; case CANNON_BLAST_INITIATED: @@ -114,8 +113,8 @@ class instance_deadmines : public InstanceMapScript ShootCannon(); BlastOutDoor(); LeverStucked(); - pIronCladDoor->MonsterYell(SAY_MR_SMITE_ALARM2, LANG_UNIVERSAL, NULL); - DoPlaySound(pIronCladDoor, SOUND_MR_SMITE_ALARM2); + //pIronCladDoor->MonsterYell(SAY_MR_SMITE_ALARM2, LANG_UNIVERSAL, NULL); + pIronCladDoor->PlayDirectSound(SOUND_MR_SMITE_ALARM2); State = PIRATES_ATTACK; } else CannonBlast_Timer -= diff; break; @@ -170,7 +169,7 @@ class instance_deadmines : public InstanceMapScript if (GameObject* pDefiasCannon = instance->GetGameObject(DefiasCannonGUID)) { pDefiasCannon->SetGoState(GO_STATE_ACTIVE); - DoPlaySound(pDefiasCannon, SOUND_CANNONFIRE); + pDefiasCannon->PlayDirectSound(SOUND_CANNONFIRE); } } @@ -179,7 +178,7 @@ class instance_deadmines : public InstanceMapScript if (GameObject* pIronCladDoor = instance->GetGameObject(IronCladDoorGUID)) { pIronCladDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - DoPlaySound(pIronCladDoor, SOUND_DESTROYDOOR); + pIronCladDoor->PlayDirectSound(SOUND_DESTROYDOOR); } } @@ -238,13 +237,6 @@ class instance_deadmines : public InstanceMapScript return 0; } - - void DoPlaySound(GameObject* unit, uint32 sound) - { - WorldPacket data(SMSG_PLAY_SOUND, 4); - data << uint32(sound); - unit->SendMessageToSet(&data, false); - } }; InstanceScript* GetInstanceScript(InstanceMap* map) const override diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index c37829e26d5..716b32601be 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -560,25 +560,25 @@ public: { case 0: return 9999999; case 1: - me->MonsterYell(SAY_DIALOG_MEDIVH_1, LANG_UNIVERSAL, NULL); + me->Yell(SAY_DIALOG_MEDIVH_1, LANG_UNIVERSAL); return 10000; case 2: if (arca) - arca->MonsterYell(SAY_DIALOG_ARCANAGOS_2, LANG_UNIVERSAL, NULL); + arca->Yell(SAY_DIALOG_ARCANAGOS_2, LANG_UNIVERSAL); return 20000; case 3: - me->MonsterYell(SAY_DIALOG_MEDIVH_3, LANG_UNIVERSAL, NULL); + me->Yell(SAY_DIALOG_MEDIVH_3, LANG_UNIVERSAL); return 10000; case 4: if (arca) - arca->MonsterYell(SAY_DIALOG_ARCANAGOS_4, LANG_UNIVERSAL, NULL); + arca->Yell(SAY_DIALOG_ARCANAGOS_4, LANG_UNIVERSAL); return 20000; case 5: - me->MonsterYell(SAY_DIALOG_MEDIVH_5, LANG_UNIVERSAL, NULL); + me->Yell(SAY_DIALOG_MEDIVH_5, LANG_UNIVERSAL); return 20000; case 6: if (arca) - arca->MonsterYell(SAY_DIALOG_ARCANAGOS_6, LANG_UNIVERSAL, NULL); + arca->Yell(SAY_DIALOG_ARCANAGOS_6, LANG_UNIVERSAL); return 10000; case 7: FireArcanagosTimer = 500; @@ -588,7 +588,7 @@ public: DoCast(me, SPELL_MANA_SHIELD); return 10000; case 9: - me->MonsterTextEmote(EMOTE_DIALOG_MEDIVH_7, NULL, false); + me->TextEmote(EMOTE_DIALOG_MEDIVH_7); return 10000; case 10: if (arca) @@ -596,7 +596,7 @@ public: return 1000; case 11: if (arca) - arca->MonsterYell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL, NULL); + arca->Yell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL); return 5000; case 12: if (arca) @@ -608,7 +608,7 @@ public: } return 10000; case 13: - me->MonsterYell(SAY_DIALOG_MEDIVH_9, LANG_UNIVERSAL, NULL); + me->Yell(SAY_DIALOG_MEDIVH_9, LANG_UNIVERSAL); return 10000; case 14: me->SetVisible(false); diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 0733640f4c3..b9429954dea 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -352,7 +352,7 @@ public: Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000); if (speaker) speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false); - me->MonsterTextEmote(EMOTE_LAUGHS, NULL); + me->TextEmote(EMOTE_LAUGHS); } else laugh -= diff; } @@ -670,14 +670,14 @@ public: if (count < 3) { if (player) - player->Say(Text[count], 0); + player->Say(Text[count], LANG_UNIVERSAL); } else { DoCast(me, SPELL_RHYME_BIG); if (player) { - player->Say(Text[count], 0); + player->Say(Text[count], LANG_UNIVERSAL); player->HandleEmoteCommand(ANIM_EMOTE_SHOUT); } wp_reached = true; @@ -735,7 +735,7 @@ public: if (laugh <= diff) { laugh = urand(11000, 22000); - me->MonsterTextEmote(EMOTE_LAUGHS, NULL); + me->TextEmote(EMOTE_LAUGHS); DoPlaySoundToSet(me, RandomLaugh[rand32() % 3]); } else laugh -= diff; diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 3284febb9f3..60bfae36f47 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -769,7 +769,7 @@ public: } else { - me->MonsterTextEmote(EMOTE_UNABLE_TO_FIND, NULL); + me->TextEmote(EMOTE_UNABLE_TO_FIND); EnterEvadeMode(); return; } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 3c9d4397d24..077597e4706 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -306,7 +306,7 @@ class boss_hexlord_malacrass : public CreatureScript instance->SetData(DATA_HEXLORDEVENT, IN_PROGRESS); DoZoneInCombat(); - me->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL); + me->Yell(YELL_AGGRO, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_AGGRO); for (uint8 i = 0; i < 4; ++i) @@ -327,11 +327,11 @@ class boss_hexlord_malacrass : public CreatureScript switch (urand(0, 1)) { case 0: - me->MonsterYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL); + me->Yell(YELL_KILL_ONE, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_KILL_ONE); break; case 1: - me->MonsterYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL); + me->Yell(YELL_KILL_TWO, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_KILL_TWO); break; } @@ -341,7 +341,7 @@ class boss_hexlord_malacrass : public CreatureScript { instance->SetData(DATA_HEXLORDEVENT, DONE); - me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL); + me->Yell(YELL_DEATH, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_DEATH); for (uint8 i = 0; i < 4; ++i) @@ -415,7 +415,7 @@ class boss_hexlord_malacrass : public CreatureScript if (DrainPower_Timer <= diff) { DoCast(me, SPELL_DRAIN_POWER, true); - me->MonsterYell(YELL_DRAIN_POWER, LANG_UNIVERSAL, NULL); + me->Yell(YELL_DRAIN_POWER, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_DRAIN_POWER); DrainPower_Timer = urand(40000, 55000); // must cast in 60 sec, or buff/debuff will disappear } else DrainPower_Timer -= diff; @@ -427,7 +427,7 @@ class boss_hexlord_malacrass : public CreatureScript else { DoCast(me, SPELL_SPIRIT_BOLTS, false); - me->MonsterYell(YELL_SPIRIT_BOLTS, LANG_UNIVERSAL, NULL); + me->Yell(YELL_SPIRIT_BOLTS, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_SPIRIT_BOLTS); SpiritBolts_Timer = 40000; SiphonSoul_Timer = 10000; // ready to drain diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index c9c028021f1..279ca60a484 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -227,7 +227,7 @@ class boss_nalorakk : public CreatureScript case 0: if (me->IsWithinDistInMap(who, 50)) { - me->MonsterYell(YELL_NALORAKK_WAVE1, LANG_UNIVERSAL, NULL); + me->Yell(YELL_NALORAKK_WAVE1, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_NALORAKK_WAVE1); (*me).GetMotionMaster()->MovePoint(1, NalorakkWay[1][0], NalorakkWay[1][1], NalorakkWay[1][2]); @@ -240,7 +240,7 @@ class boss_nalorakk : public CreatureScript case 2: if (me->IsWithinDistInMap(who, 40)) { - me->MonsterYell(YELL_NALORAKK_WAVE2, LANG_UNIVERSAL, NULL); + me->Yell(YELL_NALORAKK_WAVE2, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_NALORAKK_WAVE2); (*me).GetMotionMaster()->MovePoint(3, NalorakkWay[3][0], NalorakkWay[3][1], NalorakkWay[3][2]); @@ -253,7 +253,7 @@ class boss_nalorakk : public CreatureScript case 5: if (me->IsWithinDistInMap(who, 40)) { - me->MonsterYell(YELL_NALORAKK_WAVE3, LANG_UNIVERSAL, NULL); + me->Yell(YELL_NALORAKK_WAVE3, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_NALORAKK_WAVE3); (*me).GetMotionMaster()->MovePoint(6, NalorakkWay[6][0], NalorakkWay[6][1], NalorakkWay[6][2]); @@ -268,7 +268,7 @@ class boss_nalorakk : public CreatureScript { SendAttacker(who); - me->MonsterYell(YELL_NALORAKK_WAVE4, LANG_UNIVERSAL, NULL); + me->Yell(YELL_NALORAKK_WAVE4, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_NALORAKK_WAVE4); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -287,7 +287,7 @@ class boss_nalorakk : public CreatureScript { instance->SetData(DATA_NALORAKKEVENT, IN_PROGRESS); - me->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL); + me->Yell(YELL_AGGRO, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_AGGRO); DoZoneInCombat(); } @@ -296,7 +296,7 @@ class boss_nalorakk : public CreatureScript { instance->SetData(DATA_NALORAKKEVENT, DONE); - me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL); + me->Yell(YELL_DEATH, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_DEATH); } @@ -305,11 +305,11 @@ class boss_nalorakk : public CreatureScript switch (urand(0, 1)) { case 0: - me->MonsterYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL); + me->Yell(YELL_KILL_ONE, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_KILL_ONE); break; case 1: - me->MonsterYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL); + me->Yell(YELL_KILL_TWO, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_KILL_TWO); break; } @@ -373,7 +373,7 @@ class boss_nalorakk : public CreatureScript if (Berserk_Timer <= diff) { DoCast(me, SPELL_BERSERK, true); - me->MonsterYell(YELL_BERSERK, LANG_UNIVERSAL, NULL); + me->Yell(YELL_BERSERK, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_BERSERK); Berserk_Timer = 600000; } else Berserk_Timer -= diff; @@ -383,7 +383,7 @@ class boss_nalorakk : public CreatureScript if (inBearForm) { // me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, 5122); - me->MonsterYell(YELL_SHIFTEDTOTROLL, LANG_UNIVERSAL, NULL); + me->Yell(YELL_SHIFTEDTOTROLL, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_TOTROLL); me->RemoveAurasDueToSpell(SPELL_BEARFORM); Surge_Timer = urand(15000, 20000); @@ -395,7 +395,7 @@ class boss_nalorakk : public CreatureScript else { // me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, 0); - me->MonsterYell(YELL_SHIFTEDTOBEAR, LANG_UNIVERSAL, NULL); + me->Yell(YELL_SHIFTEDTOBEAR, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_TOBEAR); DoCast(me, SPELL_BEARFORM, true); LaceratingSlash_Timer = 2000; // dur 18s @@ -426,7 +426,7 @@ class boss_nalorakk : public CreatureScript if (Surge_Timer <= diff) { - me->MonsterYell(YELL_SURGE, LANG_UNIVERSAL, NULL); + me->Yell(YELL_SURGE, LANG_UNIVERSAL); DoPlaySoundToSet(me, SOUND_YELL_SURGE); Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 45, true); if (target) diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp index 84f650ec9f4..598717a1c3b 100644 --- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp @@ -280,7 +280,7 @@ public: { case 0: if (WaitTimer == WAIT_SECS) - me->MonsterSay(NPCSAY_INIT, LANG_UNIVERSAL, NULL); //no blizzlike + me->Say(NPCSAY_INIT, LANG_UNIVERSAL); //no blizzlike if (WaitTimer <= diff) { @@ -310,7 +310,7 @@ public: { if (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID)) { - me->MonsterSay(NPCSAY_END, LANG_UNIVERSAL, NULL); //not blizzlike + me->Say(NPCSAY_END, LANG_UNIVERSAL); //not blizzlike player->GroupEventHappens(QUEST_PYREWOOD_AMBUSH, me); } } |
