mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 23:26:23 +00:00
refactor(Core/Scripts): restyle scripts lib with astyle (#3467)
This commit is contained in:
@@ -136,13 +136,13 @@ enum Texts
|
||||
SAY_DEEP_BREATH,
|
||||
SAY_SLAY_P1,
|
||||
SAY_END_P1,
|
||||
SAY_PHASE_2,
|
||||
SAY_PHASE_2,
|
||||
SAY_ANTIMAGIC_SHELL,
|
||||
SAY_MAGIC_BLAST,
|
||||
SAY_SLAY_P2,
|
||||
SAY_END_P2,
|
||||
SAY_INTRO_PHASE_3,
|
||||
SAY_PHASE_3,
|
||||
SAY_PHASE_3,
|
||||
EMOTE_SURGE_OF_POWER_WARNING_P2,
|
||||
SAY_SURGE_OF_POWER,
|
||||
SAY_BUFFED_BY_SPARK,
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
struct boss_malygosAI : public ScriptedAI
|
||||
{
|
||||
boss_malygosAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
boss_malygosAI(Creature* c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
@@ -246,9 +246,9 @@ public:
|
||||
{
|
||||
float angle = me->GetOrientation();
|
||||
float dist = 75.0f;
|
||||
if (Creature *c = me->SummonCreature(NPC_PORTAL, me->GetPositionX()+cos(angle)*dist, me->GetPositionY()+sin(angle)*dist, me->GetPositionZ(), FourSidesPos[id].GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 13000))
|
||||
if (Creature* c = me->SummonCreature(NPC_PORTAL, me->GetPositionX() + cos(angle) * dist, me->GetPositionY() + sin(angle) * dist, me->GetPositionZ(), FourSidesPos[id].GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 13000))
|
||||
me->CastSpell(c, SPELL_PORTAL_BEAM, false);
|
||||
timer2 = INTRO_MOVEMENT_INTERVAL-10000;
|
||||
timer2 = INTRO_MOVEMENT_INTERVAL - 10000;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -300,7 +300,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit * /*caster*/, const SpellInfo *spell) override
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_POWER_SPARK_MALYGOS_BUFF)
|
||||
{
|
||||
@@ -344,7 +344,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32 &damage, DamageEffectType, SpellSchoolMask) override
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (damage >= me->GetHealth() && !me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE)) // allow dying only in phase 3!
|
||||
{
|
||||
@@ -388,8 +388,8 @@ public:
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAllAuras();
|
||||
float angle = CenterPos.GetAngle(me);
|
||||
float x = CenterPos.GetPositionX() + cos(angle)*35.0f;
|
||||
float y = CenterPos.GetPositionY() + sin(angle)*35.0f;
|
||||
float x = CenterPos.GetPositionX() + cos(angle) * 35.0f;
|
||||
float y = CenterPos.GetPositionY() + sin(angle) * 35.0f;
|
||||
float z = FourSidesPos[0].GetPositionZ();
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_INTRO_CENTER_AIR, x, y, z);
|
||||
@@ -419,33 +419,33 @@ public:
|
||||
|
||||
events.SetPhase(PHASE_ONE);
|
||||
events.RescheduleEvent(EVENT_BERSERK, 600000, 0);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_BREATH, urand(9000,12000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_STORM, urand(2000,5000), 1);
|
||||
events.RescheduleEvent(EVENT_SUMMON_POWER_SPARK, urand(10000,15000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_BREATH, urand(9000, 12000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_STORM, urand(2000, 5000), 1);
|
||||
events.RescheduleEvent(EVENT_SUMMON_POWER_SPARK, urand(10000, 15000), 1);
|
||||
events.RescheduleEvent(EVENT_START_VORTEX_0, 30000, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case EVENT_SPELL_ARCANE_BREATH:
|
||||
me->CastSpell(me->GetVictim(), SPELL_ARCANE_BREATH, false);
|
||||
events.RepeatEvent(urand(12000,15000));
|
||||
events.RepeatEvent(urand(12000, 15000));
|
||||
break;
|
||||
case EVENT_SPELL_ARCANE_STORM:
|
||||
me->CastCustomSpell(SPELL_ARCANE_STORM, SPELLVALUE_MAX_TARGETS, DUNGEON_MODE(5, 12), me, true);
|
||||
events.RepeatEvent(urand(10000,15000));
|
||||
events.RepeatEvent(urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_SUMMON_POWER_SPARK:
|
||||
{
|
||||
uint8 random = urand(0, 3);
|
||||
if (Creature *c = me->SummonCreature(NPC_PORTAL, FourSidesPos[random], TEMPSUMMON_TIMED_DESPAWN, 6000))
|
||||
if (Creature* c = me->SummonCreature(NPC_PORTAL, FourSidesPos[random], TEMPSUMMON_TIMED_DESPAWN, 6000))
|
||||
c->CastSpell(c, SPELL_PORTAL_BEAM, false);
|
||||
if (Creature* c = me->SummonCreature(NPC_POWER_SPARK, FourSidesPos[random], TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
{
|
||||
c->AI()->DoAction(1);
|
||||
c->AI()->Talk(EMOTE_POWER_SPARK);
|
||||
}
|
||||
|
||||
events.RepeatEvent(urand(20000,30000));
|
||||
|
||||
events.RepeatEvent(urand(20000, 30000));
|
||||
}
|
||||
break;
|
||||
case EVENT_START_VORTEX_0:
|
||||
@@ -465,14 +465,14 @@ public:
|
||||
me->SetDisableGravity(true);
|
||||
//me->SetHover(true);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->GetMotionMaster()->MoveTakeoff(MI_POINT_VORTEX_TAKEOFF, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ()+20.0f, 7.0f);
|
||||
me->GetMotionMaster()->MoveTakeoff(MI_POINT_VORTEX_TAKEOFF, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ() + 20.0f, 7.0f);
|
||||
|
||||
events.PopEvent();
|
||||
events.DelayEvents(25000, 1); // don't delay berserk (group 0)
|
||||
}
|
||||
break;
|
||||
case EVENT_VORTEX_FLY_TO_CENTER:
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_VORTEX_CENTER, CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ()+20.0f);
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_VORTEX_CENTER, CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ() + 20.0f);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_START_VORTEX_REAL:
|
||||
@@ -482,10 +482,10 @@ public:
|
||||
|
||||
{
|
||||
Position pos;
|
||||
float angle = (me->GetOrientation() >= M_PI/4 ? me->GetOrientation()-M_PI/4 : 7*M_PI/4+me->GetOrientation());
|
||||
pos.m_positionX = CenterPos.GetPositionX()+cos(angle)*40.0f;
|
||||
pos.m_positionY = CenterPos.GetPositionY()+sin(angle)*40.0f;
|
||||
pos.m_positionZ = CenterPos.GetPositionZ()+20.0f;
|
||||
float angle = (me->GetOrientation() >= M_PI / 4 ? me->GetOrientation() - M_PI / 4 : 7 * M_PI / 4 + me->GetOrientation());
|
||||
pos.m_positionX = CenterPos.GetPositionX() + cos(angle) * 40.0f;
|
||||
pos.m_positionY = CenterPos.GetPositionY() + sin(angle) * 40.0f;
|
||||
pos.m_positionZ = CenterPos.GetPositionZ() + 20.0f;
|
||||
pos.m_orientation = pos.GetAngle(&CenterPos);
|
||||
|
||||
if (Creature* vp = me->SummonCreature(NPC_WORLD_TRIGGER_LAOI, pos, TEMPSUMMON_TIMED_DESPAWN, 14000))
|
||||
@@ -493,19 +493,19 @@ public:
|
||||
vp->SetCanFly(true);
|
||||
vp->SetDisableGravity(true);
|
||||
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player *pPlayer = i->GetSource())
|
||||
if (Player* pPlayer = i->GetSource())
|
||||
{
|
||||
if (!pPlayer->IsAlive() || pPlayer->IsGameMaster())
|
||||
continue;
|
||||
|
||||
Position plrpos;
|
||||
float angle = CenterPos.GetAngle(pPlayer);
|
||||
plrpos.m_positionX = CenterPos.GetPositionX()+cos(angle)*5.0f;
|
||||
plrpos.m_positionY = CenterPos.GetPositionY()+sin(angle)*5.0f;
|
||||
plrpos.m_positionZ = CenterPos.GetPositionZ()+18.0f;
|
||||
plrpos.m_positionX = CenterPos.GetPositionX() + cos(angle) * 5.0f;
|
||||
plrpos.m_positionY = CenterPos.GetPositionY() + sin(angle) * 5.0f;
|
||||
plrpos.m_positionZ = CenterPos.GetPositionZ() + 18.0f;
|
||||
plrpos.m_orientation = plrpos.GetAngle(&CenterPos);
|
||||
|
||||
if (Creature* c = me->SummonCreature(NPC_VORTEX, plrpos, TEMPSUMMON_TIMED_DESPAWN, 15000))
|
||||
@@ -546,20 +546,20 @@ public:
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_VORTEX_LAND_1:
|
||||
{
|
||||
bLockHealthCheck = false;
|
||||
EntryCheckPredicate pred(NPC_POWER_SPARK);
|
||||
summons.DoAction(1, pred); // resume following
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED);
|
||||
if (Unit* target = me->GetVictim())
|
||||
{
|
||||
AttackStart(target);
|
||||
me->GetMotionMaster()->MoveChase(target);
|
||||
bLockHealthCheck = false;
|
||||
EntryCheckPredicate pred(NPC_POWER_SPARK);
|
||||
summons.DoAction(1, pred); // resume following
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED);
|
||||
if (Unit* target = me->GetVictim())
|
||||
{
|
||||
AttackStart(target);
|
||||
me->GetMotionMaster()->MoveChase(target);
|
||||
}
|
||||
events.PopEvent();
|
||||
events.RescheduleEvent(EVENT_START_VORTEX_0, 60000, 1);
|
||||
break;
|
||||
}
|
||||
events.PopEvent();
|
||||
events.RescheduleEvent(EVENT_START_VORTEX_0, 60000, 1);
|
||||
break;
|
||||
}
|
||||
case EVENT_START_PHASE_2:
|
||||
events.SetPhase(PHASE_TWO);
|
||||
Talk(SAY_END_P1);
|
||||
@@ -572,44 +572,44 @@ public:
|
||||
events.CancelEventGroup(1); // don't cancel berserk (group 0)
|
||||
break;
|
||||
case EVENT_START_PHASE_2_FLY_UP:
|
||||
{
|
||||
me->SendMeleeAttackStop(me->GetVictim());
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->DisableSpline();
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
//me->SetHover(true);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->GetMotionMaster()->MoveTakeoff(MI_POINT_CENTER_AIR_PH_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+32.0f, 7.0f);
|
||||
events.PopEvent();
|
||||
events.RescheduleEvent(EVENT_START_PHASE_2_MOVE_TO_SIDE, 22500, 1);
|
||||
break;
|
||||
}
|
||||
{
|
||||
me->SendMeleeAttackStop(me->GetVictim());
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->DisableSpline();
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
//me->SetHover(true);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->GetMotionMaster()->MoveTakeoff(MI_POINT_CENTER_AIR_PH_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 32.0f, 7.0f);
|
||||
events.PopEvent();
|
||||
events.RescheduleEvent(EVENT_START_PHASE_2_MOVE_TO_SIDE, 22500, 1);
|
||||
break;
|
||||
}
|
||||
case EVENT_START_PHASE_2_MOVE_TO_SIDE:
|
||||
Talk(SAY_PHASE_2);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_PACIFIED);
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_CIRCLE_OUTSIDE_PH_2, Phase2NorthPos);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_STORM, urand(12000,15000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_STORM, urand(12000, 15000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_OVERLOAD, 8000, 1);
|
||||
events.RescheduleEvent(EVENT_MOVE_TO_SURGE_OF_POWER, 55000, 1);
|
||||
events.RescheduleEvent(EVENT_CHECK_TRASH_DEAD, 3000, 1);
|
||||
|
||||
for (int i=0; i<MAX_NEXUS_LORDS; i++)
|
||||
for (int i = 0; i < MAX_NEXUS_LORDS; i++)
|
||||
{
|
||||
float dist = 22.0f;
|
||||
float angle = M_PI/2 + ((float)i/MAX_NEXUS_LORDS)*2*M_PI;
|
||||
if (Creature* disk = me->SummonCreature(NPC_HOVER_DISK, CenterPos.GetPositionX()+cos(angle)*dist, CenterPos.GetPositionY()+sin(angle)*dist, CenterPos.GetPositionZ()+30.0f, 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
float angle = M_PI / 2 + ((float)i / MAX_NEXUS_LORDS) * 2 * M_PI;
|
||||
if (Creature* disk = me->SummonCreature(NPC_HOVER_DISK, CenterPos.GetPositionX() + cos(angle) * dist, CenterPos.GetPositionY() + sin(angle) * dist, CenterPos.GetPositionZ() + 30.0f, 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
if (Creature* c = me->SummonCreature(NPC_NEXUS_LORD, *disk, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
{
|
||||
c->EnterVehicle(disk, 0);
|
||||
disk->AI()->DoAction(1); // start moving
|
||||
}
|
||||
}
|
||||
for (int i=0; i<MAX_SCIONS_OF_ETERNITY; i++)
|
||||
for (int i = 0; i < MAX_SCIONS_OF_ETERNITY; i++)
|
||||
{
|
||||
float dist = 30.0f;
|
||||
float angle = 0.0f + ((float)i/MAX_SCIONS_OF_ETERNITY)*2*M_PI;
|
||||
if (Creature* disk = me->SummonCreature(NPC_HOVER_DISK, CenterPos.GetPositionX()+cos(angle)*dist, CenterPos.GetPositionY()+sin(angle)*dist, CenterPos.GetPositionZ()+30.0f, 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
float angle = 0.0f + ((float)i / MAX_SCIONS_OF_ETERNITY) * 2 * M_PI;
|
||||
if (Creature* disk = me->SummonCreature(NPC_HOVER_DISK, CenterPos.GetPositionX() + cos(angle) * dist, CenterPos.GetPositionY() + sin(angle) * dist, CenterPos.GetPositionZ() + 30.0f, 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
if (Creature* c = me->SummonCreature(NPC_SCION_OF_ETERNITY, *disk, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
{
|
||||
c->EnterVehicle(disk, 0);
|
||||
@@ -624,11 +624,11 @@ public:
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->StopMoving();
|
||||
float dist = urand(5, 30);
|
||||
float angle = rand_norm()*2*M_PI;
|
||||
float posx = CenterPos.GetPositionX()+cos(angle)*dist;
|
||||
float posy = CenterPos.GetPositionY()+sin(angle)*dist;
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
float posx = CenterPos.GetPositionX() + cos(angle) * dist;
|
||||
float posy = CenterPos.GetPositionY() + sin(angle) * dist;
|
||||
me->SetFacingTo(me->GetAngle(posx, posy));
|
||||
me->CastSpell(posx, posy, CenterPos.GetPositionZ()+1.5f, SPELL_ARCANE_OVERLOAD, true);
|
||||
me->CastSpell(posx, posy, CenterPos.GetPositionZ() + 1.5f, SPELL_ARCANE_OVERLOAD, true);
|
||||
events.RepeatEvent(15000);
|
||||
events.RescheduleEvent(EVENT_RESUME_FLYING_CIRCLES_PH_2, 3000, 1);
|
||||
}
|
||||
@@ -637,9 +637,9 @@ public:
|
||||
{
|
||||
float angle = CenterPos.GetAngle(me);
|
||||
float dist = Phase2NorthPos.GetExactDist2d(&CenterPos);
|
||||
float newangle = angle+0.5f;
|
||||
if (newangle >= 2*M_PI) newangle -= 2*M_PI;
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_CIRCLE_OUTSIDE_PH_2, CenterPos.GetPositionX()+cos(newangle)*dist, CenterPos.GetPositionY()+sin(newangle)*dist, Phase2NorthPos.GetPositionZ());
|
||||
float newangle = angle + 0.5f;
|
||||
if (newangle >= 2 * M_PI) newangle -= 2 * M_PI;
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_CIRCLE_OUTSIDE_PH_2, CenterPos.GetPositionX() + cos(newangle)*dist, CenterPos.GetPositionY() + sin(newangle)*dist, Phase2NorthPos.GetPositionZ());
|
||||
events.PopEvent();
|
||||
}
|
||||
break;
|
||||
@@ -649,7 +649,7 @@ public:
|
||||
float angle = CenterPos.GetAngle(me);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->StopMoving();
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_SURGE_OF_POWER_CENTER, CenterPos.GetPositionX()+cos(angle)*10.0f, CenterPos.GetPositionY()+sin(angle)*10.0f, Phase2NorthPos.GetPositionZ());
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_SURGE_OF_POWER_CENTER, CenterPos.GetPositionX() + cos(angle) * 10.0f, CenterPos.GetPositionY() + sin(angle) * 10.0f, Phase2NorthPos.GetPositionZ());
|
||||
events.CancelEventGroup(1); // everything beside berserk
|
||||
}
|
||||
break;
|
||||
@@ -665,9 +665,9 @@ public:
|
||||
Talk(SAY_SURGE_OF_POWER);
|
||||
events.RescheduleEvent(EVENT_CLEAR_TARGET, 10000, 1);
|
||||
events.RescheduleEvent(EVENT_RESUME_FLYING_CIRCLES_PH_2, 10000, 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_STORM, urand(17000,25000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_STORM, urand(17000, 25000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_OVERLOAD, 16000, 1);
|
||||
events.RescheduleEvent(EVENT_MOVE_TO_SURGE_OF_POWER, 55000+10000, 1);
|
||||
events.RescheduleEvent(EVENT_MOVE_TO_SURGE_OF_POWER, 55000 + 10000, 1);
|
||||
events.RescheduleEvent(EVENT_CHECK_TRASH_DEAD, 3000, 1);
|
||||
break;
|
||||
case EVENT_CLEAR_TARGET:
|
||||
@@ -690,7 +690,7 @@ public:
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->StopMoving();
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_START_PH_3, CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ()+70.0f);
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_START_PH_3, CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ() + 70.0f);
|
||||
events.RescheduleEvent(EVENT_LIGHT_DIMENSION_CHANGE, 1000, 1);
|
||||
events.RescheduleEvent(EVENT_DESTROY_PLATFORM_0, 10000, 1);
|
||||
}
|
||||
@@ -714,20 +714,20 @@ public:
|
||||
case EVENT_MOVE_TO_PHASE_3_POSITION:
|
||||
{
|
||||
me->SendMeleeAttackStop(me->GetVictim());
|
||||
me->GetMotionMaster()->MoveTakeoff(MI_POINT_PH_3_FIGHT_POSITION, CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ()-5.0f, me->GetSpeed(MOVE_RUN));
|
||||
me->GetMotionMaster()->MoveTakeoff(MI_POINT_PH_3_FIGHT_POSITION, CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ() - 5.0f, me->GetSpeed(MOVE_RUN));
|
||||
|
||||
me->DeleteThreatList(); // players on vehicle are unattackable -> leads to EnterEvadeMode() because target is not acceptable!
|
||||
|
||||
// mount players:
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player *pPlayer = i->GetSource())
|
||||
if (Player* pPlayer = i->GetSource())
|
||||
{
|
||||
if (!pPlayer->IsAlive() || pPlayer->IsGameMaster())
|
||||
continue;
|
||||
|
||||
if (Creature* c = me->SummonCreature(NPC_WYRMREST_SKYTALON, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ()-20.0f, 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
if (Creature* c = me->SummonCreature(NPC_WYRMREST_SKYTALON, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ() - 20.0f, 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
{
|
||||
c->setFaction(pPlayer->getFaction());
|
||||
//pPlayer->CastCustomSpell(60683, SPELLVALUE_BASE_POINT0, 1, c, true);
|
||||
@@ -753,9 +753,9 @@ public:
|
||||
if (Unit* target = me->GetVictim())
|
||||
AttackStart(target);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_PULSE, 0, 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_STATIC_FIELD, urand(1000,4000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_PH3_SURGE_OF_POWER, urand(4000,7000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_STORM, urand(12000,15000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_STATIC_FIELD, urand(1000, 4000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_PH3_SURGE_OF_POWER, urand(4000, 7000), 1);
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_STORM, urand(12000, 15000), 1);
|
||||
break;
|
||||
case EVENT_SPELL_ARCANE_PULSE:
|
||||
me->CastSpell(me, SPELL_ARCANE_PULSE, true);
|
||||
@@ -788,7 +788,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim) override
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim && victim->GetGUID() == me->GetGUID())
|
||||
return;
|
||||
@@ -822,7 +822,7 @@ public:
|
||||
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_GET_DEFAULT_FOR_MAP, 1*IN_MILLISECONDS);
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_GET_DEFAULT_FOR_MAP, 1 * IN_MILLISECONDS);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
@@ -849,9 +849,9 @@ public:
|
||||
if (timer2 <= diff)
|
||||
{
|
||||
timer2 = 0;
|
||||
uint32 tmp = urand(0,3);
|
||||
uint32 tmp = urand(0, 3);
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_INTRO_SIDE_0+tmp, FourSidesPos[tmp]);
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_INTRO_SIDE_0 + tmp, FourSidesPos[tmp]);
|
||||
}
|
||||
else
|
||||
timer2 -= diff;
|
||||
@@ -879,13 +879,13 @@ public:
|
||||
{
|
||||
npc_vortex_rideAI(Creature* pCreature) : VehicleAI(pCreature)
|
||||
{
|
||||
VORTEX_RADIUS = urand(22,28);
|
||||
VORTEX_RADIUS = urand(22, 28);
|
||||
float h = urand(15, 30);
|
||||
float angle = CenterPos.GetAngle(me);
|
||||
Position pos;
|
||||
pos.m_positionX = CenterPos.GetPositionX()+VORTEX_RADIUS*cos(angle);
|
||||
pos.m_positionY = CenterPos.GetPositionY()+VORTEX_RADIUS*sin(angle);
|
||||
pos.m_positionZ = CenterPos.GetPositionZ()+h;
|
||||
pos.m_positionX = CenterPos.GetPositionX() + VORTEX_RADIUS * cos(angle);
|
||||
pos.m_positionY = CenterPos.GetPositionY() + VORTEX_RADIUS * sin(angle);
|
||||
pos.m_positionZ = CenterPos.GetPositionZ() + h;
|
||||
pos.m_orientation = pos.GetAngle(&CenterPos);
|
||||
me->SetPosition(pos);
|
||||
timer = 0;
|
||||
@@ -919,7 +919,7 @@ public:
|
||||
if (despawnTimer <= diff)
|
||||
{
|
||||
despawnTimer = 0;
|
||||
me->UpdatePosition(CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ()+18.0f, 0.0f, true);
|
||||
me->UpdatePosition(CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ() + 18.0f, 0.0f, true);
|
||||
me->StopMovingOnCurrentPos();
|
||||
if (Vehicle* vehicle = me->GetVehicleKit())
|
||||
vehicle->RemoveAllPassengers();
|
||||
@@ -932,26 +932,26 @@ public:
|
||||
if (timer <= diff)
|
||||
{
|
||||
float angle = CenterPos.GetAngle(me);
|
||||
float newangle = angle+2*M_PI/((float)VORTEX_TRAVEL_TIME/VORTEX_DEFAULT_DIFF);
|
||||
if (newangle >= 2*M_PI)
|
||||
newangle -= 2*M_PI;
|
||||
float newx = CenterPos.GetPositionX()+VORTEX_RADIUS*cos(newangle);
|
||||
float newy = CenterPos.GetPositionY()+VORTEX_RADIUS*sin(newangle);
|
||||
float newangle = angle + 2 * M_PI / ((float)VORTEX_TRAVEL_TIME / VORTEX_DEFAULT_DIFF);
|
||||
if (newangle >= 2 * M_PI)
|
||||
newangle -= 2 * M_PI;
|
||||
float newx = CenterPos.GetPositionX() + VORTEX_RADIUS * cos(newangle);
|
||||
float newy = CenterPos.GetPositionY() + VORTEX_RADIUS * sin(newangle);
|
||||
float arcangle = me->GetAngle(newx, newy);
|
||||
float dist = 2*me->GetDistance2d(newx, newy);
|
||||
float dist = 2 * me->GetDistance2d(newx, newy);
|
||||
if (me->GetVehicleKit()) if (Unit* pass = me->GetVehicleKit()->GetPassenger(0)) if (Player* plr = pass->ToPlayer())
|
||||
{
|
||||
if (!bUpdatedFlying && timer)
|
||||
{
|
||||
bUpdatedFlying = true;
|
||||
plr->SetDisableGravity(true, true);
|
||||
}
|
||||
{
|
||||
if (!bUpdatedFlying && timer)
|
||||
{
|
||||
bUpdatedFlying = true;
|
||||
plr->SetDisableGravity(true, true);
|
||||
}
|
||||
|
||||
plr->SendMonsterMove(me->GetPositionX()+dist*cos(arcangle), me->GetPositionY()+dist*sin(arcangle), me->GetPositionZ(), VORTEX_DEFAULT_DIFF*2, SPLINEFLAG_FLYING);
|
||||
me->Relocate(newx, newy);
|
||||
}
|
||||
plr->SendMonsterMove(me->GetPositionX() + dist * cos(arcangle), me->GetPositionY() + dist * sin(arcangle), me->GetPositionZ(), VORTEX_DEFAULT_DIFF * 2, SPLINEFLAG_FLYING);
|
||||
me->Relocate(newx, newy);
|
||||
}
|
||||
|
||||
timer = (diff-timer <= VORTEX_DEFAULT_DIFF) ? VORTEX_DEFAULT_DIFF - (diff-timer) : 0;
|
||||
timer = (diff - timer <= VORTEX_DEFAULT_DIFF) ? VORTEX_DEFAULT_DIFF - (diff - timer) : 0;
|
||||
}
|
||||
else
|
||||
timer -= diff;
|
||||
@@ -959,7 +959,7 @@ public:
|
||||
|
||||
void AttackStart(Unit* /*who*/) override {}
|
||||
void MoveInLineOfSight(Unit* /*who*/) override {}
|
||||
void DamageTaken(Unit*, uint32 &damage, DamageEffectType, SpellSchoolMask) override { damage = 0; }
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override { damage = 0; }
|
||||
};
|
||||
};
|
||||
|
||||
@@ -999,12 +999,12 @@ public:
|
||||
MoveTimer = 0;
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->DisableSpline();
|
||||
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+0.05f, 7.0f);
|
||||
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.05f, 7.0f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32 &damage, DamageEffectType, SpellSchoolMask) override
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
@@ -1090,8 +1090,8 @@ public:
|
||||
{
|
||||
DoZoneInCombat();
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_NEXUS_LORD_ARCANE_SHOCK, urand(3000,10000));
|
||||
events.RescheduleEvent(EVENT_NEXUS_LORD_HASTE, urand(8000,14000));
|
||||
events.RescheduleEvent(EVENT_NEXUS_LORD_ARCANE_SHOCK, urand(3000, 10000));
|
||||
events.RescheduleEvent(EVENT_NEXUS_LORD_HASTE, urand(8000, 14000));
|
||||
}
|
||||
|
||||
void AttackStart(Unit* victim) override
|
||||
@@ -1109,10 +1109,10 @@ public:
|
||||
{
|
||||
if (!victim->IsWithinMeleeRange(me))
|
||||
{
|
||||
float x,y,z;
|
||||
float x, y, z;
|
||||
victim->GetClosePoint(x, y, z, 0.0f, 1.5f, me->GetAngle(victim));
|
||||
if (Unit* v = me->GetVehicleBase())
|
||||
v->GetMotionMaster()->MovePoint(0, x, y ,z);
|
||||
v->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
}
|
||||
timer = 1000;
|
||||
}
|
||||
@@ -1136,11 +1136,11 @@ public:
|
||||
case EVENT_NEXUS_LORD_ARCANE_SHOCK:
|
||||
if (Unit* victim = me->GetVictim())
|
||||
me->CastSpell(victim, SPELL_ARCANE_SHOCK);
|
||||
events.RepeatEvent(urand(10000,15000));
|
||||
events.RepeatEvent(urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_NEXUS_LORD_HASTE:
|
||||
me->CastSpell(me, SPELL_HASTE);
|
||||
events.RepeatEvent(urand(20000,30000));
|
||||
events.RepeatEvent(urand(20000, 30000));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1174,7 +1174,7 @@ public:
|
||||
pInstance = me->GetInstanceScript();
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_TELEPORT_VISUAL, 0);
|
||||
events.RescheduleEvent(EVENT_SCION_OF_ETERNITY_ARCANE_BARRAGE, urand(20000,25000));
|
||||
events.RescheduleEvent(EVENT_SCION_OF_ETERNITY_ARCANE_BARRAGE, urand(20000, 25000));
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
@@ -1198,20 +1198,20 @@ public:
|
||||
case EVENT_SCION_OF_ETERNITY_ARCANE_BARRAGE:
|
||||
{
|
||||
std::vector<uint64> guids;
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player *pPlayer = i->GetSource())
|
||||
if (Player* pPlayer = i->GetSource())
|
||||
{
|
||||
if (!pPlayer->IsAlive() || pPlayer->IsGameMaster())
|
||||
continue;
|
||||
guids.push_back(pPlayer->GetGUID());
|
||||
}
|
||||
if (!guids.empty())
|
||||
if (Player* plr = ObjectAccessor::GetPlayer(*me, guids.at(urand(0, guids.size()-1))))
|
||||
if (Player* plr = ObjectAccessor::GetPlayer(*me, guids.at(urand(0, guids.size() - 1))))
|
||||
me->CastSpell(plr, SPELL_SCION_ARCANE_BARRAGE);
|
||||
|
||||
events.RepeatEvent(urand(5000,8000));
|
||||
events.RepeatEvent(urand(5000, 8000));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1253,7 +1253,7 @@ public:
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
|
||||
void PassengerBoarded(Unit *who, int8 /*seat*/, bool apply) override
|
||||
void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) override
|
||||
{
|
||||
events.Reset();
|
||||
if (!who)
|
||||
@@ -1307,17 +1307,16 @@ public:
|
||||
events.RescheduleEvent(EVENT_DISK_MOVE_NEXT_POINT, 0);
|
||||
break;
|
||||
case MI_POINT_NEXUS_LORD:
|
||||
if (me->GetPositionZ() > CenterPos.GetPositionZ()+2.0f)
|
||||
if (me->GetPositionZ() > CenterPos.GetPositionZ() + 2.0f)
|
||||
events.RescheduleEvent(EVENT_DISK_MOVE_NEXT_POINT, 0);
|
||||
else
|
||||
if (Vehicle* v = me->GetVehicleKit())
|
||||
if (Unit* pass = v->GetPassenger(0))
|
||||
if (Creature* c = pass->ToCreature())
|
||||
{
|
||||
c->SetReactState(REACT_AGGRESSIVE);
|
||||
if (Player* plr = c->SelectNearestPlayer(100.0f))
|
||||
c->AI()->AttackStart(plr);
|
||||
}
|
||||
else if (Vehicle* v = me->GetVehicleKit())
|
||||
if (Unit* pass = v->GetPassenger(0))
|
||||
if (Creature* c = pass->ToCreature())
|
||||
{
|
||||
c->SetReactState(REACT_AGGRESSIVE);
|
||||
if (Player* plr = c->SelectNearestPlayer(100.0f))
|
||||
c->AI()->AttackStart(plr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1335,20 +1334,20 @@ public:
|
||||
{
|
||||
float angle = CenterPos.GetAngle(me);
|
||||
float newangle = angle - 0.5f;
|
||||
if (newangle < 0.0f) newangle += 2*M_PI;
|
||||
float newz = me->GetPositionZ()-4.0f;
|
||||
if (newz<CenterPos.GetPositionZ()) newz = CenterPos.GetPositionZ();
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_NEXUS_LORD, CenterPos.GetPositionX()+cos(newangle)*22.0f, CenterPos.GetPositionY()+sin(newangle)*22.0f, newz);
|
||||
if (newangle < 0.0f) newangle += 2 * M_PI;
|
||||
float newz = me->GetPositionZ() - 4.0f;
|
||||
if (newz < CenterPos.GetPositionZ()) newz = CenterPos.GetPositionZ();
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_NEXUS_LORD, CenterPos.GetPositionX() + cos(newangle) * 22.0f, CenterPos.GetPositionY() + sin(newangle) * 22.0f, newz);
|
||||
}
|
||||
break;
|
||||
case NPC_SCION_OF_ETERNITY:
|
||||
{
|
||||
float angle = CenterPos.GetAngle(me);
|
||||
float newangle = angle - 0.3f;
|
||||
if (newangle < 0.0f) newangle += 2*M_PI;
|
||||
float newz = me->GetPositionZ()-2.0f;
|
||||
if (newz<CenterPos.GetPositionZ()+20.0f) newz = CenterPos.GetPositionZ()+20.0f;
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_SCION, CenterPos.GetPositionX()+cos(newangle)*30.0f, CenterPos.GetPositionY()+sin(newangle)*30.0f, newz);
|
||||
if (newangle < 0.0f) newangle += 2 * M_PI;
|
||||
float newz = me->GetPositionZ() - 2.0f;
|
||||
if (newz < CenterPos.GetPositionZ() + 20.0f) newz = CenterPos.GetPositionZ() + 20.0f;
|
||||
me->GetMotionMaster()->MovePoint(MI_POINT_SCION, CenterPos.GetPositionX() + cos(newangle) * 30.0f, CenterPos.GetPositionY() + sin(newangle) * 30.0f, newz);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1496,59 +1495,59 @@ public:
|
||||
|
||||
class spell_eoe_ph3_surge_of_power : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_eoe_ph3_surge_of_power() : SpellScriptLoader("spell_eoe_ph3_surge_of_power") { }
|
||||
public:
|
||||
spell_eoe_ph3_surge_of_power() : SpellScriptLoader("spell_eoe_ph3_surge_of_power") { }
|
||||
|
||||
class spell_eoe_ph3_surge_of_power_SpellScript : public SpellScript
|
||||
class spell_eoe_ph3_surge_of_power_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_eoe_ph3_surge_of_power_SpellScript);
|
||||
|
||||
uint64 DrakeGUID[3];
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
PrepareSpellScript(spell_eoe_ph3_surge_of_power_SpellScript);
|
||||
|
||||
uint64 DrakeGUID[3];
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
memset(&DrakeGUID, 0, sizeof(DrakeGUID));
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* c = caster->ToCreature())
|
||||
{
|
||||
uint8 i=0;
|
||||
std::list<Unit*> drakes;
|
||||
c->AI()->SelectTargetList(drakes, (c->GetMap()->GetSpawnMode() == 0 ? 1 : 3), SELECT_TARGET_RANDOM, 0.0f, false, 57403 /*only drakes have this aura*/);
|
||||
for (std::list<Unit*>::iterator itr = drakes.begin(); itr != drakes.end() && i < 3; ++itr)
|
||||
{
|
||||
DrakeGUID[i++] = (*itr)->GetGUID();
|
||||
if (Vehicle* v = (*itr)->GetVehicleKit())
|
||||
if (Unit* p = v->GetPassenger(0))
|
||||
if (Player* plr = p->ToPlayer())
|
||||
c->AI()->Talk(EMOTE_SURGE_OF_POWER_WARNING_P3, plr);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
memset(&DrakeGUID, 0, sizeof(DrakeGUID));
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* c = caster->ToCreature())
|
||||
{
|
||||
targets.clear();
|
||||
for (uint8 i=0; i<3; ++i)
|
||||
if (DrakeGUID[i])
|
||||
if (Unit* u = ObjectAccessor::GetUnit(*caster, DrakeGUID[i]))
|
||||
targets.push_back(u);
|
||||
uint8 i = 0;
|
||||
std::list<Unit*> drakes;
|
||||
c->AI()->SelectTargetList(drakes, (c->GetMap()->GetSpawnMode() == 0 ? 1 : 3), SELECT_TARGET_RANDOM, 0.0f, false, 57403 /*only drakes have this aura*/);
|
||||
for (std::list<Unit*>::iterator itr = drakes.begin(); itr != drakes.end() && i < 3; ++itr)
|
||||
{
|
||||
DrakeGUID[i++] = (*itr)->GetGUID();
|
||||
if (Vehicle* v = (*itr)->GetVehicleKit())
|
||||
if (Unit* p = v->GetPassenger(0))
|
||||
if (Player* plr = p->ToPlayer())
|
||||
c->AI()->Talk(EMOTE_SURGE_OF_POWER_WARNING_P3, plr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_eoe_ph3_surge_of_power_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_eoe_ph3_surge_of_power_SpellScript();
|
||||
return true;
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
targets.clear();
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
if (DrakeGUID[i])
|
||||
if (Unit* u = ObjectAccessor::GetUnit(*caster, DrakeGUID[i]))
|
||||
targets.push_back(u);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_eoe_ph3_surge_of_power_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_eoe_ph3_surge_of_power_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -80,10 +80,10 @@ const Position CenterPos = {754.395f, 1301.27f, 266.10f, 0.0f};
|
||||
|
||||
const Position FourSidesPos[] =
|
||||
{
|
||||
{686.417f, 1235.52f, 288.17f, M_PI/4},
|
||||
{828.182f, 1379.05f, 288.17f, 5*M_PI/4},
|
||||
{681.278f, 1375.796f, 288.17f, 7*M_PI/4},
|
||||
{821.182f, 1235.42f, 288.17f, 3*M_PI/4},
|
||||
{686.417f, 1235.52f, 288.17f, M_PI / 4},
|
||||
{828.182f, 1379.05f, 288.17f, 5 * M_PI / 4},
|
||||
{681.278f, 1375.796f, 288.17f, 7 * M_PI / 4},
|
||||
{821.182f, 1235.42f, 288.17f, 3 * M_PI / 4},
|
||||
};
|
||||
|
||||
const Position Phase2NorthPos = {837.22f, 1301.676f, 296.10f, M_PI};
|
||||
@@ -92,12 +92,12 @@ const uint32 MalygosIntroIntervals[] = {18000, 19000, 21000, 18000, 15000};
|
||||
|
||||
class EoEDrakeEnterVehicleEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
EoEDrakeEnterVehicleEvent(Creature& owner, uint64 playerGUID) : _owner(owner), _playerGUID(playerGUID) { }
|
||||
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override;
|
||||
private:
|
||||
Creature& _owner;
|
||||
uint64 _playerGUID;
|
||||
public:
|
||||
EoEDrakeEnterVehicleEvent(Creature& owner, uint64 playerGUID) : _owner(owner), _playerGUID(playerGUID) { }
|
||||
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override;
|
||||
private:
|
||||
Creature& _owner;
|
||||
uint64 _playerGUID;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
GO_PlatformGUID = 0;
|
||||
bPokeAchiev = false;
|
||||
}
|
||||
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
return EncounterStatus == IN_PROGRESS;
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
if (!pPlayer->IsAlive())
|
||||
return;
|
||||
|
||||
if (Creature* c = pPlayer->SummonCreature(NPC_WYRMREST_SKYTALON, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ()-20.0f, 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
if (Creature* c = pPlayer->SummonCreature(NPC_WYRMREST_SKYTALON, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ() - 20.0f, 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0))
|
||||
{
|
||||
c->SetCanFly(true);
|
||||
c->setFaction(pPlayer->getFaction());
|
||||
@@ -150,8 +150,8 @@ public:
|
||||
if (GameObject* go = instance->GetGameObject(GO_ExitPortalGUID))
|
||||
go->SetPhaseMask(1, true);
|
||||
if (Creature* c = instance->GetCreature(NPC_MalygosGUID))
|
||||
if (c->SummonCreature(NPC_ALEXSTRASZA, 798.0f, 1268.0f, 299.0f, 2.45f ,TEMPSUMMON_TIMED_DESPAWN, 604800000))
|
||||
break;
|
||||
if (c->SummonCreature(NPC_ALEXSTRASZA, 798.0f, 1268.0f, 299.0f, 2.45f, TEMPSUMMON_TIMED_DESPAWN, 604800000))
|
||||
break;
|
||||
}
|
||||
if (data == DONE)
|
||||
SaveToDB();
|
||||
@@ -177,7 +177,8 @@ public:
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case DATA_MALYGOS_GUID: return NPC_MalygosGUID;
|
||||
case DATA_MALYGOS_GUID:
|
||||
return NPC_MalygosGUID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -38,171 +38,171 @@ enum Events
|
||||
|
||||
class ChargeRifts : public BasicEvent
|
||||
{
|
||||
public:
|
||||
ChargeRifts(Creature* caster) : _caster(caster)
|
||||
{
|
||||
}
|
||||
public:
|
||||
ChargeRifts(Creature* caster) : _caster(caster)
|
||||
{
|
||||
}
|
||||
|
||||
bool Execute(uint64 /*execTime*/, uint32 /*diff*/)
|
||||
{
|
||||
_caster->AI()->Talk(EMOTE_SHIELD);
|
||||
_caster->CastSpell(_caster, SPELL_CHARGE_RIFTS, true);
|
||||
return true;
|
||||
}
|
||||
bool Execute(uint64 /*execTime*/, uint32 /*diff*/)
|
||||
{
|
||||
_caster->AI()->Talk(EMOTE_SHIELD);
|
||||
_caster->CastSpell(_caster, SPELL_CHARGE_RIFTS, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
Creature* _caster;
|
||||
private:
|
||||
Creature* _caster;
|
||||
};
|
||||
|
||||
class boss_anomalus : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_anomalus() : CreatureScript("boss_anomalus") { }
|
||||
public:
|
||||
boss_anomalus() : CreatureScript("boss_anomalus") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_anomalusAI (creature);
|
||||
}
|
||||
|
||||
struct boss_anomalusAI : public BossAI
|
||||
{
|
||||
boss_anomalusAI(Creature* creature) : BossAI(creature, DATA_ANOMALUS_EVENT)
|
||||
{
|
||||
return new boss_anomalusAI (creature);
|
||||
}
|
||||
|
||||
struct boss_anomalusAI : public BossAI
|
||||
bool achievement;
|
||||
uint16 activeRifts;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
boss_anomalusAI(Creature* creature) : BossAI(creature, DATA_ANOMALUS_EVENT)
|
||||
{
|
||||
}
|
||||
BossAI::Reset();
|
||||
achievement = true;
|
||||
me->CastSpell(me, SPELL_CLOSE_RIFTS, true);
|
||||
}
|
||||
|
||||
bool achievement;
|
||||
uint16 activeRifts;
|
||||
uint32 GetData(uint32 data) const
|
||||
{
|
||||
if (data == me->GetEntry())
|
||||
return achievement;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void SetData(uint32 type, uint32)
|
||||
{
|
||||
if (type == me->GetEntry())
|
||||
{
|
||||
BossAI::Reset();
|
||||
achievement = true;
|
||||
me->CastSpell(me, SPELL_CLOSE_RIFTS, true);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 data) const
|
||||
{
|
||||
if (data == me->GetEntry())
|
||||
return achievement;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32)
|
||||
{
|
||||
if (type == me->GetEntry())
|
||||
if (activeRifts > 0 && --activeRifts == 0 && me->HasAura(SPELL_RIFT_SHIELD))
|
||||
{
|
||||
if (activeRifts > 0 && --activeRifts == 0 && me->HasAura(SPELL_RIFT_SHIELD))
|
||||
events.DelayEvents(me->GetAura(SPELL_RIFT_SHIELD)->GetDuration() - 46000);
|
||||
me->RemoveAura(SPELL_RIFT_SHIELD);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
}
|
||||
achievement = false;
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
activeRifts++;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
BossAI::EnterCombat(who);
|
||||
|
||||
activeRifts = 0;
|
||||
events.SetTimer(45000);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_SPARK, 5000);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_HEALTH, 1000);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_SPAWN_RIFT, IsHeroic() ? 15000 : 25000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_ARCANE_ATTRACTION, 8000);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
BossAI::JustDied(killer);
|
||||
me->CastSpell(me, SPELL_CLOSE_RIFTS, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_ANOMALUS_SPARK:
|
||||
me->CastSpell(me->GetVictim(), SPELL_SPARK, false);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_SPARK, 5000);
|
||||
break;
|
||||
case EVENT_ANOMALUS_HEALTH:
|
||||
if (me->HealthBelowPct(51))
|
||||
{
|
||||
events.DelayEvents(me->GetAura(SPELL_RIFT_SHIELD)->GetDuration() - 46000);
|
||||
me->RemoveAura(SPELL_RIFT_SHIELD);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
//First time we reach 51%, the next rift going to be empowered following timings.
|
||||
events.CancelEvent(EVENT_ANOMALUS_SPAWN_RIFT);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_SPAWN_RIFT_EMPOWERED, 1000);
|
||||
break;
|
||||
}
|
||||
achievement = false;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_HEALTH, 1000);
|
||||
break;
|
||||
case EVENT_ANOMALUS_ARCANE_ATTRACTION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCANE_ATTRACTION, false);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_ARCANE_ATTRACTION, 15000);
|
||||
break;
|
||||
case EVENT_ANOMALUS_SPAWN_RIFT:
|
||||
Talk(SAY_RIFT);
|
||||
Talk(EMOTE_RIFT);
|
||||
me->CastSpell(me, SPELL_CREATE_RIFT, false);
|
||||
//Once we hit 51% hp mark, after each rift we spawn an empowered
|
||||
events.ScheduleEvent(me->HealthBelowPct(51) ? EVENT_ANOMALUS_SPAWN_RIFT_EMPOWERED : EVENT_ANOMALUS_SPAWN_RIFT, IsHeroic() ? 15000 : 25000);
|
||||
break;
|
||||
case EVENT_ANOMALUS_SPAWN_RIFT_EMPOWERED:
|
||||
Talk(SAY_RIFT);
|
||||
Talk(EMOTE_RIFT);
|
||||
|
||||
me->CastSpell(me, SPELL_CREATE_RIFT, false);
|
||||
me->CastSpell(me, SPELL_RIFT_SHIELD, true);
|
||||
me->m_Events.AddEvent(new ChargeRifts(me), me->m_Events.CalculateTime(1000));
|
||||
events.DelayEvents(46000);
|
||||
//As we just spawned an empowered spawn a normal one
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_SPAWN_RIFT, IsHeroic() ? 15000 : 25000);
|
||||
break;
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
activeRifts++;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
EnterEvadeIfOutOfCombatArea();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
BossAI::EnterCombat(who);
|
||||
|
||||
activeRifts = 0;
|
||||
events.SetTimer(45000);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_SPARK, 5000);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_HEALTH, 1000);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_SPAWN_RIFT, IsHeroic() ? 15000 : 25000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_ARCANE_ATTRACTION, 8000);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
BossAI::JustDied(killer);
|
||||
me->CastSpell(me, SPELL_CLOSE_RIFTS, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_ANOMALUS_SPARK:
|
||||
me->CastSpell(me->GetVictim(), SPELL_SPARK, false);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_SPARK, 5000);
|
||||
break;
|
||||
case EVENT_ANOMALUS_HEALTH:
|
||||
if (me->HealthBelowPct(51))
|
||||
{
|
||||
//First time we reach 51%, the next rift going to be empowered following timings.
|
||||
events.CancelEvent(EVENT_ANOMALUS_SPAWN_RIFT);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_SPAWN_RIFT_EMPOWERED, 1000);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_HEALTH, 1000);
|
||||
break;
|
||||
case EVENT_ANOMALUS_ARCANE_ATTRACTION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCANE_ATTRACTION, false);
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_ARCANE_ATTRACTION, 15000);
|
||||
break;
|
||||
case EVENT_ANOMALUS_SPAWN_RIFT:
|
||||
Talk(SAY_RIFT);
|
||||
Talk(EMOTE_RIFT);
|
||||
me->CastSpell(me, SPELL_CREATE_RIFT, false);
|
||||
//Once we hit 51% hp mark, after each rift we spawn an empowered
|
||||
events.ScheduleEvent(me->HealthBelowPct(51) ? EVENT_ANOMALUS_SPAWN_RIFT_EMPOWERED : EVENT_ANOMALUS_SPAWN_RIFT, IsHeroic() ? 15000 : 25000);
|
||||
break;
|
||||
case EVENT_ANOMALUS_SPAWN_RIFT_EMPOWERED:
|
||||
Talk(SAY_RIFT);
|
||||
Talk(EMOTE_RIFT);
|
||||
|
||||
me->CastSpell(me, SPELL_CREATE_RIFT, false);
|
||||
me->CastSpell(me, SPELL_RIFT_SHIELD, true);
|
||||
me->m_Events.AddEvent(new ChargeRifts(me), me->m_Events.CalculateTime(1000));
|
||||
events.DelayEvents(46000);
|
||||
//As we just spawned an empowered spawn a normal one
|
||||
events.ScheduleEvent(EVENT_ANOMALUS_SPAWN_RIFT, IsHeroic() ? 15000 : 25000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
EnterEvadeIfOutOfCombatArea();
|
||||
}
|
||||
|
||||
bool CheckEvadeIfOutOfCombatArea() const
|
||||
{
|
||||
return me->GetHomePosition().GetExactDist2d(me) > 60.0f;
|
||||
}
|
||||
};
|
||||
bool CheckEvadeIfOutOfCombatArea() const
|
||||
{
|
||||
return me->GetHomePosition().GetExactDist2d(me) > 60.0f;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class achievement_chaos_theory : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_chaos_theory() : AchievementCriteriaScript("achievement_chaos_theory")
|
||||
{
|
||||
}
|
||||
public:
|
||||
achievement_chaos_theory() : AchievementCriteriaScript("achievement_chaos_theory")
|
||||
{
|
||||
}
|
||||
|
||||
bool OnCheck(Player* /*player*/, Unit* target)
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
bool OnCheck(Player* /*player*/, Unit* target)
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
return target->GetAI()->GetData(target->GetEntry());
|
||||
}
|
||||
return target->GetAI()->GetData(target->GetEntry());
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_anomalus()
|
||||
|
||||
@@ -32,85 +32,85 @@ enum Says
|
||||
|
||||
class boss_commander_stoutbeard : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_commander_stoutbeard() : CreatureScript("boss_commander_stoutbeard") { }
|
||||
public:
|
||||
boss_commander_stoutbeard() : CreatureScript("boss_commander_stoutbeard") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return GetInstanceAI<boss_commander_stoutbeardAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_commander_stoutbeardAI : public BossAI
|
||||
{
|
||||
boss_commander_stoutbeardAI(Creature* creature) : BossAI(creature, DATA_COMMANDER_EVENT)
|
||||
{
|
||||
return GetInstanceAI<boss_commander_stoutbeardAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_commander_stoutbeardAI : public BossAI
|
||||
void Reset()
|
||||
{
|
||||
boss_commander_stoutbeardAI(Creature* creature) : BossAI(creature, DATA_COMMANDER_EVENT)
|
||||
BossAI::Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
BossAI::EnterCombat(who);
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
events.ScheduleEvent(EVENT_BATTLE_SHOUT, 0);
|
||||
events.ScheduleEvent(EVENT_FRIGHTENING_SHOUT, 10000);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, 15000);
|
||||
events.ScheduleEvent(EVENT_COMMANDER_CHARGE, 1000);
|
||||
me->RemoveAllAuras();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit*)
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6000);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_BATTLE_SHOUT:
|
||||
me->CastSpell(me, SPELL_BATTLE_SHOUT, true);
|
||||
events.ScheduleEvent(EVENT_BATTLE_SHOUT, 120000);
|
||||
break;
|
||||
case EVENT_FRIGHTENING_SHOUT:
|
||||
me->CastSpell(me->GetVictim(), SPELL_FRIGHTENING_SHOUT, false);
|
||||
events.ScheduleEvent(EVENT_FRIGHTENING_SHOUT, urand(15000, 20000));
|
||||
break;
|
||||
case EVENT_WHIRLWIND:
|
||||
me->CastSpell(me, SPELL_WHIRLWIND, false);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, 16000);
|
||||
break;
|
||||
case EVENT_COMMANDER_CHARGE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0, 25.0f))
|
||||
me->CastSpell(target, SPELL_CHARGE, false);
|
||||
events.ScheduleEvent(EVENT_COMMANDER_CHARGE, 20000);
|
||||
break;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
BossAI::Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
BossAI::EnterCombat(who);
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
events.ScheduleEvent(EVENT_BATTLE_SHOUT, 0);
|
||||
events.ScheduleEvent(EVENT_FRIGHTENING_SHOUT, 10000);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, 15000);
|
||||
events.ScheduleEvent(EVENT_COMMANDER_CHARGE, 1000);
|
||||
me->RemoveAllAuras();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit*)
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6000);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_BATTLE_SHOUT:
|
||||
me->CastSpell(me, SPELL_BATTLE_SHOUT, true);
|
||||
events.ScheduleEvent(EVENT_BATTLE_SHOUT, 120000);
|
||||
break;
|
||||
case EVENT_FRIGHTENING_SHOUT:
|
||||
me->CastSpell(me->GetVictim(), SPELL_FRIGHTENING_SHOUT, false);
|
||||
events.ScheduleEvent(EVENT_FRIGHTENING_SHOUT, urand(15000, 20000));
|
||||
break;
|
||||
case EVENT_WHIRLWIND:
|
||||
me->CastSpell(me, SPELL_WHIRLWIND, false);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, 16000);
|
||||
break;
|
||||
case EVENT_COMMANDER_CHARGE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0, 25.0f))
|
||||
me->CastSpell(target, SPELL_CHARGE, false);
|
||||
events.ScheduleEvent(EVENT_COMMANDER_CHARGE, 20000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_commander_stoutbeard()
|
||||
|
||||
@@ -41,158 +41,158 @@ enum Events
|
||||
|
||||
class boss_keristrasza : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_keristrasza() : CreatureScript("boss_keristrasza") { }
|
||||
public:
|
||||
boss_keristrasza() : CreatureScript("boss_keristrasza") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return GetInstanceAI<boss_keristraszaAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_keristraszaAI : public BossAI
|
||||
{
|
||||
boss_keristraszaAI(Creature* creature) : BossAI(creature, DATA_KERISTRASZA_EVENT)
|
||||
{
|
||||
return GetInstanceAI<boss_keristraszaAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_keristraszaAI : public BossAI
|
||||
std::set<uint32> aGuids;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
boss_keristraszaAI(Creature* creature) : BossAI(creature, DATA_KERISTRASZA_EVENT)
|
||||
BossAI::Reset();
|
||||
RemovePrison(CanRemovePrison());
|
||||
aGuids.clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
BossAI::EnterCombat(who);
|
||||
|
||||
me->CastSpell(me, SPELL_INTENSE_COLD, true);
|
||||
events.ScheduleEvent(EVENT_CRYSTALFIRE_BREATH, 14000);
|
||||
events.ScheduleEvent(EVENT_CRYSTAL_CHAINS, DUNGEON_MODE(20000, 11000));
|
||||
events.ScheduleEvent(EVENT_TAIL_SWEEP, 5000);
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
|
||||
events.ScheduleEvent(EVENT_ACHIEVEMENT_CHECK, 1000);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
BossAI::JustDied(killer);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit*)
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6000);
|
||||
}
|
||||
}
|
||||
|
||||
std::set<uint32> aGuids;
|
||||
void SetData(uint32 type, uint32)
|
||||
{
|
||||
if (type == me->GetEntry() && CanRemovePrison())
|
||||
RemovePrison(true);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
bool CanRemovePrison()
|
||||
{
|
||||
for (uint8 i = DATA_TELESTRA_ORB; i <= DATA_ORMOROK_ORB; ++i)
|
||||
if (instance->GetBossState(i) != DONE)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void RemovePrison(bool remove)
|
||||
{
|
||||
if (remove)
|
||||
{
|
||||
BossAI::Reset();
|
||||
RemovePrison(CanRemovePrison());
|
||||
aGuids.clear();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
else
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
BossAI::EnterCombat(who);
|
||||
|
||||
me->CastSpell(me, SPELL_INTENSE_COLD, true);
|
||||
events.ScheduleEvent(EVENT_CRYSTALFIRE_BREATH, 14000);
|
||||
events.ScheduleEvent(EVENT_CRYSTAL_CHAINS, DUNGEON_MODE(20000,11000));
|
||||
events.ScheduleEvent(EVENT_TAIL_SWEEP, 5000);
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
|
||||
events.ScheduleEvent(EVENT_ACHIEVEMENT_CHECK, 1000);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->CastSpell(me, SPELL_FROZEN_PRISON, true);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
uint32 GetData(uint32 guid) const
|
||||
{
|
||||
return aGuids.find(guid) == aGuids.end();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
BossAI::JustDied(killer);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit*)
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6000);
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32)
|
||||
{
|
||||
if (type == me->GetEntry() && CanRemovePrison())
|
||||
RemovePrison(true);
|
||||
}
|
||||
|
||||
bool CanRemovePrison()
|
||||
{
|
||||
for (uint8 i = DATA_TELESTRA_ORB; i <= DATA_ORMOROK_ORB; ++i)
|
||||
if (instance->GetBossState(i) != DONE)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void RemovePrison(bool remove)
|
||||
{
|
||||
if (remove)
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->CastSpell(me, SPELL_FROZEN_PRISON, true);
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 guid) const
|
||||
{
|
||||
return aGuids.find(guid) == aGuids.end();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_HEALTH_CHECK:
|
||||
if (me->HealthBelowPct(26))
|
||||
{
|
||||
Talk(SAY_ENRAGE);
|
||||
Talk(EMOTE_FRENZY);
|
||||
me->CastSpell(me, SPELL_ENRAGE, true);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
|
||||
case EVENT_HEALTH_CHECK:
|
||||
if (me->HealthBelowPct(26))
|
||||
{
|
||||
Talk(SAY_ENRAGE);
|
||||
Talk(EMOTE_FRENZY);
|
||||
me->CastSpell(me, SPELL_ENRAGE, true);
|
||||
break;
|
||||
case EVENT_ACHIEVEMENT_CHECK:
|
||||
}
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
|
||||
break;
|
||||
case EVENT_ACHIEVEMENT_CHECK:
|
||||
{
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
|
||||
if (Aura *aur = itr->GetSource()->GetAura(SPELL_INTENSE_COLD_TRIGGER))
|
||||
if (Aura* aur = itr->GetSource()->GetAura(SPELL_INTENSE_COLD_TRIGGER))
|
||||
if (aur->GetStackAmount() > 2)
|
||||
aGuids.insert(itr->GetSource()->GetGUIDLow());
|
||||
events.ScheduleEvent(EVENT_ACHIEVEMENT_CHECK, 500);
|
||||
break;
|
||||
}
|
||||
case EVENT_CRYSTALFIRE_BREATH:
|
||||
me->CastSpell(me->GetVictim(), SPELL_CRYSTALFIRE_BREATH, false);
|
||||
events.ScheduleEvent(EVENT_CRYSTALFIRE_BREATH, 14000);
|
||||
break;
|
||||
case EVENT_TAIL_SWEEP:
|
||||
me->CastSpell(me, SPELL_TAIL_SWEEP, false);
|
||||
events.ScheduleEvent(EVENT_TAIL_SWEEP, 5000);
|
||||
break;
|
||||
case EVENT_CRYSTAL_CHAINS:
|
||||
Talk(SAY_CRYSTAL_NOVA);
|
||||
if (IsHeroic())
|
||||
me->CastSpell(me, SPELL_CRYSTALIZE, false);
|
||||
else if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
me->CastSpell(target, SPELL_CRYSTAL_CHAINS, false);
|
||||
events.ScheduleEvent(EVENT_CRYSTAL_CHAINS, DUNGEON_MODE(20000, 11000));
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
case EVENT_CRYSTALFIRE_BREATH:
|
||||
me->CastSpell(me->GetVictim(), SPELL_CRYSTALFIRE_BREATH, false);
|
||||
events.ScheduleEvent(EVENT_CRYSTALFIRE_BREATH, 14000);
|
||||
break;
|
||||
case EVENT_TAIL_SWEEP:
|
||||
me->CastSpell(me, SPELL_TAIL_SWEEP, false);
|
||||
events.ScheduleEvent(EVENT_TAIL_SWEEP, 5000);
|
||||
break;
|
||||
case EVENT_CRYSTAL_CHAINS:
|
||||
Talk(SAY_CRYSTAL_NOVA);
|
||||
if (IsHeroic())
|
||||
me->CastSpell(me, SPELL_CRYSTALIZE, false);
|
||||
else if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
me->CastSpell(target, SPELL_CRYSTAL_CHAINS, false);
|
||||
events.ScheduleEvent(EVENT_CRYSTAL_CHAINS, DUNGEON_MODE(20000, 11000));
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class achievement_intense_cold : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_intense_cold() : AchievementCriteriaScript("achievement_intense_cold")
|
||||
{
|
||||
}
|
||||
public:
|
||||
achievement_intense_cold() : AchievementCriteriaScript("achievement_intense_cold")
|
||||
{
|
||||
}
|
||||
|
||||
bool OnCheck(Player* player, Unit* target)
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
bool OnCheck(Player* player, Unit* target)
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
return target->GetAI()->GetData(player->GetGUIDLow());
|
||||
}
|
||||
return target->GetAI()->GetData(player->GetGUIDLow());
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_keristrasza()
|
||||
|
||||
@@ -11,7 +11,7 @@ enum Spells
|
||||
// Main
|
||||
SPELL_ICE_NOVA = 47772,
|
||||
SPELL_FIREBOMB = 47773,
|
||||
|
||||
|
||||
SPELL_GRAVITY_WELL = 47756,
|
||||
SPELL_TELESTRA_BACK = 47714,
|
||||
SPELL_BURNING_WINDS = 46308,
|
||||
@@ -62,270 +62,270 @@ enum Events
|
||||
|
||||
class boss_magus_telestra : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_magus_telestra() : CreatureScript("boss_magus_telestra") { }
|
||||
public:
|
||||
boss_magus_telestra() : CreatureScript("boss_magus_telestra") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return GetInstanceAI<boss_magus_telestraAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_magus_telestraAI : public BossAI
|
||||
{
|
||||
boss_magus_telestraAI(Creature* creature) : BossAI(creature, DATA_MAGUS_TELESTRA_EVENT)
|
||||
{
|
||||
return GetInstanceAI<boss_magus_telestraAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_magus_telestraAI : public BossAI
|
||||
uint8 copiesDied;
|
||||
bool achievement;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
boss_magus_telestraAI(Creature* creature) : BossAI(creature, DATA_MAGUS_TELESTRA_EVENT)
|
||||
BossAI::Reset();
|
||||
copiesDied = 0;
|
||||
achievement = true;
|
||||
|
||||
if (IsHeroic() && sGameEventMgr->IsActiveEvent(GAME_EVENT_WINTER_VEIL) && !me->HasAura(SPELL_WEAR_CHRISTMAS_HAT))
|
||||
me->AddAura(SPELL_WEAR_CHRISTMAS_HAT, me);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 data) const
|
||||
{
|
||||
if (data == me->GetEntry())
|
||||
return achievement;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
BossAI::EnterCombat(who);
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
events.ScheduleEvent(EVENT_MAGUS_ICE_NOVA, 10000);
|
||||
events.ScheduleEvent(EVENT_MAGUS_FIREBOMB, 0);
|
||||
events.ScheduleEvent(EVENT_MAGUS_GRAVITY_WELL, 20000);
|
||||
events.ScheduleEvent(EVENT_MAGUS_HEALTH1, 1000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_MAGUS_HEALTH2, 1000);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (who && me->Attack(who, true))
|
||||
me->GetMotionMaster()->MoveChase(who, 20.0f);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit*)
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6000);
|
||||
}
|
||||
}
|
||||
|
||||
uint8 copiesDied;
|
||||
bool achievement;
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void SpellHit(Unit* caster, const SpellInfo* spellInfo)
|
||||
{
|
||||
if (spellInfo->Id >= SPELL_FIRE_MAGUS_DEATH && spellInfo->Id <= SPELL_ARCANE_MAGUS_DEATH && caster->ToCreature())
|
||||
{
|
||||
BossAI::Reset();
|
||||
copiesDied = 0;
|
||||
achievement = true;
|
||||
events.ScheduleEvent(EVENT_MAGUS_FAIL_ACHIEVEMENT, 5000);
|
||||
caster->ToCreature()->DespawnOrUnsummon(1000);
|
||||
|
||||
if (IsHeroic() && sGameEventMgr->IsActiveEvent(GAME_EVENT_WINTER_VEIL) && !me->HasAura(SPELL_WEAR_CHRISTMAS_HAT))
|
||||
me->AddAura(SPELL_WEAR_CHRISTMAS_HAT, me);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 data) const
|
||||
{
|
||||
if (data == me->GetEntry())
|
||||
return achievement;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
BossAI::EnterCombat(who);
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
events.ScheduleEvent(EVENT_MAGUS_ICE_NOVA, 10000);
|
||||
events.ScheduleEvent(EVENT_MAGUS_FIREBOMB, 0);
|
||||
events.ScheduleEvent(EVENT_MAGUS_GRAVITY_WELL, 20000);
|
||||
events.ScheduleEvent(EVENT_MAGUS_HEALTH1, 1000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_MAGUS_HEALTH2, 1000);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (who && me->Attack(who, true))
|
||||
me->GetMotionMaster()->MoveChase(who, 20.0f);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit*)
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
if (++copiesDied >= 3)
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6000);
|
||||
copiesDied = 0;
|
||||
events.CancelEvent(EVENT_MAGUS_FAIL_ACHIEVEMENT);
|
||||
events.ScheduleEvent(EVENT_MAGUS_MERGED, 5000);
|
||||
me->CastSpell(me, SPELL_BURNING_WINDS, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spellInfo)
|
||||
{
|
||||
if (spellInfo->Id >= SPELL_FIRE_MAGUS_DEATH && spellInfo->Id <= SPELL_ARCANE_MAGUS_DEATH && caster->ToCreature())
|
||||
{
|
||||
events.ScheduleEvent(EVENT_MAGUS_FAIL_ACHIEVEMENT, 5000);
|
||||
caster->ToCreature()->DespawnOrUnsummon(1000);
|
||||
|
||||
if (++copiesDied >= 3)
|
||||
case EVENT_MAGUS_HEALTH1:
|
||||
if (me->HealthBelowPct(51))
|
||||
{
|
||||
copiesDied = 0;
|
||||
events.CancelEvent(EVENT_MAGUS_FAIL_ACHIEVEMENT);
|
||||
events.ScheduleEvent(EVENT_MAGUS_MERGED, 5000);
|
||||
me->CastSpell(me, SPELL_BURNING_WINDS, true);
|
||||
me->CastSpell(me, SPELL_START_SUMMON_CLONES, false);
|
||||
events.ScheduleEvent(EVENT_MAGUS_RELOCATE, 3500);
|
||||
Talk(SAY_SPLIT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
events.ScheduleEvent(EVENT_MAGUS_HEALTH1, 1000);
|
||||
break;
|
||||
case EVENT_MAGUS_HEALTH2:
|
||||
if (me->HealthBelowPct(11))
|
||||
{
|
||||
me->CastSpell(me, SPELL_START_SUMMON_CLONES, false);
|
||||
events.ScheduleEvent(EVENT_MAGUS_RELOCATE, 3500);
|
||||
Talk(SAY_SPLIT);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_MAGUS_HEALTH2, 1000);
|
||||
break;
|
||||
case EVENT_MAGUS_FIREBOMB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->CastSpell(target, SPELL_FIREBOMB, false);
|
||||
events.ScheduleEvent(EVENT_MAGUS_FIREBOMB, 3000);
|
||||
break;
|
||||
case EVENT_MAGUS_ICE_NOVA:
|
||||
me->CastSpell(me, SPELL_ICE_NOVA, false);
|
||||
events.ScheduleEvent(EVENT_MAGUS_ICE_NOVA, 15000);
|
||||
break;
|
||||
case EVENT_MAGUS_GRAVITY_WELL:
|
||||
me->CastSpell(me, SPELL_GRAVITY_WELL, false);
|
||||
events.ScheduleEvent(EVENT_MAGUS_GRAVITY_WELL, 15000);
|
||||
break;
|
||||
case EVENT_MAGUS_FAIL_ACHIEVEMENT:
|
||||
achievement = false;
|
||||
break;
|
||||
case EVENT_MAGUS_RELOCATE:
|
||||
me->NearTeleportTo(505.04f, 88.915f, -16.13f, 2.98f);
|
||||
break;
|
||||
case EVENT_MAGUS_MERGED:
|
||||
me->CastSpell(me, SPELL_TELESTRA_BACK, true);
|
||||
me->RemoveAllAuras();
|
||||
Talk(SAY_MERGE);
|
||||
break;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_MAGUS_HEALTH1:
|
||||
if (me->HealthBelowPct(51))
|
||||
{
|
||||
me->CastSpell(me, SPELL_START_SUMMON_CLONES, false);
|
||||
events.ScheduleEvent(EVENT_MAGUS_RELOCATE, 3500);
|
||||
Talk(SAY_SPLIT);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_MAGUS_HEALTH1, 1000);
|
||||
break;
|
||||
case EVENT_MAGUS_HEALTH2:
|
||||
if (me->HealthBelowPct(11))
|
||||
{
|
||||
me->CastSpell(me, SPELL_START_SUMMON_CLONES, false);
|
||||
events.ScheduleEvent(EVENT_MAGUS_RELOCATE, 3500);
|
||||
Talk(SAY_SPLIT);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_MAGUS_HEALTH2, 1000);
|
||||
break;
|
||||
case EVENT_MAGUS_FIREBOMB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->CastSpell(target, SPELL_FIREBOMB, false);
|
||||
events.ScheduleEvent(EVENT_MAGUS_FIREBOMB, 3000);
|
||||
break;
|
||||
case EVENT_MAGUS_ICE_NOVA:
|
||||
me->CastSpell(me, SPELL_ICE_NOVA, false);
|
||||
events.ScheduleEvent(EVENT_MAGUS_ICE_NOVA, 15000);
|
||||
break;
|
||||
case EVENT_MAGUS_GRAVITY_WELL:
|
||||
me->CastSpell(me, SPELL_GRAVITY_WELL, false);
|
||||
events.ScheduleEvent(EVENT_MAGUS_GRAVITY_WELL, 15000);
|
||||
break;
|
||||
case EVENT_MAGUS_FAIL_ACHIEVEMENT:
|
||||
achievement = false;
|
||||
break;
|
||||
case EVENT_MAGUS_RELOCATE:
|
||||
me->NearTeleportTo(505.04f, 88.915f, -16.13f, 2.98f);
|
||||
break;
|
||||
case EVENT_MAGUS_MERGED:
|
||||
me->CastSpell(me, SPELL_TELESTRA_BACK, true);
|
||||
me->RemoveAllAuras();
|
||||
Talk(SAY_MERGE);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_boss_magus_telestra_summon_telestra_clones : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_boss_magus_telestra_summon_telestra_clones() : SpellScriptLoader("spell_boss_magus_telestra_summon_telestra_clones") { }
|
||||
public:
|
||||
spell_boss_magus_telestra_summon_telestra_clones() : SpellScriptLoader("spell_boss_magus_telestra_summon_telestra_clones") { }
|
||||
|
||||
class spell_boss_magus_telestra_summon_telestra_clones_AuraScript : public AuraScript
|
||||
class spell_boss_magus_telestra_summon_telestra_clones_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_boss_magus_telestra_summon_telestra_clones_AuraScript);
|
||||
|
||||
bool Load()
|
||||
{
|
||||
PrepareAuraScript(spell_boss_magus_telestra_summon_telestra_clones_AuraScript);
|
||||
|
||||
bool Load()
|
||||
{
|
||||
return GetUnitOwner()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_FIRE_MAGUS_SUMMON, true);
|
||||
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_FROST_MAGUS_SUMMON, true);
|
||||
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_ARCANE_MAGUS_SUMMON, true);
|
||||
|
||||
GetUnitOwner()->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
GetUnitOwner()->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
GetUnitOwner()->ToCreature()->LoadEquipment(0, true);
|
||||
|
||||
}
|
||||
|
||||
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
GetUnitOwner()->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
GetUnitOwner()->ToCreature()->LoadEquipment(1, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_boss_magus_telestra_summon_telestra_clones_AuraScript::HandleApply, EFFECT_1, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL);
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_boss_magus_telestra_summon_telestra_clones_AuraScript::HandleRemove, EFFECT_1, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_boss_magus_telestra_summon_telestra_clones_AuraScript();
|
||||
return GetUnitOwner()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_FIRE_MAGUS_SUMMON, true);
|
||||
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_FROST_MAGUS_SUMMON, true);
|
||||
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_ARCANE_MAGUS_SUMMON, true);
|
||||
|
||||
GetUnitOwner()->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
GetUnitOwner()->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
GetUnitOwner()->ToCreature()->LoadEquipment(0, true);
|
||||
|
||||
}
|
||||
|
||||
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
GetUnitOwner()->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
GetUnitOwner()->ToCreature()->LoadEquipment(1, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_boss_magus_telestra_summon_telestra_clones_AuraScript::HandleApply, EFFECT_1, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL);
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_boss_magus_telestra_summon_telestra_clones_AuraScript::HandleRemove, EFFECT_1, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_boss_magus_telestra_summon_telestra_clones_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_boss_magus_telestra_gravity_well : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_boss_magus_telestra_gravity_well() : SpellScriptLoader("spell_boss_magus_telestra_gravity_well") { }
|
||||
public:
|
||||
spell_boss_magus_telestra_gravity_well() : SpellScriptLoader("spell_boss_magus_telestra_gravity_well") { }
|
||||
|
||||
class spell_boss_magus_telestra_gravity_well_SpellScript : public SpellScript
|
||||
class spell_boss_magus_telestra_gravity_well_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_boss_magus_telestra_gravity_well_SpellScript);
|
||||
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
PrepareSpellScript(spell_boss_magus_telestra_gravity_well_SpellScript);
|
||||
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(acore::RandomCheck(50));
|
||||
}
|
||||
|
||||
void HandlePull(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
Unit* target = GetHitUnit();
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
Position pos;
|
||||
if (target->GetDistance(GetCaster()) < 5.0f)
|
||||
{
|
||||
pos.Relocate(GetCaster()->GetPositionX(), GetCaster()->GetPositionY(), GetCaster()->GetPositionZ()+1.0f);
|
||||
float o = frand(0, 2*M_PI);
|
||||
target->MovePositionToFirstCollision(pos, 20.0f, o);
|
||||
pos.m_positionZ += frand(5.0f, 15.0f);
|
||||
}
|
||||
else
|
||||
pos.Relocate(GetCaster()->GetPositionX(), GetCaster()->GetPositionY(), GetCaster()->GetPositionZ()+1.0f);
|
||||
|
||||
float speedXY = float(GetSpellInfo()->Effects[effIndex].MiscValue) * 0.1f;
|
||||
float speedZ = target->GetDistance(pos) / speedXY * 0.5f * Movement::gravity;
|
||||
|
||||
target->GetMotionMaster()->MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_boss_magus_telestra_gravity_well_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_boss_magus_telestra_gravity_well_SpellScript::HandlePull, EFFECT_0, SPELL_EFFECT_PULL_TOWARDS_DEST);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_boss_magus_telestra_gravity_well_SpellScript();
|
||||
targets.remove_if(acore::RandomCheck(50));
|
||||
}
|
||||
|
||||
void HandlePull(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
Unit* target = GetHitUnit();
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
Position pos;
|
||||
if (target->GetDistance(GetCaster()) < 5.0f)
|
||||
{
|
||||
pos.Relocate(GetCaster()->GetPositionX(), GetCaster()->GetPositionY(), GetCaster()->GetPositionZ() + 1.0f);
|
||||
float o = frand(0, 2 * M_PI);
|
||||
target->MovePositionToFirstCollision(pos, 20.0f, o);
|
||||
pos.m_positionZ += frand(5.0f, 15.0f);
|
||||
}
|
||||
else
|
||||
pos.Relocate(GetCaster()->GetPositionX(), GetCaster()->GetPositionY(), GetCaster()->GetPositionZ() + 1.0f);
|
||||
|
||||
float speedXY = float(GetSpellInfo()->Effects[effIndex].MiscValue) * 0.1f;
|
||||
float speedZ = target->GetDistance(pos) / speedXY * 0.5f * Movement::gravity;
|
||||
|
||||
target->GetMotionMaster()->MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_boss_magus_telestra_gravity_well_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_boss_magus_telestra_gravity_well_SpellScript::HandlePull, EFFECT_0, SPELL_EFFECT_PULL_TOWARDS_DEST);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_boss_magus_telestra_gravity_well_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_split_personality : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_split_personality() : AchievementCriteriaScript("achievement_split_personality")
|
||||
{
|
||||
}
|
||||
public:
|
||||
achievement_split_personality() : AchievementCriteriaScript("achievement_split_personality")
|
||||
{
|
||||
}
|
||||
|
||||
bool OnCheck(Player* /*player*/, Unit* target)
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
bool OnCheck(Player* /*player*/, Unit* target)
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
return target->GetAI()->GetData(target->GetEntry());
|
||||
}
|
||||
return target->GetAI()->GetData(target->GetEntry());
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_magus_telestra()
|
||||
|
||||
@@ -49,167 +49,167 @@ enum Misc
|
||||
|
||||
class boss_ormorok : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_ormorok() : CreatureScript("boss_ormorok") { }
|
||||
public:
|
||||
boss_ormorok() : CreatureScript("boss_ormorok") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return GetInstanceAI<boss_ormorokAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_ormorokAI : public BossAI
|
||||
{
|
||||
boss_ormorokAI(Creature* creature) : BossAI(creature, DATA_ORMOROK_EVENT)
|
||||
{
|
||||
return GetInstanceAI<boss_ormorokAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_ormorokAI : public BossAI
|
||||
uint8 _spikesCount;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
boss_ormorokAI(Creature* creature) : BossAI(creature, DATA_ORMOROK_EVENT)
|
||||
_spikesCount = 0;
|
||||
BossAI::Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
BossAI::EnterCombat(who);
|
||||
|
||||
events.ScheduleEvent(EVENT_ORMOROK_CRYSTAL_SPIKES, 12000);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_TRAMPLE, 10000);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SPELL_REFLECTION, 30000);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_HEALTH, 1000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SUMMON, 17000);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
BossAI::JustDied(killer);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6000);
|
||||
}
|
||||
}
|
||||
|
||||
uint8 _spikesCount;
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
_spikesCount = 0;
|
||||
BossAI::Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
BossAI::EnterCombat(who);
|
||||
|
||||
events.ScheduleEvent(EVENT_ORMOROK_CRYSTAL_SPIKES, 12000);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_TRAMPLE, 10000);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SPELL_REFLECTION, 30000);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_HEALTH, 1000);
|
||||
if (IsHeroic())
|
||||
case EVENT_ORMOROK_HEALTH:
|
||||
if (me->HealthBelowPct(26))
|
||||
{
|
||||
me->CastSpell(me, SPELL_FRENZY, true);
|
||||
Talk(EMOTE_FRENZY);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_ORMOROK_HEALTH, 1000);
|
||||
break;
|
||||
case EVENT_ORMOROK_TRAMPLE:
|
||||
me->CastSpell(me, SPELL_TRAMPLE, false);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_TRAMPLE, 10000);
|
||||
break;
|
||||
case EVENT_ORMOROK_SPELL_REFLECTION:
|
||||
Talk(SAY_REFLECT);
|
||||
me->CastSpell(me, SPELL_SPELL_REFLECTION, false);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SPELL_REFLECTION, 30000);
|
||||
break;
|
||||
case EVENT_ORMOROK_SUMMON:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_SUMMON_CRYSTALLINE_TANGLER, true);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SUMMON, 17000);
|
||||
break;
|
||||
case EVENT_ORMOROK_CRYSTAL_SPIKES:
|
||||
Talk(SAY_CRYSTAL_SPIKES);
|
||||
me->CastSpell(me, SPELL_CRYSTAL_SPIKES, false);
|
||||
_spikesCount = 0;
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SUMMON_SPIKES, 300);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_CRYSTAL_SPIKES, 20000);
|
||||
break;
|
||||
case EVENT_ORMOROK_SUMMON_SPIKES:
|
||||
if (++_spikesCount > 9)
|
||||
break;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
float o = rand_norm() * 2.0f * M_PI;
|
||||
float x = me->GetPositionX() + 5.0f * _spikesCount * cos(o);
|
||||
float y = me->GetPositionY() + 5.0f * _spikesCount * sin(o);
|
||||
float h = me->GetMap()->GetHeight(x, y, me->GetPositionZ() + 5.0f);
|
||||
|
||||
if (h != INVALID_HEIGHT)
|
||||
me->SummonCreature(NPC_CRYSTAL_SPIKE, x, y, h, 0, TEMPSUMMON_TIMED_DESPAWN, 7000);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SUMMON_SPIKES, 200);
|
||||
break;
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
BossAI::JustDied(killer);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6000);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_ORMOROK_HEALTH:
|
||||
if (me->HealthBelowPct(26))
|
||||
{
|
||||
me->CastSpell(me, SPELL_FRENZY, true);
|
||||
Talk(EMOTE_FRENZY);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_ORMOROK_HEALTH, 1000);
|
||||
break;
|
||||
case EVENT_ORMOROK_TRAMPLE:
|
||||
me->CastSpell(me, SPELL_TRAMPLE, false);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_TRAMPLE, 10000);
|
||||
break;
|
||||
case EVENT_ORMOROK_SPELL_REFLECTION:
|
||||
Talk(SAY_REFLECT);
|
||||
me->CastSpell(me, SPELL_SPELL_REFLECTION, false);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SPELL_REFLECTION, 30000);
|
||||
break;
|
||||
case EVENT_ORMOROK_SUMMON:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_SUMMON_CRYSTALLINE_TANGLER, true);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SUMMON, 17000);
|
||||
break;
|
||||
case EVENT_ORMOROK_CRYSTAL_SPIKES:
|
||||
Talk(SAY_CRYSTAL_SPIKES);
|
||||
me->CastSpell(me, SPELL_CRYSTAL_SPIKES, false);
|
||||
_spikesCount = 0;
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SUMMON_SPIKES, 300);
|
||||
events.ScheduleEvent(EVENT_ORMOROK_CRYSTAL_SPIKES, 20000);
|
||||
break;
|
||||
case EVENT_ORMOROK_SUMMON_SPIKES:
|
||||
if (++_spikesCount > 9)
|
||||
break;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
float o = rand_norm()*2.0f*M_PI;
|
||||
float x = me->GetPositionX()+5.0f*_spikesCount*cos(o);
|
||||
float y = me->GetPositionY()+5.0f*_spikesCount*sin(o);
|
||||
float h = me->GetMap()->GetHeight(x, y, me->GetPositionZ()+5.0f);
|
||||
|
||||
if (h != INVALID_HEIGHT)
|
||||
me->SummonCreature(NPC_CRYSTAL_SPIKE, x, y, h, 0, TEMPSUMMON_TIMED_DESPAWN, 7000);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_ORMOROK_SUMMON_SPIKES, 200);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class npc_crystal_spike : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_crystal_spike() : CreatureScript("npc_crystal_spike") { }
|
||||
public:
|
||||
npc_crystal_spike() : CreatureScript("npc_crystal_spike") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return GetInstanceAI<npc_crystal_spikeAI>(pCreature);
|
||||
}
|
||||
|
||||
struct npc_crystal_spikeAI : public NullCreatureAI
|
||||
{
|
||||
npc_crystal_spikeAI(Creature* c) : NullCreatureAI(c)
|
||||
{
|
||||
return GetInstanceAI<npc_crystal_spikeAI>(pCreature);
|
||||
}
|
||||
|
||||
struct npc_crystal_spikeAI : public NullCreatureAI
|
||||
int32 _damageTimer;
|
||||
uint64 _gameObjectGUID;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
npc_crystal_spikeAI(Creature *c) : NullCreatureAI(c)
|
||||
if (GameObject* gameobject = me->SummonGameObject(GO_CRYSTAL_SPIKE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3500))
|
||||
_gameObjectGUID = gameobject->GetGUID();
|
||||
|
||||
_damageTimer = 1;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (_damageTimer)
|
||||
{
|
||||
}
|
||||
|
||||
int32 _damageTimer;
|
||||
uint64 _gameObjectGUID;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (GameObject* gameobject = me->SummonGameObject(GO_CRYSTAL_SPIKE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3500))
|
||||
_gameObjectGUID = gameobject->GetGUID();
|
||||
|
||||
_damageTimer = 1;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (_damageTimer)
|
||||
_damageTimer += diff;
|
||||
if (_damageTimer >= 2000)
|
||||
{
|
||||
_damageTimer += diff;
|
||||
if (_damageTimer >= 2000)
|
||||
{
|
||||
if (GameObject* gameobject = ObjectAccessor::GetGameObject(*me, _gameObjectGUID))
|
||||
gameobject->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* gameobject = ObjectAccessor::GetGameObject(*me, _gameObjectGUID))
|
||||
gameobject->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
me->CastSpell(me, SPELL_CRYSTAL_SPIKE_DAMAGE, false);
|
||||
_damageTimer = 0;
|
||||
}
|
||||
me->CastSpell(me, SPELL_CRYSTAL_SPIKE_DAMAGE, false);
|
||||
_damageTimer = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_ormorok()
|
||||
|
||||
@@ -16,157 +16,157 @@ DoorData const doorData[] =
|
||||
|
||||
class instance_nexus : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_nexus() : InstanceMapScript("instance_nexus", 576) { }
|
||||
public:
|
||||
instance_nexus() : InstanceMapScript("instance_nexus", 576) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_nexus_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_nexus_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_nexus_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
return new instance_nexus_InstanceMapScript(map);
|
||||
SetBossNumber(MAX_ENCOUNTERS);
|
||||
LoadDoorData(doorData);
|
||||
}
|
||||
|
||||
struct instance_nexus_InstanceMapScript : public InstanceScript
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
instance_nexus_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
TeamId TeamIdInInstance = TEAM_NEUTRAL;
|
||||
if (!players.isEmpty())
|
||||
if (Player* pPlayer = players.begin()->GetSource())
|
||||
TeamIdInInstance = pPlayer->GetTeamId();
|
||||
|
||||
void Initialize()
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
SetBossNumber(MAX_ENCOUNTERS);
|
||||
LoadDoorData(doorData);
|
||||
case NPC_ALLIANCE_RANGER:
|
||||
creature->setFaction(16);
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
creature->UpdateEntry(NPC_HORDE_RANGER);
|
||||
break;
|
||||
case NPC_ALLIANCE_BERSERKER:
|
||||
creature->setFaction(16);
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
creature->UpdateEntry(NPC_HORDE_BERSERKER);
|
||||
break;
|
||||
case NPC_ALLIANCE_COMMANDER:
|
||||
creature->setFaction(16);
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
creature->UpdateEntry(NPC_HORDE_COMMANDER);
|
||||
break;
|
||||
case NPC_ALLIANCE_CLERIC:
|
||||
creature->setFaction(16);
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
creature->UpdateEntry(NPC_HORDE_CLERIC);
|
||||
break;
|
||||
case NPC_COMMANDER_STOUTBEARD:
|
||||
creature->setFaction(16);
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
creature->UpdateEntry(NPC_COMMANDER_KOLURG);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
void OnGameObjectCreate(GameObject* gameObject)
|
||||
{
|
||||
switch (gameObject->GetEntry())
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
TeamId TeamIdInInstance = TEAM_NEUTRAL;
|
||||
if (!players.isEmpty())
|
||||
if (Player* pPlayer = players.begin()->GetSource())
|
||||
TeamIdInInstance = pPlayer->GetTeamId();
|
||||
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_ALLIANCE_RANGER:
|
||||
creature->setFaction(16);
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
creature->UpdateEntry(NPC_HORDE_RANGER);
|
||||
break;
|
||||
case NPC_ALLIANCE_BERSERKER:
|
||||
creature->setFaction(16);
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
creature->UpdateEntry(NPC_HORDE_BERSERKER);
|
||||
break;
|
||||
case NPC_ALLIANCE_COMMANDER:
|
||||
creature->setFaction(16);
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
creature->UpdateEntry(NPC_HORDE_COMMANDER);
|
||||
break;
|
||||
case NPC_ALLIANCE_CLERIC:
|
||||
creature->setFaction(16);
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
creature->UpdateEntry(NPC_HORDE_CLERIC);
|
||||
break;
|
||||
case NPC_COMMANDER_STOUTBEARD:
|
||||
creature->setFaction(16);
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
creature->UpdateEntry(NPC_COMMANDER_KOLURG);
|
||||
break;
|
||||
}
|
||||
case GO_TELESTRA_SPHERE:
|
||||
if (GetBossState(DATA_TELESTRA_ORB) != DONE && GetBossState(DATA_MAGUS_TELESTRA_EVENT) == DONE)
|
||||
gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_ANOMALUS_SPHERE:
|
||||
if (GetBossState(DATA_ANOMALUS_ORB) != DONE && GetBossState(DATA_ANOMALUS_EVENT) == DONE)
|
||||
gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_ORMOROK_SPHERE:
|
||||
if (GetBossState(DATA_ORMOROK_ORB) != DONE && GetBossState(DATA_ORMOROK_EVENT) == DONE)
|
||||
gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameObject)
|
||||
void OnGameObjectRemove(GameObject* gameObject)
|
||||
{
|
||||
switch (gameObject->GetEntry())
|
||||
{
|
||||
switch (gameObject->GetEntry())
|
||||
{
|
||||
case GO_TELESTRA_SPHERE:
|
||||
if (GetBossState(DATA_TELESTRA_ORB) != DONE && GetBossState(DATA_MAGUS_TELESTRA_EVENT) == DONE)
|
||||
gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_ANOMALUS_SPHERE:
|
||||
if (GetBossState(DATA_ANOMALUS_ORB) != DONE && GetBossState(DATA_ANOMALUS_EVENT) == DONE)
|
||||
gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_ORMOROK_SPHERE:
|
||||
if (GetBossState(DATA_ORMOROK_ORB) != DONE && GetBossState(DATA_ORMOROK_EVENT) == DONE)
|
||||
gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
}
|
||||
case GO_TELESTRA_SPHERE:
|
||||
case GO_ANOMALUS_SPHERE:
|
||||
case GO_ORMOROK_SPHERE:
|
||||
AddDoor(gameObject, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectRemove(GameObject* gameObject)
|
||||
void SetData(uint32 type, uint32)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
switch (gameObject->GetEntry())
|
||||
{
|
||||
case GO_TELESTRA_SPHERE:
|
||||
case GO_ANOMALUS_SPHERE:
|
||||
case GO_ORMOROK_SPHERE:
|
||||
AddDoor(gameObject, false);
|
||||
break;
|
||||
}
|
||||
case GO_TELESTRA_SPHERE:
|
||||
SetBossState(DATA_TELESTRA_ORB, NOT_STARTED);
|
||||
SetBossState(DATA_TELESTRA_ORB, DONE);
|
||||
break;
|
||||
case GO_ANOMALUS_SPHERE:
|
||||
SetBossState(DATA_ANOMALUS_ORB, NOT_STARTED);
|
||||
SetBossState(DATA_ANOMALUS_ORB, DONE);
|
||||
break;
|
||||
case GO_ORMOROK_SPHERE:
|
||||
SetBossState(DATA_ORMOROK_ORB, NOT_STARTED);
|
||||
SetBossState(DATA_ORMOROK_ORB, DONE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GO_TELESTRA_SPHERE:
|
||||
SetBossState(DATA_TELESTRA_ORB, NOT_STARTED);
|
||||
SetBossState(DATA_TELESTRA_ORB, DONE);
|
||||
break;
|
||||
case GO_ANOMALUS_SPHERE:
|
||||
SetBossState(DATA_ANOMALUS_ORB, NOT_STARTED);
|
||||
SetBossState(DATA_ANOMALUS_ORB, DONE);
|
||||
break;
|
||||
case GO_ORMOROK_SPHERE:
|
||||
SetBossState(DATA_ORMOROK_ORB, NOT_STARTED);
|
||||
SetBossState(DATA_ORMOROK_ORB, DONE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
bool SetBossState(uint32 id, EncounterState state)
|
||||
{
|
||||
if (!InstanceScript::SetBossState(id, state))
|
||||
return false;
|
||||
|
||||
bool SetBossState(uint32 id, EncounterState state)
|
||||
{
|
||||
if (!InstanceScript::SetBossState(id, state))
|
||||
return false;
|
||||
|
||||
if (state != DONE || id > DATA_ORMOROK_EVENT)
|
||||
return true;
|
||||
|
||||
BossInfo const* bossInfo = GetBossInfo(id + DATA_TELESTRA_ORB);
|
||||
for (DoorSet::const_iterator i = bossInfo->door[DOOR_TYPE_PASSAGE].begin(); i != bossInfo->door[DOOR_TYPE_PASSAGE].end(); ++i)
|
||||
(*i)->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
if (state != DONE || id > DATA_ORMOROK_EVENT)
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
BossInfo const* bossInfo = GetBossInfo(id + DATA_TELESTRA_ORB);
|
||||
for (DoorSet::const_iterator i = bossInfo->door[DOOR_TYPE_PASSAGE].begin(); i != bossInfo->door[DOOR_TYPE_PASSAGE].end(); ++i)
|
||||
(*i)->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "N E X " << GetBossSaveData();
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if( !in )
|
||||
return;
|
||||
|
||||
char dataHead1, dataHead2, dataHead3;
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2 >> dataHead3;
|
||||
if (dataHead1 == 'N' && dataHead2 == 'E' && dataHead3 == 'X')
|
||||
{
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "N E X " << GetBossSaveData();
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if( !in )
|
||||
return;
|
||||
|
||||
char dataHead1, dataHead2, dataHead3;
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2 >> dataHead3;
|
||||
if (dataHead1 == 'N' && dataHead2 == 'E' && dataHead3 == 'X')
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
enum eFrayer
|
||||
@@ -180,104 +180,104 @@ enum eFrayer
|
||||
|
||||
class npc_crystalline_frayer : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_crystalline_frayer() : CreatureScript("npc_crystalline_frayer") { }
|
||||
public:
|
||||
npc_crystalline_frayer() : CreatureScript("npc_crystalline_frayer") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return GetInstanceAI<npc_crystalline_frayerAI>(creature);
|
||||
}
|
||||
|
||||
struct npc_crystalline_frayerAI : public ScriptedAI
|
||||
{
|
||||
npc_crystalline_frayerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
return GetInstanceAI<npc_crystalline_frayerAI>(creature);
|
||||
}
|
||||
|
||||
struct npc_crystalline_frayerAI : public ScriptedAI
|
||||
bool _allowDeath;
|
||||
uint32 restoreTimer;
|
||||
uint32 abilityTimer1;
|
||||
uint32 abilityTimer2;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
npc_crystalline_frayerAI(Creature* creature) : ScriptedAI(creature)
|
||||
restoreTimer = 0;
|
||||
abilityTimer1 = 0;
|
||||
abilityTimer2 = 30000;
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit*)
|
||||
{
|
||||
_allowDeath = me->GetInstanceScript()->GetBossState(DATA_ORMOROK_EVENT) == DONE;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
if (me->isRegeneratingHealth())
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
if (!_allowDeath)
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->DeleteThreatList();
|
||||
me->CombatStop(true);
|
||||
damage = 0;
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetRegeneratingHealth(false);
|
||||
me->CastSpell(me, SPELL_SUMMON_SEED_POD, true);
|
||||
me->CastSpell(me, SPELL_SEED_POD, true);
|
||||
me->CastSpell(me, SPELL_AURA_OF_REGENERATION, false);
|
||||
restoreTimer = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (restoreTimer)
|
||||
{
|
||||
restoreTimer += diff;
|
||||
if (restoreTimer >= 90 * IN_MILLISECONDS)
|
||||
{
|
||||
Talk(0);
|
||||
me->SetRegeneratingHealth(true);
|
||||
restoreTimer = 0;
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool _allowDeath;
|
||||
uint32 restoreTimer;
|
||||
uint32 abilityTimer1;
|
||||
uint32 abilityTimer2;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
void Reset()
|
||||
abilityTimer1 += diff;
|
||||
abilityTimer2 += diff;
|
||||
|
||||
if (abilityTimer1 >= 5000)
|
||||
{
|
||||
restoreTimer = 0;
|
||||
me->CastSpell(me->GetVictim(), SPELL_ENSNARE, false);
|
||||
abilityTimer1 = 0;
|
||||
abilityTimer2 = 30000;
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit*)
|
||||
if (abilityTimer2 >= 30000)
|
||||
{
|
||||
_allowDeath = me->GetInstanceScript()->GetBossState(DATA_ORMOROK_EVENT) == DONE;
|
||||
me->CastSpell(me->GetVictim(), SPELL_CRYSTAL_BLOOM, false);
|
||||
abilityTimer2 = 0;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
if (me->isRegeneratingHealth())
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
if (!_allowDeath)
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->DeleteThreatList();
|
||||
me->CombatStop(true);
|
||||
damage = 0;
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetRegeneratingHealth(false);
|
||||
me->CastSpell(me, SPELL_SUMMON_SEED_POD, true);
|
||||
me->CastSpell(me, SPELL_SEED_POD, true);
|
||||
me->CastSpell(me, SPELL_AURA_OF_REGENERATION, false);
|
||||
restoreTimer = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (restoreTimer)
|
||||
{
|
||||
restoreTimer += diff;
|
||||
if (restoreTimer >= 90*IN_MILLISECONDS)
|
||||
{
|
||||
Talk(0);
|
||||
me->SetRegeneratingHealth(true);
|
||||
restoreTimer = 0;
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
abilityTimer1 += diff;
|
||||
abilityTimer2 += diff;
|
||||
|
||||
if (abilityTimer1 >= 5000)
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), SPELL_ENSNARE, false);
|
||||
abilityTimer1 = 0;
|
||||
}
|
||||
|
||||
if (abilityTimer2 >= 30000)
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), SPELL_CRYSTAL_BLOOM, false);
|
||||
abilityTimer2 = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_instance_nexus()
|
||||
|
||||
@@ -54,11 +54,11 @@ public:
|
||||
|
||||
struct boss_drakosAI : public ScriptedAI
|
||||
{
|
||||
boss_drakosAI(Creature *c) : ScriptedAI(c)
|
||||
boss_drakosAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
|
||||
me->SetInCombatWithZone();
|
||||
|
||||
events.RescheduleEvent(EVENT_MAGIC_PULL, urand(10000,15000));
|
||||
events.RescheduleEvent(EVENT_MAGIC_PULL, urand(10000, 15000));
|
||||
events.RescheduleEvent(EVENT_THUNDERING_STOMP, urand(3000, 6000));
|
||||
events.RescheduleEvent(EVENT_SUMMON, 2000);
|
||||
}
|
||||
@@ -91,8 +91,8 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_DRAKOS, DONE);
|
||||
for( uint8 i=0; i<3; ++i )
|
||||
if( uint64 guid = pInstance->GetData64(DATA_DCD_1+i) )
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( uint64 guid = pInstance->GetData64(DATA_DCD_1 + i) )
|
||||
if( GameObject* pGo = ObjectAccessor::GetGameObject(*me, guid) )
|
||||
if( pGo->GetGoState() != GO_STATE_ACTIVE )
|
||||
{
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
//me->MonsterTextEmote(TEXT_MAGIC_PULL, 0, true);
|
||||
|
||||
me->CastSpell(me, SPELL_MAGIC_PULL, false);
|
||||
events.RepeatEvent(urand(15000,25000));
|
||||
events.RepeatEvent(urand(15000, 25000));
|
||||
events.ScheduleEvent(EVENT_SUMMON_x4, 1500);
|
||||
}
|
||||
break;
|
||||
@@ -142,24 +142,24 @@ public:
|
||||
Talk(SAY_STOMP);
|
||||
|
||||
me->CastSpell(me, SPELL_THUNDERING_STOMP, false);
|
||||
events.RepeatEvent(urand(10000,20000));
|
||||
events.RepeatEvent(urand(10000, 20000));
|
||||
}
|
||||
break;
|
||||
case EVENT_SUMMON:
|
||||
{
|
||||
for( uint8 i=0; i<2; ++i )
|
||||
for( uint8 i = 0; i < 2; ++i )
|
||||
{
|
||||
float angle = rand_norm()*2*M_PI;
|
||||
me->SummonCreature(NPC_UNSTABLE_SPHERE, me->GetPositionX() + 5.0f*cos(angle), me->GetPositionY() + 5.0f*sin(angle), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 18000);
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
me->SummonCreature(NPC_UNSTABLE_SPHERE, me->GetPositionX() + 5.0f * cos(angle), me->GetPositionY() + 5.0f * sin(angle), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 18000);
|
||||
}
|
||||
events.RepeatEvent(2000);
|
||||
}
|
||||
break;
|
||||
case EVENT_SUMMON_x4:
|
||||
for( uint8 i=0; i<4; ++i )
|
||||
for( uint8 i = 0; i < 4; ++i )
|
||||
{
|
||||
float angle = rand_norm()*2*M_PI;
|
||||
me->SummonCreature(NPC_UNSTABLE_SPHERE, me->GetPositionX() + 5.0f*cos(angle), me->GetPositionY() + 5.0f*sin(angle), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 18000);
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
me->SummonCreature(NPC_UNSTABLE_SPHERE, me->GetPositionX() + 5.0f * cos(angle), me->GetPositionY() + 5.0f * sin(angle), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 18000);
|
||||
}
|
||||
events.PopEvent();
|
||||
break;
|
||||
@@ -180,16 +180,16 @@ public:
|
||||
|
||||
struct npc_oculus_unstable_sphereAI : public ScriptedAI
|
||||
{
|
||||
npc_oculus_unstable_sphereAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_oculus_unstable_sphereAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 timer;
|
||||
bool located, gonext;
|
||||
|
||||
void PickNewLocation()
|
||||
{
|
||||
float dist = rand_norm()*40.0f;
|
||||
float angle = rand_norm()*2*M_PI;
|
||||
me->GetMotionMaster()->MovePoint(1, 961.29f + dist*cos(angle), 1049.0f + dist*sin(angle), 360.0f);
|
||||
float dist = rand_norm() * 40.0f;
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
me->GetMotionMaster()->MovePoint(1, 961.29f + dist * cos(angle), 1049.0f + dist * sin(angle), 360.0f);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
struct boss_eregosAI : public ScriptedAI
|
||||
{
|
||||
boss_eregosAI(Creature *c) : ScriptedAI(c)
|
||||
boss_eregosAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -132,19 +132,19 @@ public:
|
||||
me->SummonGameObject(GO_SPOTLIGHT, 1018.06f, 1051.09f, 605.619019f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32 & /*damage*/, DamageEffectType, SpellSchoolMask)
|
||||
void DamageTaken(Unit*, uint32& /*damage*/, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
if( !me->GetMap()->IsHeroic() )
|
||||
return;
|
||||
|
||||
if( shiftNumber <= uint32(1) && uint32(me->GetHealth()*100/me->GetMaxHealth()) <= uint32(60-shiftNumber*40) )
|
||||
if( shiftNumber <= uint32(1) && uint32(me->GetHealth() * 100 / me->GetMaxHealth()) <= uint32(60 - shiftNumber * 40) )
|
||||
{
|
||||
++shiftNumber;
|
||||
events.RescheduleEvent(EVENT_SPELL_PLANAR_SHIFT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
@@ -193,16 +193,16 @@ public:
|
||||
events.RepeatEvent(35000);
|
||||
break;
|
||||
case EVENT_SUMMON_WHELPS:
|
||||
for( uint8 i=0; i<5; ++i )
|
||||
for( uint8 i = 0; i < 5; ++i )
|
||||
events.ScheduleEvent(EVENT_SUMMON_SINGLE_WHELP, urand(0, 8000));
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
case EVENT_SUMMON_SINGLE_WHELP:
|
||||
{
|
||||
float x = rand_norm()*50.0f-25.0f;
|
||||
float y = rand_norm()*50.0f-25.0f;
|
||||
float z = rand_norm()*50.0f-25.0f;
|
||||
me->SummonCreature(NPC_LEY_GUARDIAN_WHELP, me->GetPositionX()+x, me->GetPositionY()+y, me->GetPositionZ()+z, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
float x = rand_norm() * 50.0f - 25.0f;
|
||||
float y = rand_norm() * 50.0f - 25.0f;
|
||||
float z = rand_norm() * 50.0f - 25.0f;
|
||||
me->SummonCreature(NPC_LEY_GUARDIAN_WHELP, me->GetPositionX() + x, me->GetPositionY() + y, me->GetPositionZ() + z, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
events.PopEvent();
|
||||
}
|
||||
break;
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
//me->MonsterYell(TEXT_PLANAR_SHIFT_SAY, LANG_UNIVERSAL, 0);
|
||||
Talk(SAY_SHIELD);
|
||||
me->CastSpell(me, SPELL_PLANAR_SHIFT, false);
|
||||
for( uint8 i=0; i<3; ++i )
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Unit* t = SelectTarget(SELECT_TARGET_RANDOM, 0, 300.0f, false) )
|
||||
if( Creature* pa = me->SummonCreature(NPC_PLANAR_ANOMALY, *me, TEMPSUMMON_TIMED_DESPAWN, 17000) )
|
||||
{
|
||||
|
||||
@@ -60,18 +60,20 @@ enum Yells
|
||||
SAY_PLAYER_KILL = 7
|
||||
};
|
||||
|
||||
float summons[3][4] = {
|
||||
{NPC_PHANTASMAL_AIR, NPC_PHANTASMAL_AIR, NPC_PHANTASMAL_WATER, NPC_PHANTASMAL_FIRE},
|
||||
{NPC_PHANTASMAL_OGRE, NPC_PHANTASMAL_OGRE, NPC_PHANTASMAL_NAGAL, NPC_PHANTASMAL_MURLOC},
|
||||
{NPC_PHANTASMAL_CLOUDSCRAPER, NPC_PHANTASMAL_CLOUDSCRAPER, NPC_PHANTASMAL_MAMMOTH, NPC_PHANTASMAL_WOLF}
|
||||
};
|
||||
float summons[3][4] =
|
||||
{
|
||||
{NPC_PHANTASMAL_AIR, NPC_PHANTASMAL_AIR, NPC_PHANTASMAL_WATER, NPC_PHANTASMAL_FIRE},
|
||||
{NPC_PHANTASMAL_OGRE, NPC_PHANTASMAL_OGRE, NPC_PHANTASMAL_NAGAL, NPC_PHANTASMAL_MURLOC},
|
||||
{NPC_PHANTASMAL_CLOUDSCRAPER, NPC_PHANTASMAL_CLOUDSCRAPER, NPC_PHANTASMAL_MAMMOTH, NPC_PHANTASMAL_WOLF}
|
||||
};
|
||||
|
||||
float cords[4][4] = {
|
||||
{1177.47f, 937.722f, 527.405f, 2.21657f},
|
||||
{968.66f, 1042.53f, 527.32f, 0.077f},
|
||||
{1164.02f, 1170.85f, 527.321f, 3.66f},
|
||||
{1118.31f, 1080.377f, 508.361f, 4.25f}
|
||||
};
|
||||
float cords[4][4] =
|
||||
{
|
||||
{1177.47f, 937.722f, 527.405f, 2.21657f},
|
||||
{968.66f, 1042.53f, 527.32f, 0.077f},
|
||||
{1164.02f, 1170.85f, 527.321f, 3.66f},
|
||||
{1118.31f, 1080.377f, 508.361f, 4.25f}
|
||||
};
|
||||
|
||||
class boss_urom : public CreatureScript
|
||||
{
|
||||
@@ -85,20 +87,20 @@ public:
|
||||
|
||||
struct boss_uromAI : public ScriptedAI
|
||||
{
|
||||
boss_uromAI(Creature *c) : ScriptedAI(c)
|
||||
boss_uromAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
bool lock;
|
||||
float x,y,z;
|
||||
float x, y, z;
|
||||
int32 releaseLockTimer;
|
||||
|
||||
uint8 GetPhaseByCurrentPosition()
|
||||
{
|
||||
for (uint8 i=0; i<4; ++i)
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (me->GetDistance(cords[i][0], cords[i][1], cords[i][2]) < 20.0f)
|
||||
return i;
|
||||
|
||||
@@ -218,35 +220,35 @@ public:
|
||||
switch( spell->Id )
|
||||
{
|
||||
case SPELL_SUMMON_MENAGERIE_1:
|
||||
{
|
||||
for( uint8 i=0; i<4; ++i )
|
||||
me->SummonCreature(summons[0][i], cords[0][0] + ((i%2) ? 4.0f : -4.0f), cords[0][1] + (i<2 ? 4.0f : -4.0f), cords[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
{
|
||||
for( uint8 i = 0; i < 4; ++i )
|
||||
me->SummonCreature(summons[0][i], cords[0][0] + ((i % 2) ? 4.0f : -4.0f), cords[0][1] + (i < 2 ? 4.0f : -4.0f), cords[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
uint8 phase = GetPhaseByCurrentPosition();
|
||||
me->SetHomePosition(cords[phase+1][0], cords[phase+1][1], cords[phase+1][2], cords[phase+1][3]);
|
||||
me->DestroyForNearbyPlayers();
|
||||
me->SetHomePosition(cords[phase + 1][0], cords[phase + 1][1], cords[phase + 1][2], cords[phase + 1][3]);
|
||||
me->DestroyForNearbyPlayers();
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATION, true);
|
||||
releaseLockTimer = 1;
|
||||
}
|
||||
break;
|
||||
me->CastSpell(me, SPELL_EVOCATION, true);
|
||||
releaseLockTimer = 1;
|
||||
}
|
||||
break;
|
||||
case SPELL_SUMMON_MENAGERIE_2:
|
||||
{
|
||||
for( uint8 i=0; i<4; ++i )
|
||||
me->SummonCreature(summons[1][i], cords[1][0] + ((i%2) ? 4.0f : -4.0f), cords[1][1] + (i<2 ? 4.0f : -4.0f), cords[1][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
{
|
||||
for( uint8 i = 0; i < 4; ++i )
|
||||
me->SummonCreature(summons[1][i], cords[1][0] + ((i % 2) ? 4.0f : -4.0f), cords[1][1] + (i < 2 ? 4.0f : -4.0f), cords[1][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
uint8 phase = GetPhaseByCurrentPosition();
|
||||
me->SetHomePosition(cords[phase+1][0], cords[phase+1][1], cords[phase+1][2], cords[phase+1][3]);
|
||||
me->DestroyForNearbyPlayers();
|
||||
me->SetHomePosition(cords[phase + 1][0], cords[phase + 1][1], cords[phase + 1][2], cords[phase + 1][3]);
|
||||
me->DestroyForNearbyPlayers();
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATION, true);
|
||||
releaseLockTimer = 1;
|
||||
}
|
||||
break;
|
||||
me->CastSpell(me, SPELL_EVOCATION, true);
|
||||
releaseLockTimer = 1;
|
||||
}
|
||||
break;
|
||||
case SPELL_SUMMON_MENAGERIE_3:
|
||||
{
|
||||
for( uint8 i=0; i<4; ++i )
|
||||
me->SummonCreature(summons[2][i], cords[2][0] + ((i%2) ? 4.0f : -4.0f), cords[2][1] + (i<2 ? 4.0f : -4.0f), cords[2][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
for( uint8 i = 0; i < 4; ++i )
|
||||
me->SummonCreature(summons[2][i], cords[2][0] + ((i % 2) ? 4.0f : -4.0f), cords[2][1] + (i < 2 ? 4.0f : -4.0f), cords[2][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
uint8 phase = GetPhaseByCurrentPosition();
|
||||
me->SetHomePosition(cords[phase+1][0], cords[phase+1][1], cords[phase+1][2], cords[phase+1][3]);
|
||||
me->SetHomePosition(cords[phase + 1][0], cords[phase + 1][1], cords[phase + 1][2], cords[phase + 1][3]);
|
||||
me->DestroyForNearbyPlayers();
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATION, true);
|
||||
@@ -262,7 +264,7 @@ public:
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
me->NearTeleportTo(1103.69f, 1048.76f, 512.279f, 1.16f);
|
||||
|
||||
|
||||
Talk(SAY_ARCANE_EXPLOSION);
|
||||
Talk(EMOTE_ARCANE_EXPLOSION);
|
||||
|
||||
@@ -313,7 +315,7 @@ public:
|
||||
case EVENT_FROSTBOMB:
|
||||
if( Unit* v = me->GetVictim() )
|
||||
me->CastSpell(v, SPELL_FROSTBOMB, false);
|
||||
events.RepeatEvent(urand(7000,11000));
|
||||
events.RepeatEvent(urand(7000, 11000));
|
||||
break;
|
||||
case EVENT_TIME_BOMB:
|
||||
if( Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true) )
|
||||
@@ -325,7 +327,7 @@ public:
|
||||
y = me->GetPositionY();
|
||||
z = me->GetPositionZ();
|
||||
me->CastSpell(me, SPELL_TELEPORT, false);
|
||||
events.RepeatEvent(urand(25000,30000));
|
||||
events.RepeatEvent(urand(25000, 30000));
|
||||
events.DelayEvents(10000);
|
||||
break;
|
||||
case EVENT_TELE_BACK:
|
||||
|
||||
@@ -73,11 +73,11 @@ public:
|
||||
}
|
||||
struct boss_varosAI : public ScriptedAI
|
||||
{
|
||||
boss_varosAI(Creature *c) : ScriptedAI(c)
|
||||
boss_varosAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
float ZapAngle;
|
||||
@@ -222,9 +222,9 @@ public:
|
||||
me->SetFacingTo(ZapAngle);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->CastSpell((Unit*)NULL, SPELL_ENERGIZE_CORES, false);
|
||||
ZapAngle += M_PI/2;
|
||||
if( ZapAngle >= 2*M_PI )
|
||||
ZapAngle -= 2*M_PI;
|
||||
ZapAngle += M_PI / 2;
|
||||
if( ZapAngle >= 2 * M_PI )
|
||||
ZapAngle -= 2 * M_PI;
|
||||
events.PopEvent();
|
||||
events.ScheduleEvent(EVENT_ENERGIZE_CORES_THIN, 2000);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
switch( pGo->GetEntry() )
|
||||
{
|
||||
case GO_DRAGON_CAGE_DOOR:
|
||||
for( uint8 i=0; i<3; ++i )
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
{
|
||||
if( DragonCageDoorGUID[i] )
|
||||
continue;
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
if (m_auiEncounter[DATA_DRAKOS] == DONE && m_auiEncounter[DATA_VAROS] != DONE)
|
||||
{
|
||||
player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
|
||||
player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 10-CentrifugeCount);
|
||||
player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 10 - CentrifugeCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
if( data == DONE )
|
||||
{
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 10-CentrifugeCount);
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 10 - CentrifugeCount);
|
||||
|
||||
if (instance->IsHeroic())
|
||||
DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_MAKE_IT_COUNT_TIMED_EVENT);
|
||||
@@ -153,13 +153,13 @@ public:
|
||||
case DATA_EREGOS:
|
||||
m_auiEncounter[DATA_EREGOS] = data;
|
||||
if (data == DONE)
|
||||
DoRespawnGameObject(EregosCacheGUID, 7*DAY);
|
||||
DoRespawnGameObject(EregosCacheGUID, 7 * DAY);
|
||||
break;
|
||||
case DATA_CC_COUNT:
|
||||
if( CentrifugeCount < 10 )
|
||||
{
|
||||
++CentrifugeCount;
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 10-CentrifugeCount);
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 10 - CentrifugeCount);
|
||||
}
|
||||
if( CentrifugeCount >= 10 )
|
||||
if( Creature* varos = instance->GetCreature(uiVarosGUID) )
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
case DATA_DCD_1:
|
||||
case DATA_DCD_2:
|
||||
case DATA_DCD_3:
|
||||
return DragonCageDoorGUID[identifier-100];
|
||||
return DragonCageDoorGUID[identifier - 100];
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
{
|
||||
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> CentrifugeCount;
|
||||
|
||||
for( uint8 i=0; i<MAX_ENCOUNTER; ++i )
|
||||
for( uint8 i = 0; i < MAX_ENCOUNTER; ++i )
|
||||
if( m_auiEncounter[i] == IN_PROGRESS )
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user