aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp22
1 files changed, 19 insertions, 3 deletions
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;