From 178315f8e263394063a602cda17d6eca1bd294da Mon Sep 17 00:00:00 2001 From: Poszer <41213210+poszer@users.noreply.github.com> Date: Sat, 27 Jul 2019 01:49:37 +0200 Subject: [PATCH] fix(Core/Quest): Scratches (#2090) - Correctly despawn NPC Kaliri totem when the quest is completed. --- .../scripts/Outland/zone_blades_edge_mountains.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp index 07bc92352..b611ba503 100644 --- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp @@ -425,7 +425,9 @@ enum Daranelle { SAY_SPELL_INFLUENCE = 0, SPELL_LASHHAN_CHANNEL = 36904, - SPELL_DISPELLING_ANALYSIS = 37028 + SPELL_DISPELLING_ANALYSIS = 37028, + + NPC_KALIRI_TOTEM = 21468 }; class npc_daranelle : public CreatureScript @@ -448,9 +450,13 @@ public: { if (who->HasAura(SPELL_LASHHAN_CHANNEL) && me->IsWithinDistInMap(who, 10.0f)) { - Talk(SAY_SPELL_INFLUENCE, who); - /// @todo Move the below to updateAI and run if this statement == true - DoCast(who, SPELL_DISPELLING_ANALYSIS, true); + if (Creature * bird = who->FindNearestCreature(NPC_KALIRI_TOTEM, 10.0f)) + { + Talk(SAY_SPELL_INFLUENCE, who); + /// @todo Move the below to updateAI and run if this statement == true + DoCast(who, SPELL_DISPELLING_ANALYSIS, true); + bird->DespawnOrUnsummon(2000); + } } }