*code cleanup
*totally destroyed m_creature, use "me" for future coding --HG-- branch : trunk
This commit is contained in:
@@ -46,7 +46,7 @@ struct celebras_the_cursedAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
m_creature->SummonCreature(13716, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 600000);
|
||||
me->SummonCreature(13716, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 600000);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -67,15 +67,15 @@ struct celebras_the_cursedAI : public ScriptedAI
|
||||
//EntanglingRoots
|
||||
if (EntanglingRoots_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_ENTANGLINGROOTS);
|
||||
DoCast(me->getVictim(), SPELL_ENTANGLINGROOTS);
|
||||
EntanglingRoots_Timer = 20000;
|
||||
} else EntanglingRoots_Timer -= diff;
|
||||
|
||||
//CorruptForces
|
||||
if (CorruptForces_Timer <= diff)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(m_creature, SPELL_CORRUPT_FORCES);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_CORRUPT_FORCES);
|
||||
CorruptForces_Timer = 20000;
|
||||
} else CorruptForces_Timer -= diff;
|
||||
|
||||
|
||||
@@ -54,24 +54,24 @@ struct boss_landslideAI : public ScriptedAI
|
||||
//KnockAway_Timer
|
||||
if (KnockAway_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_KNOCKAWAY);
|
||||
DoCast(me->getVictim(), SPELL_KNOCKAWAY);
|
||||
KnockAway_Timer = 15000;
|
||||
} else KnockAway_Timer -= diff;
|
||||
|
||||
//Trample_Timer
|
||||
if (Trample_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_TRAMPLE);
|
||||
DoCast(me, SPELL_TRAMPLE);
|
||||
Trample_Timer = 8000;
|
||||
} else Trample_Timer -= diff;
|
||||
|
||||
//Landslide
|
||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50)
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 50)
|
||||
{
|
||||
if (Landslide_Timer <= diff)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(m_creature, SPELL_LANDSLIDE);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_LANDSLIDE);
|
||||
Landslide_Timer = 60000;
|
||||
} else Landslide_Timer -= diff;
|
||||
}
|
||||
|
||||
@@ -60,12 +60,12 @@ struct boss_noxxionAI : public ScriptedAI
|
||||
if (Invisible && Invisible_Timer <= diff)
|
||||
{
|
||||
//Become visible again
|
||||
m_creature->setFaction(14);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->setFaction(14);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//Noxxion model
|
||||
m_creature->SetDisplayId(11172);
|
||||
me->SetDisplayId(11172);
|
||||
Invisible = false;
|
||||
//m_creature->m_canMove = true;
|
||||
//me->m_canMove = true;
|
||||
} else if (Invisible)
|
||||
{
|
||||
Invisible_Timer -= diff;
|
||||
@@ -80,14 +80,14 @@ struct boss_noxxionAI : public ScriptedAI
|
||||
//ToxicVolley_Timer
|
||||
if (ToxicVolley_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_TOXICVOLLEY);
|
||||
DoCast(me->getVictim(), SPELL_TOXICVOLLEY);
|
||||
ToxicVolley_Timer = 9000;
|
||||
} else ToxicVolley_Timer -= diff;
|
||||
|
||||
//Uppercut_Timer
|
||||
if (Uppercut_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_UPPERCUT);
|
||||
DoCast(me->getVictim(), SPELL_UPPERCUT);
|
||||
Uppercut_Timer = 12000;
|
||||
} else Uppercut_Timer -= diff;
|
||||
|
||||
@@ -95,17 +95,17 @@ struct boss_noxxionAI : public ScriptedAI
|
||||
if (!Invisible && Adds_Timer <= diff)
|
||||
{
|
||||
//Inturrupt any spell casting
|
||||
//m_creature->m_canMove = true;
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
m_creature->setFaction(35);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//me->m_canMove = true;
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->setFaction(35);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
// Invisible Model
|
||||
m_creature->SetDisplayId(11686);
|
||||
SummonAdds(m_creature->getVictim());
|
||||
SummonAdds(m_creature->getVictim());
|
||||
SummonAdds(m_creature->getVictim());
|
||||
SummonAdds(m_creature->getVictim());
|
||||
SummonAdds(m_creature->getVictim());
|
||||
me->SetDisplayId(11686);
|
||||
SummonAdds(me->getVictim());
|
||||
SummonAdds(me->getVictim());
|
||||
SummonAdds(me->getVictim());
|
||||
SummonAdds(me->getVictim());
|
||||
SummonAdds(me->getVictim());
|
||||
Invisible = true;
|
||||
Invisible_Timer = 15000;
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ struct boss_ptheradrasAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
m_creature->SummonCreature(12238,28.067,61.875,-123.405,4.67,TEMPSUMMON_TIMED_DESPAWN,600000);
|
||||
me->SummonCreature(12238,28.067,61.875,-123.405,4.67,TEMPSUMMON_TIMED_DESPAWN,600000);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -62,7 +62,7 @@ struct boss_ptheradrasAI : public ScriptedAI
|
||||
//Dustfield_Timer
|
||||
if (Dustfield_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_DUSTFIELD);
|
||||
DoCast(me, SPELL_DUSTFIELD);
|
||||
Dustfield_Timer = 14000;
|
||||
} else Dustfield_Timer -= diff;
|
||||
|
||||
@@ -79,14 +79,14 @@ struct boss_ptheradrasAI : public ScriptedAI
|
||||
//RepulsiveGaze_Timer
|
||||
if (RepulsiveGaze_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_REPULSIVEGAZE);
|
||||
DoCast(me->getVictim(), SPELL_REPULSIVEGAZE);
|
||||
RepulsiveGaze_Timer = 20000;
|
||||
} else RepulsiveGaze_Timer -= diff;
|
||||
|
||||
//Thrash_Timer
|
||||
if (Thrash_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_THRASH);
|
||||
DoCast(me, SPELL_THRASH);
|
||||
Thrash_Timer = 18000;
|
||||
} else Thrash_Timer -= diff;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user