mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 11:03:47 +00:00
refactor(Core/Scripts): restyle scripts lib with astyle (#3467)
This commit is contained in:
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
struct boss_cyanigosaAI : public ScriptedAI
|
||||
{
|
||||
boss_cyanigosaAI(Creature *c) : ScriptedAI(c)
|
||||
boss_cyanigosaAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -75,9 +75,9 @@ public:
|
||||
Talk(SAY_AGGRO);
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_VACUUM, 30000);
|
||||
events.RescheduleEvent(EVENT_SPELL_BLIZZARD, urand(5000,10000));
|
||||
events.RescheduleEvent(EVENT_SPELL_TAIL_SWEEP, urand(15000,20000));
|
||||
events.RescheduleEvent(EVENT_SPELL_UNCONTROLLABLE_ENERGY, urand(5000,8000));
|
||||
events.RescheduleEvent(EVENT_SPELL_BLIZZARD, urand(5000, 10000));
|
||||
events.RescheduleEvent(EVENT_SPELL_TAIL_SWEEP, urand(15000, 20000));
|
||||
events.RescheduleEvent(EVENT_SPELL_UNCONTROLLABLE_ENERGY, urand(5000, 8000));
|
||||
if (IsHeroic())
|
||||
events.RescheduleEvent(EVENT_SPELL_MANA_DESTRUCTION, 20000);
|
||||
}
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
switch(spell->Id)
|
||||
{
|
||||
case SPELL_ARCANE_VACUUM:
|
||||
target->NearTeleportTo(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10.0f, target->GetOrientation());
|
||||
target->NearTeleportTo(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 10.0f, target->GetOrientation());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -133,11 +133,11 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_TAIL_SWEEP:
|
||||
me->CastSpell(me->GetVictim(), SPELL_TAIL_SWEEP, false);
|
||||
events.RepeatEvent(urand(15000,20000));
|
||||
events.RepeatEvent(urand(15000, 20000));
|
||||
break;
|
||||
case EVENT_SPELL_UNCONTROLLABLE_ENERGY:
|
||||
me->CastSpell(me->GetVictim(), SPELL_UNCONTROLLABLE_ENERGY, false);
|
||||
events.RepeatEvent(urand(20000,25000));
|
||||
events.RepeatEvent(urand(20000, 25000));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -149,8 +149,8 @@ public:
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BOSS_DIED, 0);
|
||||
float h = me->GetMap()->GetHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+2.0f);
|
||||
if (h != INVALID_HEIGHT && me->GetPositionZ()-h > 3.0f)
|
||||
float h = me->GetMap()->GetHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 2.0f);
|
||||
if (h != INVALID_HEIGHT && me->GetPositionZ() - h > 3.0f)
|
||||
{
|
||||
me->UpdatePosition(me->GetPositionX(), me->GetPositionY(), h, me->GetOrientation(), true); // move to ground
|
||||
me->StopMovingOnCurrentPos();
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
struct boss_erekemAI : public ScriptedAI
|
||||
{
|
||||
boss_erekemAI(Creature *c) : ScriptedAI(c)
|
||||
boss_erekemAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -78,11 +78,11 @@ public:
|
||||
DoCast(me, SPELL_EARTH_SHIELD);
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_SPELL_BLOODLUST, 15000);
|
||||
events.RescheduleEvent(EVENT_SPELL_BREAK_BONDS, urand(9000,14000));
|
||||
events.RescheduleEvent(EVENT_SPELL_BREAK_BONDS, urand(9000, 14000));
|
||||
events.RescheduleEvent(EVENT_SPELL_CHAIN_HEAL, 0);
|
||||
events.RescheduleEvent(EVENT_SPELL_EARTH_SHIELD, 20000);
|
||||
events.RescheduleEvent(EVENT_SPELL_EARTH_SHOCK, urand(2000,8000));
|
||||
events.RescheduleEvent(EVENT_SPELL_LIGHTNING_BOLT, urand(5000,10000));
|
||||
events.RescheduleEvent(EVENT_SPELL_EARTH_SHOCK, urand(2000, 8000));
|
||||
events.RescheduleEvent(EVENT_SPELL_LIGHTNING_BOLT, urand(5000, 10000));
|
||||
if (IsHeroic())
|
||||
events.RescheduleEvent(EVENT_SPELL_STORMSTRIKE, 3000);
|
||||
|
||||
@@ -110,11 +110,11 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_BLOODLUST:
|
||||
me->CastSpell((Unit*)NULL, SPELL_BLOODLUST, false);
|
||||
events.RepeatEvent(urand(35000,45000));
|
||||
events.RepeatEvent(urand(35000, 45000));
|
||||
break;
|
||||
case EVENT_SPELL_BREAK_BONDS:
|
||||
me->CastSpell((Unit*)NULL, SPELL_BREAK_BONDS, false);
|
||||
events.RepeatEvent(urand(16000,22000));
|
||||
events.RepeatEvent(urand(16000, 22000));
|
||||
break;
|
||||
case EVENT_SPELL_CHAIN_HEAL:
|
||||
if (uint64 TargetGUID = GetChainHealTargetGUID())
|
||||
@@ -123,15 +123,15 @@ public:
|
||||
if (Creature* target = pInstance->instance->GetCreature(TargetGUID))
|
||||
me->CastSpell(target, SPELL_CHAIN_HEAL, false);
|
||||
|
||||
Creature *pGuard1 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_1_GUID));
|
||||
Creature *pGuard2 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_2_GUID));
|
||||
Creature* pGuard1 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_1_GUID));
|
||||
Creature* pGuard2 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_2_GUID));
|
||||
if ((pGuard1 && !pGuard1->IsAlive()) || (pGuard2 && !pGuard2->IsAlive()))
|
||||
{
|
||||
events.RepeatEvent(urand(3000,6000));
|
||||
events.RepeatEvent(urand(3000, 6000));
|
||||
break;
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(urand(8000,11000));
|
||||
events.RepeatEvent(urand(8000, 11000));
|
||||
break;
|
||||
case EVENT_SPELL_EARTH_SHIELD:
|
||||
me->CastSpell(me, SPELL_EARTH_SHIELD, false);
|
||||
@@ -139,17 +139,17 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_EARTH_SHOCK:
|
||||
me->CastSpell(me->GetVictim(), SPELL_EARTH_SHOCK, false);
|
||||
events.RepeatEvent(urand(8000,13000));
|
||||
events.RepeatEvent(urand(8000, 13000));
|
||||
break;
|
||||
case EVENT_SPELL_LIGHTNING_BOLT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 35.0f, true))
|
||||
me->CastSpell(target, SPELL_LIGHTNING_BOLT, false);
|
||||
events.RepeatEvent(urand(15000,25000));
|
||||
events.RepeatEvent(urand(15000, 25000));
|
||||
break;
|
||||
case EVENT_SPELL_STORMSTRIKE:
|
||||
{
|
||||
Creature *pGuard1 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_1_GUID));
|
||||
Creature *pGuard2 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_2_GUID));
|
||||
Creature* pGuard1 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_1_GUID));
|
||||
Creature* pGuard2 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_2_GUID));
|
||||
if (pGuard1 && !pGuard1->IsAlive() && pGuard2 && !pGuard2->IsAlive()) // both dead
|
||||
me->CastSpell(me->GetVictim(), SPELL_STORMSTRIKE, false);
|
||||
events.RepeatEvent(3000);
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
|
||||
struct npc_erekem_guardAI : public ScriptedAI
|
||||
{
|
||||
npc_erekem_guardAI(Creature *c) : ScriptedAI(c)
|
||||
npc_erekem_guardAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
{
|
||||
DoZoneInCombat();
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_SPELL_GUSHING_WOUND, urand(1000,3000));
|
||||
events.RescheduleEvent(EVENT_SPELL_GUSHING_WOUND, urand(1000, 3000));
|
||||
events.RescheduleEvent(EVENT_SPELL_HOWLING_SCREECH, urand(8000, 13000));
|
||||
events.RescheduleEvent(EVENT_SPELL_STRIKE, urand(4000, 8000));
|
||||
|
||||
@@ -275,15 +275,15 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_GUSHING_WOUND:
|
||||
me->CastSpell(me->GetVictim(), SPELL_GUSHING_WOUND, false);
|
||||
events.RepeatEvent(urand(7000,12000));
|
||||
events.RepeatEvent(urand(7000, 12000));
|
||||
break;
|
||||
case EVENT_SPELL_HOWLING_SCREECH:
|
||||
me->CastSpell(me->GetVictim(), SPELL_HOWLING_SCREECH, false);
|
||||
events.RepeatEvent(urand(8000,13000));
|
||||
events.RepeatEvent(urand(8000, 13000));
|
||||
break;
|
||||
case EVENT_SPELL_STRIKE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_STRIKE, false);
|
||||
events.RepeatEvent(urand(4000,8000));
|
||||
events.RepeatEvent(urand(4000, 8000));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#define ACTION_WATER_ELEMENT_KILLED 2
|
||||
|
||||
#define MAX_SPAWN_LOC 5
|
||||
static Position SpawnLoc[MAX_SPAWN_LOC]=
|
||||
static Position SpawnLoc[MAX_SPAWN_LOC] =
|
||||
{
|
||||
{1840.64f, 795.407f, 44.079f, 1.676f},
|
||||
{1886.24f, 757.733f, 47.750f, 5.201f},
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
struct boss_ichoronAI : public ScriptedAI
|
||||
{
|
||||
boss_ichoronAI(Creature *c) : ScriptedAI(c), globules(me)
|
||||
boss_ichoronAI(Creature* c) : ScriptedAI(c), globules(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
bIsExploded = false;
|
||||
bIsFrenzy = false;
|
||||
uiDrainedTimer = 15000;
|
||||
uiWaterBoltVolleyTimer = urand(7000,12000);
|
||||
uiWaterBoltVolleyTimer = urand(7000, 12000);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisplayId(me->GetNativeDisplayId());
|
||||
}
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
break;
|
||||
case ACTION_WATER_ELEMENT_KILLED:
|
||||
uint32 damage = me->CountPctFromMaxHealth(3);
|
||||
damage = std::min(damage, me->GetHealth()-1);
|
||||
damage = std::min(damage, me->GetHealth() - 1);
|
||||
me->ModifyHealth(-int32(damage));
|
||||
me->LowerPlayerDamageReq(damage);
|
||||
break;
|
||||
@@ -136,12 +136,12 @@ public:
|
||||
|
||||
void IchoronDoCastToAllHostilePlayers(uint32 spellId, bool triggered)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player *plr = i->GetSource())
|
||||
if (Player* plr = i->GetSource())
|
||||
me->CastSpell(plr, spellId, triggered);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
bIsExploded = false;
|
||||
bIsFrenzy = false;
|
||||
uiDrainedTimer = 15000;
|
||||
uiWaterBoltVolleyTimer = urand(7000,12000);
|
||||
uiWaterBoltVolleyTimer = urand(7000, 12000);
|
||||
DoZoneInCombat();
|
||||
Talk(SAY_AGGRO);
|
||||
me->CastSpell(me, SPELL_PROTECTIVE_BUBBLE, true);
|
||||
@@ -185,14 +185,14 @@ public:
|
||||
uiDrainedTimer = 15000;
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisplayId(11686);
|
||||
for (uint8 i=0; i<MAX_SPAWN_LOC; ++i)
|
||||
for (uint8 i = 0; i < MAX_SPAWN_LOC; ++i)
|
||||
{
|
||||
float angle = rand_norm()*2*M_PI;
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
Position p1(SpawnLoc[i]), p2(SpawnLoc[i]);
|
||||
p1.m_positionX += 2.5f*cos(angle);
|
||||
p1.m_positionY += 2.5f*sin(angle);
|
||||
p2.m_positionX -= 2.5f*cos(angle);
|
||||
p2.m_positionY -= 2.5f*sin(angle);
|
||||
p1.m_positionX += 2.5f * cos(angle);
|
||||
p1.m_positionY += 2.5f * sin(angle);
|
||||
p2.m_positionX -= 2.5f * cos(angle);
|
||||
p2.m_positionY -= 2.5f * sin(angle);
|
||||
DoSummon(NPC_ICHOR_GLOBULE, p1, 60000, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN);
|
||||
DoSummon(NPC_ICHOR_GLOBULE, p2, 60000, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN);
|
||||
}
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *pSummoned)
|
||||
void SummonedCreatureDespawn(Creature* pSummoned)
|
||||
{
|
||||
if (pSummoned)
|
||||
{
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
pInstance->SetData(DATA_BOSS_DIED, 0);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit * victim)
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim && victim->GetGUID() == me->GetGUID())
|
||||
return;
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
|
||||
struct npc_ichor_globuleAI : public ScriptedAI
|
||||
{
|
||||
npc_ichor_globuleAI(Creature *c) : ScriptedAI(c)
|
||||
npc_ichor_globuleAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
uiRangeCheck_Timer = 1000;
|
||||
@@ -326,7 +326,7 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
if (Creature* pIchoron = pInstance->instance->GetCreature(pInstance->GetData64(DATA_ICHORON_GUID)))
|
||||
if (me->IsWithinDist(pIchoron, 2.0f , false))
|
||||
if (me->IsWithinDist(pIchoron, 2.0f, false))
|
||||
{
|
||||
if (pIchoron->AI())
|
||||
pIchoron->AI()->DoAction(ACTION_WATER_ELEMENT_HIT);
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
enum eSpells
|
||||
{
|
||||
SPELL_CAUTERIZING_FLAMES = 59466,
|
||||
SPELL_FIREBOLT_N = 54235,
|
||||
SPELL_FIREBOLT_H = 59468,
|
||||
SPELL_FLAME_BREATH_N = 54282,
|
||||
SPELL_FLAME_BREATH_H = 59469,
|
||||
SPELL_LAVA_BURN_N = 54249,
|
||||
SPELL_LAVA_BURN_H = 59594,
|
||||
SPELL_CAUTERIZING_FLAMES = 59466,
|
||||
SPELL_FIREBOLT_N = 54235,
|
||||
SPELL_FIREBOLT_H = 59468,
|
||||
SPELL_FLAME_BREATH_N = 54282,
|
||||
SPELL_FLAME_BREATH_H = 59469,
|
||||
SPELL_LAVA_BURN_N = 54249,
|
||||
SPELL_LAVA_BURN_H = 59594,
|
||||
};
|
||||
|
||||
#define SPELL_FIREBOLT DUNGEON_MODE(SPELL_FIREBOLT_N, SPELL_FIREBOLT_H)
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
struct boss_lavanthorAI : public ScriptedAI
|
||||
{
|
||||
boss_lavanthorAI(Creature *c) : ScriptedAI(c)
|
||||
boss_lavanthorAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -81,19 +81,19 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_FIREBOLT:
|
||||
me->CastSpell(me->GetVictim(), SPELL_FIREBOLT, false);
|
||||
events.RepeatEvent(urand(5000,13000));
|
||||
events.RepeatEvent(urand(5000, 13000));
|
||||
break;
|
||||
case EVENT_SPELL_FLAME_BREATH:
|
||||
me->CastSpell(me->GetVictim(), SPELL_FLAME_BREATH, false);
|
||||
events.RepeatEvent(urand(10000,15000));
|
||||
events.RepeatEvent(urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_SPELL_LAVA_BURN:
|
||||
me->CastSpell(me->GetVictim(), SPELL_LAVA_BURN, false);
|
||||
events.RepeatEvent(urand(14000,20000));
|
||||
events.RepeatEvent(urand(14000, 20000));
|
||||
break;
|
||||
case EVENT_SPELL_CAUTERIZING_FLAMES:
|
||||
me->CastSpell((Unit*)NULL, SPELL_FLAME_BREATH, false);
|
||||
events.RepeatEvent(urand(10000,16000));
|
||||
events.RepeatEvent(urand(10000, 16000));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
struct boss_moraggAI : public ScriptedAI
|
||||
{
|
||||
boss_moraggAI(Creature *c) : ScriptedAI(c)
|
||||
boss_moraggAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -63,8 +63,8 @@ public:
|
||||
me->CastSpell(me, SPELL_RAY_OF_SUFFERING, true);
|
||||
me->CastSpell(me, SPELL_RAY_OF_PAIN, true);
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_SPELL_CORROSIVE_SALIVA, urand(4000,6000));
|
||||
events.RescheduleEvent(EVENT_SPELL_OPTIC_LINK, urand(10000,11000));
|
||||
events.RescheduleEvent(EVENT_SPELL_CORROSIVE_SALIVA, urand(4000, 6000));
|
||||
events.RescheduleEvent(EVENT_SPELL_OPTIC_LINK, urand(10000, 11000));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
@@ -83,13 +83,13 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_CORROSIVE_SALIVA:
|
||||
me->CastSpell(me->GetVictim(), SPELL_CORROSIVE_SALIVA, false);
|
||||
events.RepeatEvent(urand(8000,10000));
|
||||
events.RepeatEvent(urand(8000, 10000));
|
||||
break;
|
||||
case EVENT_SPELL_OPTIC_LINK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0, 40.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_OPTIC_LINK, false);
|
||||
events.RepeatEvent(urand(18000,21000));
|
||||
events.RepeatEvent(urand(18000, 21000));
|
||||
}
|
||||
else
|
||||
events.RepeatEvent(5000);
|
||||
@@ -127,12 +127,12 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_optic_linkAuraScript)
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const * aurEff)
|
||||
void HandleEffectPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
if (Unit* target = GetTarget())
|
||||
if (Unit* caster = GetCaster())
|
||||
if (GetAura() && GetAura()->GetEffect(0))
|
||||
GetAura()->GetEffect(0)->SetAmount(aurEff->GetSpellInfo()->Effects[EFFECT_0].BasePoints+(((int32)target->GetExactDist(caster))*25)+(aurEff->GetTickNumber()*100));
|
||||
GetAura()->GetEffect(0)->SetAmount(aurEff->GetSpellInfo()->Effects[EFFECT_0].BasePoints + (((int32)target->GetExactDist(caster)) * 25) + (aurEff->GetTickNumber() * 100));
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript *GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_optic_linkAuraScript();
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
struct boss_xevozzAI : public ScriptedAI
|
||||
{
|
||||
boss_xevozzAI(Creature *c) : ScriptedAI(c), spheres(me)
|
||||
boss_xevozzAI(Creature* c) : ScriptedAI(c), spheres(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
Talk(SAY_AGGRO);
|
||||
DoZoneInCombat();
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_BARRAGE_VOLLEY, urand(16000,20000));
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_BARRAGE_VOLLEY, urand(16000, 20000));
|
||||
events.RescheduleEvent(EVENT_SUMMON_SPHERES, 10000);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,8 @@ public:
|
||||
if (IsHeroic())
|
||||
{
|
||||
uint32 entry2;
|
||||
do { entry2 = RAND(SPELL_SUMMON_ETHEREAL_SPHERE_1, SPELL_SUMMON_ETHEREAL_SPHERE_2, SPELL_SUMMON_ETHEREAL_SPHERE_3); } while (entry1 == entry2);
|
||||
do { entry2 = RAND(SPELL_SUMMON_ETHEREAL_SPHERE_1, SPELL_SUMMON_ETHEREAL_SPHERE_2, SPELL_SUMMON_ETHEREAL_SPHERE_3); }
|
||||
while (entry1 == entry2);
|
||||
me->CastSpell((Unit*)NULL, entry2, true);
|
||||
}
|
||||
events.RepeatEvent(45000);
|
||||
@@ -159,7 +160,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *pSummoned)
|
||||
void SummonedCreatureDespawn(Creature* pSummoned)
|
||||
{
|
||||
if (pSummoned)
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
struct boss_zuramatAI : public ScriptedAI
|
||||
{
|
||||
boss_zuramatAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
boss_zuramatAI(Creature* c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
Talk(SAY_AGGRO);
|
||||
DoZoneInCombat();
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_SPELL_SHROUD_OF_DARKNESS, urand(5000,7000));
|
||||
events.RescheduleEvent(EVENT_SPELL_VOID_SHIFT, urand(23000,25000));
|
||||
events.RescheduleEvent(EVENT_SPELL_SHROUD_OF_DARKNESS, urand(5000, 7000));
|
||||
events.RescheduleEvent(EVENT_SPELL_VOID_SHIFT, urand(23000, 25000));
|
||||
events.RescheduleEvent(EVENT_SPELL_SUMMON_VOID_SENTRY, 10000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ACHIEV, 1);
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
me->CastSpell(target, SPELL_VOID_SHIFT, false);
|
||||
me->MonsterWhisper("Gaze... into the void.", target->ToPlayer(), false);
|
||||
}
|
||||
events.RepeatEvent(urand(18000,22000));
|
||||
events.RepeatEvent(urand(18000, 22000));
|
||||
break;
|
||||
case EVENT_SPELL_SUMMON_VOID_SENTRY:
|
||||
me->CastSpell((Unit*)NULL, SPELL_SUMMON_VOID_SENTRY, false);
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
pInstance->SetData(DATA_BOSS_DIED, 0);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit * victim)
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim && victim->GetGUID() == me->GetGUID())
|
||||
return;
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *pSummoned)
|
||||
void SummonedCreatureDespawn(Creature* pSummoned)
|
||||
{
|
||||
if (pSummoned)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
|
||||
struct npc_vh_void_sentryAI : public NullCreatureAI
|
||||
{
|
||||
npc_vh_void_sentryAI(Creature *c) : NullCreatureAI(c)
|
||||
npc_vh_void_sentryAI(Creature* c) : NullCreatureAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
SummonedGUID = 0;
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
me->DespawnOrUnsummon(5000);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *pSummoned)
|
||||
void SummonedCreatureDespawn(Creature* pSummoned)
|
||||
{
|
||||
if (pSummoned)
|
||||
pInstance->SetData64(DATA_DELETE_TRASH_MOB, pSummoned->GetGUID());
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
NPC_SinclariGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_VIOLET_HOLD_GUARD:
|
||||
for (uint8 i=0; i<4; ++i)
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (NPC_GuardGUID[i] == 0)
|
||||
{
|
||||
NPC_GuardGUID[i] = creature->GetGUID();
|
||||
@@ -238,9 +238,9 @@ public:
|
||||
PortalLocation = data;
|
||||
break;
|
||||
case DATA_DECRASE_DOOR_HEALTH:
|
||||
if (GateHealth>0)
|
||||
if (GateHealth > 0)
|
||||
--GateHealth;
|
||||
if (GateHealth==0)
|
||||
if (GateHealth == 0)
|
||||
{
|
||||
CLEANED = false;
|
||||
InstanceCleanup();
|
||||
@@ -418,7 +418,7 @@ public:
|
||||
break;
|
||||
case EVENT_GUARDS_FALL_BACK:
|
||||
{
|
||||
for (uint8 i=0; i<4; ++i)
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (Creature* c = instance->GetCreature(NPC_GuardGUID[i]))
|
||||
{
|
||||
c->SetReactState(REACT_PASSIVE);
|
||||
@@ -432,7 +432,7 @@ public:
|
||||
break;
|
||||
case EVENT_GUARDS_DISAPPEAR:
|
||||
{
|
||||
for (uint8 i=0; i<4; ++i)
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (Creature* c = instance->GetCreature(NPC_GuardGUID[i]))
|
||||
c->SetVisible(false);
|
||||
events.PopEvent();
|
||||
@@ -474,17 +474,18 @@ public:
|
||||
case EVENT_SUMMON_PORTAL:
|
||||
++WaveCount;
|
||||
DoUpdateWorldState(WORLD_STATE_VH_WAVE_COUNT, (uint32)WaveCount);
|
||||
SetData(DATA_PORTAL_LOCATION, (GetData(DATA_PORTAL_LOCATION) + urand(1, 5))%6);
|
||||
SetData(DATA_PORTAL_LOCATION, (GetData(DATA_PORTAL_LOCATION) + urand(1, 5)) % 6);
|
||||
if (Creature* c = instance->GetCreature(NPC_SinclariGUID))
|
||||
{
|
||||
if (WaveCount%6 != 0)
|
||||
if (WaveCount % 6 != 0)
|
||||
c->SummonCreature(NPC_TELEPORTATION_PORTAL, PortalLocations[GetData(DATA_PORTAL_LOCATION)], TEMPSUMMON_CORPSE_DESPAWN);
|
||||
else if (WaveCount == 6 || WaveCount == 12) // first or second boss
|
||||
{
|
||||
if (!uiFirstBoss || !uiSecondBoss)
|
||||
{
|
||||
uiFirstBoss = urand(1,6);
|
||||
do { uiSecondBoss = urand(1,6); } while (uiFirstBoss==uiSecondBoss);
|
||||
uiFirstBoss = urand(1, 6);
|
||||
do { uiSecondBoss = urand(1, 6); }
|
||||
while (uiFirstBoss == uiSecondBoss);
|
||||
SaveToDB();
|
||||
}
|
||||
c->SummonCreature(NPC_TELEPORTATION_PORTAL, MiddleRoomPortalSaboLocation, TEMPSUMMON_CORPSE_DESPAWN);
|
||||
@@ -539,13 +540,13 @@ public:
|
||||
bool DoNeedCleanup(bool enter)
|
||||
{
|
||||
uint8 aliveCount = 0;
|
||||
Map::PlayerList const &pl = instance->GetPlayers();
|
||||
Map::PlayerList const& pl = instance->GetPlayers();
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
if( Player* plr = itr->GetSource() )
|
||||
if( plr->IsAlive() && !plr->IsGameMaster() && !plr->HasAura(27827)/*spirit of redemption aura*/ )
|
||||
++aliveCount;
|
||||
|
||||
bool need = enter ? aliveCount<=1 : aliveCount==0;
|
||||
bool need = enter ? aliveCount <= 1 : aliveCount == 0;
|
||||
if( !need && CLEANED )
|
||||
CLEANED = false;
|
||||
return need;
|
||||
@@ -567,12 +568,12 @@ public:
|
||||
|
||||
// reset positions of Sinclari and Guards
|
||||
if (Creature* c = instance->GetCreature(NPC_SinclariGUID)) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); }
|
||||
for (uint8 i=0; i<4; ++i)
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (Creature* c = instance->GetCreature(NPC_GuardGUID[i]))
|
||||
{
|
||||
c->DespawnOrUnsummon();
|
||||
c->SetRespawnTime(3);
|
||||
if (m_auiEncounter[MAX_ENCOUNTER-1] == DONE)
|
||||
if (m_auiEncounter[MAX_ENCOUNTER - 1] == DONE)
|
||||
c->SetVisible(false);
|
||||
else
|
||||
c->SetVisible(true);
|
||||
@@ -597,7 +598,7 @@ public:
|
||||
// open main gate
|
||||
HandleGameObject(GO_MainGateGUID, true);
|
||||
|
||||
if (m_auiEncounter[MAX_ENCOUNTER-1] != DONE) // instance not finished
|
||||
if (m_auiEncounter[MAX_ENCOUNTER - 1] != DONE) // instance not finished
|
||||
{
|
||||
// close all cells
|
||||
HandleGameObject(GO_MoraggCellGUID, false);
|
||||
@@ -628,7 +629,7 @@ public:
|
||||
GateHealth = 100;
|
||||
WaveCount = 0;
|
||||
bDefensesUsed = false;
|
||||
if (m_auiEncounter[MAX_ENCOUNTER-1] == DONE)
|
||||
if (m_auiEncounter[MAX_ENCOUNTER - 1] == DONE)
|
||||
EncounterStatus = DONE;
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_CHECK_PLAYERS, CLEANUP_CHECK_INTERVAL);
|
||||
@@ -692,10 +693,10 @@ public:
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
|
||||
if (m_auiEncounter[MAX_ENCOUNTER-1] == DONE)
|
||||
if (m_auiEncounter[MAX_ENCOUNTER - 1] == DONE)
|
||||
EncounterStatus = DONE;
|
||||
}
|
||||
else OUT_LOAD_INST_DATA_FAIL;
|
||||
else OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
@@ -47,12 +47,12 @@ public:
|
||||
switch (pInstance->GetData(DATA_ENCOUNTER_STATUS))
|
||||
{
|
||||
case NOT_STARTED:
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, 13853, creature->GetGUID());
|
||||
break;
|
||||
case IN_PROGRESS:
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_I_WANT_IN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_I_WANT_IN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
SendGossipMenuFor(player, 13853, creature->GetGUID());
|
||||
break;
|
||||
default: // DONE or invalid
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
CloseGossipMenuFor(player);
|
||||
if (InstanceScript *pInstance = creature->GetInstanceScript())
|
||||
if (InstanceScript* pInstance = creature->GetInstanceScript())
|
||||
pInstance->SetData(DATA_START_INSTANCE, 1);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
@@ -102,14 +102,14 @@ class npc_vh_teleportation_portal : public CreatureScript
|
||||
public:
|
||||
npc_vh_teleportation_portal() : CreatureScript("npc_vh_teleportation_portal") { }
|
||||
|
||||
CreatureAI* GetAI(Creature *creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_vh_teleportation_portalAI(creature);
|
||||
}
|
||||
|
||||
struct npc_vh_teleportation_portalAI : public NullCreatureAI
|
||||
{
|
||||
npc_vh_teleportation_portalAI(Creature *c) : NullCreatureAI(c), listOfMobs(me)
|
||||
npc_vh_teleportation_portalAI(Creature* c) : NullCreatureAI(c), listOfMobs(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
events.Reset();
|
||||
@@ -124,14 +124,14 @@ public:
|
||||
else
|
||||
addValue = 1;
|
||||
|
||||
if (wave%6 != 0)
|
||||
events.RescheduleEvent(RAND(EVENT_SUMMON_KEEPER_OR_GUARDIAN,EVENT_SUMMON_ELITES), 10000);
|
||||
if (wave % 6 != 0)
|
||||
events.RescheduleEvent(RAND(EVENT_SUMMON_KEEPER_OR_GUARDIAN, EVENT_SUMMON_ELITES), 10000);
|
||||
else
|
||||
events.RescheduleEvent(EVENT_SUMMON_SABOTEOUR, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
InstanceScript *pInstance;
|
||||
InstanceScript* pInstance;
|
||||
SummonList listOfMobs;
|
||||
EventMap events;
|
||||
uint8 wave;
|
||||
@@ -153,13 +153,13 @@ public:
|
||||
case EVENT_SUMMON_KEEPER_OR_GUARDIAN:
|
||||
bKorG = true;
|
||||
spawned = true;
|
||||
if (Creature *c = DoSummon(RAND(NPC_PORTAL_GUARDIAN, NPC_PORTAL_KEEPER), me, 2.0f, 0, TEMPSUMMON_DEAD_DESPAWN))
|
||||
if (Creature* c = DoSummon(RAND(NPC_PORTAL_GUARDIAN, NPC_PORTAL_KEEPER), me, 2.0f, 0, TEMPSUMMON_DEAD_DESPAWN))
|
||||
me->CastSpell(c, SPELL_PORTAL_CHANNEL, false);
|
||||
events.PopEvent();
|
||||
events.RescheduleEvent(EVENT_SUMMON_KEEPER_TRASH, 20000);
|
||||
break;
|
||||
case EVENT_SUMMON_KEEPER_TRASH:
|
||||
for (uint8 i=0; i<3+addValue; ++i)
|
||||
for (uint8 i = 0; i < 3 + addValue; ++i)
|
||||
{
|
||||
uint32 entry = RAND(NPC_AZURE_INVADER_1, NPC_AZURE_INVADER_2, NPC_AZURE_SPELLBREAKER_1, NPC_AZURE_SPELLBREAKER_2, NPC_AZURE_MAGE_SLAYER_1, NPC_AZURE_MAGE_SLAYER_2, NPC_AZURE_BINDER_1, NPC_AZURE_BINDER_2);
|
||||
DoSummon(entry, me, 2.0f, 20000, TEMPSUMMON_DEAD_DESPAWN);
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
break;
|
||||
case EVENT_SUMMON_ELITES:
|
||||
spawned = true;
|
||||
for (uint8 i=0; i<2+addValue; ++i)
|
||||
for (uint8 i = 0; i < 2 + addValue; ++i)
|
||||
{
|
||||
uint32 entry = RAND(NPC_AZURE_CAPTAIN, NPC_AZURE_RAIDER, NPC_AZURE_STALKER, NPC_AZURE_SORCEROR);
|
||||
DoSummon(entry, me, 2.0f, 20000, TEMPSUMMON_DEAD_DESPAWN);
|
||||
@@ -212,13 +212,13 @@ public:
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
events.Reset();
|
||||
if (wave%6 == 0) // just to be sure, shouln't occur
|
||||
if (wave % 6 == 0) // just to be sure, shouln't occur
|
||||
return;
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_PORTAL_DEFEATED, 0);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *pSummoned)
|
||||
void JustSummoned(Creature* pSummoned)
|
||||
{
|
||||
if (pSummoned)
|
||||
{
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedMobDied(Creature *pSummoned)
|
||||
void SummonedMobDied(Creature* pSummoned)
|
||||
{
|
||||
if (pSummoned)
|
||||
{
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
|
||||
struct violet_hold_trashAI : public npc_escortAI
|
||||
{
|
||||
violet_hold_trashAI(Creature *c) : npc_escortAI(c)
|
||||
violet_hold_trashAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
if (pInstance)
|
||||
@@ -287,8 +287,8 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
|
||||
void WaypointReached(uint32 id)
|
||||
{
|
||||
if (PLoc<6)
|
||||
if (id == uint16(PLocWPCount[PLoc] -1 -(bAlt ? 1 : 0)))
|
||||
if (PLoc < 6)
|
||||
if (id == uint16(PLocWPCount[PLoc] - 1 - (bAlt ? 1 : 0)))
|
||||
CreatureStartAttackDoor();
|
||||
}
|
||||
|
||||
@@ -305,43 +305,43 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
switch(PLoc)
|
||||
{
|
||||
case 0:
|
||||
for(int i=0;i<6;i++)
|
||||
AddWaypoint(i, FirstPortalTrashWPs[i][0]+irand(-1, 1), FirstPortalTrashWPs[i][1]+irand(-1, 1), FirstPortalTrashWPs[i][2]+irand(-1, 1), 0);
|
||||
for(int i = 0; i < 6; i++)
|
||||
AddWaypoint(i, FirstPortalTrashWPs[i][0] + irand(-1, 1), FirstPortalTrashWPs[i][1] + irand(-1, 1), FirstPortalTrashWPs[i][2] + irand(-1, 1), 0);
|
||||
me->SetHomePosition(FirstPortalTrashWPs[5][0], FirstPortalTrashWPs[5][1], FirstPortalTrashWPs[5][2], 3.149439f);
|
||||
break;
|
||||
case 1:
|
||||
bAlt = (bool)urand(0, 1);
|
||||
if (!bAlt)
|
||||
{
|
||||
for(int i=0;i<9;i++)
|
||||
AddWaypoint(i, SecondPortalTrashWPs1[i][0]+irand(-1, 1), SecondPortalTrashWPs1[i][1]+irand(-1, 1), SecondPortalTrashWPs1[i][2], 0);
|
||||
me->SetHomePosition(SecondPortalTrashWPs1[8][0]+irand(-1, 1), SecondPortalTrashWPs1[8][1]+irand(-1, 1), SecondPortalTrashWPs1[8][2]+irand(-1, 1), 3.149439f);
|
||||
for(int i = 0; i < 9; i++)
|
||||
AddWaypoint(i, SecondPortalTrashWPs1[i][0] + irand(-1, 1), SecondPortalTrashWPs1[i][1] + irand(-1, 1), SecondPortalTrashWPs1[i][2], 0);
|
||||
me->SetHomePosition(SecondPortalTrashWPs1[8][0] + irand(-1, 1), SecondPortalTrashWPs1[8][1] + irand(-1, 1), SecondPortalTrashWPs1[8][2] + irand(-1, 1), 3.149439f);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int i=0;i<8;i++)
|
||||
AddWaypoint(i, SecondPortalTrashWPs2[i][0]+irand(-1, 1), SecondPortalTrashWPs2[i][1]+irand(-1, 1), SecondPortalTrashWPs2[i][2], 0);
|
||||
for(int i = 0; i < 8; i++)
|
||||
AddWaypoint(i, SecondPortalTrashWPs2[i][0] + irand(-1, 1), SecondPortalTrashWPs2[i][1] + irand(-1, 1), SecondPortalTrashWPs2[i][2], 0);
|
||||
me->SetHomePosition(SecondPortalTrashWPs2[7][0], SecondPortalTrashWPs2[7][1], SecondPortalTrashWPs2[7][2], 3.149439f);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
for(int i=0;i<8;i++)
|
||||
AddWaypoint(i, ThirdPortalTrashWPs[i][0]+irand(-1, 1), ThirdPortalTrashWPs[i][1]+irand(-1, 1), ThirdPortalTrashWPs[i][2], 0);
|
||||
for(int i = 0; i < 8; i++)
|
||||
AddWaypoint(i, ThirdPortalTrashWPs[i][0] + irand(-1, 1), ThirdPortalTrashWPs[i][1] + irand(-1, 1), ThirdPortalTrashWPs[i][2], 0);
|
||||
me->SetHomePosition(ThirdPortalTrashWPs[7][0], ThirdPortalTrashWPs[7][1], ThirdPortalTrashWPs[7][2], 3.149439f);
|
||||
break;
|
||||
case 3:
|
||||
for(int i=0;i<9;i++)
|
||||
AddWaypoint(i, FourthPortalTrashWPs[i][0]+irand(-1, 1), FourthPortalTrashWPs[i][1]+irand(-1, 1), FourthPortalTrashWPs[i][2], 0);
|
||||
for(int i = 0; i < 9; i++)
|
||||
AddWaypoint(i, FourthPortalTrashWPs[i][0] + irand(-1, 1), FourthPortalTrashWPs[i][1] + irand(-1, 1), FourthPortalTrashWPs[i][2], 0);
|
||||
me->SetHomePosition(FourthPortalTrashWPs[8][0], FourthPortalTrashWPs[8][1], FourthPortalTrashWPs[8][2], 3.149439f);
|
||||
break;
|
||||
case 4:
|
||||
for(int i=0;i<6;i++)
|
||||
AddWaypoint(i, FifthPortalTrashWPs[i][0]+irand(-1, 1), FifthPortalTrashWPs[i][1]+irand(-1, 1), FifthPortalTrashWPs[i][2], 0);
|
||||
for(int i = 0; i < 6; i++)
|
||||
AddWaypoint(i, FifthPortalTrashWPs[i][0] + irand(-1, 1), FifthPortalTrashWPs[i][1] + irand(-1, 1), FifthPortalTrashWPs[i][2], 0);
|
||||
me->SetHomePosition(FifthPortalTrashWPs[5][0], FifthPortalTrashWPs[5][1], FifthPortalTrashWPs[5][2], 3.149439f);
|
||||
break;
|
||||
case 5:
|
||||
for(int i=0;i<4;i++)
|
||||
AddWaypoint(i, SixthPoralTrashWPs[i][0]+irand(-1, 1), SixthPoralTrashWPs[i][1]+irand(-1, 1), SixthPoralTrashWPs[i][2], 0);
|
||||
for(int i = 0; i < 4; i++)
|
||||
AddWaypoint(i, SixthPoralTrashWPs[i][0] + irand(-1, 1), SixthPoralTrashWPs[i][1] + irand(-1, 1), SixthPoralTrashWPs[i][2], 0);
|
||||
me->SetHomePosition(SixthPoralTrashWPs[3][0], SixthPoralTrashWPs[3][1], SixthPoralTrashWPs[3][2], 3.149439f);
|
||||
break;
|
||||
}
|
||||
@@ -371,7 +371,7 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
if (!HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->SetHomePosition(1845.577759f+rand_norm()*5-2.5f, 800.681152f+rand_norm()*5-2.5f, 44.104248f, M_PI);
|
||||
me->SetHomePosition(1845.577759f + rand_norm() * 5 - 2.5f, 800.681152f + rand_norm() * 5 - 2.5f, 44.104248f, M_PI);
|
||||
}
|
||||
|
||||
me->DeleteThreatList();
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
|
||||
struct npc_azure_invaderAI : public violet_hold_trashAI
|
||||
{
|
||||
npc_azure_invaderAI(Creature *c) : violet_hold_trashAI(c) {}
|
||||
npc_azure_invaderAI(Creature* c) : violet_hold_trashAI(c) {}
|
||||
|
||||
uint32 uiCleaveTimer;
|
||||
uint32 uiImpaleTimer;
|
||||
@@ -510,7 +510,8 @@ public:
|
||||
{
|
||||
DoCast(me->GetVictim(), SPELL_CLEAVE);
|
||||
uiCleaveTimer = 5000;
|
||||
} else uiCleaveTimer -= diff;
|
||||
}
|
||||
else uiCleaveTimer -= diff;
|
||||
|
||||
if (uiImpaleTimer <= diff)
|
||||
{
|
||||
@@ -518,7 +519,8 @@ public:
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_IMPALE);
|
||||
uiImpaleTimer = 4000;
|
||||
} else uiImpaleTimer -= diff;
|
||||
}
|
||||
else uiImpaleTimer -= diff;
|
||||
}
|
||||
|
||||
if (me->GetEntry() == NPC_AZURE_INVADER_2)
|
||||
@@ -527,13 +529,15 @@ public:
|
||||
{
|
||||
DoCast(me->GetVictim(), SPELL_BRUTAL_STRIKE);
|
||||
uiBrutalStrikeTimer = 5000;
|
||||
} else uiBrutalStrikeTimer -= diff;
|
||||
}
|
||||
else uiBrutalStrikeTimer -= diff;
|
||||
|
||||
if (uiSunderArmorTimer <= diff)
|
||||
{
|
||||
DoCast(me->GetVictim(), SPELL_SUNDER_ARMOR);
|
||||
uiSunderArmorTimer = urand(8000, 10000);
|
||||
} else uiSunderArmorTimer -= diff;
|
||||
}
|
||||
else uiSunderArmorTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -555,7 +559,7 @@ public:
|
||||
|
||||
struct npc_azure_binderAI : public violet_hold_trashAI
|
||||
{
|
||||
npc_azure_binderAI(Creature *c) : violet_hold_trashAI(c) {}
|
||||
npc_azure_binderAI(Creature* c) : violet_hold_trashAI(c) {}
|
||||
|
||||
uint32 uiArcaneExplosionTimer;
|
||||
uint32 uiArcainBarrageTimer;
|
||||
@@ -583,7 +587,8 @@ public:
|
||||
{
|
||||
DoCast(SPELL_ARCANE_EXPLOSION);
|
||||
uiArcaneExplosionTimer = 5000;
|
||||
} else uiArcaneExplosionTimer -= diff;
|
||||
}
|
||||
else uiArcaneExplosionTimer -= diff;
|
||||
|
||||
if (uiArcainBarrageTimer <= diff)
|
||||
{
|
||||
@@ -591,7 +596,8 @@ public:
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_ARCANE_BARRAGE);
|
||||
uiArcainBarrageTimer = 6000;
|
||||
} else uiArcainBarrageTimer -= diff;
|
||||
}
|
||||
else uiArcainBarrageTimer -= diff;
|
||||
}
|
||||
|
||||
if (me->GetEntry() == NPC_AZURE_BINDER_2)
|
||||
@@ -600,7 +606,8 @@ public:
|
||||
{
|
||||
DoCast(SPELL_FROST_NOVA);
|
||||
uiFrostNovaTimer = 5000;
|
||||
} else uiFrostNovaTimer -= diff;
|
||||
}
|
||||
else uiFrostNovaTimer -= diff;
|
||||
|
||||
if (uiFrostboltTimer <= diff)
|
||||
{
|
||||
@@ -608,7 +615,8 @@ public:
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_FROSTBOLT);
|
||||
uiFrostboltTimer = 6000;
|
||||
} else uiFrostboltTimer -= diff;
|
||||
}
|
||||
else uiFrostboltTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -628,7 +636,7 @@ public:
|
||||
|
||||
struct npc_azure_mage_slayerAI : public violet_hold_trashAI
|
||||
{
|
||||
npc_azure_mage_slayerAI(Creature *c) : violet_hold_trashAI(c) {}
|
||||
npc_azure_mage_slayerAI(Creature* c) : violet_hold_trashAI(c) {}
|
||||
|
||||
uint32 uiArcaneEmpowermentTimer;
|
||||
uint32 uiSpellLockTimer;
|
||||
@@ -652,7 +660,8 @@ public:
|
||||
{
|
||||
DoCast(me, SPELL_ARCANE_EMPOWERMENT);
|
||||
uiArcaneEmpowermentTimer = 14000;
|
||||
} else uiArcaneEmpowermentTimer -= diff;
|
||||
}
|
||||
else uiArcaneEmpowermentTimer -= diff;
|
||||
}
|
||||
|
||||
if (me->GetEntry() == NPC_AZURE_MAGE_SLAYER_2)
|
||||
@@ -663,7 +672,8 @@ public:
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_SPELL_LOCK);
|
||||
uiSpellLockTimer = 9000;
|
||||
} else uiSpellLockTimer -= diff;
|
||||
}
|
||||
else uiSpellLockTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -683,7 +693,7 @@ public:
|
||||
|
||||
struct npc_azure_raiderAI : public violet_hold_trashAI
|
||||
{
|
||||
npc_azure_raiderAI(Creature *c) : violet_hold_trashAI(c) {}
|
||||
npc_azure_raiderAI(Creature* c) : violet_hold_trashAI(c) {}
|
||||
|
||||
uint32 uiConcussionBlowTimer;
|
||||
uint32 uiMagicReflectionTimer;
|
||||
@@ -705,13 +715,15 @@ public:
|
||||
{
|
||||
DoCast(me->GetVictim(), SPELL_CONCUSSION_BLOW);
|
||||
uiConcussionBlowTimer = 5000;
|
||||
} else uiConcussionBlowTimer -= diff;
|
||||
}
|
||||
else uiConcussionBlowTimer -= diff;
|
||||
|
||||
if (uiMagicReflectionTimer <= diff)
|
||||
{
|
||||
DoCast(SPELL_MAGIC_REFLECTION);
|
||||
uiMagicReflectionTimer = urand(10000, 15000);
|
||||
} else uiMagicReflectionTimer -= diff;
|
||||
}
|
||||
else uiMagicReflectionTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -730,7 +742,7 @@ public:
|
||||
|
||||
struct npc_azure_stalkerAI : public violet_hold_trashAI
|
||||
{
|
||||
npc_azure_stalkerAI(Creature *c) : violet_hold_trashAI(c) {}
|
||||
npc_azure_stalkerAI(Creature* c) : violet_hold_trashAI(c) {}
|
||||
|
||||
uint32 uiBackstabTimer;
|
||||
uint32 uiTacticalBlinkTimer;
|
||||
@@ -740,7 +752,7 @@ public:
|
||||
{
|
||||
uiBackstabTimer = 1300;
|
||||
uiTacticalBlinkTimer = 8000;
|
||||
TacticalBlinkCasted =false;
|
||||
TacticalBlinkCasted = false;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
@@ -771,7 +783,8 @@ public:
|
||||
DoCast(pTarget, SPELL_BACKSTAB);
|
||||
TacticalBlinkCasted = false;
|
||||
uiBackstabTimer = 4000;
|
||||
} else uiBackstabTimer -= diff;
|
||||
}
|
||||
else uiBackstabTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -821,7 +834,8 @@ public:
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_ARCANE_BLAST);
|
||||
uiArcaneBlastTimer = 6000;
|
||||
} else uiArcaneBlastTimer -= diff;
|
||||
}
|
||||
else uiArcaneBlastTimer -= diff;
|
||||
|
||||
if (uiSlowTimer <= diff)
|
||||
{
|
||||
@@ -829,7 +843,8 @@ public:
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_SLOW);
|
||||
uiSlowTimer = 5000;
|
||||
} else uiSlowTimer -= diff;
|
||||
}
|
||||
else uiSlowTimer -= diff;
|
||||
}
|
||||
|
||||
if (me->GetEntry() == NPC_AZURE_SPELLBREAKER_2)
|
||||
@@ -840,13 +855,15 @@ public:
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_CHAINS_OF_ICE);
|
||||
uiChainsOfIceTimer = 7000;
|
||||
} else uiChainsOfIceTimer -= diff;
|
||||
}
|
||||
else uiChainsOfIceTimer -= diff;
|
||||
|
||||
if (uiConeOfColdTimer <= diff)
|
||||
{
|
||||
DoCast(SPELL_CONE_OF_COLD);
|
||||
DoCast(SPELL_CONE_OF_COLD);
|
||||
uiConeOfColdTimer = 5000;
|
||||
} else uiConeOfColdTimer -= diff;
|
||||
}
|
||||
else uiConeOfColdTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -866,7 +883,7 @@ public:
|
||||
|
||||
struct npc_azure_captainAI : public violet_hold_trashAI
|
||||
{
|
||||
npc_azure_captainAI(Creature *c) : violet_hold_trashAI(c) {}
|
||||
npc_azure_captainAI(Creature* c) : violet_hold_trashAI(c) {}
|
||||
|
||||
uint32 uiMortalStrikeTimer;
|
||||
uint32 uiWhirlwindTimer;
|
||||
@@ -888,13 +905,15 @@ public:
|
||||
{
|
||||
DoCast(me->GetVictim(), SPELL_MORTAL_STRIKE);
|
||||
uiMortalStrikeTimer = 5000;
|
||||
} else uiMortalStrikeTimer -= diff;
|
||||
}
|
||||
else uiMortalStrikeTimer -= diff;
|
||||
|
||||
if (uiWhirlwindTimer <= diff)
|
||||
{
|
||||
DoCastAOE(SPELL_WHIRLWIND_OF_STEEL);
|
||||
uiWhirlwindTimer = 8000;
|
||||
} else uiWhirlwindTimer -= diff;
|
||||
}
|
||||
else uiWhirlwindTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -913,7 +932,7 @@ public:
|
||||
|
||||
struct npc_azure_sorcerorAI : public violet_hold_trashAI
|
||||
{
|
||||
npc_azure_sorcerorAI(Creature *c) : violet_hold_trashAI(c) {}
|
||||
npc_azure_sorcerorAI(Creature* c) : violet_hold_trashAI(c) {}
|
||||
|
||||
uint32 uiArcaneStreamTimer;
|
||||
uint32 uiArcaneStreamTimerStartingValueHolder;
|
||||
@@ -938,15 +957,17 @@ public:
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 35.0f, true);
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_ARCANE_STREAM);
|
||||
uiArcaneStreamTimer = urand(0, 5000)+5000;
|
||||
uiArcaneStreamTimer = urand(0, 5000) + 5000;
|
||||
uiArcaneStreamTimerStartingValueHolder = uiArcaneStreamTimer;
|
||||
} else uiArcaneStreamTimer -= diff;
|
||||
}
|
||||
else uiArcaneStreamTimer -= diff;
|
||||
|
||||
if (uiManaDetonationTimer <= diff && uiArcaneStreamTimer >=1500 && uiArcaneStreamTimer <= uiArcaneStreamTimerStartingValueHolder/2)
|
||||
if (uiManaDetonationTimer <= diff && uiArcaneStreamTimer >= 1500 && uiArcaneStreamTimer <= uiArcaneStreamTimerStartingValueHolder / 2)
|
||||
{
|
||||
DoCastAOE(SPELL_MANA_DETONATION);
|
||||
uiManaDetonationTimer = urand(2000, 6000);
|
||||
} else uiManaDetonationTimer -= diff;
|
||||
}
|
||||
else uiManaDetonationTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -976,7 +997,7 @@ public:
|
||||
|
||||
struct npc_azure_saboteurAI : public npc_escortAI
|
||||
{
|
||||
npc_azure_saboteurAI(Creature *c) : npc_escortAI(c)
|
||||
npc_azure_saboteurAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
uiBoss = 0;
|
||||
@@ -1037,17 +1058,17 @@ public:
|
||||
switch(uiBoss)
|
||||
{
|
||||
case 1:
|
||||
for(int i=0;i<3;i++)
|
||||
for(int i = 0; i < 3; i++)
|
||||
AddWaypoint(i, SaboteurFinalPos1[i][0], SaboteurFinalPos1[i][1], SaboteurFinalPos1[i][2], 0);
|
||||
me->SetHomePosition(SaboteurFinalPos1[2][0], SaboteurFinalPos1[2][1], SaboteurFinalPos1[2][2], 4.762346f);
|
||||
break;
|
||||
case 2:
|
||||
for(int i=0;i<3;i++)
|
||||
for(int i = 0; i < 3; i++)
|
||||
AddWaypoint(i, SaboteurFinalPos2[i][0], SaboteurFinalPos2[i][1], SaboteurFinalPos2[i][2], 0);
|
||||
me->SetHomePosition(SaboteurFinalPos2[2][0], SaboteurFinalPos2[2][1], SaboteurFinalPos2[2][2], 1.862674f);
|
||||
break;
|
||||
case 3:
|
||||
for(int i=0;i<2;i++)
|
||||
for(int i = 0; i < 2; i++)
|
||||
AddWaypoint(i, SaboteurFinalPos3[i][0], SaboteurFinalPos3[i][1], SaboteurFinalPos3[i][2], 0);
|
||||
me->SetHomePosition(SaboteurFinalPos3[1][0], SaboteurFinalPos3[1][1], SaboteurFinalPos3[1][2], 5.500638f);
|
||||
break;
|
||||
@@ -1060,7 +1081,7 @@ public:
|
||||
me->SetHomePosition(SaboteurFinalPos5[0], SaboteurFinalPos5[1], SaboteurFinalPos5[2], 1.100841f);
|
||||
break;
|
||||
case 6:
|
||||
for(int i=0;i<5;i++)
|
||||
for(int i = 0; i < 5; i++)
|
||||
AddWaypoint(i, SaboteurFinalPos6[i][0], SaboteurFinalPos6[i][1], SaboteurFinalPos6[i][2], 0);
|
||||
me->SetHomePosition(SaboteurFinalPos6[4][0], SaboteurFinalPos6[4][1], SaboteurFinalPos6[4][2], 0.983031f);
|
||||
break;
|
||||
@@ -1124,7 +1145,7 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_destroy_door_sealAuraScript)
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const * /*aurEff*/)
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* target = GetTarget())
|
||||
@@ -1138,7 +1159,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript *GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_destroy_door_sealAuraScript();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Originally written by Pussywizard - Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef DEF_VIOLET_HOLD_H
|
||||
#define DEF_VIOLET_HOLD_H
|
||||
@@ -79,7 +79,7 @@ enum VHWorldStates
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_CONTROL_CRYSTAL_ACTIVATION= 57804,
|
||||
SPELL_CONTROL_CRYSTAL_ACTIVATION = 57804,
|
||||
SPELL_ARCANE_LIGHTNING = 57912,
|
||||
SPELL_ARCANE_LIGHTNING_VISUAL = 57930,
|
||||
SPELL_PORTAL_CHANNEL = 58012,
|
||||
@@ -153,7 +153,7 @@ const Position BossStartMove6 = {1928.207031f, 852.864441f, 47.200813f, 0.0f};
|
||||
const Position CyanigosasSpawnLocation = {1930.281250f, 804.407715f, 52.410946f, 3.139621f};
|
||||
const Position MiddleRoomLocation = {1892.291260f, 805.696838f, 38.438862f, 3.139621f};
|
||||
|
||||
const uint8 PLocWPCount[6] = {6,9,8,9,6,4};
|
||||
const uint8 PLocWPCount[6] = {6, 9, 8, 9, 6, 4};
|
||||
|
||||
const Position PortalLocations[] =
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user