From 67e702b29b4fa09c628fba00649dcd74e048aad4 Mon Sep 17 00:00:00 2001 From: Killyana Date: Thu, 7 Mar 2019 17:37:03 +0100 Subject: Spell/Script: Specify a target for Azure Dragon: On Death Force Cast Wyrmrest Defender to Whisper to Controller - Random (cherry picked from commit e5470ab1ee32b97e07e979950665a7ede66603e0) --- src/server/scripts/Spells/spell_quest.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index a14bd2d6236..de570569a09 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1471,6 +1471,10 @@ class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoad }; // ID - 50287 Azure Dragon: On Death Force Cast Wyrmrest Defender to Whisper to Controller - Random (cast from Azure Dragons and Azure Drakes on death) +enum q12372Creatures +{ + NPC_WYRMREST_DEFENDER = 27629 +}; class spell_q12372_azure_on_death_force_whisper : public SpellScriptLoader { public: @@ -1482,7 +1486,8 @@ class spell_q12372_azure_on_death_force_whisper : public SpellScriptLoader void HandleScript(SpellEffIndex /*effIndex*/) { - if (Creature* defender = GetHitCreature()) + Creature* defender = GetHitCreature(); + if (defender && defender->GetEntry() == NPC_WYRMREST_DEFENDER) defender->AI()->Talk(WHISPER_ON_HIT_BY_FORCE_WHISPER, defender->GetCharmerOrOwner()); } -- cgit v1.2.3