Core/Unit: Renamed addUnitState/hasUnitState/clearUnitState to AddUnitState/HasUnitState/ClearUnitState
Core/Vehicles: Allow the vehicle to always damage the passenger (removed unneded dbc hacks from scripts) --HG-- branch : trunk
This commit is contained in:
@@ -342,7 +342,7 @@ public:
|
||||
|
||||
//Teleport self to a hiding spot (this causes errors in the Trinity log but no real issues)
|
||||
DoTeleportTo(HIDE_X,HIDE_Y,HIDE_Z);
|
||||
me->addUnitState(UNIT_STAT_FLEEING);
|
||||
me->AddUnitState(UNIT_STAT_FLEEING);
|
||||
|
||||
//Spawn nef and have him attack a random target
|
||||
Creature* Nefarian = me->SummonCreature(CREATURE_NEFARIAN,NEF_X,NEF_Y,NEF_Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000);
|
||||
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
EnfeebleResetTimer = 0;
|
||||
} else EnfeebleResetTimer -= diff;
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_STUNNED)) // While shifting to phase 2 malchezaar stuns himself
|
||||
if (me->HasUnitState(UNIT_STAT_STUNNED)) // While shifting to phase 2 malchezaar stuns himself
|
||||
return;
|
||||
|
||||
if (me->GetUInt64Value(UNIT_FIELD_TARGET) != me->getVictim()->GetGUID())
|
||||
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->addUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
|
||||
ScriptedAI::InitializeAI();
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false);
|
||||
break;
|
||||
case CREATURE_DARKNESS:
|
||||
summoned->addUnitState(UNIT_STAT_STUNNED);
|
||||
summoned->AddUnitState(UNIT_STAT_STUNNED);
|
||||
float x,y,z,o;
|
||||
summoned->GetHomePosition(x,y,z,o);
|
||||
me->SummonCreature(CREATURE_DARK_FIENDS, x,y,z,o, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
InAction = false;
|
||||
SummonSentinel = false;
|
||||
|
||||
me->addUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
@@ -475,7 +475,7 @@ public:
|
||||
WaitTimer = 2000;
|
||||
InAction = false;
|
||||
|
||||
me->addUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry* Spell)
|
||||
@@ -494,7 +494,7 @@ public:
|
||||
{
|
||||
if (!InAction)
|
||||
{
|
||||
me->clearUnitState(UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
DoCastAOE(SPELL_DARKFIEND_SKIN, false);
|
||||
AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true));
|
||||
InAction = true;
|
||||
@@ -604,7 +604,7 @@ public:
|
||||
SpellTimer = 5000;
|
||||
Phase = 0;
|
||||
|
||||
me->addUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
DoCastAOE(SPELL_BLACKHOLE_SPAWN, true);
|
||||
}
|
||||
|
||||
@@ -616,7 +616,7 @@ public:
|
||||
switch (NeedForAHack)
|
||||
{
|
||||
case 0:
|
||||
me->clearUnitState(UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
DoCastAOE(SPELL_BLACKHOLE_GROW, false);
|
||||
if (Victim)
|
||||
AttackStart(Victim);
|
||||
|
||||
@@ -90,7 +90,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
AfterTeleportTimer = 0;
|
||||
Abuse_Bug_Timer = 10000 + rand()%7000;
|
||||
BugsTimer = 2000;
|
||||
me->clearUnitState(UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
DontYellWhenDead = false;
|
||||
EnrageTimer = 15*60000;
|
||||
}
|
||||
@@ -237,7 +237,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
DoStopAttack();
|
||||
DoResetThreat();
|
||||
DoCast(me, SPELL_TWIN_TELEPORT_VISUAL);
|
||||
me->addUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
AfterTeleport = true;
|
||||
AfterTeleportTimer = 2000;
|
||||
tspellcasted = false;
|
||||
@@ -249,9 +249,9 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
{
|
||||
if (!tspellcasted)
|
||||
{
|
||||
me->clearUnitState(UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
DoCast(me, SPELL_TWIN_TELEPORT);
|
||||
me->addUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
}
|
||||
|
||||
tspellcasted = true;
|
||||
@@ -259,7 +259,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
if (AfterTeleportTimer <= diff)
|
||||
{
|
||||
AfterTeleport = false;
|
||||
me->clearUnitState(UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
if (Unit *nearu = me->SelectNearestTarget(100))
|
||||
{
|
||||
//DoYell(nearu->GetName(), LANG_UNIVERSAL, 0);
|
||||
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
if (((uiUndergroundPhase == 0 && HealthBelowPct(75))
|
||||
|| (uiUndergroundPhase == 1 && HealthBelowPct(50))
|
||||
|| (uiUndergroundPhase == 2 && HealthBelowPct(25)))
|
||||
&& !me->hasUnitState(UNIT_STAT_CASTING))
|
||||
&& !me->HasUnitState(UNIT_STAT_CASTING))
|
||||
{
|
||||
bGuardianSummoned = false;
|
||||
bVenomancerSummoned = false;
|
||||
|
||||
+6
-6
@@ -109,7 +109,7 @@ public:
|
||||
{
|
||||
RemoveSummons();
|
||||
me->SetDisplayId(me->GetNativeDisplayId());
|
||||
me->clearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
|
||||
bEventInProgress = false;
|
||||
bEvent = false;
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
uiPhase++;
|
||||
uiResurrectTimer = 4000;
|
||||
bEventInProgress = false;
|
||||
me->clearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
} else uiResurrectTimer -= uiDiff;
|
||||
}
|
||||
|
||||
@@ -209,14 +209,14 @@ public:
|
||||
if (!bSummonArmy)
|
||||
{
|
||||
bSummonArmy = true;
|
||||
me->addUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
DoCast(me, SPELL_ARMY_DEAD);
|
||||
}
|
||||
if (!bDeathArmyDone)
|
||||
{
|
||||
if (uiDeathArmyCheckTimer <= uiDiff)
|
||||
{
|
||||
me->clearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
uiDeathArmyCheckTimer = 0;
|
||||
bDeathArmyDone = true;
|
||||
} else uiDeathArmyCheckTimer -= uiDiff;
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (!me->hasUnitState(UNIT_STAT_ROOT) && !me->HealthBelowPct(1))
|
||||
if (!me->HasUnitState(UNIT_STAT_ROOT) && !me->HealthBelowPct(1))
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
{
|
||||
uiDamage = 0;
|
||||
me->SetHealth(0);
|
||||
me->addUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
|
||||
RemoveSummons();
|
||||
switch(uiPhase)
|
||||
{
|
||||
|
||||
@@ -138,7 +138,7 @@ class boss_bronjahm : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -248,7 +248,7 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -441,7 +441,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -497,7 +497,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -555,7 +555,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -612,7 +612,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -672,7 +672,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -738,7 +738,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -811,7 +811,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -878,7 +878,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
|
||||
@@ -657,7 +657,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -740,7 +740,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -840,7 +840,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -910,7 +910,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -976,7 +976,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
switch(events.ExecuteEvent())
|
||||
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -306,7 +306,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -373,7 +373,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -432,7 +432,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -499,7 +499,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -561,7 +561,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -624,7 +624,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -689,7 +689,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -745,7 +745,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -803,7 +803,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -868,7 +868,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -930,7 +930,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -988,7 +988,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -1050,7 +1050,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -1108,7 +1108,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->clearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
MightyBlowTimer = 10*IN_MILLISECONDS;
|
||||
bHealth = false;
|
||||
@@ -86,14 +86,14 @@ public:
|
||||
|
||||
if (bRestore)
|
||||
{
|
||||
pWho->clearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
pWho->ClearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
pWho->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
if (pWho == me)
|
||||
me->RemoveAura(SPELL_FREEZE_ANIM);
|
||||
}else
|
||||
{
|
||||
pWho->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pWho->addUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
pWho->AddUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
if (pWho == me)
|
||||
DoCast(me,SPELL_FREEZE_ANIM);
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
MightyBlowTimer = 10*IN_MILLISECONDS;
|
||||
} else MightyBlowTimer -= diff;
|
||||
|
||||
if (!me->hasUnitState(UNIT_STAT_STUNNED))
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED))
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
DoScriptText(SAY_TRANSFORM_1, me);
|
||||
uiTransformationTimer = 5*IN_MILLISECONDS;
|
||||
bStartOfTransformation = true;
|
||||
me->clearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
else
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
if (bStartOfTransformation)
|
||||
{
|
||||
bStartOfTransformation = false;
|
||||
me->addUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
}
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
DoScriptText(SAY_TRANSFORM_2, me);
|
||||
uiTransformationTimer = 9*IN_MILLISECONDS;
|
||||
bStartOfTransformation = true;
|
||||
me->clearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
else
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
if (bStartOfTransformation)
|
||||
{
|
||||
bStartOfTransformation = false;
|
||||
me->addUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ class boss_blood_council_controller : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -485,7 +485,7 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -679,7 +679,7 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -892,7 +892,7 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -1089,7 +1089,7 @@ class npc_ball_of_flame : public CreatureScript
|
||||
if (Player* target = ObjectAccessor::GetPlayer(*me, chaseGUID))
|
||||
{
|
||||
// need to clear states now because this call is before AuraEffect is fully removed
|
||||
me->clearUnitState(UNIT_STAT_CASTING | UNIT_STAT_STUNNED);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING | UNIT_STAT_STUNNED);
|
||||
if (target && me->Attack(target, true))
|
||||
me->GetMotionMaster()->MoveChase(target, 1.0f);
|
||||
}
|
||||
@@ -1214,7 +1214,7 @@ class npc_dark_nucleus : public CreatureScript
|
||||
}
|
||||
|
||||
DoCast(who, SPELL_SHADOW_RESONANCE_RESIST);
|
||||
me->clearUnitState(UNIT_STAT_CASTING);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
@@ -1248,7 +1248,7 @@ class npc_dark_nucleus : public CreatureScript
|
||||
!victim->HasAura(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID()))
|
||||
{
|
||||
DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST);
|
||||
me->clearUnitState(UNIT_STAT_CASTING);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1267,7 +1267,7 @@ class npc_dark_nucleus : public CreatureScript
|
||||
lockedTarget = true;
|
||||
AttackStart(victim);
|
||||
DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST);
|
||||
me->clearUnitState(UNIT_STAT_CASTING);
|
||||
me->ClearUnitState(UNIT_STAT_CASTING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -392,7 +392,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -176,7 +176,7 @@ class boss_festergut : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -307,7 +307,7 @@ class npc_stinky_icc : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -345,7 +345,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING) && !(events.GetPhaseMask() & PHASE_INTRO_MASK))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -592,7 +592,7 @@ class npc_cult_fanatic : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -670,7 +670,7 @@ class npc_cult_adherent : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -156,7 +156,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -532,8 +532,4 @@ void AddSC_boss_lord_marrowgar()
|
||||
new spell_marrowgar_coldflame();
|
||||
new spell_marrowgar_bone_spike_graveyard();
|
||||
new spell_marrowgar_bone_storm();
|
||||
|
||||
// has to be done or else players threat will be wiped for impaled player and he will absorb all damage
|
||||
if (VehicleSeatEntry* vehSeat = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(6206)))
|
||||
vehSeat->m_flags |= 0x400;
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
{
|
||||
summon->AI()->AttackStart(target);
|
||||
summon->CastCustomSpell(SPELL_GASEOUS_BLOAT, SPELLVALUE_MAX_TARGETS, 1, target, false);
|
||||
summon->clearUnitState(UNIT_STAT_CASTING);
|
||||
summon->ClearUnitState(UNIT_STAT_CASTING);
|
||||
summon->GetMotionMaster()->MoveIdle();
|
||||
summon->m_Events.AddEvent(new StartMovementEvent(*summon), summon->m_Events.CalculateTime(3500));
|
||||
}
|
||||
@@ -280,7 +280,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
{
|
||||
summon->AI()->AttackStart(target);
|
||||
summon->CastCustomSpell(SPELL_VOLATILE_OOZE_ADHESIVE, SPELLVALUE_MAX_TARGETS, 1, target, false);
|
||||
summon->clearUnitState(UNIT_STAT_CASTING);
|
||||
summon->ClearUnitState(UNIT_STAT_CASTING);
|
||||
summon->GetMotionMaster()->MoveIdle();
|
||||
summon->m_Events.AddEvent(new StartMovementEvent(*summon), summon->m_Events.CalculateTime(3500));
|
||||
}
|
||||
@@ -524,7 +524,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -184,7 +184,7 @@ class boss_rotface : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -410,7 +410,7 @@ class npc_precious_icc : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -396,7 +396,7 @@ public:
|
||||
instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -476,7 +476,7 @@ public:
|
||||
else uiGuardiansOfIcecrownTimer -= diff;
|
||||
}
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
if (uint32 eventId = events.GetEvent())
|
||||
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -397,11 +397,11 @@ public:
|
||||
if (me->HasAura(SPELL_SYSTEMS_SHUTDOWN))
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->addUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
if (me->HasAura(SPELL_SYSTEMS_SHUTDOWN))
|
||||
@@ -466,7 +466,7 @@ public:
|
||||
break;
|
||||
case EVENT_REPAIR:
|
||||
me->MonsterTextEmote(EMOTE_REPAIR, 0, true);
|
||||
me->clearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
|
||||
InstallAdds(false);
|
||||
events.CancelEvent(EVENT_REPAIR);
|
||||
break;
|
||||
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
EncounterTime += diff;
|
||||
@@ -482,8 +482,4 @@ void AddSC_boss_ignis()
|
||||
new npc_iron_construct();
|
||||
new npc_scorch_ground();
|
||||
new spell_ignis_slag_pot();
|
||||
|
||||
// has to be done or else players wil absorb dmg from slag pot vehicle seat 1 slagpot
|
||||
if (VehicleSeatEntry* vehSeat = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(3206)))
|
||||
vehSeat->m_flags |= 0x400;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
// TODO: because we are using hack, he is stunned and cannot cast, so we use triggered for every spell
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
|
||||
if (uiCleaveTimer <= diff)
|
||||
{
|
||||
if (!me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (!me->HasUnitState(UNIT_STAT_CASTING))
|
||||
{
|
||||
if (bIsUndead)
|
||||
DoCast(me->getVictim(), SPELL_WOE_STRIKE);
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
|
||||
if (uiSmashTimer <= diff)
|
||||
{
|
||||
if (!me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (!me->HasUnitState(UNIT_STAT_CASTING))
|
||||
{
|
||||
if (bIsUndead)
|
||||
DoCast(me->getVictim(), SPELL_DARK_SMASH);
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
{
|
||||
if (uiEnrageTimer <= diff)
|
||||
{
|
||||
if (!me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (!me->HasUnitState(UNIT_STAT_CASTING))
|
||||
{
|
||||
// Spawn target for Axe
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 1);
|
||||
@@ -256,7 +256,7 @@ public:
|
||||
|
||||
if (uiRoarTimer <= diff)
|
||||
{
|
||||
if (!me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (!me->HasUnitState(UNIT_STAT_CASTING))
|
||||
{
|
||||
if (bIsUndead)
|
||||
DoCast(me, SPELL_DREADFUL_ROAR);
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
if (Aura *overchargedAura = me->GetAura(SPELL_OVERCHARGED))
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
|
||||
@@ -1328,7 +1328,7 @@ public:
|
||||
if (uiType != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
me->addUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->CastSpell(me, SPELL_STUN, true);
|
||||
if (me->isSummon())
|
||||
if (Unit* pSummoner = CAST_SUM(me)->GetSummoner())
|
||||
@@ -1445,7 +1445,7 @@ public:
|
||||
DoScriptText(SAY_LERYSSA_1, pLeryssa);
|
||||
pArlos->Kill(pArlos, false);
|
||||
pLeryssa->RemoveAura(SPELL_STUN);
|
||||
pLeryssa->clearUnitState(UNIT_STAT_STUNNED);
|
||||
pLeryssa->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
pLeryssa->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
pLeryssa->GetMotionMaster()->MovePoint(0,3722.114502f, 3564.201660f, 477.441437f);
|
||||
|
||||
@@ -1495,7 +1495,7 @@ public:
|
||||
if (Creature* pTalbot = me->FindNearestCreature(NPC_PRINCE_VALANAR, 50.0f, true))
|
||||
CAST_AI(npc_counselor_talbot::npc_counselor_talbotAI, pTalbot->AI())->bCheck = true;
|
||||
|
||||
me->addUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
me->CastSpell(me, SPELL_STUN, true);
|
||||
|
||||
if (me->isSummon())
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ public:
|
||||
summoned->CastSpell(summoned,SPELL_FOCUS_FIRE_VISUAL,false);
|
||||
summoned->setFaction(me->getFaction());
|
||||
summoned->SetLevel(me->getLevel());
|
||||
summoned->addUnitState(UNIT_STAT_ROOT);
|
||||
summoned->AddUnitState(UNIT_STAT_ROOT);
|
||||
|
||||
if (Unit *pFocusedTarget = Unit::GetUnit(*me, FocusedTargetGUID))
|
||||
summoned->AI()->AttackStart(pFocusedTarget);
|
||||
|
||||
+2
-2
@@ -337,7 +337,7 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
VazrudenGUID = 0;
|
||||
}
|
||||
summoned = false;
|
||||
me->clearUnitState(UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STAT_ROOT);
|
||||
me->SetVisible(true);
|
||||
}
|
||||
}
|
||||
@@ -352,7 +352,7 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
NazanGUID = Nazan->GetGUID();
|
||||
summoned = true;
|
||||
me->SetVisible(false);
|
||||
me->addUnitState(UNIT_STAT_ROOT);
|
||||
me->AddUnitState(UNIT_STAT_ROOT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ class boss_magtheridon : public CreatureScript
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
me->addUnitState(UNIT_STAT_STUNNED);
|
||||
me->AddUnitState(UNIT_STAT_STUNNED);
|
||||
DoCast(me, SPELL_SHADOW_CAGE_C, true);
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ class boss_magtheridon : public CreatureScript
|
||||
|
||||
void AttackStart(Unit *who)
|
||||
{
|
||||
if (!me->hasUnitState(UNIT_STAT_STUNNED))
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED))
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ class boss_magtheridon : public CreatureScript
|
||||
if (BlastNova_Timer <= diff)
|
||||
{
|
||||
// to avoid earthquake interruption
|
||||
if (!me->hasUnitState(UNIT_STAT_STUNNED))
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED))
|
||||
{
|
||||
DoScriptText(EMOTE_BLASTNOVA, me);
|
||||
DoCast(me, SPELL_BLASTNOVA);
|
||||
@@ -445,7 +445,7 @@ class boss_magtheridon : public CreatureScript
|
||||
|
||||
if (!Phase3 && HealthBelowPct(30)
|
||||
&& !me->IsNonMeleeSpellCasted(false) // blast nova
|
||||
&& !me->hasUnitState(UNIT_STAT_STUNNED)) // shadow cage and earthquake
|
||||
&& !me->HasUnitState(UNIT_STAT_STUNNED)) // shadow cage and earthquake
|
||||
{
|
||||
Phase3 = true;
|
||||
DoScriptText(SAY_CHAMBER_DESTROY, me);
|
||||
|
||||
+1
-1
@@ -224,7 +224,7 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
Creature* Magtheridon = instance->GetCreature(MagtheridonGUID);
|
||||
if (Magtheridon && Magtheridon->isAlive())
|
||||
{
|
||||
Magtheridon->clearUnitState(UNIT_STAT_STUNNED);
|
||||
Magtheridon->ClearUnitState(UNIT_STAT_STUNNED);
|
||||
Magtheridon->AI()->AttackStart(Magtheridon->SelectNearestTarget(999));
|
||||
}
|
||||
CageTimer = 0;
|
||||
|
||||
@@ -398,7 +398,7 @@ class boss_kaelthas : public CreatureScript
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!me->hasUnitState(UNIT_STAT_STUNNED) && who->isTargetableForAttack() &&
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED) && who->isTargetableForAttack() &&
|
||||
me->IsHostileTo(who) && who->isInAccessiblePlaceFor(me))
|
||||
{
|
||||
if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
||||
|
||||
@@ -798,7 +798,7 @@ public:
|
||||
Materialize = true;
|
||||
}
|
||||
|
||||
if (me->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || me->hasUnitState(UNIT_STAT_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it
|
||||
if (me->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || me->HasUnitState(UNIT_STAT_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it
|
||||
DoCast(me, SPELL_PHASE_SLIP);
|
||||
|
||||
if (!UpdateVictim())
|
||||
|
||||
@@ -1258,7 +1258,7 @@ public:
|
||||
AggroTargetGUID = 0;
|
||||
Timers = false;
|
||||
|
||||
me->addUnitState(UNIT_STAT_ROOT);
|
||||
me->AddUnitState(UNIT_STAT_ROOT);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
}
|
||||
@@ -1302,7 +1302,7 @@ public:
|
||||
if (Player* AggroTarget = (Unit::GetPlayer(*me, AggroTargetGUID)))
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->clearUnitState(UNIT_STAT_ROOT);
|
||||
me->ClearUnitState(UNIT_STAT_ROOT);
|
||||
|
||||
float x, y, z;
|
||||
AggroTarget->GetPosition(x,y,z);
|
||||
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
{
|
||||
Unit* pTarget = aurApp->GetTarget();
|
||||
pTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
pTarget->addUnitState(UNIT_STAT_ROOT);
|
||||
pTarget->AddUnitState(UNIT_STAT_ROOT);
|
||||
}
|
||||
|
||||
void HandleEffectRemove(AuraEffect const * /*aurEff*/, AuraApplication const * aurApp, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
@@ -1873,7 +1873,7 @@ public:
|
||||
Unit *owner = me->GetCharmerOrOwner();
|
||||
|
||||
me->CombatStop(true);
|
||||
if (owner && !me->hasUnitState(UNIT_STAT_FOLLOW))
|
||||
if (owner && !me->HasUnitState(UNIT_STAT_FOLLOW))
|
||||
{
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);
|
||||
@@ -2056,7 +2056,7 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!me->hasUnitState(UNIT_STAT_STUNNED))
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED))
|
||||
me->SetControlled(true,UNIT_STAT_STUNNED);//disable rotate
|
||||
|
||||
if (uiEntry != NPC_ADVANCED_TARGET_DUMMY && uiEntry != NPC_TARGET_DUMMY)
|
||||
|
||||
Reference in New Issue
Block a user