Scripts: Reorder file names in Commands/CMakeList file and cosmetic changes in all scripts
This commit is contained in:
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
struct boss_anubrekhanAI : public BossAI
|
||||
{
|
||||
boss_anubrekhanAI(Creature *c) : BossAI(c, BOSS_ANUBREKHAN) {}
|
||||
boss_anubrekhanAI(Creature* c) : BossAI(c, BOSS_ANUBREKHAN) {}
|
||||
|
||||
bool hasTaunted;
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
DoScriptText(SAY_SLAY, me);
|
||||
}
|
||||
|
||||
void JustDied(Unit *)
|
||||
void JustDied(Unit* )
|
||||
{
|
||||
_JustDied();
|
||||
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPAWN_GUARDIAN_NORMAL, urand(15000, 20000));
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!hasTaunted && me->IsWithinDistInMap(who, 60.0f) && who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
BossAI::SummonedCreatureDespawn(summon);
|
||||
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
//Cast Impale on a random target
|
||||
//Do NOT cast it when we are afflicted by locust swarm
|
||||
if (!me->HasAura(RAID_MODE(SPELL_LOCUST_SWARM_10, SPELL_LOCUST_SWARM_25)))
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, RAID_MODE(SPELL_IMPALE_10, SPELL_IMPALE_25));
|
||||
events.ScheduleEvent(EVENT_IMPALE, urand(10000, 20000));
|
||||
break;
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
|
||||
struct boss_four_horsemenAI : public BossAI
|
||||
{
|
||||
boss_four_horsemenAI(Creature *c) : BossAI(c, BOSS_HORSEMEN)
|
||||
boss_four_horsemenAI(Creature* c) : BossAI(c, BOSS_HORSEMEN)
|
||||
{
|
||||
id = Horsemen(0);
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
@@ -131,15 +131,15 @@ public:
|
||||
_Reset();
|
||||
}
|
||||
|
||||
bool DoEncounterAction(Unit *who, bool attack, bool reset, bool checkAllDead)
|
||||
bool DoEncounterAction(Unit* who, bool attack, bool reset, bool checkAllDead)
|
||||
{
|
||||
if (!instance)
|
||||
return false;
|
||||
|
||||
Creature *Thane = CAST_CRE(Unit::GetUnit(*me, instance->GetData64(DATA_THANE)));
|
||||
Creature *Lady = CAST_CRE(Unit::GetUnit(*me, instance->GetData64(DATA_LADY)));
|
||||
Creature *Baron = CAST_CRE(Unit::GetUnit(*me, instance->GetData64(DATA_BARON)));
|
||||
Creature *Sir = CAST_CRE(Unit::GetUnit(*me, instance->GetData64(DATA_SIR)));
|
||||
Creature* Thane = CAST_CRE(Unit::GetUnit(*me, instance->GetData64(DATA_THANE)));
|
||||
Creature* Lady = CAST_CRE(Unit::GetUnit(*me, instance->GetData64(DATA_LADY)));
|
||||
Creature* Baron = CAST_CRE(Unit::GetUnit(*me, instance->GetData64(DATA_BARON)));
|
||||
Creature* Sir = CAST_CRE(Unit::GetUnit(*me, instance->GetData64(DATA_SIR)));
|
||||
|
||||
if (Thane && Lady && Baron && Sir)
|
||||
{
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
movementCompleted = true;
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
Unit *eventStarter = Unit::GetUnit(*me, uiEventStarterGUID);
|
||||
Unit* eventStarter = Unit::GetUnit(*me, uiEventStarterGUID);
|
||||
|
||||
if (eventStarter && me->canAttack(eventStarter))
|
||||
AttackStart(eventStarter);
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
}
|
||||
|
||||
// switch to "who" if nearer than current target.
|
||||
void SelectNearestTarget(Unit *who)
|
||||
void SelectNearestTarget(Unit* who)
|
||||
{
|
||||
if (me->getVictim() && me->GetDistanceOrder(who, me->getVictim()) && me->canAttack(who))
|
||||
{
|
||||
@@ -257,14 +257,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
BossAI::MoveInLineOfSight(who);
|
||||
if (caster)
|
||||
SelectNearestTarget(who);
|
||||
}
|
||||
|
||||
void AttackStart(Unit *who)
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!movementCompleted && !movementStarted)
|
||||
{
|
||||
@@ -361,7 +361,7 @@ public:
|
||||
|
||||
if (caster)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f))
|
||||
DoCast(pTarget, SPELL_PRIMARY(id));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -57,13 +57,13 @@ public:
|
||||
|
||||
struct boss_gluthAI : public BossAI
|
||||
{
|
||||
boss_gluthAI(Creature *c) : BossAI(c, BOSS_GLUTH)
|
||||
boss_gluthAI(Creature* c) : BossAI(c, BOSS_GLUTH)
|
||||
{
|
||||
// Do not let Gluth be affected by zombies' debuff
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_INFECTED_WOUND, true);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (who->GetEntry() == MOB_ZOMBIE && me->IsWithinDistInMap(who, 7))
|
||||
{
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SUMMON, 15000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
if (summon->GetEntry() == MOB_ZOMBIE)
|
||||
summon->AI()->AttackStart(me);
|
||||
|
||||
@@ -225,7 +225,7 @@ class boss_gothik : public CreatureScript
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
@@ -357,7 +357,7 @@ class boss_gothik : public CreatureScript
|
||||
if (spellId && me->isInCombat())
|
||||
{
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST);
|
||||
if (Creature *pRandomDeadTrigger = Unit::GetCreature(*me, DeadTriggerGUID[rand() % POS_DEAD]))
|
||||
if (Creature* pRandomDeadTrigger = Unit::GetCreature(*me, DeadTriggerGUID[rand() % POS_DEAD]))
|
||||
me->CastSpell(pRandomDeadTrigger, spellId, true);
|
||||
}
|
||||
}
|
||||
@@ -469,7 +469,7 @@ class boss_gothik : public CreatureScript
|
||||
DoTeleportTo(PosGroundLiveSide);
|
||||
|
||||
me->getThreatManager().resetAggro(NotOnSameSide(me));
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_NEAREST, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_NEAREST, 0))
|
||||
{
|
||||
me->getThreatManager().addThreat(pTarget, 100.0f);
|
||||
AttackStart(pTarget);
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
struct boss_grobbulusAI : public BossAI
|
||||
{
|
||||
boss_grobbulusAI(Creature *c) : BossAI(c, BOSS_GROBBULUS)
|
||||
boss_grobbulusAI(Creature* c) : BossAI(c, BOSS_GROBBULUS)
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_POISON_CLOUD_ADD, true);
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_BERSERK, 12*60000);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit *pTarget, const SpellEntry *spell)
|
||||
void SpellHitTarget(Unit* pTarget, const SpellEntry *spell)
|
||||
{
|
||||
if (spell->Id == uint32(SPELL_SLIME_SPRAY))
|
||||
{
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPRAY, 15000+rand()%15000);
|
||||
return;
|
||||
case EVENT_INJECT:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (!pTarget->HasAura(SPELL_MUTATING_INJECTION))
|
||||
DoCast(pTarget, SPELL_MUTATING_INJECTION);
|
||||
events.ScheduleEvent(EVENT_INJECT, 8000 + uint32(120 * me->GetHealthPct()));
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
struct boss_heiganAI : public BossAI
|
||||
{
|
||||
boss_heiganAI(Creature *c) : BossAI(c, BOSS_HEIGAN) {}
|
||||
boss_heiganAI(Creature* c) : BossAI(c, BOSS_HEIGAN) {}
|
||||
|
||||
uint32 eruptSection;
|
||||
bool eruptDirection;
|
||||
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
|
||||
FindGameObjects();
|
||||
|
||||
if (GameObject *pKTTrigger = me->GetMap()->GetGameObject(KTTriggerGUID))
|
||||
if (GameObject* pKTTrigger = me->GetMap()->GetGameObject(KTTriggerGUID))
|
||||
{
|
||||
pKTTrigger->ResetDoorOrButton();
|
||||
pKTTrigger->SetPhaseMask(1, true);
|
||||
@@ -310,7 +310,7 @@ public:
|
||||
|
||||
for (uint8 i = 0; i <= 3; ++i)
|
||||
{
|
||||
if (GameObject *pPortal = me->GetMap()->GetGameObject(PortalsGUID[i]))
|
||||
if (GameObject* pPortal = me->GetMap()->GetGameObject(PortalsGUID[i]))
|
||||
{
|
||||
if (!((pPortal->getLootState() == GO_READY) || (pPortal->getLootState() == GO_NOT_READY)))
|
||||
pPortal->ResetDoorOrButton();
|
||||
@@ -352,7 +352,7 @@ public:
|
||||
FindGameObjects();
|
||||
for (uint8 i = 0; i <= 3; ++i)
|
||||
{
|
||||
if (GameObject *pPortal = me->GetMap()->GetGameObject(PortalsGUID[i]))
|
||||
if (GameObject* pPortal = me->GetMap()->GetGameObject(PortalsGUID[i]))
|
||||
pPortal->ResetDoorOrButton();
|
||||
}
|
||||
DoCast(me, SPELL_KELTHUZAD_CHANNEL, false);
|
||||
@@ -415,7 +415,7 @@ public:
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_TRIGGER:
|
||||
if (GameObject *pKTTrigger = me->GetMap()->GetGameObject(KTTriggerGUID))
|
||||
if (GameObject* pKTTrigger = me->GetMap()->GetGameObject(KTTriggerGUID))
|
||||
pKTTrigger->SetPhaseMask(2, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
@@ -457,7 +457,7 @@ public:
|
||||
|
||||
for (uint8 i = 0; i <= 3; ++i)
|
||||
{
|
||||
if (GameObject *pPortal = me->GetMap()->GetGameObject(PortalsGUID[i]))
|
||||
if (GameObject* pPortal = me->GetMap()->GetGameObject(PortalsGUID[i]))
|
||||
{
|
||||
if (pPortal->getLootState() == GO_READY)
|
||||
pPortal->UseDoorOrButton();
|
||||
@@ -498,7 +498,7 @@ public:
|
||||
uint32 count = urand(1, 3);
|
||||
for (uint8 i = 1; i <= count; i++)
|
||||
{
|
||||
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 200, true);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 200, true);
|
||||
if (pTarget && !pTarget->isCharmed() && (chained.find(pTarget->GetGUID()) == chained.end()))
|
||||
{
|
||||
DoCast(pTarget, SPELL_CHAINS_OF_KELTHUZAD);
|
||||
@@ -530,7 +530,7 @@ public:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, NotCharmedTargetSelector()))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, NotCharmedTargetSelector()))
|
||||
{
|
||||
switch(player->getClass())
|
||||
{
|
||||
@@ -616,12 +616,12 @@ public:
|
||||
break;
|
||||
}
|
||||
case EVENT_FISSURE:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_SHADOW_FISURE);
|
||||
events.RepeatEvent(urand(10000, 45000));
|
||||
break;
|
||||
case EVENT_BLAST:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, RAID_MODE(1, 0), 0, true))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, RAID_MODE(1, 0), 0, true))
|
||||
DoCast(pTarget, SPELL_FROST_BLAST);
|
||||
if (rand()%2)
|
||||
DoScriptText(SAY_FROST_BLAST, me);
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
struct boss_loathebAI : public BossAI
|
||||
{
|
||||
boss_loathebAI(Creature *c) : BossAI(c, BOSS_LOATHEB) {}
|
||||
boss_loathebAI(Creature* c) : BossAI(c, BOSS_LOATHEB) {}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
struct boss_maexxnaAI : public BossAI
|
||||
{
|
||||
boss_maexxnaAI(Creature *c) : BossAI(c, BOSS_MAEXXNA) {}
|
||||
boss_maexxnaAI(Creature* c) : BossAI(c, BOSS_MAEXXNA) {}
|
||||
|
||||
bool enraged;
|
||||
|
||||
@@ -104,12 +104,12 @@ public:
|
||||
// TODO : Add missing text
|
||||
for (uint8 i = 0; i < RAID_MODE(1, 2); ++i)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true, -SPELL_WEB_WRAP))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true, -SPELL_WEB_WRAP))
|
||||
{
|
||||
pTarget->RemoveAura(RAID_MODE(SPELL_WEB_SPRAY_10, SPELL_WEB_SPRAY_25));
|
||||
uint8 pos = rand()%MAX_POS_WRAP;
|
||||
pTarget->GetMotionMaster()->MoveJump(PosWrap[pos].GetPositionX(), PosWrap[pos].GetPositionY(), PosWrap[pos].GetPositionZ(), 20, 20);
|
||||
if (Creature *wrap = DoSummon(MOB_WEB_WRAP, PosWrap[pos], 0, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
if (Creature* wrap = DoSummon(MOB_WEB_WRAP, PosWrap[pos], 0, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
wrap->AI()->SetGUID(pTarget->GetGUID());
|
||||
}
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
|
||||
struct mob_webwrapAI : public NullCreatureAI
|
||||
{
|
||||
mob_webwrapAI(Creature *c) : NullCreatureAI(c), victimGUID(0) {}
|
||||
mob_webwrapAI(Creature* c) : NullCreatureAI(c), victimGUID(0) {}
|
||||
|
||||
uint64 victimGUID;
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
struct boss_nothAI : public BossAI
|
||||
{
|
||||
boss_nothAI(Creature *c) : BossAI(c, BOSS_NOTH) {}
|
||||
boss_nothAI(Creature* c) : BossAI(c, BOSS_NOTH) {}
|
||||
|
||||
uint32 waveCount, balconyCount;
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
DoScriptText(SAY_SLAY, me);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->setActive(true);
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
struct boss_patchwerkAI : public BossAI
|
||||
{
|
||||
boss_patchwerkAI(Creature *c) : BossAI(c, BOSS_PATCHWERK) {}
|
||||
boss_patchwerkAI(Creature* c) : BossAI(c, BOSS_PATCHWERK) {}
|
||||
|
||||
bool Enraged;
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
|
||||
for (; i != me->getThreatManager().getThreatList().end(); ++i)
|
||||
{
|
||||
Unit *pTarget = (*i)->getTarget();
|
||||
Unit* pTarget = (*i)->getTarget();
|
||||
if (pTarget->isAlive() && pTarget != me->getVictim() && pTarget->GetHealth() > MostHP && me->IsWithinMeleeRange(pTarget))
|
||||
{
|
||||
MostHP = pTarget->GetHealth();
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
struct boss_razuviousAI : public BossAI
|
||||
{
|
||||
boss_razuviousAI(Creature *c) : BossAI(c, BOSS_RAZUVIOUS) {}
|
||||
boss_razuviousAI(Creature* c) : BossAI(c, BOSS_RAZUVIOUS) {}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SHOUT, 25000);
|
||||
return;
|
||||
case EVENT_KNIFE:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f))
|
||||
DoCast(pTarget, SPELL_JAGGED_KNIFE);
|
||||
events.ScheduleEvent(EVENT_KNIFE, 10000);
|
||||
return;
|
||||
|
||||
@@ -132,14 +132,14 @@ public:
|
||||
CheckPlayersFrostResist();
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit *pTarget, const SpellEntry *spell)
|
||||
void SpellHitTarget(Unit* pTarget, const SpellEntry *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_ICEBOLT)
|
||||
{
|
||||
IceBlockMap::iterator itr = iceblocks.find(pTarget->GetGUID());
|
||||
if (itr != iceblocks.end() && !itr->second)
|
||||
{
|
||||
if (GameObject *iceblock = me->SummonGameObject(GO_ICEBLOCK, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, 0, 0, 0, 0, 25000))
|
||||
if (GameObject* iceblock = me->SummonGameObject(GO_ICEBLOCK, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, 0, 0, 0, 0, 25000))
|
||||
itr->second = iceblock->GetGUID();
|
||||
}
|
||||
}
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
case EVENT_BLIZZARD:
|
||||
{
|
||||
//DoCastAOE(SPELL_SUMMON_BLIZZARD);
|
||||
if (Creature *pSummon = DoSummon(MOB_BLIZZARD, me, 0.0f, urand(25000, 30000), TEMPSUMMON_TIMED_DESPAWN))
|
||||
if (Creature* pSummon = DoSummon(MOB_BLIZZARD, me, 0.0f, urand(25000, 30000), TEMPSUMMON_TIMED_DESPAWN))
|
||||
pSummon->GetMotionMaster()->MoveRandom(40);
|
||||
events.ScheduleEvent(EVENT_BLIZZARD, RAID_MODE(20000, 7000), 0, PHASE_GROUND);
|
||||
break;
|
||||
@@ -360,7 +360,7 @@ public:
|
||||
std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
|
||||
for (; i != me->getThreatManager().getThreatList().end(); ++i)
|
||||
{
|
||||
Unit *pTarget = (*i)->getTarget();
|
||||
Unit* pTarget = (*i)->getTarget();
|
||||
if (pTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
|
||||
struct boss_thaddiusAI : public BossAI
|
||||
{
|
||||
boss_thaddiusAI(Creature *c) : BossAI(c, BOSS_THADDIUS)
|
||||
boss_thaddiusAI(Creature* c) : BossAI(c, BOSS_THADDIUS)
|
||||
{
|
||||
// init is a bit tricky because thaddius shall track the life of both adds, but not if there was a wipe
|
||||
// and, in particular, if there was a crash after both adds were killed (should not respawn)
|
||||
@@ -114,11 +114,11 @@ public:
|
||||
// Moreover, the adds may not yet be spawn. So just track down the status if mob is spawn
|
||||
// and each mob will send its status at reset (meaning that it is alive)
|
||||
checkFeugenAlive = false;
|
||||
if (Creature *pFeugen = me->GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
|
||||
if (Creature* pFeugen = me->GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
|
||||
checkFeugenAlive = pFeugen->isAlive();
|
||||
|
||||
checkStalaggAlive = false;
|
||||
if (Creature *pStalagg = me->GetCreature(*me, instance->GetData64(DATA_STALAGG)))
|
||||
if (Creature* pStalagg = me->GetCreature(*me, instance->GetData64(DATA_STALAGG)))
|
||||
checkStalaggAlive = pStalagg->isAlive();
|
||||
|
||||
if (!checkFeugenAlive && !checkStalaggAlive)
|
||||
@@ -207,13 +207,13 @@ public:
|
||||
if (!checkStalaggAlive)
|
||||
{
|
||||
if (instance)
|
||||
if (Creature *pStalagg = me->GetCreature(*me, instance->GetData64(DATA_STALAGG)))
|
||||
if (Creature* pStalagg = me->GetCreature(*me, instance->GetData64(DATA_STALAGG)))
|
||||
pStalagg->Respawn();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (instance)
|
||||
if (Creature *pFeugen = me->GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
|
||||
if (Creature* pFeugen = me->GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
|
||||
pFeugen->Respawn();
|
||||
}
|
||||
}
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
|
||||
struct mob_stalaggAI : public ScriptedAI
|
||||
{
|
||||
mob_stalaggAI(Creature *c) : ScriptedAI(c)
|
||||
mob_stalaggAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -279,7 +279,7 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
if (Creature *pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (Creature* pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (pThaddius->AI())
|
||||
pThaddius->AI()->DoAction(ACTION_STALAGG_RESET);
|
||||
powerSurgeTimer = urand(20000, 25000);
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (Creature *pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (Creature* pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (pThaddius->AI())
|
||||
pThaddius->AI()->DoAction(ACTION_STALAGG_DIED);
|
||||
}
|
||||
@@ -306,7 +306,7 @@ public:
|
||||
|
||||
if (magneticPullTimer <= uiDiff)
|
||||
{
|
||||
if (Creature *pFeugen = me->GetCreature(*me, pInstance->GetData64(DATA_FEUGEN)))
|
||||
if (Creature* pFeugen = me->GetCreature(*me, pInstance->GetData64(DATA_FEUGEN)))
|
||||
{
|
||||
Unit* pStalaggVictim = me->getVictim();
|
||||
Unit* pFeugenVictim = pFeugen->getVictim();
|
||||
@@ -352,7 +352,7 @@ public:
|
||||
|
||||
struct mob_feugenAI : public ScriptedAI
|
||||
{
|
||||
mob_feugenAI(Creature *c) : ScriptedAI(c)
|
||||
mob_feugenAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -364,7 +364,7 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
if (Creature *pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (Creature* pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (pThaddius->AI())
|
||||
pThaddius->AI()->DoAction(ACTION_FEUGEN_RESET);
|
||||
staticFieldTimer = 5000;
|
||||
@@ -378,7 +378,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (Creature *pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (Creature* pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (pThaddius->AI())
|
||||
pThaddius->AI()->DoAction(ACTION_FEUGEN_DIED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user