Scripts/ZulGurub: Fix attacking Bloodlord Mandokir

Closes #1007
Closes #7499
This commit is contained in:
gecko32
2012-08-27 16:50:47 +01:00
committed by Nay
parent f50ad5dd99
commit 1a0a80bb77

View File

@@ -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;