Scripts: Reorder file names in Commands/CMakeList file and cosmetic changes in all scripts
This commit is contained in:
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
struct mob_stolen_soulAI : public ScriptedAI
|
||||
{
|
||||
mob_stolen_soulAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_stolen_soulAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint8 myClass;
|
||||
uint32 Class_Timer;
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
|
||||
struct boss_exarch_maladaarAI : public ScriptedAI
|
||||
{
|
||||
boss_exarch_maladaarAI(Creature *c) : ScriptedAI(c)
|
||||
boss_exarch_maladaarAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
HasTaunted = false;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
Avatar_summoned = false;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!HasTaunted && me->IsWithinDistInMap(who, 150.0))
|
||||
{
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (summoned->GetEntry() == ENTRY_STOLEN_SOUL)
|
||||
{
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
summoned->SetDisplayId(soulmodel);
|
||||
summoned->setFaction(me->getFaction());
|
||||
|
||||
if (Unit *pTarget = Unit::GetUnit(*me, soulholder))
|
||||
if (Unit* pTarget = Unit::GetUnit(*me, soulholder))
|
||||
{
|
||||
|
||||
CAST_AI(mob_stolen_soul::mob_stolen_soulAI, summoned->AI())->SetMyClass(soulclass);
|
||||
@@ -259,7 +259,7 @@ public:
|
||||
|
||||
if (StolenSoul_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
|
||||
if (Ribbon_of_Souls_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_RIBBON_OF_SOULS);
|
||||
|
||||
Ribbon_of_Souls_timer = 5000 + (rand()%20 * 1000);
|
||||
@@ -319,7 +319,7 @@ public:
|
||||
|
||||
struct mob_avatar_of_martyredAI : public ScriptedAI
|
||||
{
|
||||
mob_avatar_of_martyredAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_avatar_of_martyredAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Mortal_Strike_timer;
|
||||
|
||||
|
||||
+5
-5
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
struct boss_shirrak_the_dead_watcherAI : public ScriptedAI
|
||||
{
|
||||
boss_shirrak_the_dead_watcherAI(Creature *c) : ScriptedAI(c)
|
||||
boss_shirrak_the_dead_watcherAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{ }
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (summoned && summoned->GetEntry() == ENTRY_FOCUS_FIRE)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
summoned->SetLevel(me->getLevel());
|
||||
summoned->AddUnitState(UNIT_STAT_ROOT);
|
||||
|
||||
if (Unit *pFocusedTarget = Unit::GetUnit(*me, FocusedTargetGUID))
|
||||
if (Unit* pFocusedTarget = Unit::GetUnit(*me, FocusedTargetGUID))
|
||||
summoned->AI()->AttackStart(pFocusedTarget);
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
if (FocusFire_Timer <= diff)
|
||||
{
|
||||
// Summon Focus Fire & Emote
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->isAlive())
|
||||
{
|
||||
FocusedTargetGUID = pTarget->GetGUID();
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
|
||||
struct mob_focus_fireAI : public ScriptedAI
|
||||
{
|
||||
mob_focus_fireAI(Creature *c) : ScriptedAI(c)
|
||||
mob_focus_fireAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
struct boss_nexusprince_shaffarAI : public ScriptedAI
|
||||
{
|
||||
boss_nexusprince_shaffarAI(Creature *c) : ScriptedAI(c), summons(me) { HasTaunted = false; }
|
||||
boss_nexusprince_shaffarAI(Creature* c) : ScriptedAI(c), summons(me) { HasTaunted = false; }
|
||||
|
||||
uint32 Blink_Timer;
|
||||
uint32 Beacon_Timer;
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!HasTaunted && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
|
||||
{
|
||||
@@ -122,20 +122,20 @@ public:
|
||||
summons.DoZoneInCombat();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (summoned->GetEntry() == NPC_BEACON)
|
||||
{
|
||||
summoned->CastSpell(summoned, SPELL_ETHEREAL_BEACON_VISUAL, false);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summoned->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
|
||||
struct mob_ethereal_beaconAI : public ScriptedAI
|
||||
{
|
||||
mob_ethereal_beaconAI(Creature *c) : ScriptedAI(c)
|
||||
mob_ethereal_beaconAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
Shaffar->AI()->AttackStart(who);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(me->getVictim());
|
||||
}
|
||||
@@ -278,7 +278,7 @@ public:
|
||||
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
Creature *Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100);
|
||||
Creature* Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100);
|
||||
if (!Shaffar || Shaffar->isDead() || !Shaffar->isInCombat())
|
||||
{
|
||||
KillSelf();
|
||||
@@ -325,7 +325,7 @@ public:
|
||||
|
||||
struct mob_ethereal_apprenticeAI : public ScriptedAI
|
||||
{
|
||||
mob_ethereal_apprenticeAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_ethereal_apprenticeAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Cast_Timer;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
struct boss_pandemoniusAI : public ScriptedAI
|
||||
{
|
||||
boss_pandemoniusAI(Creature *c) : ScriptedAI(c)
|
||||
boss_pandemoniusAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
|
||||
if (VoidBlast_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_VOID_BLAST);
|
||||
VoidBlast_Timer = 500;
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
struct boss_darkweaver_sythAI : public ScriptedAI
|
||||
{
|
||||
boss_darkweaver_sythAI(Creature *c) : ScriptedAI(c)
|
||||
boss_darkweaver_sythAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -110,9 +110,9 @@ public:
|
||||
DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summoned->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
|
||||
if (flameshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_FLAME_SHOCK);
|
||||
|
||||
flameshock_timer = 10000 + rand()%5000;
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
|
||||
if (arcaneshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_ARCANE_SHOCK);
|
||||
|
||||
arcaneshock_timer = 10000 + rand()%5000;
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
|
||||
if (frostshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_FROST_SHOCK);
|
||||
|
||||
frostshock_timer = 10000 + rand()%5000;
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
|
||||
if (shadowshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_SHADOW_SHOCK);
|
||||
|
||||
shadowshock_timer = 10000 + rand()%5000;
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
|
||||
if (chainlightning_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
|
||||
|
||||
chainlightning_timer = 25000;
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
|
||||
struct mob_syth_fireAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_fireAI(Creature *c) : ScriptedAI(c)
|
||||
mob_syth_fireAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
|
||||
if (flameshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_FLAME_SHOCK);
|
||||
|
||||
flameshock_timer = 5000;
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
|
||||
if (flamebuffet_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_FLAME_BUFFET);
|
||||
|
||||
flamebuffet_timer = 5000;
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
|
||||
struct mob_syth_arcaneAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_arcaneAI(Creature *c) : ScriptedAI(c)
|
||||
mob_syth_arcaneAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
|
||||
if (arcaneshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_ARCANE_SHOCK);
|
||||
|
||||
arcaneshock_timer = 5000;
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
|
||||
if (arcanebuffet_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_ARCANE_BUFFET);
|
||||
|
||||
arcanebuffet_timer = 5000;
|
||||
@@ -319,7 +319,7 @@ public:
|
||||
|
||||
struct mob_syth_frostAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_frostAI(Creature *c) : ScriptedAI(c)
|
||||
mob_syth_frostAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
|
||||
if (frostshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_FROST_SHOCK);
|
||||
|
||||
frostshock_timer = 5000;
|
||||
@@ -350,7 +350,7 @@ public:
|
||||
|
||||
if (frostbuffet_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_FROST_BUFFET);
|
||||
|
||||
frostbuffet_timer = 5000;
|
||||
@@ -374,7 +374,7 @@ public:
|
||||
|
||||
struct mob_syth_shadowAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_shadowAI(Creature *c) : ScriptedAI(c)
|
||||
mob_syth_shadowAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ public:
|
||||
|
||||
if (shadowshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_SHADOW_SHOCK);
|
||||
|
||||
shadowshock_timer = 5000;
|
||||
@@ -405,7 +405,7 @@ public:
|
||||
|
||||
if (shadowbuffet_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_SHADOW_BUFFET);
|
||||
|
||||
shadowbuffet_timer = 5000;
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
struct boss_talon_king_ikissAI : public ScriptedAI
|
||||
{
|
||||
boss_talon_king_ikissAI(Creature *c) : ScriptedAI(c)
|
||||
boss_talon_king_ikissAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
ManaShield = false;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me))
|
||||
{
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
|
||||
if (Sheep_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget;
|
||||
Unit* pTarget;
|
||||
|
||||
//second top aggro target in normal, random target in heroic correct?
|
||||
if (IsHeroic())
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
{
|
||||
DoScriptText(EMOTE_ARCANE_EXP, me);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
+3
-3
@@ -66,7 +66,7 @@ public:
|
||||
|
||||
struct boss_blackheart_the_inciterAI : public ScriptedAI
|
||||
{
|
||||
boss_blackheart_the_inciterAI(Creature *c) : ScriptedAI(c)
|
||||
boss_blackheart_the_inciterAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
pTarget->CastSpell(pTarget, SPELL_INCITE_CHAOS_B, true);
|
||||
}
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
//Charge_Timer
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_CHARGE);
|
||||
Charge_Timer = 15000 + rand()%10000;
|
||||
} else Charge_Timer -= diff;
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
struct mob_voidtravelerAI : public ScriptedAI
|
||||
{
|
||||
mob_voidtravelerAI(Creature *c) : ScriptedAI(c)
|
||||
mob_voidtravelerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
}
|
||||
if (move <= diff)
|
||||
{
|
||||
Creature *Vorpil = Unit::GetCreature(*me, VorpilGUID);
|
||||
Creature* Vorpil = Unit::GetCreature(*me, VorpilGUID);
|
||||
if (!Vorpil)
|
||||
{
|
||||
VorpilGUID = 0;
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
|
||||
struct boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
{
|
||||
boss_grandmaster_vorpilAI(Creature *c) : ScriptedAI(c)
|
||||
boss_grandmaster_vorpilAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
Intro = false;
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
Creature *Portal = NULL;
|
||||
Creature* Portal = NULL;
|
||||
Portal = me->SummonCreature(MOB_VOID_PORTAL, VoidPortalCoords[i][0], VoidPortalCoords[i][1], VoidPortalCoords[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 3000000);
|
||||
if (Portal)
|
||||
{
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
Unit *Portal = Unit::GetUnit((*me), PortalsGuid[i]);
|
||||
Unit* Portal = Unit::GetUnit((*me), PortalsGuid[i]);
|
||||
if (Portal && Portal->isAlive())
|
||||
Portal->DealDamage(Portal, Portal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
PortalsGuid[i] = 0;
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (summoned && summoned->GetEntry() == MOB_VOID_TRAVELER)
|
||||
CAST_AI(mob_voidtraveler::mob_voidtravelerAI, summoned->AI())->VorpilGUID = me->GetGUID();
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
|
||||
if (IsHeroic() && banish_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, false);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, false);
|
||||
if (pTarget)
|
||||
{
|
||||
DoCast(pTarget, SPELL_BANISH);
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
struct boss_murmurAI : public ScriptedAI
|
||||
{
|
||||
boss_murmurAI(Creature *c) : ScriptedAI(c)
|
||||
boss_murmurAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
//Not do anything without aura, spell can be resisted!
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
void EnterCombat(Unit* /*who*/) { }
|
||||
|
||||
// Sonic Boom instant damage (needs core fix instead of this)
|
||||
void SpellHitTarget(Unit *pTarget, const SpellEntry *spell)
|
||||
void SpellHitTarget(Unit* pTarget, const SpellEntry *spell)
|
||||
{
|
||||
if (pTarget && pTarget->isAlive() && spell && spell->Id == uint32(SPELL_SONIC_BOOM_EFFECT))
|
||||
me->DealDamage(pTarget, (pTarget->GetHealth()*90)/100, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NATURE, spell);
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
// Murmur's Touch
|
||||
if (MurmursTouch_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 80, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 80, true))
|
||||
DoCast(pTarget, SPELL_MURMURS_TOUCH);
|
||||
MurmursTouch_Timer = 25000 + rand()%10000;
|
||||
} else MurmursTouch_Timer -= diff;
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
// Magnetic Pull
|
||||
if (MagneticPull_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->isAlive())
|
||||
{
|
||||
DoCast(pTarget, SPELL_MAGNETIC_PULL);
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
{
|
||||
std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
|
||||
if (Unit *pTarget = Unit::GetUnit((*me), (*i)->getUnitGuid()))
|
||||
if (Unit* pTarget = Unit::GetUnit((*me), (*i)->getUnitGuid()))
|
||||
if (pTarget->isAlive() && !me->IsWithinDist(pTarget, 35, false))
|
||||
DoCast(pTarget, SPELL_THUNDERING_STORM, true);
|
||||
ThunderingStorm_Timer = 15000;
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
// Sonic Shock
|
||||
if (SonicShock_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 20, false))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 20, false))
|
||||
if (pTarget->isAlive())
|
||||
DoCast(pTarget, SPELL_SONIC_SHOCK);
|
||||
SonicShock_Timer = 10000+rand()%10000;
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
{
|
||||
std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
|
||||
if (Unit *pTarget = Unit::GetUnit((*me), (*i)->getUnitGuid()))
|
||||
if (Unit* pTarget = Unit::GetUnit((*me), (*i)->getUnitGuid()))
|
||||
if (pTarget->isAlive() && me->IsWithinMeleeRange(pTarget))
|
||||
{
|
||||
me->TauntApply(pTarget);
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
struct boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
{
|
||||
boss_gurtogg_bloodboilAI(Creature *c) : ScriptedAI(c)
|
||||
boss_gurtogg_bloodboilAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -147,11 +147,11 @@ public:
|
||||
if (!m_threatlist.size()) // He doesn't have anyone in his threatlist, useless to continue
|
||||
return;
|
||||
|
||||
std::list<Unit *> targets;
|
||||
std::list<Unit* > targets;
|
||||
std::list<HostileReference *>::const_iterator itr = m_threatlist.begin();
|
||||
for (; itr!= m_threatlist.end(); ++itr) //store the threat list in a different container
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
//only on alive players
|
||||
if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
targets.push_back(pTarget);
|
||||
@@ -166,9 +166,9 @@ public:
|
||||
/*SpellEntry const *spellInfo = GetSpellStore()->LookupEntry(SPELL_BLOODBOIL);
|
||||
if (spellInfo)
|
||||
{
|
||||
for (std::list<Unit *>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
for (std::list<Unit* >::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
{
|
||||
Unit *pTarget = *itr;
|
||||
Unit* pTarget = *itr;
|
||||
if (!pTarget) return;
|
||||
for (uint32 i = 0; i<3; ++i)
|
||||
{
|
||||
@@ -228,7 +228,7 @@ public:
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_BEWILDERING_STRIKE);
|
||||
float mt_threat = DoGetThreat(me->getVictim());
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
|
||||
me->AddThreat(pTarget, mt_threat);
|
||||
BewilderingStrikeTimer = 20000;
|
||||
} else BewilderingStrikeTimer -= diff;
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
{
|
||||
if (Phase1)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget && pTarget->isAlive())
|
||||
{
|
||||
Phase1 = false;
|
||||
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
|
||||
struct flame_of_azzinothAI : public ScriptedAI
|
||||
{
|
||||
flame_of_azzinothAI(Creature *c) : ScriptedAI(c) {}
|
||||
flame_of_azzinothAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 FlameBlastTimer;
|
||||
uint32 CheckTimer;
|
||||
@@ -392,7 +392,7 @@ public:
|
||||
|
||||
void ChargeCheck()
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_FARTHEST, 0, 200, false);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_FARTHEST, 0, 200, false);
|
||||
if (pTarget && (!me->IsWithinCombatRange(pTarget, FLAME_CHARGE_DISTANCE)))
|
||||
{
|
||||
me->AddThreat(pTarget, 5000000.0f);
|
||||
@@ -411,7 +411,7 @@ public:
|
||||
Glaive->InterruptNonMeleeSpells(true);
|
||||
DoCast(me, SPELL_FLAME_ENRAGE, true);
|
||||
DoResetThreat();
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget && pTarget->isAlive())
|
||||
{
|
||||
me->AddThreat(me->getVictim(), 5000000.0f);
|
||||
@@ -538,7 +538,7 @@ public:
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
void AttackStart(Unit *who)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!who || Phase >= PHASE_TALK_SEQUENCE)
|
||||
return;
|
||||
@@ -549,7 +549,7 @@ public:
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *) {}
|
||||
void MoveInLineOfSight(Unit* ) {}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (damage >= me->GetHealth() && done_by != me)
|
||||
damage = 0;
|
||||
@@ -1038,7 +1038,7 @@ public:
|
||||
|
||||
case EVENT_PARASITIC_SHADOWFIEND:
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 200, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 200, true))
|
||||
DoCast(pTarget, SPELL_PARASITIC_SHADOWFIEND, true);
|
||||
Timer[EVENT_PARASITIC_SHADOWFIEND] = 35000 + rand()%10000;
|
||||
}
|
||||
@@ -1157,7 +1157,7 @@ public:
|
||||
|
||||
struct boss_maievAI : public ScriptedAI
|
||||
{
|
||||
boss_maievAI(Creature *c) : ScriptedAI(c) {};
|
||||
boss_maievAI(Creature* c) : ScriptedAI(c) {};
|
||||
|
||||
uint64 IllidanGUID;
|
||||
|
||||
@@ -1183,7 +1183,7 @@ public:
|
||||
void EnterEvadeMode() {}
|
||||
void GetIllidanGUID(uint64 guid) { IllidanGUID = guid; }
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (done_by->GetGUID() != IllidanGUID)
|
||||
damage = 0;
|
||||
@@ -1197,7 +1197,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit *who)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!who || Timer[EVENT_MAIEV_STEALTH])
|
||||
return;
|
||||
@@ -1271,7 +1271,7 @@ public:
|
||||
{
|
||||
if (GETCRE(Illidan, IllidanGUID))
|
||||
{
|
||||
Unit *pTarget = Illidan->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = Illidan->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (!pTarget || !me->IsWithinDistInMap(pTarget, 80) || Illidan->IsWithinDistInMap(pTarget, 20))
|
||||
{
|
||||
@@ -1466,7 +1466,7 @@ public:
|
||||
Timer = 1;
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (damage > me->GetHealth() || done_by->GetGUID() != IllidanGUID)
|
||||
damage = 0;
|
||||
@@ -1886,7 +1886,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::JustSummoned(Creature* su
|
||||
summon->setDeathState(JUST_DIED);
|
||||
return;
|
||||
}
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 999, true);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 999, true);
|
||||
if (!pTarget || pTarget->HasAura(SPELL_PARASITIC_SHADOWFIEND)
|
||||
|| pTarget->HasAura(SPELL_PARASITIC_SHADOWFIEND2))
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true);
|
||||
@@ -1895,7 +1895,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::JustSummoned(Creature* su
|
||||
}
|
||||
break;
|
||||
case SHADOW_DEMON:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true)) // only on players.
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true)) // only on players.
|
||||
{
|
||||
summon->AddThreat(pTarget, 5000000.0f);
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
@@ -2017,7 +2017,7 @@ public:
|
||||
|
||||
struct cage_trap_triggerAI : public ScriptedAI
|
||||
{
|
||||
cage_trap_triggerAI(Creature *c) : ScriptedAI(c) {}
|
||||
cage_trap_triggerAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint64 IllidanGUID;
|
||||
uint32 DespawnTimer;
|
||||
@@ -2039,7 +2039,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/){}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!Active)
|
||||
return;
|
||||
@@ -2114,7 +2114,7 @@ public:
|
||||
|
||||
struct shadow_demonAI : public ScriptedAI
|
||||
{
|
||||
shadow_demonAI(Creature *c) : ScriptedAI(c) {}
|
||||
shadow_demonAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint64 TargetGUID;
|
||||
|
||||
@@ -2128,7 +2128,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (Unit *pTarget = Unit::GetUnit((*me), TargetGUID))
|
||||
if (Unit* pTarget = Unit::GetUnit((*me), TargetGUID))
|
||||
pTarget->RemoveAurasDueToSpell(SPELL_PARALYZE);
|
||||
}
|
||||
|
||||
@@ -2231,7 +2231,7 @@ public:
|
||||
{
|
||||
if (!me->getVictim())
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true))
|
||||
AttackStart(pTarget);
|
||||
else
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
|
||||
struct boss_shahrazAI : public ScriptedAI
|
||||
{
|
||||
boss_shahrazAI(Creature *c) : ScriptedAI(c)
|
||||
boss_shahrazAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
//Randomly cast one beam.
|
||||
if (BeamTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!pTarget || !pTarget->isAlive())
|
||||
return;
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
|
||||
struct npc_enslaved_soulAI : public ScriptedAI
|
||||
{
|
||||
npc_enslaved_soulAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_enslaved_soulAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint64 ReliquaryGUID;
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
|
||||
struct boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
{
|
||||
boss_reliquary_of_soulsAI(Creature *c) : ScriptedAI(c)
|
||||
boss_reliquary_of_soulsAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
EssenceGUID = 0;
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
float y = Coords[random].y;
|
||||
Creature* Soul = me->SummonCreature(CREATURE_ENSLAVED_SOUL, x, y, me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if (!Soul) return false;
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
CAST_AI(npc_enslaved_soul::npc_enslaved_soulAI, Soul->AI())->ReliquaryGUID = me->GetGUID();
|
||||
Soul->AI()->AttackStart(pTarget);
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void MergeThreatList(Creature *pTarget)
|
||||
void MergeThreatList(Creature* pTarget)
|
||||
{
|
||||
if (!pTarget)
|
||||
return;
|
||||
@@ -361,7 +361,7 @@ public:
|
||||
void npc_enslaved_soul::npc_enslaved_soulAI::JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (ReliquaryGUID)
|
||||
if (Creature *Reliquary = (Unit::GetCreature((*me), ReliquaryGUID)))
|
||||
if (Creature* Reliquary = (Unit::GetCreature((*me), ReliquaryGUID)))
|
||||
++(CAST_AI(boss_reliquary_of_souls::boss_reliquary_of_soulsAI, Reliquary->AI())->SoulDeathCount);
|
||||
|
||||
DoCast(me, SPELL_SOUL_RELEASE, true);
|
||||
@@ -379,7 +379,7 @@ public:
|
||||
|
||||
struct boss_essence_of_sufferingAI : public ScriptedAI
|
||||
{
|
||||
boss_essence_of_sufferingAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_essence_of_sufferingAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint64 StatAuraGUID;
|
||||
|
||||
@@ -446,7 +446,7 @@ public:
|
||||
return; // No targets added for some reason. No point continuing.
|
||||
targets.sort(Trinity::ObjectDistanceOrderPred(me)); // Sort players by distance.
|
||||
targets.resize(1); // Only need closest target.
|
||||
Unit *pTarget = targets.front(); // Get the first target.
|
||||
Unit* pTarget = targets.front(); // Get the first target.
|
||||
if (pTarget)
|
||||
pTarget->CastSpell(me, SPELL_FIXATE_TAUNT, true);
|
||||
DoResetThreat();
|
||||
@@ -504,7 +504,7 @@ public:
|
||||
|
||||
struct boss_essence_of_desireAI : public ScriptedAI
|
||||
{
|
||||
boss_essence_of_desireAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_essence_of_desireAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 RuneShieldTimer;
|
||||
uint32 DeadenTimer;
|
||||
@@ -518,7 +518,7 @@ public:
|
||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_CONFUSE, true);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (done_by == me)
|
||||
return;
|
||||
@@ -607,7 +607,7 @@ public:
|
||||
|
||||
struct boss_essence_of_angerAI : public ScriptedAI
|
||||
{
|
||||
boss_essence_of_angerAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_essence_of_angerAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint64 AggroTargetGUID;
|
||||
|
||||
|
||||
@@ -278,12 +278,12 @@ public:
|
||||
{
|
||||
summons.DespawnAll();
|
||||
}
|
||||
void JustSummoned(Creature *summon)
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
if (summon->GetEntry() == CREATURE_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
|
||||
summons.Summon(summon);
|
||||
}
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
if (summon->GetEntry() == CREATURE_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
|
||||
summons.Despawn(summon);
|
||||
@@ -371,7 +371,7 @@ public:
|
||||
{
|
||||
Spawn->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
Spawn->GetMotionMaster()->MovePoint(0, AGGRO_X, AGGRO_Y, AGGRO_Z);
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Spawn->AI()->AttackStart(pTarget);
|
||||
}
|
||||
}
|
||||
@@ -628,12 +628,12 @@ public:
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
if (summon->GetEntry() == CREATURE_BROKEN)
|
||||
summons.Summon(summon);
|
||||
}
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
if (summon->GetEntry() == CREATURE_BROKEN)
|
||||
summons.Despawn(summon);
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
struct molten_flameAI : public NullCreatureAI
|
||||
{
|
||||
molten_flameAI(Creature *c) : NullCreatureAI(c) {}
|
||||
molten_flameAI(Creature* c) : NullCreatureAI(c) {}
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
|
||||
struct boss_supremusAI : public ScriptedAI
|
||||
{
|
||||
boss_supremusAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
boss_supremusAI(Creature* c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -165,13 +165,13 @@ public:
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon) {summons.Summon(summon);}
|
||||
void SummonedCreatureDespawn(Creature *summon) {summons.Despawn(summon);}
|
||||
void JustSummoned(Creature* summon) {summons.Summon(summon);}
|
||||
void SummonedCreatureDespawn(Creature* summon) {summons.Despawn(summon);}
|
||||
|
||||
Unit* CalculateHatefulStrikeTarget()
|
||||
{
|
||||
uint32 health = 0;
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
|
||||
std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
|
||||
std::list<HostileReference*>::const_iterator i = m_threatlist.begin();
|
||||
@@ -211,13 +211,13 @@ public:
|
||||
events.ScheduleEvent(EVENT_FLAME, 20000, GCD_CAST);
|
||||
break;
|
||||
case EVENT_HATEFUL_STRIKE:
|
||||
if (Unit *pTarget = CalculateHatefulStrikeTarget())
|
||||
if (Unit* pTarget = CalculateHatefulStrikeTarget())
|
||||
DoCast(pTarget, SPELL_HATEFUL_STRIKE);
|
||||
events.DelayEvents(1000, GCD_CAST);
|
||||
events.ScheduleEvent(EVENT_HATEFUL_STRIKE, 5000, GCD_CAST, PHASE_STRIKE);
|
||||
break;
|
||||
case EVENT_SWITCH_TARGET:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
{
|
||||
DoResetThreat();
|
||||
me->AddThreat(pTarget, 5000000.0f);
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
break;
|
||||
case EVENT_VOLCANO:
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true);
|
||||
if (!pTarget) pTarget = me->getVictim();
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
|
||||
struct npc_volcanoAI : public Scripted_NoMovementAI
|
||||
{
|
||||
npc_volcanoAI(Creature *c) : Scripted_NoMovementAI(c) {}
|
||||
npc_volcanoAI(Creature* c) : Scripted_NoMovementAI(c) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
struct mob_doom_blossomAI : public ScriptedAI
|
||||
{
|
||||
mob_doom_blossomAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_doom_blossomAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 CheckTeronTimer;
|
||||
uint32 ShadowBoltTimer;
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!who || (!who->isAlive()) || (who->GetGUID() == GhostGUID))
|
||||
return;
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
targets.push_back(pUnit);
|
||||
}
|
||||
targets.sort(Trinity::ObjectDistanceOrderPred(me));
|
||||
Unit *pTarget = targets.front();
|
||||
Unit* pTarget = targets.front();
|
||||
if (pTarget && me->IsWithinDistInMap(pTarget, me->GetAttackDistance(pTarget)))
|
||||
{
|
||||
DoCast(pTarget, SPELL_ATROPHY);
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
|
||||
struct boss_teron_gorefiendAI : public ScriptedAI
|
||||
{
|
||||
boss_teron_gorefiendAI(Creature *c) : ScriptedAI(c)
|
||||
boss_teron_gorefiendAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -365,7 +365,7 @@ public:
|
||||
Construct->CastSpell(Construct, SPELL_PASSIVE_SHADOWFORM, true);
|
||||
SetThreatList(Construct); // Use same function as Doom Blossom to set Threat List.
|
||||
CAST_AI(mob_shadowy_construct::mob_shadowy_constructAI, Construct->AI())->GhostGUID = GhostGUID;
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (!pTarget) // someone's trying to solo.
|
||||
pTarget = me->getVictim();
|
||||
|
||||
@@ -417,7 +417,7 @@ public:
|
||||
Shadow = me->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 0);
|
||||
if (Shadow)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (!pTarget)
|
||||
pTarget = me->getVictim();
|
||||
|
||||
@@ -430,7 +430,7 @@ public:
|
||||
|
||||
if (SummonDoomBlossomTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
float X = CalculateRandomLocation(pTarget->GetPositionX(), 20);
|
||||
float Y = CalculateRandomLocation(pTarget->GetPositionY(), 20);
|
||||
@@ -452,7 +452,7 @@ public:
|
||||
|
||||
if (IncinerateTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (!pTarget)
|
||||
pTarget = me->getVictim();
|
||||
|
||||
@@ -466,7 +466,7 @@ public:
|
||||
|
||||
if (CrushingShadowsTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget && pTarget->isAlive())
|
||||
DoCast(pTarget, SPELL_CRUSHING_SHADOWS);
|
||||
CrushingShadowsTimer = 10000 + rand()%16 * 1000;
|
||||
@@ -475,7 +475,7 @@ public:
|
||||
/*** NOTE FOR FUTURE DEV: UNCOMMENT BELOW ONLY IF MIND CONTROL IS FULLY IMPLEMENTED **/
|
||||
/*if (ShadowOfDeathTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
if (!pTarget)
|
||||
pTarget = me->getVictim();
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
struct boss_najentusAI : public ScriptedAI
|
||||
{
|
||||
boss_najentusAI(Creature *c) : ScriptedAI(c)
|
||||
boss_najentusAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
bool RemoveImpalingSpine()
|
||||
{
|
||||
if (!SpineTargetGUID) return false;
|
||||
Unit *pTarget = Unit::GetUnit(*me, SpineTargetGUID);
|
||||
Unit* pTarget = Unit::GetUnit(*me, SpineTargetGUID);
|
||||
if (pTarget && pTarget->HasAura(SPELL_IMPALING_SPINE))
|
||||
pTarget->RemoveAurasDueToSpell(SPELL_IMPALING_SPINE);
|
||||
SpineTargetGUID=0;
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
break;
|
||||
case EVENT_SPINE:
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (!pTarget) pTarget = me->getVictim();
|
||||
if (pTarget)
|
||||
{
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
|
||||
struct mob_illidari_councilAI : public ScriptedAI
|
||||
{
|
||||
mob_illidari_councilAI(Creature *c) : ScriptedAI(c)
|
||||
mob_illidari_councilAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
|
||||
void StartEvent(Unit *pTarget)
|
||||
void StartEvent(Unit* pTarget)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
@@ -475,7 +475,7 @@ public:
|
||||
|
||||
struct boss_gathios_the_shattererAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_gathios_the_shattererAI(Creature *c) : boss_illidari_councilAI(c) {}
|
||||
boss_gathios_the_shattererAI(Creature* c) : boss_illidari_councilAI(c) {}
|
||||
|
||||
uint32 ConsecrationTimer;
|
||||
uint32 HammerOfJusticeTimer;
|
||||
@@ -557,7 +557,7 @@ public:
|
||||
|
||||
if (HammerOfJusticeTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
// is in ~10-40 yd range
|
||||
if (me->IsInRange(pTarget, 10.0f, 40.0f, false))
|
||||
@@ -602,7 +602,7 @@ public:
|
||||
|
||||
struct boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_high_nethermancer_zerevorAI(Creature *c) : boss_illidari_councilAI(c) {}
|
||||
boss_high_nethermancer_zerevorAI(Creature* c) : boss_illidari_councilAI(c) {}
|
||||
|
||||
uint32 BlizzardTimer;
|
||||
uint32 FlamestrikeTimer;
|
||||
@@ -670,7 +670,7 @@ public:
|
||||
|
||||
if (BlizzardTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_BLIZZARD);
|
||||
BlizzardTimer = 45000 + rand()%46 * 1000;
|
||||
@@ -681,7 +681,7 @@ public:
|
||||
|
||||
if (FlamestrikeTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_FLAMESTRIKE);
|
||||
FlamestrikeTimer = 55000 + rand()%46 * 1000;
|
||||
@@ -706,7 +706,7 @@ public:
|
||||
|
||||
struct boss_lady_malandeAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_lady_malandeAI(Creature *c) : boss_illidari_councilAI(c) {}
|
||||
boss_lady_malandeAI(Creature* c) : boss_illidari_councilAI(c) {}
|
||||
|
||||
uint32 EmpoweredSmiteTimer;
|
||||
uint32 CircleOfHealingTimer;
|
||||
@@ -738,7 +738,7 @@ public:
|
||||
|
||||
if (EmpoweredSmiteTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_EMPOWERED_SMITE);
|
||||
EmpoweredSmiteTimer = 38000;
|
||||
@@ -753,7 +753,7 @@ public:
|
||||
|
||||
if (DivineWrathTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_DIVINE_WRATH);
|
||||
DivineWrathTimer = 40000 + rand()%41 * 1000;
|
||||
@@ -784,7 +784,7 @@ public:
|
||||
|
||||
struct boss_veras_darkshadowAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_veras_darkshadowAI(Creature *c) : boss_illidari_councilAI(c) {}
|
||||
boss_veras_darkshadowAI(Creature* c) : boss_illidari_councilAI(c) {}
|
||||
|
||||
uint64 EnvenomTargetGUID;
|
||||
|
||||
@@ -838,7 +838,7 @@ public:
|
||||
|
||||
if (VanishTimer <= diff) // Disappear and stop attacking, but follow a random unit
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
VanishTimer = 30000;
|
||||
AppearEnvenomTimer= 28000;
|
||||
@@ -858,7 +858,7 @@ public:
|
||||
{
|
||||
if (VanishTimer <= diff) // Become attackable and poison current target
|
||||
{
|
||||
Unit *pTarget = me->getVictim();
|
||||
Unit* pTarget = me->getVictim();
|
||||
DoCast(pTarget, SPELL_DEADLY_POISON);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoResetThreat();
|
||||
|
||||
+21
-21
@@ -107,7 +107,7 @@ public:
|
||||
|
||||
struct boss_fathomlord_karathressAI : public ScriptedAI
|
||||
{
|
||||
boss_fathomlord_karathressAI(Creature *c) : ScriptedAI(c)
|
||||
boss_fathomlord_karathressAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
Advisors[0] = 0;
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
Advisors[2] = pInstance->GetData64(DATA_CARIBDIS);
|
||||
}
|
||||
|
||||
void StartEvent(Unit *who)
|
||||
void StartEvent(Unit* who)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
if (CataclysmicBolt_Timer <= diff)
|
||||
{
|
||||
//select a random unit other than the main tank
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
//if there aren't other units, cast on the tank
|
||||
if (!pTarget)
|
||||
@@ -317,7 +317,7 @@ public:
|
||||
|
||||
struct boss_fathomguard_sharkkisAI : public ScriptedAI
|
||||
{
|
||||
boss_fathomguard_sharkkisAI(Creature *c) : ScriptedAI(c)
|
||||
boss_fathomguard_sharkkisAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
|
||||
pet = false;
|
||||
|
||||
Creature *Pet = Unit::GetCreature(*me, SummonedPet);
|
||||
Creature* Pet = Unit::GetCreature(*me, SummonedPet);
|
||||
if (Pet && Pet->isAlive())
|
||||
{
|
||||
Pet->DealDamage(Pet, Pet->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
@@ -358,7 +358,7 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature *Karathress = NULL;
|
||||
Creature* Karathress = NULL;
|
||||
Karathress = (Unit::GetCreature((*me), pInstance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
@@ -381,7 +381,7 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -418,7 +418,7 @@ public:
|
||||
if (TheBeastWithin_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_THE_BEAST_WITHIN);
|
||||
Creature *Pet = Unit::GetCreature(*me, SummonedPet);
|
||||
Creature* Pet = Unit::GetCreature(*me, SummonedPet);
|
||||
if (Pet && Pet->isAlive())
|
||||
{
|
||||
Pet->CastSpell(Pet, SPELL_PET_ENRAGE, true);
|
||||
@@ -443,8 +443,8 @@ public:
|
||||
pet_id = CREATURE_FATHOM_SPOREBAT;
|
||||
}
|
||||
//DoCast(me, spell_id, true);
|
||||
Creature *Pet = DoSpawnCreature(pet_id, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Creature* Pet = DoSpawnCreature(pet_id, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (Pet && pTarget)
|
||||
{
|
||||
Pet->AI()->AttackStart(pTarget);
|
||||
@@ -471,7 +471,7 @@ public:
|
||||
|
||||
struct boss_fathomguard_tidalvessAI : public ScriptedAI
|
||||
{
|
||||
boss_fathomguard_tidalvessAI(Creature *c) : ScriptedAI(c)
|
||||
boss_fathomguard_tidalvessAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -498,7 +498,7 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature *Karathress = NULL;
|
||||
Creature* Karathress = NULL;
|
||||
Karathress = (Unit::GetCreature((*me), pInstance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
@@ -522,7 +522,7 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -557,7 +557,7 @@ public:
|
||||
if (Spitfire_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_SPITFIRE_TOTEM);
|
||||
Unit *SpitfireTotem = Unit::GetUnit(*me, CREATURE_SPITFIRE_TOTEM);
|
||||
Unit* SpitfireTotem = Unit::GetUnit(*me, CREATURE_SPITFIRE_TOTEM);
|
||||
if (SpitfireTotem)
|
||||
{
|
||||
CAST_CRE(SpitfireTotem)->AI()->AttackStart(me->getVictim());
|
||||
@@ -598,7 +598,7 @@ public:
|
||||
|
||||
struct boss_fathomguard_caribdisAI : public ScriptedAI
|
||||
{
|
||||
boss_fathomguard_caribdisAI(Creature *c) : ScriptedAI(c)
|
||||
boss_fathomguard_caribdisAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -625,7 +625,7 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature *Karathress = NULL;
|
||||
Creature* Karathress = NULL;
|
||||
Karathress = (Unit::GetCreature((*me), pInstance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
@@ -648,7 +648,7 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -688,14 +688,14 @@ public:
|
||||
{
|
||||
//DoCast(me, SPELL_SUMMON_CYCLONE); // Doesn't work
|
||||
Cyclone_Timer = 30000+rand()%10000;
|
||||
Creature *Cyclone = me->SummonCreature(CREATURE_CYCLONE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
Creature* Cyclone = me->SummonCreature(CREATURE_CYCLONE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
if (Cyclone)
|
||||
{
|
||||
CAST_CRE(Cyclone)->SetFloatValue(OBJECT_FIELD_SCALE_X, 3.0f);
|
||||
Cyclone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Cyclone->setFaction(me->getFaction());
|
||||
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_CYCLONE, true);
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
{
|
||||
Cyclone->AI()->AttackStart(pTarget);
|
||||
@@ -707,7 +707,7 @@ public:
|
||||
if (Heal_Timer <= diff)
|
||||
{
|
||||
// It can be cast on any of the mobs
|
||||
Unit *pUnit = NULL;
|
||||
Unit* pUnit = NULL;
|
||||
|
||||
while (pUnit == NULL || !pUnit->isAlive())
|
||||
{
|
||||
|
||||
+4
-4
@@ -88,7 +88,7 @@ public:
|
||||
|
||||
struct boss_hydross_the_unstableAI : public ScriptedAI
|
||||
{
|
||||
boss_hydross_the_unstableAI(Creature *c) : ScriptedAI(c), Summons(me)
|
||||
boss_hydross_the_unstableAI(Creature* c) : ScriptedAI(c), Summons(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
Summons.Despawn(summon);
|
||||
}
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
//VileSludge_Timer
|
||||
if (VileSludge_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_VILE_SLUDGE);
|
||||
|
||||
@@ -329,7 +329,7 @@ public:
|
||||
//WaterTomb_Timer
|
||||
if (WaterTomb_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_WATER_TOMB);
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
|
||||
struct boss_lady_vashjAI : public ScriptedAI
|
||||
{
|
||||
boss_lady_vashjAI (Creature *c) : ScriptedAI(c)
|
||||
boss_lady_vashjAI (Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
Intro = false;
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
JustCreated = false;
|
||||
} else CanAttack = true;
|
||||
|
||||
Unit *remo;
|
||||
Unit* remo;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
remo = Unit::GetUnit(*me, ShieldGeneratorChannel[i]);
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
AttackStart(who);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!Intro)
|
||||
{
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
{
|
||||
//Static Charge
|
||||
//Used on random people (only 1 person at any given time) in Phases 1 and 3, it's a debuff doing 2775 to 3225 Nature damage to the target and everybody in about 5 yards around it, every 1 seconds for 30 seconds. It can be removed by Cloak of Shadows, Iceblock, Divine Shield, etc, but not by Cleanse or Dispel Magic.
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true);
|
||||
|
||||
if (pTarget && !pTarget->HasAura(SPELL_STATIC_CHARGE_TRIGGER))
|
||||
@@ -404,7 +404,7 @@ public:
|
||||
me->GetMotionMaster()->Clear();
|
||||
DoTeleportTo(MIDDLE_X, MIDDLE_Y, MIDDLE_Z);
|
||||
|
||||
Creature *pCreature;
|
||||
Creature* pCreature;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
pCreature = me->SummonCreature(SHIED_GENERATOR_CHANNEL, ShieldGeneratorChannelPos[i][0], ShieldGeneratorChannelPos[i][1], ShieldGeneratorChannelPos[i][2], ShieldGeneratorChannelPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
@@ -420,12 +420,12 @@ public:
|
||||
//SummonSporebat_Timer
|
||||
if (SummonSporebat_Timer <= diff)
|
||||
{
|
||||
Creature *Sporebat = NULL;
|
||||
Creature* Sporebat = NULL;
|
||||
Sporebat = me->SummonCreature(TOXIC_SPOREBAT, SPOREBAT_X, SPOREBAT_Y, SPOREBAT_Z, SPOREBAT_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
|
||||
if (Sporebat)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
Sporebat->AI()->AttackStart(pTarget);
|
||||
@@ -450,7 +450,7 @@ public:
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
bool InMeleeRange = false;
|
||||
Unit *pTarget;
|
||||
Unit* pTarget;
|
||||
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
@@ -478,7 +478,7 @@ public:
|
||||
{
|
||||
//Forked Lightning
|
||||
//Used constantly in Phase 2, it shoots out completely randomly targeted bolts of lightning which hit everybody in a roughtly 60 degree cone in front of Vashj for 2313-2687 nature damage.
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (!pTarget)
|
||||
@@ -519,7 +519,7 @@ public:
|
||||
CoilfangElite = me->SummonCreature(COILFANG_ELITE, CoilfangElitePos[pos][0], CoilfangElitePos[pos][1], CoilfangElitePos[pos][2], CoilfangElitePos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
if (CoilfangElite)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
CoilfangElite->AI()->AttackStart(pTarget);
|
||||
@@ -537,7 +537,7 @@ public:
|
||||
CoilfangStrider = me->SummonCreature(COILFANG_STRIDER, CoilfangStriderPos[pos][0], CoilfangStriderPos[pos][1], CoilfangStriderPos[pos][2], CoilfangStriderPos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
if (CoilfangStrider)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
CoilfangStrider->AI()->AttackStart(pTarget);
|
||||
@@ -587,7 +587,7 @@ public:
|
||||
|
||||
struct mob_enchanted_elementalAI : public ScriptedAI
|
||||
{
|
||||
mob_enchanted_elementalAI(Creature *c) : ScriptedAI(c)
|
||||
mob_enchanted_elementalAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -660,7 +660,7 @@ public:
|
||||
if (me->IsWithinDist3d(MIDDLE_X, MIDDLE_Y, MIDDLE_Z, 3))
|
||||
DoCast(me, SPELL_SURGE);
|
||||
}
|
||||
if (Creature *Vashj = Unit::GetCreature(*me, VashjGUID))
|
||||
if (Creature* Vashj = Unit::GetCreature(*me, VashjGUID))
|
||||
{
|
||||
if (!Vashj->isInCombat() || CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->AI())->Phase != 2 || Vashj->isDead())
|
||||
{
|
||||
@@ -689,7 +689,7 @@ public:
|
||||
|
||||
struct mob_tainted_elementalAI : public ScriptedAI
|
||||
{
|
||||
mob_tainted_elementalAI(Creature *c) : ScriptedAI(c)
|
||||
mob_tainted_elementalAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -709,7 +709,7 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature *Vashj = NULL;
|
||||
Creature* Vashj = NULL;
|
||||
Vashj = (Unit::GetCreature((*me), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||
|
||||
if (Vashj)
|
||||
@@ -727,7 +727,7 @@ public:
|
||||
//PoisonBolt_Timer
|
||||
if (PoisonBolt_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (pTarget && pTarget->IsWithinDistInMap(me, 30))
|
||||
@@ -764,7 +764,7 @@ public:
|
||||
|
||||
struct mob_toxic_sporebatAI : public ScriptedAI
|
||||
{
|
||||
mob_toxic_sporebatAI(Creature *c) : ScriptedAI(c)
|
||||
mob_toxic_sporebatAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
EnterEvadeMode();
|
||||
@@ -819,7 +819,7 @@ public:
|
||||
//toxic spores
|
||||
if (bolt_timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -840,7 +840,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
//check if vashj is death
|
||||
Unit *Vashj = NULL;
|
||||
Unit* Vashj = NULL;
|
||||
Vashj = Unit::GetUnit((*me), pInstance->GetData64(DATA_LADYVASHJ));
|
||||
if (!Vashj || (Vashj && !Vashj->isAlive()) || (Vashj && CAST_AI(boss_lady_vashj::boss_lady_vashjAI, CAST_CRE(Vashj)->AI())->Phase != 3))
|
||||
{
|
||||
@@ -922,7 +922,7 @@ public:
|
||||
|
||||
struct mob_shield_generator_channelAI : public ScriptedAI
|
||||
{
|
||||
mob_shield_generator_channelAI(Creature *c) : ScriptedAI(c)
|
||||
mob_shield_generator_channelAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -950,7 +950,7 @@ public:
|
||||
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
Unit *Vashj = NULL;
|
||||
Unit* Vashj = NULL;
|
||||
Vashj = Unit::GetUnit((*me), pInstance->GetData64(DATA_LADYVASHJ));
|
||||
|
||||
if (Vashj && Vashj->isAlive())
|
||||
@@ -984,7 +984,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
Creature *Vashj = NULL;
|
||||
Creature* Vashj = NULL;
|
||||
Vashj = (Unit::GetCreature((*pPlayer), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||
if (Vashj && (CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->AI())->Phase == 2))
|
||||
{
|
||||
@@ -1021,7 +1021,7 @@ public:
|
||||
}
|
||||
|
||||
//get and remove channel
|
||||
Unit *Channel = NULL;
|
||||
Unit* Channel = NULL;
|
||||
Channel = Unit::GetCreature(*Vashj, CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->AI())->ShieldGeneratorChannel[channel_identifier]);
|
||||
if (Channel)
|
||||
{
|
||||
|
||||
+16
-16
@@ -79,7 +79,7 @@ public:
|
||||
|
||||
struct mob_inner_demonAI : public ScriptedAI
|
||||
{
|
||||
mob_inner_demonAI(Creature *c) : ScriptedAI(c)
|
||||
mob_inner_demonAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
victimGUID = 0;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
pUnit->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (done_by->GetGUID() != victimGUID && done_by->GetGUID() != me->GetGUID())
|
||||
{
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
|
||||
struct boss_leotheras_the_blindAI : public ScriptedAI
|
||||
{
|
||||
boss_leotheras_the_blindAI(Creature *c) : ScriptedAI(c)
|
||||
boss_leotheras_the_blindAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
c->GetPosition(x, y, z);
|
||||
pInstance = c->GetInstanceScript();
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
if (Creature *add = Unit::GetCreature(*me, SpellBinderGUID[i]))
|
||||
if (Creature* add = Unit::GetCreature(*me, SpellBinderGUID[i]))
|
||||
add->DisappearAndDie();
|
||||
|
||||
float nx = x;
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
|
||||
}
|
||||
}
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (me->HasAura(AURA_BANISH))
|
||||
return;
|
||||
@@ -282,7 +282,7 @@ public:
|
||||
uint8 AliveChannelers = 0;
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Unit *add = Unit::GetUnit(*me, SpellBinderGUID[i]);
|
||||
Unit* add = Unit::GetUnit(*me, SpellBinderGUID[i]);
|
||||
if (add && add->isAlive())
|
||||
++AliveChannelers;
|
||||
}
|
||||
@@ -420,7 +420,7 @@ public:
|
||||
{
|
||||
if (Whirlwind_Timer <= diff)
|
||||
{
|
||||
Unit *newTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* newTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (newTarget)
|
||||
{
|
||||
DoResetThreat();
|
||||
@@ -508,15 +508,15 @@ public:
|
||||
if (InnerDemons_Timer <= diff)
|
||||
{
|
||||
std::list<HostileReference *>& ThreatList = me->getThreatManager().getThreatList();
|
||||
std::vector<Unit *> TargetList;
|
||||
std::vector<Unit* > TargetList;
|
||||
for (std::list<HostileReference *>::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); ++itr)
|
||||
{
|
||||
Unit *tempTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
Unit* tempTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if (tempTarget && tempTarget->GetTypeId() == TYPEID_PLAYER && tempTarget->GetGUID() != me->getVictim()->GetGUID() && TargetList.size()<5)
|
||||
TargetList.push_back(tempTarget);
|
||||
}
|
||||
//SpellEntry *spell = GET_SPELL(SPELL_INSIDIOUS_WHISPER);
|
||||
for (std::vector<Unit *>::const_iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr)
|
||||
for (std::vector<Unit* >::const_iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr)
|
||||
{
|
||||
if ((*itr) && (*itr)->isAlive())
|
||||
{
|
||||
@@ -566,7 +566,7 @@ public:
|
||||
//at this point he divides himself in two parts
|
||||
CastConsumingMadness();
|
||||
DespawnDemon();
|
||||
Creature *Copy = NULL;
|
||||
Creature* Copy = NULL;
|
||||
Copy = DoSpawnCreature(DEMON_FORM, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 6000);
|
||||
if (Copy)
|
||||
{
|
||||
@@ -600,7 +600,7 @@ public:
|
||||
|
||||
struct boss_leotheras_the_blind_demonformAI : public ScriptedAI
|
||||
{
|
||||
boss_leotheras_the_blind_demonformAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_leotheras_the_blind_demonformAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 ChaosBlast_Timer;
|
||||
bool DealDamage;
|
||||
@@ -673,7 +673,7 @@ public:
|
||||
|
||||
struct mob_greyheart_spellbinderAI : public ScriptedAI
|
||||
{
|
||||
mob_greyheart_spellbinderAI(Creature *c) : ScriptedAI(c)
|
||||
mob_greyheart_spellbinderAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
leotherasGUID = 0;
|
||||
@@ -697,7 +697,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, 0);
|
||||
Creature *leotheras = Unit::GetCreature(*me, leotherasGUID);
|
||||
Creature* leotheras = Unit::GetCreature(*me, leotherasGUID);
|
||||
if (leotheras && leotheras->isAlive())
|
||||
CAST_AI(boss_leotheras_the_blind::boss_leotheras_the_blindAI, leotheras->AI())->CheckChannelers(/*false*/);
|
||||
}
|
||||
@@ -722,7 +722,7 @@ public:
|
||||
{
|
||||
if (leotherasGUID)
|
||||
{
|
||||
Creature *leotheras = Unit::GetCreature(*me, leotherasGUID);
|
||||
Creature* leotheras = Unit::GetCreature(*me, leotherasGUID);
|
||||
if (leotheras && leotheras->isAlive())
|
||||
DoCast(leotheras, BANISH_BEAM);
|
||||
}
|
||||
@@ -759,7 +759,7 @@ public:
|
||||
|
||||
if (Mindblast_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (pTarget)DoCast(pTarget, SPELL_MINDBLAST);
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
|
||||
struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
{
|
||||
boss_the_lurker_belowAI(Creature *c) : Scripted_NoMovementAI(c), Summons(me)
|
||||
boss_the_lurker_belowAI(Creature* c) : Scripted_NoMovementAI(c), Summons(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
SpellEntry *TempSpell = GET_SPELL(SPELL_SPOUT_ANIM);
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
Scripted_NoMovementAI::EnterCombat(who);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!CanStartEvent)//boss is invisible, don't attack
|
||||
return;
|
||||
@@ -299,7 +299,7 @@ public:
|
||||
|
||||
if (GeyserTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (!pTarget && me->getVictim())
|
||||
pTarget = me->getVictim();
|
||||
if (pTarget)
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
{
|
||||
if (WaterboltTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!pTarget && me->getVictim())
|
||||
pTarget = me->getVictim();
|
||||
if (pTarget)
|
||||
@@ -408,7 +408,7 @@ public:
|
||||
|
||||
struct mob_coilfang_ambusherAI : public Scripted_NoMovementAI
|
||||
{
|
||||
mob_coilfang_ambusherAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
mob_coilfang_ambusherAI(Creature* c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
SpellEntry *TempSpell = GET_SPELL(SPELL_SHOOT);
|
||||
if (TempSpell)
|
||||
@@ -430,7 +430,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!who || me->getVictim()) return;
|
||||
|
||||
@@ -453,7 +453,7 @@ public:
|
||||
|
||||
if (ShootBowTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
int bp0 = 1100;
|
||||
if (pTarget)
|
||||
|
||||
+5
-5
@@ -89,7 +89,7 @@ public:
|
||||
|
||||
struct boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
{
|
||||
boss_morogrim_tidewalkerAI(Creature *c) : ScriptedAI(c)
|
||||
boss_morogrim_tidewalkerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Creature* Murloc = me->SummonCreature(NPC_TIDEWALKER_LURKER, MurlocCords[i][0], MurlocCords[i][1], MurlocCords[i][2], MurlocCords[i][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (pTarget && Murloc)
|
||||
Murloc->AI()->AttackStart(pTarget);
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
if (WateryGrave_Timer <= diff)
|
||||
{
|
||||
//Teleport 4 players under the waterfalls
|
||||
Unit *pTarget;
|
||||
Unit* pTarget;
|
||||
std::set<uint64> list;
|
||||
std::set<uint64>::const_iterator itr;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
|
||||
struct mob_water_globuleAI : public ScriptedAI
|
||||
{
|
||||
mob_water_globuleAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_water_globuleAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Check_Timer;
|
||||
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!who || me->getVictim())
|
||||
return;
|
||||
|
||||
+7
-7
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
struct boss_thespiaAI : public ScriptedAI
|
||||
{
|
||||
boss_thespiaAI(Creature *c) : ScriptedAI(c)
|
||||
boss_thespiaAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -108,12 +108,12 @@ public:
|
||||
//LightningCloud_Timer
|
||||
if (LightningCloud_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_LIGHTNING_CLOUD);
|
||||
|
||||
//cast twice in Heroic mode
|
||||
if (IsHeroic())
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_LIGHTNING_CLOUD);
|
||||
|
||||
LightningCloud_Timer = 15000+rand()%10000;
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
//LungBurst_Timer
|
||||
if (LungBurst_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_LUNG_BURST);
|
||||
LungBurst_Timer = 7000+rand()%5000;
|
||||
} else LungBurst_Timer -=diff;
|
||||
@@ -130,12 +130,12 @@ public:
|
||||
//EnvelopingWinds_Timer
|
||||
if (EnvelopingWinds_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_ENVELOPING_WINDS);
|
||||
|
||||
//cast twice in Heroic mode
|
||||
if (IsHeroic())
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_ENVELOPING_WINDS);
|
||||
EnvelopingWinds_Timer = 10000+rand()%5000;
|
||||
} else EnvelopingWinds_Timer -=diff;
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
|
||||
struct mob_coilfang_waterelementalAI : public ScriptedAI
|
||||
{
|
||||
mob_coilfang_waterelementalAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_coilfang_waterelementalAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 WaterBoltVolley_Timer;
|
||||
|
||||
|
||||
+3
-3
@@ -60,7 +60,7 @@ public:
|
||||
|
||||
struct boss_mekgineer_steamriggerAI : public ScriptedAI
|
||||
{
|
||||
boss_mekgineer_steamriggerAI(Creature *c) : ScriptedAI(c)
|
||||
boss_mekgineer_steamriggerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
|
||||
if (Saw_Blade_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_SAW_BLADE);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_SAW_BLADE);
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
|
||||
struct mob_steamrigger_mechanicAI : public ScriptedAI
|
||||
{
|
||||
mob_steamrigger_mechanicAI(Creature *c) : ScriptedAI(c)
|
||||
mob_steamrigger_mechanicAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
struct mob_naga_distillerAI : public ScriptedAI
|
||||
{
|
||||
mob_naga_distillerAI(Creature *c) : ScriptedAI(c)
|
||||
mob_naga_distillerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
|
||||
struct boss_warlord_kalithreshAI : public ScriptedAI
|
||||
{
|
||||
boss_warlord_kalithreshAI(Creature *c) : ScriptedAI(c)
|
||||
boss_warlord_kalithreshAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
//Impale_Timer
|
||||
if (Impale_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_IMPALE);
|
||||
|
||||
Impale_Timer = 7500+rand()%5000;
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
|
||||
struct boss_hungarfenAI : public ScriptedAI
|
||||
{
|
||||
boss_hungarfenAI(Creature *c) : ScriptedAI(c)
|
||||
boss_hungarfenAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
if (Mushroom_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->SummonCreature(17990, pTarget->GetPositionX()+(rand()%8), pTarget->GetPositionY()+(rand()%8), pTarget->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
|
||||
else
|
||||
me->SummonCreature(17990, me->GetPositionX()+(rand()%8), me->GetPositionY()+(rand()%8), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
|
||||
if (AcidGeyser_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_ACID_GEYSER);
|
||||
AcidGeyser_Timer = 10000+rand()%7500;
|
||||
} else AcidGeyser_Timer -= diff;
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
|
||||
struct mob_underbog_mushroomAI : public ScriptedAI
|
||||
{
|
||||
mob_underbog_mushroomAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_underbog_mushroomAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
bool Stop;
|
||||
uint32 Grow_Timer;
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
struct boss_the_black_stalkerAI : public ScriptedAI
|
||||
{
|
||||
boss_the_black_stalkerAI(Creature *c) : ScriptedAI(c)
|
||||
boss_the_black_stalkerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -75,12 +75,12 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
if (summon && summon->GetEntry() == ENTRY_SPORE_STRIDER)
|
||||
{
|
||||
Striders.push_back(summon->GetGUID());
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
else
|
||||
if (me->getVictim())
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
void JustDied(Unit* /*who*/)
|
||||
{
|
||||
for (std::list<uint64>::const_iterator i = Striders.begin(); i != Striders.end(); ++i)
|
||||
if (Creature *strider = Unit::GetCreature(*me, *i))
|
||||
if (Creature* strider = Unit::GetCreature(*me, *i))
|
||||
strider->DisappearAndDie();
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
{
|
||||
if (LevitatedTarget_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = Unit::GetUnit(*me, LevitatedTarget))
|
||||
if (Unit* pTarget = Unit::GetUnit(*me, LevitatedTarget))
|
||||
{
|
||||
if (!pTarget->HasAura(SPELL_LEVITATE))
|
||||
{
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
}
|
||||
if (Levitate_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
{
|
||||
DoCast(pTarget, SPELL_LEVITATE);
|
||||
LevitatedTarget = pTarget->GetGUID();
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
// Chain Lightning
|
||||
if (ChainLightning_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
|
||||
ChainLightning_Timer = 7000;
|
||||
} else ChainLightning_Timer -= diff;
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
// Static Charge
|
||||
if (StaticCharge_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true))
|
||||
DoCast(pTarget, SPELL_STATIC_CHARGE);
|
||||
StaticCharge_Timer = 10000;
|
||||
} else StaticCharge_Timer -= diff;
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
|
||||
struct boss_gruulAI : public ScriptedAI
|
||||
{
|
||||
boss_gruulAI(Creature *c) : ScriptedAI(c)
|
||||
boss_gruulAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
// Hurtful Strike
|
||||
if (m_uiHurtfulStrike_Timer <= uiDiff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1);
|
||||
|
||||
if (pTarget && me->IsWithinMeleeRange(me->getVictim()))
|
||||
DoCast(pTarget, SPELL_HURTFUL_STRIKE);
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
// Cave In
|
||||
if (m_uiCaveIn_Timer <= uiDiff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_CAVE_IN);
|
||||
|
||||
if (m_uiCaveIn_StaticTimer >= 4000)
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
|
||||
struct boss_high_king_maulgarAI : public ScriptedAI
|
||||
{
|
||||
boss_high_king_maulgarAI(Creature *c) : ScriptedAI(c)
|
||||
boss_high_king_maulgarAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
|
||||
Phase2 = false;
|
||||
|
||||
Creature *pCreature = NULL;
|
||||
Creature* pCreature = NULL;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
if (Council[i])
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
DoScriptText(RAND(SAY_OGRE_DEATH1, SAY_OGRE_DEATH2, SAY_OGRE_DEATH3, SAY_OGRE_DEATH4), me);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
StartEvent(who);
|
||||
}
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void StartEvent(Unit *who)
|
||||
void StartEvent(Unit* who)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
//Charging_Timer
|
||||
if (Charging_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -317,7 +317,7 @@ public:
|
||||
|
||||
struct boss_olm_the_summonerAI : public ScriptedAI
|
||||
{
|
||||
boss_olm_the_summonerAI(Creature *c) : ScriptedAI(c)
|
||||
boss_olm_the_summonerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -354,7 +354,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
@@ -367,7 +367,7 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature *Maulgar = NULL;
|
||||
Creature* Maulgar = NULL;
|
||||
Maulgar = (Unit::GetCreature((*me), pInstance->GetData64(DATA_MAULGAR)));
|
||||
|
||||
if (Maulgar)
|
||||
@@ -383,7 +383,7 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -419,7 +419,7 @@ public:
|
||||
//DeathCoil Timer /need correct timer
|
||||
if (DeathCoil_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_DEATH_COIL);
|
||||
@@ -445,7 +445,7 @@ public:
|
||||
|
||||
struct boss_kiggler_the_crazedAI : public ScriptedAI
|
||||
{
|
||||
boss_kiggler_the_crazedAI(Creature *c) : ScriptedAI(c)
|
||||
boss_kiggler_the_crazedAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature *Maulgar = NULL;
|
||||
Creature* Maulgar = NULL;
|
||||
Maulgar = (Unit::GetCreature((*me), pInstance->GetData64(DATA_MAULGAR)));
|
||||
|
||||
if (Maulgar)
|
||||
@@ -498,7 +498,7 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -520,7 +520,7 @@ public:
|
||||
//GreaterPolymorph_Timer
|
||||
if (GreaterPolymorph_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_GREATER_POLYMORPH);
|
||||
|
||||
@@ -567,7 +567,7 @@ public:
|
||||
|
||||
struct boss_blindeye_the_seerAI : public ScriptedAI
|
||||
{
|
||||
boss_blindeye_the_seerAI(Creature *c) : ScriptedAI(c)
|
||||
boss_blindeye_the_seerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -602,7 +602,7 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature *Maulgar = NULL;
|
||||
Creature* Maulgar = NULL;
|
||||
Maulgar = (Unit::GetCreature((*me), pInstance->GetData64(DATA_MAULGAR)));
|
||||
|
||||
if (Maulgar)
|
||||
@@ -618,7 +618,7 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -677,7 +677,7 @@ public:
|
||||
|
||||
struct boss_krosh_firehandAI : public ScriptedAI
|
||||
{
|
||||
boss_krosh_firehandAI(Creature *c) : ScriptedAI(c)
|
||||
boss_krosh_firehandAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -712,7 +712,7 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature *Maulgar = NULL;
|
||||
Creature* Maulgar = NULL;
|
||||
Maulgar = (Unit::GetCreature((*me), pInstance->GetData64(DATA_MAULGAR)));
|
||||
|
||||
if (Maulgar)
|
||||
@@ -728,7 +728,7 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
|
||||
{
|
||||
Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
@@ -765,9 +765,9 @@ public:
|
||||
//BlastWave_Timer
|
||||
if (BlastWave_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
|
||||
std::vector<Unit *> target_list;
|
||||
std::vector<Unit* > target_list;
|
||||
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
|
||||
@@ -81,7 +81,7 @@ class boss_broggok : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->setFaction(16);
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
+10
-10
@@ -136,7 +136,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
}
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
{
|
||||
Creature *channeler = Unit::GetCreature(*me, Channelers[i]);
|
||||
Creature* channeler = Unit::GetCreature(*me, Channelers[i]);
|
||||
if (who && channeler && !channeler->isInCombat())
|
||||
channeler->AI()->AttackStart(who);
|
||||
}
|
||||
@@ -146,7 +146,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
{
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
{
|
||||
Creature *channeler = Unit::GetCreature(*me, Channelers[i]);
|
||||
Creature* channeler = Unit::GetCreature(*me, Channelers[i]);
|
||||
if (channeler && channeler->isAlive())
|
||||
return;
|
||||
}
|
||||
@@ -155,14 +155,14 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
me->AI()->AttackStart(killer);
|
||||
}
|
||||
|
||||
uint64 GetChanneled(Creature *channeler1)
|
||||
uint64 GetChanneled(Creature* channeler1)
|
||||
{
|
||||
SummonChannelers();
|
||||
if (!channeler1) return 0;
|
||||
uint8 i;
|
||||
for (i=0; i<5; ++i)
|
||||
{
|
||||
Creature *channeler = Unit::GetCreature(*me, Channelers[i]);
|
||||
Creature* channeler = Unit::GetCreature(*me, Channelers[i]);
|
||||
if (channeler && channeler->GetGUID() == channeler1->GetGUID())
|
||||
break;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
{
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
{
|
||||
Creature *channeler = Unit::GetCreature(*me, Channelers[i]);
|
||||
Creature* channeler = Unit::GetCreature(*me, Channelers[i]);
|
||||
if (!channeler || channeler->isDead())
|
||||
channeler = me->SummonCreature(ENTRY_CHANNELER, ShadowmoonChannelers[i][0], ShadowmoonChannelers[i][1], ShadowmoonChannelers[i][2], ShadowmoonChannelers[i][3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
if (channeler)
|
||||
@@ -317,7 +317,7 @@ class mob_shadowmoon_channeler : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||
if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||
CAST_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerEngaged(who);
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
@@ -326,7 +326,7 @@ class mob_shadowmoon_channeler : public CreatureScript
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if (Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||
if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||
CAST_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerDied(Killer);
|
||||
}
|
||||
|
||||
@@ -337,10 +337,10 @@ class mob_shadowmoon_channeler : public CreatureScript
|
||||
if (check_Timer <= diff)
|
||||
{
|
||||
if (!me->IsNonMeleeSpellCasted(false))
|
||||
if (Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||
if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||
{
|
||||
uint64 channeler = CAST_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->GetChanneled(me);
|
||||
if (Unit *channeled = Unit::GetUnit(*me, channeler))
|
||||
if (Unit* channeled = Unit::GetUnit(*me, channeler))
|
||||
DoCast(channeled, SPELL_CHANNELING);
|
||||
}
|
||||
check_Timer = 5000;
|
||||
@@ -352,7 +352,7 @@ class mob_shadowmoon_channeler : public CreatureScript
|
||||
|
||||
if (MarkOfShadow_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_MARK_OF_SHADOW);
|
||||
MarkOfShadow_Timer = 15000+rand()%5000;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ class boss_the_maker : public CreatureScript
|
||||
|
||||
if (ExplodingBreaker_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_EXPLODING_BREAKER);
|
||||
ExplodingBreaker_Timer = 4000+rand()%8000;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ class boss_the_maker : public CreatureScript
|
||||
/* // Disabled until Core Support for mind control
|
||||
if (domination_timer_timer <= diff)
|
||||
{
|
||||
Unit *pTarget;
|
||||
Unit* pTarget;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
DoCast(pTarget, SPELL_DOMINATION);
|
||||
|
||||
+2
-2
@@ -192,7 +192,7 @@ class boss_omor_the_unscarred : public CreatureScript
|
||||
{
|
||||
DoScriptText(SAY_CURSE, me);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_TREACHEROUS_AURA);
|
||||
Aura_Timer = 8000+rand()%8000;
|
||||
@@ -203,7 +203,7 @@ class boss_omor_the_unscarred : public CreatureScript
|
||||
|
||||
if (Shadowbolt_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (pTarget)
|
||||
pTarget = me->getVictim();
|
||||
|
||||
+8
-8
@@ -106,7 +106,7 @@ class boss_nazan : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (summoned && summoned->GetEntry() == ENTRY_LIQUID_FIRE)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ class boss_nazan : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit *pTarget, const SpellEntry* entry)
|
||||
void SpellHitTarget(Unit* pTarget, const SpellEntry* entry)
|
||||
{
|
||||
if (pTarget && entry->Id == uint32(SPELL_FIREBALL))
|
||||
me->SummonCreature(ENTRY_LIQUID_FIRE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), pTarget->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 30000);
|
||||
@@ -139,7 +139,7 @@ class boss_nazan : public CreatureScript
|
||||
|
||||
if (flight) // phase 1 - the flight
|
||||
{
|
||||
Creature *Vazruden = Unit::GetCreature(*me, VazrudenGUID);
|
||||
Creature* Vazruden = Unit::GetCreature(*me, VazrudenGUID);
|
||||
if (Fly_Timer < diff || !(Vazruden && Vazruden->isAlive() && Vazruden->HealthAbovePct(20)))
|
||||
{
|
||||
flight = false;
|
||||
@@ -319,7 +319,7 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
{
|
||||
if (summoned)
|
||||
{
|
||||
Creature *Nazan = Unit::GetCreature(*me, NazanGUID);
|
||||
Creature* Nazan = Unit::GetCreature(*me, NazanGUID);
|
||||
if (!Nazan)
|
||||
Nazan = me->FindNearestCreature(ENTRY_NAZAN, 5000);
|
||||
if (Nazan)
|
||||
@@ -328,7 +328,7 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
NazanGUID = 0;
|
||||
}
|
||||
|
||||
Creature *Vazruden = Unit::GetCreature(*me, VazrudenGUID);
|
||||
Creature* Vazruden = Unit::GetCreature(*me, VazrudenGUID);
|
||||
if (!Vazruden)
|
||||
Vazruden = me->FindNearestCreature(ENTRY_VAZRUDEN, 5000);
|
||||
if (Vazruden)
|
||||
@@ -424,8 +424,8 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
default: // adds do the job now
|
||||
if (check <= diff)
|
||||
{
|
||||
Creature *Nazan = Unit::GetCreature(*me, NazanGUID);
|
||||
Creature *Vazruden = Unit::GetCreature(*me, VazrudenGUID);
|
||||
Creature* Nazan = Unit::GetCreature(*me, NazanGUID);
|
||||
Creature* Vazruden = Unit::GetCreature(*me, VazrudenGUID);
|
||||
if ((Nazan && Nazan->isAlive()) || (Vazruden && Vazruden->isAlive()))
|
||||
{
|
||||
if ((Nazan && Nazan->getVictim()) || (Vazruden && Vazruden->getVictim()))
|
||||
@@ -482,7 +482,7 @@ class mob_hellfire_sentry : public CreatureScript
|
||||
|
||||
void JustDied(Unit* who)
|
||||
{
|
||||
if (Creature *herald = me->FindNearestCreature(ENTRY_VAZRUDEN_HERALD, 150))
|
||||
if (Creature* herald = me->FindNearestCreature(ENTRY_VAZRUDEN_HERALD, 150))
|
||||
CAST_AI(boss_vazruden_the_herald::boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(who);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript
|
||||
{
|
||||
DoScriptText(SAY_SURGE, me);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_SURGE);
|
||||
|
||||
Surge_Timer = 5000+rand()%8000;
|
||||
|
||||
@@ -151,12 +151,12 @@ class mob_abyssal : public CreatureScript
|
||||
{
|
||||
DoZoneInCombat();
|
||||
}
|
||||
void AttackStart(Unit *who)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!trigger)
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!trigger)
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
@@ -290,7 +290,7 @@ class boss_magtheridon : public CreatureScript
|
||||
}
|
||||
|
||||
//function to interrupt channeling and debuff clicker with mind exh(used if second person clicks with same cube or after dispeling/ending shadow grasp DoT)
|
||||
void DebuffClicker(Unit *clicker)
|
||||
void DebuffClicker(Unit* clicker)
|
||||
{
|
||||
if (!clicker || !clicker->isAlive())
|
||||
return;
|
||||
@@ -307,7 +307,7 @@ class boss_magtheridon : public CreatureScript
|
||||
// if not - apply mind exhaustion and delete from clicker's list
|
||||
for (CubeMap::iterator i = Cube.begin(); i != Cube.end(); ++i)
|
||||
{
|
||||
Unit *clicker = Unit::GetUnit(*me, (*i).second);
|
||||
Unit* clicker = Unit::GetUnit(*me, (*i).second);
|
||||
if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP))
|
||||
{
|
||||
DebuffClicker(clicker);
|
||||
@@ -346,7 +346,7 @@ class boss_magtheridon : public CreatureScript
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
|
||||
void AttackStart(Unit *who)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED))
|
||||
ScriptedAI::AttackStart(who);
|
||||
@@ -426,11 +426,11 @@ class boss_magtheridon : public CreatureScript
|
||||
|
||||
if (Blaze_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
float x, y, z;
|
||||
pTarget->GetPosition(x, y, z);
|
||||
Creature *summon = me->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
Creature* summon = me->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if (summon)
|
||||
{
|
||||
CAST_AI(mob_abyssal::mob_abyssalAI, summon->AI())->SetTrigger(2);
|
||||
@@ -460,11 +460,11 @@ class boss_magtheridon : public CreatureScript
|
||||
{
|
||||
if (Debris_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
float x, y, z;
|
||||
pTarget->GetPosition(x, y, z);
|
||||
Creature *summon = me->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
Creature* summon = me->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if (summon)
|
||||
CAST_AI(mob_abyssal::mob_abyssalAI, summon->AI())->SetTrigger(1);
|
||||
}
|
||||
@@ -536,7 +536,7 @@ class mob_hellfire_channeler : public CreatureScript
|
||||
DoCast(me, SPELL_SHADOW_GRASP_C, false);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summon->AI()->AttackStart(me->getVictim());
|
||||
}
|
||||
@@ -577,7 +577,7 @@ class mob_hellfire_channeler : public CreatureScript
|
||||
|
||||
if (Fear_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_FEAR);
|
||||
Fear_Timer = 25000 + rand()%15000;
|
||||
}
|
||||
@@ -586,7 +586,7 @@ class mob_hellfire_channeler : public CreatureScript
|
||||
|
||||
if (Infernal_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_BURNING_ABYSSAL, true);
|
||||
Infernal_Timer = 30000 + rand()%10000;
|
||||
}
|
||||
@@ -611,7 +611,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player *pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
{
|
||||
InstanceScript* pInstance = pGO->GetInstanceScript();
|
||||
|
||||
@@ -620,7 +620,7 @@ public:
|
||||
|
||||
if (pInstance->GetData(DATA_MAGTHERIDON_EVENT) != IN_PROGRESS)
|
||||
return true;
|
||||
Creature *Magtheridon =Unit::GetCreature(*pGO, pInstance->GetData64(DATA_MAGTHERIDON));
|
||||
Creature* Magtheridon =Unit::GetCreature(*pGO, pInstance->GetData64(DATA_MAGTHERIDON));
|
||||
if (!Magtheridon || !Magtheridon->isAlive())
|
||||
return true;
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!IntroOnce && me->IsWithinDistInMap(who, 50.0f))
|
||||
{
|
||||
@@ -208,7 +208,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
|
||||
DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->setFaction(16);
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -277,7 +277,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
|
||||
{
|
||||
if (ShadowFissure_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_SHADOW_FISSURE);
|
||||
ShadowFissure_Timer = urand(7500, 15000);
|
||||
}
|
||||
@@ -286,7 +286,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
|
||||
|
||||
if (DeathCoil_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_DEATH_COIL);
|
||||
DeathCoil_Timer = urand(15000, 20000);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ class mob_fel_orc_convert : public CreatureScript
|
||||
{
|
||||
if (pInstance->GetData64(DATA_NETHEKURSE))
|
||||
{
|
||||
Creature *pKurse = Unit::GetCreature(*me, pInstance->GetData64(DATA_NETHEKURSE));
|
||||
Creature* pKurse = Unit::GetCreature(*me, pInstance->GetData64(DATA_NETHEKURSE));
|
||||
if (pKurse && me->IsWithinDist(pKurse, 45.0f))
|
||||
{
|
||||
CAST_AI(boss_grand_warlock_nethekurse::boss_grand_warlock_nethekurseAI, pKurse->AI())->DoYellForPeonAggro();
|
||||
@@ -363,7 +363,7 @@ class mob_fel_orc_convert : public CreatureScript
|
||||
if (pInstance->GetData(TYPE_NETHEKURSE) != IN_PROGRESS)
|
||||
return;
|
||||
if (pInstance->GetData64(DATA_NETHEKURSE))
|
||||
if (Creature *pKurse = Unit::GetCreature(*me, pInstance->GetData64(DATA_NETHEKURSE)))
|
||||
if (Creature* pKurse = Unit::GetCreature(*me, pInstance->GetData64(DATA_NETHEKURSE)))
|
||||
CAST_AI(boss_grand_warlock_nethekurse::boss_grand_warlock_nethekurseAI, pKurse->AI())->DoYellForPeonDeath();
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -221,15 +221,15 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
|
||||
void DoYellForThreat()
|
||||
{
|
||||
Unit *pLeftHead = Unit::GetUnit(*me, LeftHeadGUID);
|
||||
Unit *pRightHead = Unit::GetUnit(*me, RightHeadGUID);
|
||||
Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID);
|
||||
Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID);
|
||||
|
||||
if (!pLeftHead || !pRightHead)
|
||||
return;
|
||||
|
||||
ithreat = rand()%4;
|
||||
|
||||
Unit *source = (pLeftHead->GetEntry() == Threat[ithreat].creature ? pLeftHead : pRightHead);
|
||||
Unit* source = (pLeftHead->GetEntry() == Threat[ithreat].creature ? pLeftHead : pRightHead);
|
||||
|
||||
DoScriptText(Threat[ithreat].id, source);
|
||||
|
||||
@@ -242,7 +242,7 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
me->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
me->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
|
||||
if (Unit *pLeftHead = Unit::GetUnit(*me, LeftHeadGUID))
|
||||
if (Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID))
|
||||
{
|
||||
iaggro = rand()%3;
|
||||
|
||||
@@ -256,7 +256,7 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
pInstance->SetData(TYPE_OMROGG, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (summoned->GetEntry() == NPC_LEFT_HEAD)
|
||||
LeftHeadGUID = summoned->GetGUID();
|
||||
@@ -279,7 +279,7 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
|
||||
ikilling = rand()%2;
|
||||
|
||||
Unit *source = (pLeftHead->GetEntry() == Killing[ikilling].creature ? pLeftHead : pRightHead);
|
||||
Unit* source = (pLeftHead->GetEntry() == Killing[ikilling].creature ? pLeftHead : pRightHead);
|
||||
|
||||
switch(ikilling)
|
||||
{
|
||||
@@ -331,7 +331,7 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
|
||||
if (ThreatYell2)
|
||||
{
|
||||
Unit *source = (pLeftHead->GetEntry() == ThreatDelay2[ithreat].creature ? pLeftHead : pRightHead);
|
||||
Unit* source = (pLeftHead->GetEntry() == ThreatDelay2[ithreat].creature ? pLeftHead : pRightHead);
|
||||
|
||||
DoScriptText(ThreatDelay2[ithreat].id, source);
|
||||
ThreatYell2 = false;
|
||||
@@ -339,7 +339,7 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
|
||||
if (ThreatYell)
|
||||
{
|
||||
Unit *source = (pLeftHead->GetEntry() == ThreatDelay1[ithreat].creature ? pLeftHead : pRightHead);
|
||||
Unit* source = (pLeftHead->GetEntry() == ThreatDelay1[ithreat].creature ? pLeftHead : pRightHead);
|
||||
|
||||
DoScriptText(ThreatDelay1[ithreat].id, source);
|
||||
ThreatYell = false;
|
||||
@@ -348,7 +348,7 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
|
||||
if (KillingYell)
|
||||
{
|
||||
Unit *source = (pLeftHead->GetEntry() == KillingDelay[ikilling].creature ? pLeftHead : pRightHead);
|
||||
Unit* source = (pLeftHead->GetEntry() == KillingDelay[ikilling].creature ? pLeftHead : pRightHead);
|
||||
|
||||
DoScriptText(KillingDelay[ikilling].id, source);
|
||||
KillingYell = false;
|
||||
@@ -383,7 +383,7 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
|
||||
if (ResetThreat_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoYellForThreat();
|
||||
DoResetThreat();
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
|
||||
DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
switch(summoned->GetEntry())
|
||||
{
|
||||
|
||||
@@ -151,10 +151,10 @@ class boss_alar : public CreatureScript
|
||||
pInstance->SetData(DATA_ALAREVENT, DONE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
if (summon->GetEntry() == CREATURE_EMBER_OF_ALAR)
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ class boss_alar : public CreatureScript
|
||||
WaitTimer = 4000;
|
||||
return;
|
||||
case WE_DIVE:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_DIVE_BOMB_VISUAL);
|
||||
DoCast(pTarget, SPELL_DIVE_BOMB, true);
|
||||
@@ -371,7 +371,7 @@ class boss_alar : public CreatureScript
|
||||
{
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget= SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* pTarget= SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_CHARGE);
|
||||
Charge_Timer = 30000;
|
||||
@@ -403,7 +403,7 @@ class boss_alar : public CreatureScript
|
||||
|
||||
if (FlamePatch_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
Creature* Summoned = me->SummonCreature(CREATURE_FLAME_PATCH_ALAR, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 120000);
|
||||
if (Summoned)
|
||||
@@ -436,7 +436,7 @@ class boss_alar : public CreatureScript
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = me->SelectNearestTargetInAttackDistance(5);
|
||||
if (pTarget)
|
||||
me->AI()->AttackStart(pTarget);
|
||||
|
||||
@@ -171,7 +171,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
Creature* Summoned = me->SummonCreature(entry, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
if (Summoned)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
|
||||
Summons.Summon(Summoned);
|
||||
@@ -227,7 +227,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
if (Wrath_Timer <= diff)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
DoCast(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER, true);
|
||||
Wrath_Timer = 20000+rand()%5000;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!me->HasInArc(2.5f, pTarget))
|
||||
pTarget = me->getVictim();
|
||||
if (pTarget)
|
||||
@@ -446,7 +446,7 @@ class mob_solarium_priest : public CreatureScript
|
||||
|
||||
if (healTimer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
|
||||
@@ -175,11 +175,11 @@ struct advisorbase_ai : public ScriptedAI
|
||||
|
||||
//reset encounter
|
||||
if (m_pInstance && (m_pInstance->GetData(DATA_KAELTHASEVENT) == 1 || m_pInstance->GetData(DATA_KAELTHASEVENT) == 3))
|
||||
if (Creature *Kaelthas = Unit::GetCreature((*me), m_pInstance->GetData64(DATA_KAELTHAS)))
|
||||
if (Creature* Kaelthas = Unit::GetCreature((*me), m_pInstance->GetData64(DATA_KAELTHAS)))
|
||||
Kaelthas->AI()->EnterEvadeMode();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!who || FakeDeath || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
@@ -343,7 +343,7 @@ class boss_kaelthas : public CreatureScript
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
|
||||
{
|
||||
if (Creature *pCreature = Unit::GetCreature((*me), m_auiAdvisorGuid[i]))
|
||||
if (Creature* pCreature = Unit::GetCreature((*me), m_auiAdvisorGuid[i]))
|
||||
{
|
||||
pCreature->Respawn();
|
||||
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -376,7 +376,7 @@ class boss_kaelthas : public CreatureScript
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
AttackStart(pTarget);
|
||||
|
||||
}
|
||||
@@ -395,7 +395,7 @@ class boss_kaelthas : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!me->HasUnitState(UNIT_STAT_STUNNED) && who->isTargetableForAttack() &&
|
||||
me->IsHostileTo(who) && who->isInAccessiblePlaceFor(me))
|
||||
@@ -446,7 +446,7 @@ class boss_kaelthas : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *summon) {summons.Despawn(summon);}
|
||||
void SummonedCreatureDespawn(Creature* summon) {summons.Despawn(summon);}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
@@ -474,7 +474,7 @@ class boss_kaelthas : public CreatureScript
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
Creature* Advisor = NULL;
|
||||
|
||||
//Subphase switch
|
||||
@@ -683,9 +683,9 @@ class boss_kaelthas : public CreatureScript
|
||||
if (PhaseSubphase == 0)
|
||||
{
|
||||
//Respawn advisors
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
Creature *Advisor;
|
||||
Creature* Advisor;
|
||||
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
|
||||
{
|
||||
Advisor = Unit::GetCreature((*me), m_auiAdvisorGuid[i]);
|
||||
@@ -714,7 +714,7 @@ class boss_kaelthas : public CreatureScript
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
AttackStart(pTarget);
|
||||
|
||||
Phase_Timer = 30000;
|
||||
@@ -1031,7 +1031,7 @@ class boss_thaladred_the_darkener : public CreatureScript
|
||||
advisorbase_ai::Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
@@ -1064,7 +1064,7 @@ class boss_thaladred_the_darkener : public CreatureScript
|
||||
//Gaze_Timer
|
||||
if (Gaze_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoResetThreat();
|
||||
me->AddThreat(pTarget, 5000000.0f);
|
||||
@@ -1124,7 +1124,7 @@ class boss_lord_sanguinar : public CreatureScript
|
||||
advisorbase_ai::Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
@@ -1221,7 +1221,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
@@ -1266,7 +1266,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
|
||||
//Conflagration_Timer
|
||||
if (Conflagration_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (pTarget && me->IsWithinDistInMap(pTarget, 30))
|
||||
@@ -1283,7 +1283,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
|
||||
if (ArcaneExplosion_Timer <= diff)
|
||||
{
|
||||
bool InMeleeRange = false;
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); i!= m_threatlist.end(); ++i)
|
||||
{
|
||||
@@ -1345,7 +1345,7 @@ class boss_master_engineer_telonicus : public CreatureScript
|
||||
DoScriptText(SAY_TELONICUS_DEATH, me);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
@@ -1380,7 +1380,7 @@ class boss_master_engineer_telonicus : public CreatureScript
|
||||
//RemoteToy_Timer
|
||||
if (RemoteToy_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_REMOTE_TOY);
|
||||
|
||||
RemoteToy_Timer = 10000+rand()%5000;
|
||||
|
||||
@@ -118,9 +118,9 @@ class boss_void_reaver : public CreatureScript
|
||||
// Arcane Orb
|
||||
if (ArcaneOrb_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
Unit* pTarget = NULL;
|
||||
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
|
||||
std::vector<Unit *> target_list;
|
||||
std::vector<Unit* > target_list;
|
||||
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
|
||||
@@ -233,7 +233,7 @@ class mob_ragin_flames : public CreatureScript
|
||||
|
||||
if (!onlyonce)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->GetMotionMaster()->MoveChase(pTarget);
|
||||
onlyonce = true;
|
||||
}
|
||||
|
||||
@@ -110,11 +110,11 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
}
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
@@ -129,7 +129,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Creature* Wraith = me->SummonCreature(21062, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
if (pTarget && Wraith)
|
||||
Wraith->AI()->AttackStart(pTarget);
|
||||
@@ -158,7 +158,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
|
||||
if (Domination_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
{
|
||||
DoScriptText(RAND(SAY_DOMINATION_1, SAY_DOMINATION_2), me);
|
||||
DoCast(pTarget, SPELL_DOMINATION);
|
||||
@@ -233,7 +233,7 @@ class mob_nether_wraith : public CreatureScript
|
||||
|
||||
if (ArcaneMissiles_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_ARCANE_MISSILES);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_ARCANE_MISSILES);
|
||||
|
||||
@@ -310,7 +310,7 @@ class npc_warden_mellichar : public CreatureScript
|
||||
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (IsRunning)
|
||||
return;
|
||||
|
||||
@@ -102,7 +102,7 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
ManaBurn_Timer = 25000;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!Intro)
|
||||
return;
|
||||
@@ -119,7 +119,7 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
pInstance->SetData(TYPE_HARBINGERSKYRISS, DONE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
if (!summon)
|
||||
return;
|
||||
@@ -128,7 +128,7 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
else
|
||||
summon->SetHealth(summon->CountPctFromMaxHealth(66));
|
||||
if (me->getVictim())
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (Unit *mellic = Unit::GetUnit(*me, pInstance->GetData64(DATA_MELLICHAR)))
|
||||
if (Unit* mellic = Unit::GetUnit(*me, pInstance->GetData64(DATA_MELLICHAR)))
|
||||
{
|
||||
//should have a better way to do this. possibly spell exist.
|
||||
mellic->setDeathState(JUST_DIED);
|
||||
@@ -208,7 +208,7 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
|
||||
if (MindRend_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_MIND_REND);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_MIND_REND);
|
||||
@@ -225,7 +225,7 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
|
||||
DoScriptText(RAND(SAY_FEAR_1, SAY_FEAR_2), me);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_FEAR);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_FEAR);
|
||||
@@ -242,7 +242,7 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
|
||||
DoScriptText(RAND(SAY_MIND_1, SAY_MIND_2), me);
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_DOMINATION);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_DOMINATION);
|
||||
@@ -259,7 +259,7 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, H_SPELL_MANA_BURN);
|
||||
|
||||
ManaBurn_Timer = 16000+rand()%16000;
|
||||
|
||||
@@ -85,7 +85,7 @@ class boss_high_botanist_freywinn : public CreatureScript
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (summoned->GetEntry() == ENTRY_FRAYER)
|
||||
Adds_List.push_back(summoned->GetGUID());
|
||||
@@ -146,7 +146,7 @@ class boss_high_botanist_freywinn : public CreatureScript
|
||||
{
|
||||
for (std::list<uint64>::iterator itr = Adds_List.begin(); itr != Adds_List.end(); ++itr)
|
||||
{
|
||||
if (Unit *temp = Unit::GetUnit(*me, *itr))
|
||||
if (Unit* temp = Unit::GetUnit(*me, *itr))
|
||||
{
|
||||
if (!temp->isAlive())
|
||||
{
|
||||
|
||||
@@ -159,7 +159,7 @@ class boss_laj : public CreatureScript
|
||||
{
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
if (summon && me->getVictim())
|
||||
summon->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
|
||||
|
||||
@@ -96,7 +96,7 @@ class mob_warp_splinter_treant : public CreatureScript
|
||||
{
|
||||
if (WarpGuid && check_Timer <= diff)
|
||||
{
|
||||
if (Unit *Warp = Unit::GetUnit(*me, WarpGuid))
|
||||
if (Unit* Warp = Unit::GetUnit(*me, WarpGuid))
|
||||
{
|
||||
if (me->IsWithinMeleeRange(Warp, 2.5f))
|
||||
{
|
||||
@@ -184,7 +184,7 @@ class boss_warp_splinter : public CreatureScript
|
||||
float Y = Treant_Spawn_Pos_Y + TREANT_SPAWN_DIST * sin(angle);
|
||||
float O = - me->GetAngle(X, Y);
|
||||
|
||||
if (Creature *pTreant = me->SummonCreature(CREATURE_TREANT, treant_pos[i][0], treant_pos[i][1], treant_pos[i][2], O, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000))
|
||||
if (Creature* pTreant = me->SummonCreature(CREATURE_TREANT, treant_pos[i][0], treant_pos[i][1], treant_pos[i][2], O, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000))
|
||||
CAST_AI(mob_warp_splinter_treant::mob_warp_splinter_treantAI, pTreant->AI())->WarpGuid = me->GetGUID();
|
||||
}
|
||||
DoScriptText(RAND(SAY_SUMMON_1, SAY_SUMMON_2), me);
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
|
||||
struct mobs_bladespire_ogreAI : public ScriptedAI
|
||||
{
|
||||
mobs_bladespire_ogreAI(Creature *c) : ScriptedAI(c) {}
|
||||
mobs_bladespire_ogreAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset() { }
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
|
||||
struct mobs_nether_drakeAI : public ScriptedAI
|
||||
{
|
||||
mobs_nether_drakeAI(Creature *c) : ScriptedAI(c) {}
|
||||
mobs_nether_drakeAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
bool IsNihil;
|
||||
uint32 NihilSpeech_Timer;
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
void SpellHit(Unit* caster, const SpellEntry *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = me->getVictim();
|
||||
Unit* pTarget = me->getVictim();
|
||||
if (pTarget && pTarget->getPowerType() == POWER_MANA)
|
||||
DoCast(pTarget, SPELL_MANA_BURN);
|
||||
ManaBurn_Timer = 8000+rand()%8000;
|
||||
@@ -277,13 +277,13 @@ public:
|
||||
|
||||
struct npc_daranelleAI : public ScriptedAI
|
||||
{
|
||||
npc_daranelleAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_daranelleAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
||||
@@ -406,7 +406,7 @@ public:
|
||||
|
||||
struct npc_wounded_blood_elfAI : public npc_escortAI
|
||||
{
|
||||
npc_wounded_blood_elfAI(Creature *c) : npc_escortAI(c) {}
|
||||
npc_wounded_blood_elfAI(Creature* c) : npc_escortAI(c) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
{
|
||||
bool Spawn;
|
||||
|
||||
mob_shattered_rumblerAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_shattered_rumblerAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void SpellHit(Unit *Hitter, const SpellEntry *Spellkind)
|
||||
void SpellHit(Unit* Hitter, const SpellEntry *Spellkind)
|
||||
{
|
||||
if (Spellkind->Id == 32001 && !Spawn)
|
||||
{
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
|
||||
struct mob_lumpAI : public ScriptedAI
|
||||
{
|
||||
mob_lumpAI(Creature *c) : ScriptedAI(c)
|
||||
mob_lumpAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
bReset = false;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
AttackStart(pAttacker);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 & damage)
|
||||
void DamageTaken(Unit* done_by, uint32 & damage)
|
||||
{
|
||||
if (done_by->GetTypeId() == TYPEID_PLAYER && me->HealthBelowPctDamaged(30, damage))
|
||||
{
|
||||
@@ -259,7 +259,7 @@ public:
|
||||
|
||||
struct mob_sunspring_villagerAI : public ScriptedAI
|
||||
{
|
||||
mob_sunspring_villagerAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_sunspring_villagerAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -762,7 +762,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
@@ -805,7 +805,7 @@ public:
|
||||
struct mob_sparrowhawkAI : public ScriptedAI
|
||||
{
|
||||
|
||||
mob_sparrowhawkAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_sparrowhawkAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Check_Timer;
|
||||
uint64 PlayerGUID;
|
||||
@@ -818,7 +818,7 @@ public:
|
||||
PlayerGUID = 0;
|
||||
fleeing = false;
|
||||
}
|
||||
void AttackStart(Unit *who)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
return;
|
||||
@@ -828,7 +828,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!who || PlayerGUID)
|
||||
return;
|
||||
@@ -877,7 +877,7 @@ public:
|
||||
ScriptedAI::UpdateAI(diff);
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
void SpellHit(Unit* caster, const SpellEntry *spell)
|
||||
{
|
||||
if (caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -964,7 +964,7 @@ class npc_corki : public CreatureScript
|
||||
public:
|
||||
npc_corki() : CreatureScript("npc_corki") { }
|
||||
|
||||
CreatureAI *GetAI(Creature *creature) const
|
||||
CreatureAI *GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_corkiAI(creature);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
struct npc_manaforge_control_consoleAI : public ScriptedAI
|
||||
{
|
||||
npc_manaforge_control_consoleAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_manaforge_control_consoleAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Event_Timer;
|
||||
uint32 Wave_Timer;
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
/*void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
/*void SpellHit(Unit* caster, const SpellEntry *spell)
|
||||
{
|
||||
//we have no way of telling the Creature was hit by spell -> got aura applied after 10-12 seconds
|
||||
//then no way for the mobs to actually stop the shutdown as intended.
|
||||
@@ -395,7 +395,7 @@ public:
|
||||
|
||||
struct npc_commander_dawnforgeAI : public ScriptedAI
|
||||
{
|
||||
npc_commander_dawnforgeAI(Creature *c) : ScriptedAI(c) { Reset (); }
|
||||
npc_commander_dawnforgeAI(Creature* c) : ScriptedAI(c) { Reset (); }
|
||||
|
||||
uint64 PlayerGUID;
|
||||
uint64 ardonisGUID;
|
||||
@@ -423,7 +423,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) { }
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
pathaleonGUID = summoned->GetGUID();
|
||||
}
|
||||
@@ -431,8 +431,8 @@ public:
|
||||
// Emote Ardonis and Pathaleon
|
||||
void Turn_to_Pathaleons_Image()
|
||||
{
|
||||
Creature *ardonis = Unit::GetCreature(*me, ardonisGUID);
|
||||
Creature *pathaleon = Unit::GetCreature(*me, pathaleonGUID);
|
||||
Creature* ardonis = Unit::GetCreature(*me, ardonisGUID);
|
||||
Creature* pathaleon = Unit::GetCreature(*me, pathaleonGUID);
|
||||
Player* pPlayer = Unit::GetPlayer(*me, PlayerGUID);
|
||||
|
||||
if (!ardonis || !pathaleon || !pPlayer)
|
||||
@@ -457,7 +457,7 @@ public:
|
||||
//Set them back to each other
|
||||
void Turn_to_eachother()
|
||||
{
|
||||
if (Unit *ardonis = Unit::GetUnit(*me, ardonisGUID))
|
||||
if (Unit* ardonis = Unit::GetUnit(*me, ardonisGUID))
|
||||
{
|
||||
Player* pPlayer = Unit::GetPlayer(*me, PlayerGUID);
|
||||
|
||||
@@ -514,8 +514,8 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
Unit *ardonis = Unit::GetUnit(*me, ardonisGUID);
|
||||
Unit *pathaleon = Unit::GetUnit(*me, pathaleonGUID);
|
||||
Unit* ardonis = Unit::GetUnit(*me, ardonisGUID);
|
||||
Unit* pathaleon = Unit::GetUnit(*me, pathaleonGUID);
|
||||
Player* pPlayer = Unit::GetPlayer(*me, PlayerGUID);
|
||||
|
||||
if (!ardonis || !pPlayer)
|
||||
@@ -749,14 +749,14 @@ public:
|
||||
|
||||
struct mob_phase_hunterAI : public ScriptedAI
|
||||
{
|
||||
mob_phase_hunterAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_phase_hunterAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
bool Weak;
|
||||
bool Materialize;
|
||||
bool Drained;
|
||||
uint8 WeakPercent;
|
||||
|
||||
Player *pPlayer;
|
||||
Player* pPlayer;
|
||||
uint64 PlayerGUID;
|
||||
|
||||
uint32 ManaBurnTimer;
|
||||
@@ -809,7 +809,7 @@ public:
|
||||
|
||||
for (std::list<HostileReference*>::const_iterator itr = AggroList.begin(); itr != AggroList.end(); ++itr)
|
||||
{
|
||||
if (Unit *pUnit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
if (Unit* pUnit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
{
|
||||
if (pUnit->GetCreateMana() > 0)
|
||||
UnitsWithMana.push_back(pUnit);
|
||||
@@ -826,7 +826,7 @@ public:
|
||||
ManaBurnTimer = 3500;
|
||||
} else ManaBurnTimer -= diff;
|
||||
|
||||
if (Player *pPlayer = Unit::GetPlayer(*me, PlayerGUID)) // start: support for quest 10190
|
||||
if (Player* pPlayer = Unit::GetPlayer(*me, PlayerGUID)) // start: support for quest 10190
|
||||
{
|
||||
if (!Weak && HealthBelowPct(WeakPercent)
|
||||
&& pPlayer->GetQuestStatus(QUEST_RECHARGING_THE_BATTERIES) == QUEST_STATUS_INCOMPLETE)
|
||||
@@ -890,7 +890,7 @@ public:
|
||||
struct npc_bessyAI : public npc_escortAI
|
||||
{
|
||||
|
||||
npc_bessyAI(Creature *c) : npc_escortAI(c) {}
|
||||
npc_bessyAI(Creature* c) : npc_escortAI(c) {}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
|
||||
@@ -716,7 +716,7 @@ public:
|
||||
|
||||
struct npc_overlord_morghorAI : public ScriptedAI
|
||||
{
|
||||
npc_overlord_morghorAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_overlord_morghorAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint64 PlayerGUID;
|
||||
uint64 IllidanGUID;
|
||||
@@ -1298,7 +1298,7 @@ public:
|
||||
switch(slayer->GetTypeId())
|
||||
{
|
||||
case TYPEID_UNIT:
|
||||
if (Unit *owner = slayer->GetOwner())
|
||||
if (Unit* owner = slayer->GetOwner())
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(owner)->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, me);
|
||||
break;
|
||||
@@ -1541,7 +1541,7 @@ public:
|
||||
{
|
||||
if (SpellTimer1 <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -1735,7 +1735,7 @@ public:
|
||||
|
||||
struct npc_enraged_spiritAI : public ScriptedAI
|
||||
{
|
||||
npc_enraged_spiritAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_enraged_spiritAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset() { }
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (done_by->GetTypeId() == TYPEID_PLAYER)
|
||||
if (me->HealthBelowPctDamaged(20, damage))
|
||||
@@ -321,7 +321,7 @@ public:
|
||||
struct npc_kservantAI : public npc_escortAI
|
||||
{
|
||||
public:
|
||||
npc_kservantAI(Creature *c) : npc_escortAI(c) {}
|
||||
npc_kservantAI(Creature* c) : npc_escortAI(c) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
UnkorUnfriendly_Timer = 60000;
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (done_by->GetTypeId() == TYPEID_PLAYER)
|
||||
if (me->HealthBelowPctDamaged(30, damage))
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
{
|
||||
for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
Player *pGroupie = itr->getSource();
|
||||
Player* pGroupie = itr->getSource();
|
||||
if (pGroupie &&
|
||||
pGroupie->GetQuestStatus(QUEST_DONTKILLTHEFATONE) == QUEST_STATUS_INCOMPLETE &&
|
||||
pGroupie->GetReqKillOrCastCurrentCount(QUEST_DONTKILLTHEFATONE, 18260) == 10)
|
||||
@@ -169,12 +169,12 @@ public:
|
||||
|
||||
struct mob_infested_root_walkerAI : public ScriptedAI
|
||||
{
|
||||
mob_infested_root_walkerAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_infested_root_walkerAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset() { }
|
||||
void EnterCombat(Unit* /*who*/) { }
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (done_by && done_by->GetTypeId() == TYPEID_PLAYER)
|
||||
if (me->GetHealth() <= damage)
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
struct npc_skywingAI : public npc_escortAI
|
||||
{
|
||||
public:
|
||||
npc_skywingAI(Creature *c) : npc_escortAI(c) {}
|
||||
npc_skywingAI(Creature* c) : npc_escortAI(c) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
return;
|
||||
@@ -264,12 +264,12 @@ public:
|
||||
|
||||
struct mob_rotting_forest_ragerAI : public ScriptedAI
|
||||
{
|
||||
mob_rotting_forest_ragerAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_rotting_forest_ragerAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset() { }
|
||||
void EnterCombat(Unit* /*who*/) { }
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
{
|
||||
if (done_by->GetTypeId() == TYPEID_PLAYER)
|
||||
if (me->GetHealth() <= damage)
|
||||
@@ -304,7 +304,7 @@ public:
|
||||
|
||||
struct mob_netherweb_victimAI : public ScriptedAI
|
||||
{
|
||||
mob_netherweb_victimAI(Creature *c) : ScriptedAI(c) {}
|
||||
mob_netherweb_victimAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset() { }
|
||||
void EnterCombat(Unit* /*who*/) { }
|
||||
@@ -667,7 +667,7 @@ public:
|
||||
|
||||
struct npc_akunoAI : public npc_escortAI
|
||||
{
|
||||
npc_akunoAI(Creature *c) : npc_escortAI(c) {}
|
||||
npc_akunoAI(Creature* c) : npc_escortAI(c) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user