From 1a0a80bb773d9ef492450aeba688a765d0077c7d Mon Sep 17 00:00:00 2001 From: gecko32 Date: Mon, 27 Aug 2012 16:50:47 +0100 Subject: Scripts/ZulGurub: Fix attacking Bloodlord Mandokir Closes #1007 Closes #7499 --- .../EasternKingdoms/ZulGurub/boss_mandokir.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index 83cd0b46fb8..32831eb047b 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -45,6 +45,8 @@ EndScriptData */ //Ohgans Spells #define SPELL_SUNDERARMOR 24317 +#define NPC_SPEAKER 11391 + class boss_mandokir : public CreatureScript { public: @@ -79,6 +81,7 @@ class boss_mandokir : public CreatureScript bool someWatched; bool RaptorDead; bool CombatStart; + bool SpeakerDead; uint64 WatchTarget; @@ -103,6 +106,7 @@ class boss_mandokir : public CreatureScript endWatch = false; RaptorDead = false; CombatStart = false; + SpeakerDead = false; DoCast(me, 23243); } @@ -129,19 +133,31 @@ class boss_mandokir : public CreatureScript } } } - DoCast(me, SPELL_LEVEL_UP, true); - KillCount = 0; + DoCast(me, SPELL_LEVEL_UP, true); + KillCount = 0; } } } void EnterCombat(Unit* /*who*/) { - DoScriptText(SAY_AGGRO, me); + DoScriptText(SAY_AGGRO, me); } void UpdateAI(const uint32 diff) { + if (!SpeakerDead) + { + if (!me->FindNearestCreature(NPC_SPEAKER, 100.0f, true)) + { + me->GetMotionMaster()->MovePoint(0, -12196.3f, -1948.37f, 130.36f); + SpeakerDead = true; + } + } + + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE && SpeakerDead) + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); + if (!UpdateVictim()) return; -- cgit v1.2.3