aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKillyana <morphone1@gmail.com>2019-03-07 17:37:03 +0100
committerKillyana <morphone1@gmail.com>2019-03-07 17:37:03 +0100
commite5470ab1ee32b97e07e979950665a7ede66603e0 (patch)
tree503cad8cc3c775131783016ac4a9f372e693a6e0
parent3bc1900018fd38d23e656237e751cbe1ebb8552d (diff)
Spell/Script: Specify a target for Azure Dragon: On Death Force Cast Wyrmrest Defender to Whisper to Controller - Random
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index da2fce1061c..c5444a7735f 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -1466,6 +1466,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:
@@ -1477,7 +1481,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());
}