diff options
author | gecko32 <gecko32@trinity.contrib> | 2012-08-27 16:50:47 +0100 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2012-08-27 16:50:47 +0100 |
commit | 1a0a80bb773d9ef492450aeba688a765d0077c7d (patch) | |
tree | 66f7be8d5dbf673d7df07bf7a31a58dcc1133a3a /src | |
parent | f50ad5dd990d07e7a64e325b3002e91d65fc30fc (diff) |
Scripts/ZulGurub: Fix attacking Bloodlord Mandokir
Closes #1007
Closes #7499
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp | 22 |
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; |