Scripts: Reorder file names in Commands/CMakeList file and cosmetic changes in all scripts

This commit is contained in:
Spp-
2011-06-30 14:24:56 +02:00
parent d12bb4a657
commit 6fd41ae50e
372 changed files with 1974 additions and 1968 deletions
@@ -55,7 +55,7 @@ public:
struct boss_curatorAI : public ScriptedAI
{
boss_curatorAI(Creature *c) : ScriptedAI(c) {}
boss_curatorAI(Creature* c) : ScriptedAI(c) {}
uint32 AddTimer;
uint32 HatefulBoltTimer;
@@ -132,7 +132,7 @@ public:
{
//Summon Astral Flare
Creature* AstralFlare = DoSpawnCreature(17096, float(rand()%37), float(rand()%37), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
Unit *pTarget = NULL;
Unit* pTarget = NULL;
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (AstralFlare && pTarget)
@@ -184,7 +184,7 @@ public:
else
HatefulBoltTimer = 15000;
if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
DoCast(pTarget, SPELL_HATEFUL_BOLT);
} else HatefulBoltTimer -= diff;
@@ -51,7 +51,7 @@ public:
struct boss_maiden_of_virtueAI : public ScriptedAI
{
boss_maiden_of_virtueAI(Creature *c) : ScriptedAI(c) {}
boss_maiden_of_virtueAI(Creature* c) : ScriptedAI(c) {}
uint32 Repentance_Timer;
uint32 Holyfire_Timer;
@@ -115,7 +115,7 @@ public:
if (Holyfire_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_HOLYFIRE);
Holyfire_Timer = urand(8000, 23000); //Anywhere from 8 to 23 seconds, good luck having several of those in a row!
@@ -123,7 +123,7 @@ public:
if (Holywrath_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_HOLYWRATH);
Holywrath_Timer = urand(20000, 25000); //20-30 secs sounds nice
@@ -58,7 +58,7 @@ public:
struct boss_attumenAI : public ScriptedAI
{
boss_attumenAI(Creature *c) : ScriptedAI(c)
boss_attumenAI(Creature* c) : ScriptedAI(c)
{
Phase = 1;
@@ -92,7 +92,7 @@ public:
void JustDied(Unit* /*victim*/)
{
DoScriptText(SAY_DEATH, me);
if (Unit *pMidnight = Unit::GetUnit(*me, Midnight))
if (Unit* pMidnight = Unit::GetUnit(*me, Midnight))
pMidnight->Kill(pMidnight);
}
@@ -119,7 +119,7 @@ public:
struct boss_midnightAI : public ScriptedAI
{
boss_midnightAI(Creature *c) : ScriptedAI(c) {}
boss_midnightAI(Creature* c) : ScriptedAI(c) {}
uint64 Attumen;
uint8 Phase;
@@ -141,7 +141,7 @@ public:
{
if (Phase == 2)
{
if (Unit *pUnit = Unit::GetUnit(*me, Attumen))
if (Unit* pUnit = Unit::GetUnit(*me, Attumen))
DoScriptText(SAY_MIDNIGHT_KILL, pUnit);
}
}
@@ -164,7 +164,7 @@ public:
}
else if (Phase == 2 && HealthBelowPct(25))
{
if (Unit *pAttumen = Unit::GetUnit(*me, Attumen))
if (Unit* pAttumen = Unit::GetUnit(*me, Attumen))
Mount(pAttumen);
}
else if (Phase == 3)
@@ -176,7 +176,7 @@ public:
Mount_Timer = 0;
me->SetVisible(false);
me->GetMotionMaster()->MoveIdle();
if (Unit *pAttumen = Unit::GetUnit(*me, Attumen))
if (Unit* pAttumen = Unit::GetUnit(*me, Attumen))
{
pAttumen->SetDisplayId(MOUNTED_DISPLAYID);
pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -195,7 +195,7 @@ public:
DoMeleeAttackIfReady();
}
void Mount(Unit *pAttumen)
void Mount(Unit* pAttumen)
{
DoScriptText(SAY_MOUNT, pAttumen);
Phase = 3;
@@ -220,7 +220,7 @@ public:
Mount_Timer = 1000;
}
void SetMidnight(Creature *pAttumen, uint64 value)
void SetMidnight(Creature* pAttumen, uint64 value)
{
CAST_AI(boss_attumen::boss_attumenAI, pAttumen->AI())->Midnight = value;
}
@@ -235,7 +235,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
if (ResetTimer <= diff)
{
ResetTimer = 0;
Unit *pMidnight = Unit::GetUnit(*me, Midnight);
Unit* pMidnight = Unit::GetUnit(*me, Midnight);
if (pMidnight)
{
pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -276,9 +276,9 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
{
if (ChargeTimer <= 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());
@@ -297,7 +297,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
{
if (HealthBelowPct(25))
{
Creature *pMidnight = Unit::GetCreature(*me, Midnight);
Creature* pMidnight = Unit::GetCreature(*me, Midnight);
if (pMidnight && pMidnight->GetTypeId() == TYPEID_UNIT)
{
CAST_AI(boss_midnight::boss_midnightAI, (pMidnight->AI()))->Mount(me);
@@ -72,7 +72,7 @@ public:
struct boss_moroesAI : public ScriptedAI
{
boss_moroesAI(Creature *c) : ScriptedAI(c)
boss_moroesAI(Creature* c) : ScriptedAI(c)
{
for (uint8 i = 0; i < 4; ++i)
{
@@ -155,7 +155,7 @@ public:
DeSpawnAdds();
if (isAddlistEmpty())
{
Creature *pCreature = NULL;
Creature* pCreature = NULL;
std::vector<uint32> AddList;
for (uint8 i = 0; i < 6; ++i)
@@ -181,7 +181,7 @@ public:
{
for (uint8 i = 0; i < 4; ++i)
{
Creature *pCreature = me->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
Creature* pCreature = me->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
if (pCreature)
{
AddGUID[i] = pCreature->GetGUID();
@@ -302,7 +302,7 @@ public:
{
DoScriptText(RAND(SAY_SPECIAL_1, SAY_SPECIAL_2), me);
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
pTarget->CastSpell(pTarget, SPELL_GARROTE, true);
InVanish = false;
@@ -417,7 +417,7 @@ public:
struct boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI
{
//Shadow Priest
boss_baroness_dorothea_millstipeAI(Creature *c) : boss_moroes_guestAI(c) {}
boss_baroness_dorothea_millstipeAI(Creature* c) : boss_moroes_guestAI(c) {}
uint32 ManaBurn_Timer;
uint32 MindFlay_Timer;
@@ -449,7 +449,7 @@ public:
if (ManaBurn_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (pTarget->getPowerType() == POWER_MANA)
DoCast(pTarget, SPELL_MANABURN);
ManaBurn_Timer = 5000; // 3 sec cast
@@ -457,7 +457,7 @@ public:
if (ShadowWordPain_Timer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
DoCast(pTarget, SPELL_SWPAIN);
ShadowWordPain_Timer = 7000;
@@ -481,7 +481,7 @@ public:
struct boss_baron_rafe_dreugerAI : public boss_moroes_guestAI
{
//Retr Pally
boss_baron_rafe_dreugerAI(Creature *c) : boss_moroes_guestAI(c){}
boss_baron_rafe_dreugerAI(Creature* c) : boss_moroes_guestAI(c){}
uint32 HammerOfJustice_Timer;
uint32 SealOfCommand_Timer;
@@ -539,7 +539,7 @@ public:
struct boss_lady_catriona_von_indiAI : public boss_moroes_guestAI
{
//Holy Priest
boss_lady_catriona_von_indiAI(Creature *c) : boss_moroes_guestAI(c) {}
boss_lady_catriona_von_indiAI(Creature* c) : boss_moroes_guestAI(c) {}
uint32 DispelMagic_Timer;
uint32 GreaterHeal_Timer;
@@ -573,7 +573,7 @@ public:
if (GreaterHeal_Timer <= diff)
{
Unit *pTarget = SelectGuestTarget();
Unit* pTarget = SelectGuestTarget();
DoCast(pTarget, SPELL_GREATERHEAL);
GreaterHeal_Timer = 17000;
@@ -587,7 +587,7 @@ public:
if (DispelMagic_Timer <= diff)
{
if (Unit *pTarget = RAND(SelectGuestTarget(), SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)))
if (Unit* pTarget = RAND(SelectGuestTarget(), SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)))
DoCast(pTarget, SPELL_DISPELMAGIC);
DispelMagic_Timer = 25000;
@@ -610,7 +610,7 @@ public:
struct boss_lady_keira_berrybuckAI : public boss_moroes_guestAI
{
//Holy Pally
boss_lady_keira_berrybuckAI(Creature *c) : boss_moroes_guestAI(c) {}
boss_lady_keira_berrybuckAI(Creature* c) : boss_moroes_guestAI(c) {}
uint32 Cleanse_Timer;
uint32 GreaterBless_Timer;
@@ -644,7 +644,7 @@ public:
if (HolyLight_Timer <= diff)
{
Unit *pTarget = SelectGuestTarget();
Unit* pTarget = SelectGuestTarget();
DoCast(pTarget, SPELL_HOLYLIGHT);
HolyLight_Timer = 10000;
@@ -652,7 +652,7 @@ public:
if (GreaterBless_Timer <= diff)
{
Unit *pTarget = SelectGuestTarget();
Unit* pTarget = SelectGuestTarget();
DoCast(pTarget, SPELL_GREATERBLESSOFMIGHT);
@@ -661,7 +661,7 @@ public:
if (Cleanse_Timer <= diff)
{
Unit *pTarget = SelectGuestTarget();
Unit* pTarget = SelectGuestTarget();
DoCast(pTarget, SPELL_CLEANSE);
@@ -685,7 +685,7 @@ public:
struct boss_lord_robin_darisAI : public boss_moroes_guestAI
{
//Arms Warr
boss_lord_robin_darisAI(Creature *c) : boss_moroes_guestAI(c) {}
boss_lord_robin_darisAI(Creature* c) : boss_moroes_guestAI(c) {}
uint32 Hamstring_Timer;
uint32 MortalStrike_Timer;
@@ -742,7 +742,7 @@ public:
struct boss_lord_crispin_ferenceAI : public boss_moroes_guestAI
{
//Arms Warr
boss_lord_crispin_ferenceAI(Creature *c) : boss_moroes_guestAI(c) {}
boss_lord_crispin_ferenceAI(Creature* c) : boss_moroes_guestAI(c) {}
uint32 Disarm_Timer;
uint32 HeroicStrike_Timer;
@@ -63,7 +63,7 @@ class boss_netherspite : public CreatureScript
public:
boss_netherspite() : CreatureScript("boss_netherspite") { }
CreatureAI* GetAI(Creature *pCreature) const
CreatureAI* GetAI(Creature* pCreature) const
{
return new boss_netherspiteAI(pCreature);
}
@@ -141,7 +141,7 @@ public:
pos[BLUE_PORTAL] = (r>1 ? 1: 2); // Blue Portal not on the left side (0)
for (int i=0; i<3; ++i)
if (Creature *portal = me->SummonCreature(PortalID[i], PortalCoord[pos[i]][0], PortalCoord[pos[i]][1], PortalCoord[pos[i]][2], 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
if (Creature* portal = me->SummonCreature(PortalID[i], PortalCoord[pos[i]][0], PortalCoord[pos[i]][1], PortalCoord[pos[i]][2], 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
{
PortalGUID[i] = portal->GetGUID();
portal->AddAura(PortalVisual[i], portal);
@@ -152,9 +152,9 @@ public:
{
for (int i=0; i<3; ++i)
{
if (Creature *portal = Unit::GetCreature(*me, PortalGUID[i]))
if (Creature* portal = Unit::GetCreature(*me, PortalGUID[i]))
portal->DisappearAndDie();
if (Creature *portal = Unit::GetCreature(*me, BeamerGUID[i]))
if (Creature* portal = Unit::GetCreature(*me, BeamerGUID[i]))
portal->DisappearAndDie();
PortalGUID[i] = 0;
BeamTarget[i] = 0;
@@ -164,12 +164,12 @@ public:
void UpdatePortals() // Here we handle the beams' behavior
{
for (int j=0; j<3; ++j) // j = color
if (Creature *portal = Unit::GetCreature(*me, PortalGUID[j]))
if (Creature* portal = Unit::GetCreature(*me, PortalGUID[j]))
{
// the one who's been casted upon before
Unit *current = Unit::GetUnit(*portal, BeamTarget[j]);
Unit* current = Unit::GetUnit(*portal, BeamTarget[j]);
// temporary store for the best suitable beam reciever
Unit *pTarget = me;
Unit* pTarget = me;
if (Map* map = me->GetMap())
{
@@ -199,14 +199,14 @@ public:
{
BeamTarget[j] = pTarget->GetGUID();
// remove currently beaming portal
if (Creature *beamer = Unit::GetCreature(*portal, BeamerGUID[j]))
if (Creature* beamer = Unit::GetCreature(*portal, BeamerGUID[j]))
{
beamer->CastSpell(pTarget, PortalBeam[j], false);
beamer->DisappearAndDie();
BeamerGUID[j] = 0;
}
// create new one and start beaming on the target
if (Creature *beamer = portal->SummonCreature(PortalID[j], portal->GetPositionX(), portal->GetPositionY(), portal->GetPositionZ(), portal->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 60000))
if (Creature* beamer = portal->SummonCreature(PortalID[j], portal->GetPositionX(), portal->GetPositionY(), portal->GetPositionZ(), portal->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 60000))
{
beamer->CastSpell(pTarget, PortalBeam[j], false);
BeamerGUID[j] = beamer->GetGUID();
@@ -247,7 +247,7 @@ public:
void HandleDoors(bool open) // Massive Door switcher
{
if (GameObject *Door = GameObject::GetGameObject(*me, pInstance ? pInstance->GetData64(DATA_GO_MASSIVE_DOOR) : 0))
if (GameObject* Door = GameObject::GetGameObject(*me, pInstance ? pInstance->GetData64(DATA_GO_MASSIVE_DOOR) : 0))
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
}
@@ -314,7 +314,7 @@ public:
// Netherbreath
if (NetherbreathTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
DoCast(pTarget, SPELL_NETHERBREATH);
NetherbreathTimer = urand(5000, 7000);
} else NetherbreathTimer -= diff;
@@ -177,7 +177,7 @@ public:
HandleTerraceDoors(true);
}
void MoveInLineOfSight(Unit *who)
void MoveInLineOfSight(Unit* who)
{
if (!Intro && !Flying)
ScriptedAI::MoveInLineOfSight(who);
@@ -229,7 +229,7 @@ public:
}
}
void JustSummoned(Creature *summoned)
void JustSummoned(Creature* summoned)
{
summoned->AI()->AttackStart(me->getVictim());
}
@@ -321,14 +321,14 @@ public:
if (CharredEarthTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_CHARRED_EARTH);
CharredEarthTimer = 20000;
} else CharredEarthTimer -= diff;
if (TailSweepTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (!me->HasInArc(M_PI, pTarget))
DoCast(pTarget, SPELL_TAIL_SWEEP);
TailSweepTimer = 15000;
@@ -336,7 +336,7 @@ public:
if (SearingCindersTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_SEARING_CINDERS);
SearingCindersTimer = 10000;
} else SearingCindersTimer -= diff;
@@ -378,7 +378,7 @@ public:
if (DistractingAshTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_DISTRACTING_ASH);
DistractingAshTimer = 2000; //timer wrong
} else DistractingAshTimer -= diff;
@@ -395,7 +395,7 @@ public:
if (FireballBarrageTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_FARTHEST, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_FARTHEST, 0))
DoCast(pTarget, SPELL_FIREBALL_BARRAGE);
FireballBarrageTimer = 20000;
} else FireballBarrageTimer -= diff;
@@ -108,7 +108,7 @@ public:
struct netherspite_infernalAI : public ScriptedAI
{
netherspite_infernalAI(Creature *c) : ScriptedAI(c) ,
netherspite_infernalAI(Creature* c) : ScriptedAI(c) ,
HellfireTimer(0), CleanupTimer(0), malchezaar(0), point(NULL) {}
uint32 HellfireTimer;
@@ -142,9 +142,9 @@ public:
}
}
void KilledUnit(Unit *who)
void KilledUnit(Unit* who)
{
Unit *pMalchezaar = Unit::GetUnit(*me, malchezaar);
Unit* pMalchezaar = Unit::GetUnit(*me, malchezaar);
if (pMalchezaar)
CAST_CRE(pMalchezaar)->AI()->KilledUnit(who);
}
@@ -160,7 +160,7 @@ public:
}
}
void DamageTaken(Unit *done_by, uint32 &damage)
void DamageTaken(Unit* done_by, uint32 &damage)
{
if (done_by->GetGUID() != malchezaar)
damage = 0;
@@ -183,7 +183,7 @@ public:
struct boss_malchezaarAI : public ScriptedAI
{
boss_malchezaarAI(Creature *c) : ScriptedAI(c)
boss_malchezaarAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -271,7 +271,7 @@ public:
{
//Infernal Cleanup
for (std::vector<uint64>::const_iterator itr = infernals.begin(); itr != infernals.end(); ++itr)
if (Unit *pInfernal = Unit::GetUnit(*me, *itr))
if (Unit* pInfernal = Unit::GetUnit(*me, *itr))
if (pInfernal->isAlive())
{
pInfernal->SetVisible(false);
@@ -285,7 +285,7 @@ public:
{
for (uint8 i = 0; i < 2; ++i)
{
Unit *axe = Unit::GetUnit(*me, axes[i]);
Unit* axe = Unit::GetUnit(*me, axes[i]);
if (axe && axe->isAlive())
axe->Kill(axe);
axes[i] = 0;
@@ -310,7 +310,7 @@ public:
return;
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
std::vector<Unit *> targets;
std::vector<Unit* > targets;
if (!t_list.size())
return;
@@ -319,7 +319,7 @@ public:
std::list<HostileReference *>::const_iterator itr = t_list.begin();
std::advance(itr, 1);
for (; itr != t_list.end(); ++itr) //store the threat list in a different container
if (Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
if (Unit* pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
if (pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER)
targets.push_back(pTarget);
@@ -328,8 +328,8 @@ public:
targets.erase(targets.begin()+rand()%targets.size());
uint32 i = 0;
for (std::vector<Unit *>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter, ++i)
if (Unit *pTarget = *iter)
for (std::vector<Unit* >::const_iterator iter = targets.begin(); iter != targets.end(); ++iter, ++i)
if (Unit* pTarget = *iter)
{
enfeeble_targets[i] = pTarget->GetGUID();
enfeeble_health[i] = pTarget->GetHealth();
@@ -343,7 +343,7 @@ public:
{
for (uint8 i = 0; i < 5; ++i)
{
Unit *pTarget = Unit::GetUnit(*me, enfeeble_targets[i]);
Unit* pTarget = Unit::GetUnit(*me, enfeeble_targets[i]);
if (pTarget && pTarget->isAlive())
pTarget->SetHealth(enfeeble_health[i]);
enfeeble_targets[i] = 0;
@@ -365,7 +365,7 @@ public:
pos.Relocate(point->x, point->y, INFERNAL_Z);
}
Creature *Infernal = me->SummonCreature(NETHERSPITE_INFERNAL, pos, TEMPSUMMON_TIMED_DESPAWN, 180000);
Creature* Infernal = me->SummonCreature(NETHERSPITE_INFERNAL, pos, TEMPSUMMON_TIMED_DESPAWN, 180000);
if (Infernal)
{
@@ -449,10 +449,10 @@ public:
DoScriptText(SAY_AXE_TOSS2, me);
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
for (uint8 i = 0; i < 2; ++i)
{
Creature *axe = me->SummonCreature(MALCHEZARS_AXE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
Creature* axe = me->SummonCreature(MALCHEZARS_AXE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
if (axe)
{
axe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -494,11 +494,11 @@ public:
{
AxesTargetSwitchTimer = urand(7500, 20000);
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
for (uint8 i = 0; i < 2; ++i)
{
if (Unit *axe = Unit::GetUnit(*me, axes[i]))
if (Unit* axe = Unit::GetUnit(*me, axes[i]))
{
if (axe->getVictim())
DoModifyThreatPercent(axe->getVictim(), -100);
@@ -513,7 +513,7 @@ public:
if (AmplifyDamageTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_AMPLIFY_DAMAGE);
AmplifyDamageTimer = urand(20000, 30000);
} else AmplifyDamageTimer -= diff;
@@ -536,7 +536,7 @@ public:
{
if (SWPainTimer <= diff)
{
Unit *pTarget = NULL;
Unit* pTarget = NULL;
if (phase == 1)
pTarget = me->getVictim(); // the tank
else // anyone but the tank
@@ -585,7 +585,7 @@ public:
}
}
void Cleanup(Creature *infernal, InfernalPoint *point)
void Cleanup(Creature* infernal, InfernalPoint *point)
{
for (std::vector<uint64>::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
if (*itr == infernal->GetGUID())
@@ -602,7 +602,7 @@ public:
void netherspite_infernal::netherspite_infernalAI::Cleanup()
{
Unit *pMalchezaar = Unit::GetUnit(*me, malchezaar);
Unit* pMalchezaar = Unit::GetUnit(*me, malchezaar);
if (pMalchezaar && pMalchezaar->isAlive())
CAST_AI(boss_malchezaar::boss_malchezaarAI, CAST_CRE(pMalchezaar)->AI())->Cleanup(me, point);
@@ -93,7 +93,7 @@ public:
struct boss_aranAI : public ScriptedAI
{
boss_aranAI(Creature *c) : ScriptedAI(c)
boss_aranAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -195,7 +195,7 @@ public:
//store the threat list in a different container
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());
//only on alive players
if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER)
targets.push_back(pTarget);
@@ -309,7 +309,7 @@ public:
{
if (!me->IsNonMeleeSpellCasted(false))
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
if (!pTarget)
return;
@@ -523,7 +523,7 @@ public:
struct water_elementalAI : public ScriptedAI
{
water_elementalAI(Creature *c) : ScriptedAI(c) {}
water_elementalAI(Creature* c) : ScriptedAI(c) {}
uint32 CastTimer;
@@ -68,7 +68,7 @@ public:
struct mob_kilrekAI : public ScriptedAI
{
mob_kilrekAI(Creature *c) : ScriptedAI(c)
mob_kilrekAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceScript();
}
@@ -140,7 +140,7 @@ public:
struct mob_demon_chainAI : public ScriptedAI
{
mob_demon_chainAI(Creature *c) : ScriptedAI(c) {}
mob_demon_chainAI(Creature* c) : ScriptedAI(c) {}
uint64 SacrificeGUID;
@@ -178,7 +178,7 @@ public:
struct mob_fiendish_portalAI : public PassiveAI
{
mob_fiendish_portalAI(Creature *c) : PassiveAI(c), summons(me){}
mob_fiendish_portalAI(Creature* c) : PassiveAI(c), summons(me){}
SummonList summons;
@@ -215,7 +215,7 @@ public:
struct mob_fiendish_impAI : public ScriptedAI
{
mob_fiendish_impAI(Creature *c) : ScriptedAI(c) {}
mob_fiendish_impAI(Creature* c) : ScriptedAI(c) {}
uint32 FireboltTimer;
@@ -258,7 +258,7 @@ public:
struct boss_terestianAI : public ScriptedAI
{
boss_terestianAI(Creature *c) : ScriptedAI(c)
boss_terestianAI(Creature* c) : ScriptedAI(c)
{
for (uint8 i = 0; i < 2; ++i)
PortalGUID[i] = 0;
@@ -370,7 +370,7 @@ public:
if (SacrificeTimer <= diff)
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
if (pTarget && pTarget->isAlive())
{
DoCast(pTarget, SPELL_SACRIFICE, true);
@@ -388,7 +388,7 @@ public:
if (BrainWipeTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_BRAIN_WIPE);
BrainWipeTimer = 20000;
} else BrainWipeTimer -= diff;
@@ -869,7 +869,7 @@ public:
{
if (!IsChasing)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
DoScriptText(SAY_WOLF_HOOD, me);
DoCast(pTarget, SPELL_LITTLE_RED_RIDING_HOOD, true);
@@ -886,7 +886,7 @@ public:
{
IsChasing = false;
if (Unit *pTarget = Unit::GetUnit((*me), HoodGUID))
if (Unit* pTarget = Unit::GetUnit((*me), HoodGUID))
{
HoodGUID = 0;
if (DoGetThreat(pTarget))
@@ -977,7 +977,7 @@ void PretendToDie(Creature* pCreature)
pCreature->SetStandState(UNIT_STAND_STATE_DEAD);
};
void Resurrect(Creature *pTarget)
void Resurrect(Creature* pTarget)
{
pTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pTarget->SetFullHealth();
@@ -1289,7 +1289,7 @@ public:
if (BackwardLungeTimer <= diff)
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
if (pTarget && !me->HasInArc(M_PI, pTarget))
{
DoCast(pTarget, SPELL_BACKWARD_LUNGE);
@@ -1305,7 +1305,7 @@ public:
if (DeadlySwatheTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_DEADLY_SWATHE);
DeadlySwatheTimer = urand(15000, 25000);
} else DeadlySwatheTimer -= diff;
@@ -1410,7 +1410,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
if (BlindingPassionTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_BLINDING_PASSION);
BlindingPassionTimer = urand(30000, 45000);
} else BlindingPassionTimer -= diff;