Clean up old (and partially unused) Aggro() function and use EnterCombat() instead + fix some minor enum-typos (INTURRUPT -> INTERRUPT)

(fix by Azazel)

--HG--
branch : trunk
This commit is contained in:
click
2010-07-19 14:17:30 +02:00
parent 84c6fa001c
commit ba36f1eb23
28 changed files with 43 additions and 43 deletions
@@ -62,7 +62,7 @@ struct boss_drektharAI : public ScriptedAI
uiYellTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); //20 to 30 seconds
}
void Aggro(Unit * /*who*/)
void EnterCombat(Unit * /*who*/)
{
DoScriptText(YELL_AGGRO, me);
}
@@ -55,7 +55,7 @@ struct boss_galvangarAI : public ScriptedAI
uiResetTimer = 5*IN_MILLISECONDS;
}
void Aggro(Unit * /*who*/)
void EnterCombat(Unit * /*who*/)
{
DoScriptText(YELL_AGGRO, me);
}
@@ -60,7 +60,7 @@ struct boss_vanndarAI : public ScriptedAI
uiYellTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS);
}
void Aggro(Unit * /*who*/)
void EnterCombat(Unit * /*who*/)
{
DoScriptText(YELL_AGGRO, me);
}
@@ -178,7 +178,7 @@ struct boss_gythAI : public ScriptedAI
&& me->GetHealth() > 0)
{
//summon Rend and Change model to normal Gyth
//Inturrupt any spell casting
//Interrupt any spell casting
me->InterruptNonMeleeSpells(false);
//Gyth model
me->SetDisplayId(9806);
@@ -292,7 +292,7 @@ struct boss_victor_nefariusAI : public ScriptedAI
//Teleport Victor Nefarius way out of the map
//sMapMgr.GetMap(me->GetMapId(), me)->CreatureRelocation(me,0,0,-5000,0);
//Inturrupt any spell casting
//Interrupt any spell casting
me->InterruptNonMeleeSpells(false);
//Root self
@@ -247,7 +247,7 @@ struct boss_netherspiteAI : public ScriptedAI
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
}
void Aggro(Unit * /*who*/)
void EnterCombat(Unit * /*who*/)
{
HandleDoors(false);
SwitchToPortalPhase();
@@ -109,7 +109,7 @@ struct boss_aranAI : public ScriptedAI
uint32 FireCooldown;
uint32 FrostCooldown;
uint32 DrinkInturruptTimer;
uint32 DrinkInterruptTimer;
bool ElementalsSpawned;
bool Drinking;
@@ -133,7 +133,7 @@ struct boss_aranAI : public ScriptedAI
FireCooldown = 0;
FrostCooldown = 0;
DrinkInturruptTimer = 10000;
DrinkInterruptTimer = 10000;
ElementalsSpawned = false;
Drinking = false;
@@ -261,11 +261,11 @@ struct boss_aranAI : public ScriptedAI
DoCast(me, SPELL_CONJURE, false);
DoCast(me, SPELL_DRINK, false);
me->SetStandState(UNIT_STAND_STATE_SIT);
DrinkInturruptTimer = 10000;
DrinkInterruptTimer = 10000;
}
}
//Drink Inturrupt
//Drink Interrupt
if (Drinking && DrinkInturrupted)
{
Drinking = false;
@@ -275,10 +275,10 @@ struct boss_aranAI : public ScriptedAI
DoCast(me, SPELL_POTION, false);
}
//Drink Inturrupt Timer
//Drink Interrupt Timer
if (Drinking && !DrinkInturrupted)
if (DrinkInturruptTimer >= diff)
DrinkInturruptTimer -= diff;
if (DrinkInterruptTimer >= diff)
DrinkInterruptTimer -= diff;
else
{
me->SetStandState(UNIT_STAND_STATE_STAND);
@@ -476,13 +476,13 @@ struct boss_aranAI : public ScriptedAI
void SpellHit(Unit* /*pAttacker*/, const SpellEntry* Spell)
{
//We only care about inturrupt effects and only if they are durring a spell currently being casted
//We only care about interrupt effects and only if they are durring a spell currently being casted
if ((Spell->Effect[0] != SPELL_EFFECT_INTERRUPT_CAST &&
Spell->Effect[1] != SPELL_EFFECT_INTERRUPT_CAST &&
Spell->Effect[2] != SPELL_EFFECT_INTERRUPT_CAST) || !me->IsNonMeleeSpellCasted(false))
return;
//Inturrupt effect
//Interrupt effect
me->InterruptNonMeleeSpells(false);
//Normally we would set the cooldown equal to the spell duration
@@ -597,7 +597,7 @@ struct boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI
boss_priestess_lackey_commonAI::Reset();
}
void Aggro(Unit* /*pWho*/)
void EnterCombat(Unit* /*pWho*/)
{
DoCast(me, SPELL_SUMMON_IMP);
}
@@ -93,7 +93,7 @@ struct boss_jandicebarovAI : public ScriptedAI
if (!Invisible && Illusion_Timer <= diff)
{
//Inturrupt any spell casting
//Interrupt any spell casting
me->InterruptNonMeleeSpells(false);
me->setFaction(35);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -101,7 +101,7 @@ struct npc_00x09hlAI : public npc_escortAI
}
}
void Aggro(Unit* pWho)
void EnterCombat(Unit* pWho)
{
if (pWho->GetEntry() == NPC_MARAUDING_OWL || pWho->GetEntry() == NPC_VILE_AMBUSHER)
return;
@@ -233,7 +233,7 @@ struct pyrewood_ambushAI : public ScriptedAI
}
}
void Aggro(Unit * /*who*/){}
void EnterCombat(Unit * /*who*/){}
void JustSummoned(Creature *pSummoned)
{
@@ -71,7 +71,7 @@ struct npc_tapoke_slim_jahnAI : public npc_escortAI
}
}
void Aggro(Unit* /*pWho*/)
void EnterCombat(Unit* /*pWho*/)
{
Player* pPlayer = GetPlayerForEscort();