mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 15:16:24 +00:00
converted all tabs to 4 spaces
This commit is contained in:
@@ -10,23 +10,23 @@ REWRITTEN BY XINEF
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_BERSERK = 45078,
|
||||
SPELL_FLAME_QUILLS = 34229,
|
||||
SPELL_QUILL_MISSILE_1 = 34269, // 21
|
||||
SPELL_QUILL_MISSILE_2 = 34314, // 3
|
||||
SPELL_FLAME_BUFFET = 34121,
|
||||
SPELL_EMBER_BLAST = 34341,
|
||||
SPELL_REBIRTH_PHASE2 = 34342,
|
||||
SPELL_MELT_ARMOR = 35410,
|
||||
SPELL_CHARGE = 35412,
|
||||
SPELL_REBIRTH_DIVE = 35369,
|
||||
SPELL_DIVE_BOMB_VISUAL = 35367,
|
||||
SPELL_DIVE_BOMB = 35181
|
||||
SPELL_BERSERK = 45078,
|
||||
SPELL_FLAME_QUILLS = 34229,
|
||||
SPELL_QUILL_MISSILE_1 = 34269, // 21
|
||||
SPELL_QUILL_MISSILE_2 = 34314, // 3
|
||||
SPELL_FLAME_BUFFET = 34121,
|
||||
SPELL_EMBER_BLAST = 34341,
|
||||
SPELL_REBIRTH_PHASE2 = 34342,
|
||||
SPELL_MELT_ARMOR = 35410,
|
||||
SPELL_CHARGE = 35412,
|
||||
SPELL_REBIRTH_DIVE = 35369,
|
||||
SPELL_DIVE_BOMB_VISUAL = 35367,
|
||||
SPELL_DIVE_BOMB = 35181
|
||||
};
|
||||
|
||||
const Position alarPoints[7] =
|
||||
{
|
||||
{340.15f, 58.65f, 17.71f, 4.60f},
|
||||
{340.15f, 58.65f, 17.71f, 4.60f},
|
||||
{388.09f, 31.54f, 20.18f, 1.61f},
|
||||
{388.18f, -32.85f, 20.18f, 0.52f},
|
||||
{340.29f, -60.19f, 17.72f, 5.71f},
|
||||
@@ -37,39 +37,39 @@ const Position alarPoints[7] =
|
||||
|
||||
enum Misc
|
||||
{
|
||||
DISPLAYID_INVISIBLE = 23377,
|
||||
NPC_EMBER_OF_ALAR = 19551,
|
||||
NPC_FLAME_PATCH = 20602,
|
||||
DISPLAYID_INVISIBLE = 23377,
|
||||
NPC_EMBER_OF_ALAR = 19551,
|
||||
NPC_FLAME_PATCH = 20602,
|
||||
|
||||
POINT_PLATFORM = 0,
|
||||
POINT_QUILL = 4,
|
||||
POINT_MIDDLE = 5,
|
||||
POINT_DIVE = 6,
|
||||
POINT_PLATFORM = 0,
|
||||
POINT_QUILL = 4,
|
||||
POINT_MIDDLE = 5,
|
||||
POINT_DIVE = 6,
|
||||
|
||||
EVENT_SWITCH_PLATFORM = 1,
|
||||
EVENT_START_QUILLS = 2,
|
||||
EVENT_RELOCATE_MIDDLE = 3,
|
||||
EVENT_REBIRTH = 4,
|
||||
EVENT_SPELL_MELT_ARMOR = 5,
|
||||
EVENT_SPELL_FLAME_PATCH = 6,
|
||||
EVENT_SPELL_CHARGE = 7,
|
||||
EVENT_SPELL_DIVE_BOMB = 8,
|
||||
EVENT_START_DIVE = 9,
|
||||
EVENT_CAST_DIVE_BOMB = 10,
|
||||
EVENT_SUMMON_DIVE_PHOENIX = 11,
|
||||
EVENT_REBIRTH_DIVE = 12,
|
||||
EVENT_SPELL_BERSERK = 13,
|
||||
EVENT_SWITCH_PLATFORM = 1,
|
||||
EVENT_START_QUILLS = 2,
|
||||
EVENT_RELOCATE_MIDDLE = 3,
|
||||
EVENT_REBIRTH = 4,
|
||||
EVENT_SPELL_MELT_ARMOR = 5,
|
||||
EVENT_SPELL_FLAME_PATCH = 6,
|
||||
EVENT_SPELL_CHARGE = 7,
|
||||
EVENT_SPELL_DIVE_BOMB = 8,
|
||||
EVENT_START_DIVE = 9,
|
||||
EVENT_CAST_DIVE_BOMB = 10,
|
||||
EVENT_SUMMON_DIVE_PHOENIX = 11,
|
||||
EVENT_REBIRTH_DIVE = 12,
|
||||
EVENT_SPELL_BERSERK = 13,
|
||||
|
||||
EVENT_MOVE_TO_PHASE_2 = 20,
|
||||
EVENT_FINISH_DIVE = 21
|
||||
EVENT_MOVE_TO_PHASE_2 = 20,
|
||||
EVENT_FINISH_DIVE = 21
|
||||
|
||||
};
|
||||
|
||||
// Xinef: Ruse of the Ashtongue (10946)
|
||||
enum qruseoftheAshtongue
|
||||
{
|
||||
SPELL_ASHTONGUE_RUSE = 42090,
|
||||
QUEST_RUSE_OF_THE_ASHTONGUE = 10946,
|
||||
SPELL_ASHTONGUE_RUSE = 42090,
|
||||
QUEST_RUSE_OF_THE_ASHTONGUE = 10946,
|
||||
};
|
||||
|
||||
class boss_alar : public CreatureScript
|
||||
@@ -81,57 +81,57 @@ class boss_alar : public CreatureScript
|
||||
{
|
||||
boss_alarAI(Creature* creature) : BossAI(creature, DATA_ALAR)
|
||||
{
|
||||
startPath = true;
|
||||
SetCombatMovement(false);
|
||||
startPath = true;
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
uint8 platform;
|
||||
uint8 noQuillTimes;
|
||||
bool startPath;
|
||||
uint8 platform;
|
||||
uint8 noQuillTimes;
|
||||
bool startPath;
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
BossAI::JustReachedHome();
|
||||
startPath = true;
|
||||
}
|
||||
void JustReachedHome()
|
||||
{
|
||||
BossAI::JustReachedHome();
|
||||
startPath = true;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
BossAI::Reset();
|
||||
platform = 0;
|
||||
noQuillTimes = 0;
|
||||
me->SetModelVisible(true);
|
||||
BossAI::Reset();
|
||||
platform = 0;
|
||||
noQuillTimes = 0;
|
||||
me->SetModelVisible(true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_FIRE, true);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
BossAI::EnterCombat(who);
|
||||
events.ScheduleEvent(EVENT_SWITCH_PLATFORM, 0);
|
||||
BossAI::EnterCombat(who);
|
||||
events.ScheduleEvent(EVENT_SWITCH_PLATFORM, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
me->SetModelVisible(true);
|
||||
BossAI::JustDied(killer);
|
||||
me->SetModelVisible(true);
|
||||
BossAI::JustDied(killer);
|
||||
|
||||
// Xinef: Ruse of the Ashtongue (10946)
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
if (player->GetQuestStatus(QUEST_RUSE_OF_THE_ASHTONGUE) == QUEST_STATUS_INCOMPLETE)
|
||||
if (player->HasAura(SPELL_ASHTONGUE_RUSE))
|
||||
player->AreaExploredOrEventHappens(QUEST_RUSE_OF_THE_ASHTONGUE);
|
||||
}
|
||||
// Xinef: Ruse of the Ashtongue (10946)
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
if (player->GetQuestStatus(QUEST_RUSE_OF_THE_ASHTONGUE) == QUEST_STATUS_INCOMPLETE)
|
||||
if (player->HasAura(SPELL_ASHTONGUE_RUSE))
|
||||
player->AreaExploredOrEventHappens(QUEST_RUSE_OF_THE_ASHTONGUE);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if (summon->GetEntry() == NPC_EMBER_OF_ALAR)
|
||||
summon->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_FIRE, true);
|
||||
summons.Summon(summon);
|
||||
if (summon->GetEntry() == NPC_EMBER_OF_ALAR)
|
||||
summon->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_FIRE, true);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/) { }
|
||||
@@ -141,168 +141,168 @@ class boss_alar : public CreatureScript
|
||||
if (damage >= me->GetHealth() && platform < POINT_MIDDLE)
|
||||
{
|
||||
damage = 0;
|
||||
if (events.GetNextEventTime(EVENT_REBIRTH) == 0)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->SetHealth(me->GetMaxHealth());
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->CastSpell(me, SPELL_EMBER_BLAST, true);
|
||||
if (events.GetNextEventTime(EVENT_REBIRTH) == 0)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->SetHealth(me->GetMaxHealth());
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->CastSpell(me, SPELL_EMBER_BLAST, true);
|
||||
|
||||
me->setAttackTimer(BASE_ATTACK, 16000);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_RELOCATE_MIDDLE, 8000);
|
||||
events.ScheduleEvent(EVENT_MOVE_TO_PHASE_2, 12000);
|
||||
events.ScheduleEvent(EVENT_REBIRTH, 16001);
|
||||
}
|
||||
me->setAttackTimer(BASE_ATTACK, 16000);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_RELOCATE_MIDDLE, 8000);
|
||||
events.ScheduleEvent(EVENT_MOVE_TO_PHASE_2, 12000);
|
||||
events.ScheduleEvent(EVENT_REBIRTH, 16001);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
{
|
||||
if (type == ESCORT_MOTION_TYPE && me->movespline->Finalized() && !me->IsInCombat())
|
||||
startPath = true;
|
||||
return;
|
||||
}
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
{
|
||||
if (type == ESCORT_MOTION_TYPE && me->movespline->Finalized() && !me->IsInCombat())
|
||||
startPath = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (id == POINT_PLATFORM)
|
||||
me->setAttackTimer(BASE_ATTACK, 1000);
|
||||
else if (id == POINT_QUILL)
|
||||
events.ScheduleEvent(EVENT_START_QUILLS, 1000);
|
||||
else if (id == POINT_DIVE)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_START_DIVE, 1000);
|
||||
events.ScheduleEvent(EVENT_CAST_DIVE_BOMB, 5000);
|
||||
}
|
||||
if (id == POINT_PLATFORM)
|
||||
me->setAttackTimer(BASE_ATTACK, 1000);
|
||||
else if (id == POINT_QUILL)
|
||||
events.ScheduleEvent(EVENT_START_QUILLS, 1000);
|
||||
else if (id == POINT_DIVE)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_START_DIVE, 1000);
|
||||
events.ScheduleEvent(EVENT_CAST_DIVE_BOMB, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (startPath)
|
||||
{
|
||||
me->StopMoving();
|
||||
startPath = false;
|
||||
if (WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath()))
|
||||
{
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
}
|
||||
}
|
||||
if (startPath)
|
||||
{
|
||||
me->StopMoving();
|
||||
startPath = false;
|
||||
if (WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetWaypointPath()))
|
||||
{
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SWITCH_PLATFORM:
|
||||
if (roll_chance_i(20*noQuillTimes))
|
||||
{
|
||||
noQuillTimes = 0;
|
||||
platform = RAND(0, 3);
|
||||
me->GetMotionMaster()->MovePoint(POINT_QUILL, alarPoints[POINT_QUILL], false, true);
|
||||
events.ScheduleEvent(EVENT_SWITCH_PLATFORM, 16000);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (noQuillTimes++ > 0)
|
||||
{
|
||||
me->SetOrientation(alarPoints[platform].GetOrientation());
|
||||
me->SummonCreature(NPC_EMBER_OF_ALAR, *me, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
|
||||
}
|
||||
me->GetMotionMaster()->MovePoint(POINT_PLATFORM, alarPoints[platform], false, true);
|
||||
platform = (++platform)%4;
|
||||
events.ScheduleEvent(EVENT_SWITCH_PLATFORM, 30000);
|
||||
}
|
||||
me->setAttackTimer(BASE_ATTACK, 20000);
|
||||
break;
|
||||
case EVENT_START_QUILLS:
|
||||
me->CastSpell(me, SPELL_FLAME_QUILLS, false);
|
||||
break;
|
||||
case EVENT_RELOCATE_MIDDLE:
|
||||
me->SetPosition(alarPoints[POINT_MIDDLE]);
|
||||
break;
|
||||
case EVENT_MOVE_TO_PHASE_2:
|
||||
me->RemoveAurasDueToSpell(SPELL_EMBER_BLAST);
|
||||
me->CastSpell(me, SPELL_REBIRTH_PHASE2, false);
|
||||
break;
|
||||
case EVENT_REBIRTH:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
platform = POINT_MIDDLE;
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SWITCH_PLATFORM:
|
||||
if (roll_chance_i(20*noQuillTimes))
|
||||
{
|
||||
noQuillTimes = 0;
|
||||
platform = RAND(0, 3);
|
||||
me->GetMotionMaster()->MovePoint(POINT_QUILL, alarPoints[POINT_QUILL], false, true);
|
||||
events.ScheduleEvent(EVENT_SWITCH_PLATFORM, 16000);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (noQuillTimes++ > 0)
|
||||
{
|
||||
me->SetOrientation(alarPoints[platform].GetOrientation());
|
||||
me->SummonCreature(NPC_EMBER_OF_ALAR, *me, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
|
||||
}
|
||||
me->GetMotionMaster()->MovePoint(POINT_PLATFORM, alarPoints[platform], false, true);
|
||||
platform = (++platform)%4;
|
||||
events.ScheduleEvent(EVENT_SWITCH_PLATFORM, 30000);
|
||||
}
|
||||
me->setAttackTimer(BASE_ATTACK, 20000);
|
||||
break;
|
||||
case EVENT_START_QUILLS:
|
||||
me->CastSpell(me, SPELL_FLAME_QUILLS, false);
|
||||
break;
|
||||
case EVENT_RELOCATE_MIDDLE:
|
||||
me->SetPosition(alarPoints[POINT_MIDDLE]);
|
||||
break;
|
||||
case EVENT_MOVE_TO_PHASE_2:
|
||||
me->RemoveAurasDueToSpell(SPELL_EMBER_BLAST);
|
||||
me->CastSpell(me, SPELL_REBIRTH_PHASE2, false);
|
||||
break;
|
||||
case EVENT_REBIRTH:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
platform = POINT_MIDDLE;
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
|
||||
events.ScheduleEvent(EVENT_SPELL_MELT_ARMOR, 67000);
|
||||
events.ScheduleEvent(EVENT_SPELL_CHARGE, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FLAME_PATCH, 20000);
|
||||
events.ScheduleEvent(EVENT_SPELL_DIVE_BOMB, 30000);
|
||||
break;
|
||||
case EVENT_SPELL_MELT_ARMOR:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MELT_ARMOR, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_MELT_ARMOR, 60000);
|
||||
break;
|
||||
case EVENT_SPELL_CHARGE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_CHARGE, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_CHARGE, 30000);
|
||||
break;
|
||||
case EVENT_SPELL_FLAME_PATCH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
|
||||
me->SummonCreature(NPC_FLAME_PATCH, *target, TEMPSUMMON_TIMED_DESPAWN, 2*MINUTE*IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_SPELL_FLAME_PATCH, 30000);
|
||||
break;
|
||||
case EVENT_SPELL_DIVE_BOMB:
|
||||
me->GetMotionMaster()->MovePoint(POINT_DIVE, alarPoints[POINT_DIVE], false, true);
|
||||
events.ScheduleEvent(EVENT_SPELL_DIVE_BOMB, 30000);
|
||||
events.DelayEvents(15000);
|
||||
me->setAttackTimer(BASE_ATTACK, 20000);
|
||||
break;
|
||||
case EVENT_START_DIVE:
|
||||
me->CastSpell(me, SPELL_DIVE_BOMB_VISUAL, false);
|
||||
break;
|
||||
case EVENT_CAST_DIVE_BOMB:
|
||||
events.ScheduleEvent(EVENT_SUMMON_DIVE_PHOENIX, 2000);
|
||||
events.ScheduleEvent(EVENT_REBIRTH_DIVE, 6000);
|
||||
events.ScheduleEvent(EVENT_FINISH_DIVE, 10000);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 90.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_DIVE_BOMB, false);
|
||||
me->SetPosition(*target);
|
||||
me->StopMovingOnCurrentPos();
|
||||
}
|
||||
events.ScheduleEvent(EVENT_SPELL_MELT_ARMOR, 67000);
|
||||
events.ScheduleEvent(EVENT_SPELL_CHARGE, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FLAME_PATCH, 20000);
|
||||
events.ScheduleEvent(EVENT_SPELL_DIVE_BOMB, 30000);
|
||||
break;
|
||||
case EVENT_SPELL_MELT_ARMOR:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MELT_ARMOR, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_MELT_ARMOR, 60000);
|
||||
break;
|
||||
case EVENT_SPELL_CHARGE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_CHARGE, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_CHARGE, 30000);
|
||||
break;
|
||||
case EVENT_SPELL_FLAME_PATCH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
|
||||
me->SummonCreature(NPC_FLAME_PATCH, *target, TEMPSUMMON_TIMED_DESPAWN, 2*MINUTE*IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_SPELL_FLAME_PATCH, 30000);
|
||||
break;
|
||||
case EVENT_SPELL_DIVE_BOMB:
|
||||
me->GetMotionMaster()->MovePoint(POINT_DIVE, alarPoints[POINT_DIVE], false, true);
|
||||
events.ScheduleEvent(EVENT_SPELL_DIVE_BOMB, 30000);
|
||||
events.DelayEvents(15000);
|
||||
me->setAttackTimer(BASE_ATTACK, 20000);
|
||||
break;
|
||||
case EVENT_START_DIVE:
|
||||
me->CastSpell(me, SPELL_DIVE_BOMB_VISUAL, false);
|
||||
break;
|
||||
case EVENT_CAST_DIVE_BOMB:
|
||||
events.ScheduleEvent(EVENT_SUMMON_DIVE_PHOENIX, 2000);
|
||||
events.ScheduleEvent(EVENT_REBIRTH_DIVE, 6000);
|
||||
events.ScheduleEvent(EVENT_FINISH_DIVE, 10000);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 90.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_DIVE_BOMB, false);
|
||||
me->SetPosition(*target);
|
||||
me->StopMovingOnCurrentPos();
|
||||
}
|
||||
|
||||
me->RemoveAurasDueToSpell(SPELL_DIVE_BOMB_VISUAL);
|
||||
break;
|
||||
case EVENT_SUMMON_DIVE_PHOENIX:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 10.0f, true);
|
||||
me->SummonCreature(NPC_EMBER_OF_ALAR, target ? *target : *me, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
|
||||
me->SummonCreature(NPC_EMBER_OF_ALAR, target ? *target : *me, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
|
||||
break;
|
||||
}
|
||||
case EVENT_REBIRTH_DIVE:
|
||||
me->SetModelVisible(true);
|
||||
me->CastSpell(me, SPELL_REBIRTH_DIVE, false);
|
||||
break;
|
||||
case EVENT_FINISH_DIVE:
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
break;
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
break;
|
||||
}
|
||||
me->RemoveAurasDueToSpell(SPELL_DIVE_BOMB_VISUAL);
|
||||
break;
|
||||
case EVENT_SUMMON_DIVE_PHOENIX:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 10.0f, true);
|
||||
me->SummonCreature(NPC_EMBER_OF_ALAR, target ? *target : *me, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
|
||||
me->SummonCreature(NPC_EMBER_OF_ALAR, target ? *target : *me, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
|
||||
break;
|
||||
}
|
||||
case EVENT_REBIRTH_DIVE:
|
||||
me->SetModelVisible(true);
|
||||
me->CastSpell(me, SPELL_REBIRTH_DIVE, false);
|
||||
break;
|
||||
case EVENT_FINISH_DIVE:
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
break;
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->isAttackReady())
|
||||
{
|
||||
if (me->isAttackReady())
|
||||
{
|
||||
if (me->IsWithinMeleeRange(me->GetVictim()))
|
||||
{
|
||||
me->AttackerStateUpdate(me->GetVictim());
|
||||
@@ -311,16 +311,16 @@ class boss_alar : public CreatureScript
|
||||
else
|
||||
{
|
||||
me->resetAttackTimer();
|
||||
ThreatContainer::StorageType const &threatList = me->getThreatManager().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||
if (Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
if (me->IsWithinMeleeRange(unit))
|
||||
{
|
||||
me->AttackerStateUpdate(unit);
|
||||
return;
|
||||
}
|
||||
ThreatContainer::StorageType const &threatList = me->getThreatManager().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||
if (Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
if (me->IsWithinMeleeRange(unit))
|
||||
{
|
||||
me->AttackerStateUpdate(unit);
|
||||
return;
|
||||
}
|
||||
|
||||
me->CastSpell(me, SPELL_FLAME_BUFFET, false);
|
||||
me->CastSpell(me, SPELL_FLAME_BUFFET, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -341,13 +341,13 @@ class CastQuill : public BasicEvent
|
||||
|
||||
bool Execute(uint64 /*execTime*/, uint32 /*diff*/)
|
||||
{
|
||||
_caster->CastSpell(_caster, _spellId, true);
|
||||
_caster->CastSpell(_caster, _spellId, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _caster;
|
||||
uint32 _spellId;
|
||||
uint32 _spellId;
|
||||
};
|
||||
|
||||
class spell_alar_flame_quills : public SpellScriptLoader
|
||||
@@ -363,12 +363,12 @@ class spell_alar_flame_quills : public SpellScriptLoader
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
// 24 spells in total
|
||||
for (uint8 i = 0; i < 21; ++i)
|
||||
GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_1+i), GetUnitOwner()->m_Events.CalculateTime(i*40));
|
||||
GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2+0), GetUnitOwner()->m_Events.CalculateTime(22*40));
|
||||
GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2+1), GetUnitOwner()->m_Events.CalculateTime(23*40));
|
||||
GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2+2), GetUnitOwner()->m_Events.CalculateTime(24*40));
|
||||
// 24 spells in total
|
||||
for (uint8 i = 0; i < 21; ++i)
|
||||
GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_1+i), GetUnitOwner()->m_Events.CalculateTime(i*40));
|
||||
GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2+0), GetUnitOwner()->m_Events.CalculateTime(22*40));
|
||||
GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2+1), GetUnitOwner()->m_Events.CalculateTime(23*40));
|
||||
GetUnitOwner()->m_Events.AddEvent(new CastQuill(GetUnitOwner(), SPELL_QUILL_MISSILE_2+2), GetUnitOwner()->m_Events.CalculateTime(24*40));
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -394,10 +394,10 @@ class spell_alar_ember_blast : public SpellScriptLoader
|
||||
|
||||
void HandleForceCast(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitEffect(effIndex);
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
if (Creature* alar = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(NPC_ALAR)))
|
||||
Unit::DealDamage(GetCaster(), alar, alar->CountPctFromMaxHealth(2));
|
||||
PreventHitEffect(effIndex);
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
if (Creature* alar = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(NPC_ALAR)))
|
||||
Unit::DealDamage(GetCaster(), alar, alar->CountPctFromMaxHealth(2));
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -414,78 +414,78 @@ class spell_alar_ember_blast : public SpellScriptLoader
|
||||
|
||||
class spell_alar_ember_blast_death : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_alar_ember_blast_death() : SpellScriptLoader("spell_alar_ember_blast_death") { }
|
||||
public:
|
||||
spell_alar_ember_blast_death() : SpellScriptLoader("spell_alar_ember_blast_death") { }
|
||||
|
||||
class spell_alar_ember_blast_death_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_alar_ember_blast_death_AuraScript);
|
||||
class spell_alar_ember_blast_death_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_alar_ember_blast_death_AuraScript);
|
||||
|
||||
void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
PreventDefaultAction(); // xinef: prevent default action after change that invisibility in instances is executed instantly even for creatures
|
||||
Unit* target = GetTarget();
|
||||
InvisibilityType type = InvisibilityType(aurEff->GetMiscValue());
|
||||
target->m_invisibility.AddFlag(type);
|
||||
target->m_invisibility.AddValue(type, aurEff->GetAmount());
|
||||
void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
PreventDefaultAction(); // xinef: prevent default action after change that invisibility in instances is executed instantly even for creatures
|
||||
Unit* target = GetTarget();
|
||||
InvisibilityType type = InvisibilityType(aurEff->GetMiscValue());
|
||||
target->m_invisibility.AddFlag(type);
|
||||
target->m_invisibility.AddValue(type, aurEff->GetAmount());
|
||||
|
||||
GetUnitOwner()->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
GetUnitOwner()->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
GetUnitOwner()->m_last_notify_position.Relocate(0.0f, 0.0f, 0.0f);
|
||||
GetUnitOwner()->m_delayed_unit_relocation_timer = 1000;
|
||||
}
|
||||
GetUnitOwner()->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
GetUnitOwner()->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
GetUnitOwner()->m_last_notify_position.Relocate(0.0f, 0.0f, 0.0f);
|
||||
GetUnitOwner()->m_delayed_unit_relocation_timer = 1000;
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
GetUnitOwner()->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
}
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
GetUnitOwner()->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_alar_ember_blast_death_AuraScript::OnApply, EFFECT_2, SPELL_AURA_MOD_INVISIBILITY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_alar_ember_blast_death_AuraScript::OnRemove, EFFECT_2, SPELL_AURA_MOD_INVISIBILITY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
void Register()
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_alar_ember_blast_death_AuraScript::OnApply, EFFECT_2, SPELL_AURA_MOD_INVISIBILITY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_alar_ember_blast_death_AuraScript::OnRemove, EFFECT_2, SPELL_AURA_MOD_INVISIBILITY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_alar_ember_blast_death_AuraScript();
|
||||
}
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_alar_ember_blast_death_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_alar_dive_bomb : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_alar_dive_bomb() : SpellScriptLoader("spell_alar_dive_bomb") { }
|
||||
public:
|
||||
spell_alar_dive_bomb() : SpellScriptLoader("spell_alar_dive_bomb") { }
|
||||
|
||||
class spell_alar_dive_bomb_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_alar_dive_bomb_AuraScript);
|
||||
class spell_alar_dive_bomb_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_alar_dive_bomb_AuraScript);
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->SetModelVisible(false);
|
||||
GetUnitOwner()->SetDisplayId(DISPLAYID_INVISIBLE);
|
||||
}
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->SetModelVisible(false);
|
||||
GetUnitOwner()->SetDisplayId(DISPLAYID_INVISIBLE);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_alar_dive_bomb_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
void Register()
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_alar_dive_bomb_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_alar_dive_bomb_AuraScript();
|
||||
}
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_alar_dive_bomb_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_alar()
|
||||
{
|
||||
new boss_alar();
|
||||
new spell_alar_flame_quills();
|
||||
new spell_alar_ember_blast();
|
||||
new spell_alar_ember_blast_death();
|
||||
new spell_alar_dive_bomb();
|
||||
new spell_alar_flame_quills();
|
||||
new spell_alar_ember_blast();
|
||||
new spell_alar_ember_blast_death();
|
||||
new spell_alar_dive_bomb();
|
||||
}
|
||||
|
||||
@@ -19,30 +19,30 @@ enum Yells
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_SOLARIAN_TRANSFORM = 39117,
|
||||
SPELL_ARCANE_MISSILES = 33031,
|
||||
SPELL_WRATH_OF_THE_ASTROMANCER = 42783,
|
||||
SPELL_BLINDING_LIGHT = 33009,
|
||||
SPELL_PSYCHIC_SCREAM = 34322,
|
||||
SPELL_VOID_BOLT = 39329
|
||||
SPELL_SOLARIAN_TRANSFORM = 39117,
|
||||
SPELL_ARCANE_MISSILES = 33031,
|
||||
SPELL_WRATH_OF_THE_ASTROMANCER = 42783,
|
||||
SPELL_BLINDING_LIGHT = 33009,
|
||||
SPELL_PSYCHIC_SCREAM = 34322,
|
||||
SPELL_VOID_BOLT = 39329
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
DISPLAYID_INVISIBLE = 11686,
|
||||
NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT = 18928,
|
||||
NPC_SOLARIUM_AGENT = 18925,
|
||||
NPC_SOLARIUM_PRIEST = 18806,
|
||||
DISPLAYID_INVISIBLE = 11686,
|
||||
NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT = 18928,
|
||||
NPC_SOLARIUM_AGENT = 18925,
|
||||
NPC_SOLARIUM_PRIEST = 18806,
|
||||
|
||||
EVENT_CHECK_HEALTH = 1,
|
||||
EVENT_SPELL_ARCANE_MISSILES = 2,
|
||||
EVENT_SPELL_WRATH_OF_ASTROMANCER = 3,
|
||||
EVENT_SPELL_BLINDING_LIGHT = 4,
|
||||
EVENT_SPAWN_PORTALS = 5,
|
||||
EVENT_SUMMON_ADDS = 6,
|
||||
EVENT_REAPPEAR = 7,
|
||||
EVENT_SPELL_PSYCHIC_SCREAM = 8,
|
||||
EVENT_SPELL_VOID_BOLT = 9
|
||||
EVENT_CHECK_HEALTH = 1,
|
||||
EVENT_SPELL_ARCANE_MISSILES = 2,
|
||||
EVENT_SPELL_WRATH_OF_ASTROMANCER = 3,
|
||||
EVENT_SPELL_BLINDING_LIGHT = 4,
|
||||
EVENT_SPAWN_PORTALS = 5,
|
||||
EVENT_SUMMON_ADDS = 6,
|
||||
EVENT_REAPPEAR = 7,
|
||||
EVENT_SPELL_PSYCHIC_SCREAM = 8,
|
||||
EVENT_SPELL_VOID_BOLT = 9
|
||||
};
|
||||
|
||||
|
||||
@@ -69,162 +69,162 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
BossAI::Reset();
|
||||
me->SetModelVisible(true);
|
||||
BossAI::Reset();
|
||||
me->SetModelVisible(true);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (who && me->Attack(who, true))
|
||||
me->GetMotionMaster()->MoveChase(who, (events.GetNextEventTime(EVENT_SPELL_VOID_BOLT) == 0 ? 30.0f : 0.0f));
|
||||
}
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (who && me->Attack(who, true))
|
||||
me->GetMotionMaster()->MoveChase(who, (events.GetNextEventTime(EVENT_SPELL_VOID_BOLT) == 0 ? 30.0f : 0.0f));
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && roll_chance_i(50))
|
||||
Talk(SAY_KILL);
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && roll_chance_i(50))
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
me->SetModelVisible(true);
|
||||
me->SetModelVisible(true);
|
||||
Talk(SAY_DEATH);
|
||||
BossAI::JustDied(killer);
|
||||
BossAI::JustDied(killer);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
BossAI::EnterCombat(who);
|
||||
me->CallForHelp(105.0f);
|
||||
BossAI::EnterCombat(who);
|
||||
me->CallForHelp(105.0f);
|
||||
|
||||
events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANE_MISSILES, 3000);
|
||||
events.ScheduleEvent(EVENT_SPELL_WRATH_OF_ASTROMANCER, 1000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BLINDING_LIGHT, 40000);
|
||||
events.ScheduleEvent(EVENT_SPAWN_PORTALS, 50000);
|
||||
events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANE_MISSILES, 3000);
|
||||
events.ScheduleEvent(EVENT_SPELL_WRATH_OF_ASTROMANCER, 1000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BLINDING_LIGHT, 40000);
|
||||
events.ScheduleEvent(EVENT_SPAWN_PORTALS, 50000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if (!summon->IsTrigger())
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if (!summon->IsTrigger())
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_CHECK_HEALTH:
|
||||
if (me->HealthBelowPct(21))
|
||||
{
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_SPELL_VOID_BOLT, 3000);
|
||||
events.ScheduleEvent(EVENT_SPELL_PSYCHIC_SCREAM, 7000);
|
||||
me->CastSpell(me, SPELL_SOLARIAN_TRANSFORM, true);
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000);
|
||||
break;
|
||||
case EVENT_SPELL_ARCANE_MISSILES:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCANE_MISSILES, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANE_MISSILES, 3000);
|
||||
break;
|
||||
case EVENT_SPELL_WRATH_OF_ASTROMANCER:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
me->CastSpell(target, SPELL_WRATH_OF_THE_ASTROMANCER, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_WRATH_OF_ASTROMANCER, 22000);
|
||||
break;
|
||||
case EVENT_SPELL_BLINDING_LIGHT:
|
||||
me->CastSpell(me, SPELL_BLINDING_LIGHT, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_BLINDING_LIGHT, 40000);
|
||||
break;
|
||||
case EVENT_SPAWN_PORTALS:
|
||||
me->setAttackTimer(BASE_ATTACK, 21000);
|
||||
me->SetModelVisible(false);
|
||||
events.ScheduleEvent(EVENT_SPAWN_PORTALS, 50000);
|
||||
events.DelayEvents(21000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_ADDS, 6000);
|
||||
events.ScheduleEvent(EVENT_REAPPEAR, 20000);
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
float o = rand_norm()*2*M_PI;
|
||||
if (i == 0)
|
||||
me->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, CENTER_X + cos(o)*INNER_PORTAL_RADIUS, CENTER_Y + sin(o)*INNER_PORTAL_RADIUS, CENTER_Z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 26000);
|
||||
else
|
||||
me->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, CENTER_X + cos(o)*OUTER_PORTAL_RADIUS, CENTER_Y + sin(o)*OUTER_PORTAL_RADIUS, PORTAL_Z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 26000);
|
||||
}
|
||||
break;
|
||||
case EVENT_SUMMON_ADDS:
|
||||
Talk(SAY_SUMMON1);
|
||||
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
{
|
||||
if (Creature* light = ObjectAccessor::GetCreature(*me, *itr))
|
||||
if (light->GetEntry() == NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT)
|
||||
{
|
||||
if (light->GetDistance2d(CENTER_X, CENTER_Y) < 20.0f)
|
||||
{
|
||||
me->SetPosition(*light);
|
||||
me->StopMovingOnCurrentPos();
|
||||
}
|
||||
for (uint8 j = 0; j < 4; ++j)
|
||||
me->SummonCreature(NPC_SOLARIUM_AGENT, light->GetPositionX()+frand(-3.0f, 3.0f), light->GetPositionY()+frand(-3.0f, 3.0f), light->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EVENT_REAPPEAR:
|
||||
Talk(SAY_SUMMON2);
|
||||
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
{
|
||||
if (Creature* light = ObjectAccessor::GetCreature(*me, *itr))
|
||||
{
|
||||
if (light->GetEntry() == NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT)
|
||||
{
|
||||
light->RemoveAllAuras();
|
||||
if (light->GetDistance2d(CENTER_X, CENTER_Y) < 20.0f)
|
||||
me->SetModelVisible(true);
|
||||
else
|
||||
me->SummonCreature(NPC_SOLARIUM_PRIEST, light->GetPositionX()+frand(-3.0f, 3.0f), light->GetPositionY()+frand(-3.0f, 3.0f), light->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
// protection
|
||||
if (me->GetDisplayId() != me->GetNativeDisplayId())
|
||||
{
|
||||
me->SetModelVisible(true);
|
||||
me->SummonCreature(NPC_SOLARIUM_PRIEST, me->GetPositionX()+frand(-3.0f, 3.0f), me->GetPositionY()+frand(-3.0f, 3.0f), me->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_SOLARIUM_PRIEST, me->GetPositionX()+frand(-3.0f, 3.0f), me->GetPositionY()+frand(-3.0f, 3.0f), me->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
}
|
||||
break;
|
||||
case EVENT_SPELL_VOID_BOLT:
|
||||
me->CastSpell(me->GetVictim(), SPELL_VOID_BOLT, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_VOID_BOLT, 7000);
|
||||
break;
|
||||
case EVENT_SPELL_PSYCHIC_SCREAM:
|
||||
me->CastSpell(me, SPELL_PSYCHIC_SCREAM, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_PSYCHIC_SCREAM, 12000);
|
||||
break;
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_CHECK_HEALTH:
|
||||
if (me->HealthBelowPct(21))
|
||||
{
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_SPELL_VOID_BOLT, 3000);
|
||||
events.ScheduleEvent(EVENT_SPELL_PSYCHIC_SCREAM, 7000);
|
||||
me->CastSpell(me, SPELL_SOLARIAN_TRANSFORM, true);
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000);
|
||||
break;
|
||||
case EVENT_SPELL_ARCANE_MISSILES:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCANE_MISSILES, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANE_MISSILES, 3000);
|
||||
break;
|
||||
case EVENT_SPELL_WRATH_OF_ASTROMANCER:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
me->CastSpell(target, SPELL_WRATH_OF_THE_ASTROMANCER, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_WRATH_OF_ASTROMANCER, 22000);
|
||||
break;
|
||||
case EVENT_SPELL_BLINDING_LIGHT:
|
||||
me->CastSpell(me, SPELL_BLINDING_LIGHT, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_BLINDING_LIGHT, 40000);
|
||||
break;
|
||||
case EVENT_SPAWN_PORTALS:
|
||||
me->setAttackTimer(BASE_ATTACK, 21000);
|
||||
me->SetModelVisible(false);
|
||||
events.ScheduleEvent(EVENT_SPAWN_PORTALS, 50000);
|
||||
events.DelayEvents(21000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_ADDS, 6000);
|
||||
events.ScheduleEvent(EVENT_REAPPEAR, 20000);
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
float o = rand_norm()*2*M_PI;
|
||||
if (i == 0)
|
||||
me->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, CENTER_X + cos(o)*INNER_PORTAL_RADIUS, CENTER_Y + sin(o)*INNER_PORTAL_RADIUS, CENTER_Z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 26000);
|
||||
else
|
||||
me->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, CENTER_X + cos(o)*OUTER_PORTAL_RADIUS, CENTER_Y + sin(o)*OUTER_PORTAL_RADIUS, PORTAL_Z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 26000);
|
||||
}
|
||||
break;
|
||||
case EVENT_SUMMON_ADDS:
|
||||
Talk(SAY_SUMMON1);
|
||||
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
{
|
||||
if (Creature* light = ObjectAccessor::GetCreature(*me, *itr))
|
||||
if (light->GetEntry() == NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT)
|
||||
{
|
||||
if (light->GetDistance2d(CENTER_X, CENTER_Y) < 20.0f)
|
||||
{
|
||||
me->SetPosition(*light);
|
||||
me->StopMovingOnCurrentPos();
|
||||
}
|
||||
for (uint8 j = 0; j < 4; ++j)
|
||||
me->SummonCreature(NPC_SOLARIUM_AGENT, light->GetPositionX()+frand(-3.0f, 3.0f), light->GetPositionY()+frand(-3.0f, 3.0f), light->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EVENT_REAPPEAR:
|
||||
Talk(SAY_SUMMON2);
|
||||
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
{
|
||||
if (Creature* light = ObjectAccessor::GetCreature(*me, *itr))
|
||||
{
|
||||
if (light->GetEntry() == NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT)
|
||||
{
|
||||
light->RemoveAllAuras();
|
||||
if (light->GetDistance2d(CENTER_X, CENTER_Y) < 20.0f)
|
||||
me->SetModelVisible(true);
|
||||
else
|
||||
me->SummonCreature(NPC_SOLARIUM_PRIEST, light->GetPositionX()+frand(-3.0f, 3.0f), light->GetPositionY()+frand(-3.0f, 3.0f), light->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
// protection
|
||||
if (me->GetDisplayId() != me->GetNativeDisplayId())
|
||||
{
|
||||
me->SetModelVisible(true);
|
||||
me->SummonCreature(NPC_SOLARIUM_PRIEST, me->GetPositionX()+frand(-3.0f, 3.0f), me->GetPositionY()+frand(-3.0f, 3.0f), me->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_SOLARIUM_PRIEST, me->GetPositionX()+frand(-3.0f, 3.0f), me->GetPositionY()+frand(-3.0f, 3.0f), me->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
}
|
||||
break;
|
||||
case EVENT_SPELL_VOID_BOLT:
|
||||
me->CastSpell(me->GetVictim(), SPELL_VOID_BOLT, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_VOID_BOLT, 7000);
|
||||
break;
|
||||
case EVENT_SPELL_PSYCHIC_SCREAM:
|
||||
me->CastSpell(me, SPELL_PSYCHIC_SCREAM, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_PSYCHIC_SCREAM, 12000);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
DoMeleeAttackIfReady();
|
||||
EnterEvadeIfOutOfCombatArea();
|
||||
}
|
||||
|
||||
bool CheckEvadeIfOutOfCombatArea() const
|
||||
{
|
||||
return me->GetDistance2d(432.59f, -371.93f) > 105.0f;
|
||||
}
|
||||
|
||||
bool CheckEvadeIfOutOfCombatArea() const
|
||||
{
|
||||
return me->GetDistance2d(432.59f, -371.93f) > 105.0f;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -274,12 +274,12 @@ class spell_astromancer_solarian_transform : public SpellScriptLoader
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->HandleStatModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, 400.0f, true);
|
||||
GetUnitOwner()->HandleStatModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, 400.0f, true);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetUnitOwner()->HandleStatModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, 400.0f, false);
|
||||
GetUnitOwner()->HandleStatModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, 400.0f, false);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -299,6 +299,6 @@ void AddSC_boss_high_astromancer_solarian()
|
||||
{
|
||||
new boss_high_astromancer_solarian();
|
||||
new spell_astromancer_wrath_of_the_astromancer();
|
||||
new spell_astromancer_solarian_transform();
|
||||
new spell_astromancer_solarian_transform();
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,10 +18,10 @@ enum voidReaver
|
||||
SPELL_KNOCK_AWAY = 25778,
|
||||
SPELL_BERSERK = 26662,
|
||||
|
||||
EVENT_SPELL_POUNDING = 1,
|
||||
EVENT_SPELL_ARCANEORB = 2,
|
||||
EVENT_SPELL_KNOCK_AWAY = 3,
|
||||
EVENT_SPELL_BERSERK = 4
|
||||
EVENT_SPELL_POUNDING = 1,
|
||||
EVENT_SPELL_ARCANEORB = 2,
|
||||
EVENT_SPELL_KNOCK_AWAY = 3,
|
||||
EVENT_SPELL_BERSERK = 4
|
||||
};
|
||||
|
||||
class boss_void_reaver : public CreatureScript
|
||||
@@ -34,40 +34,40 @@ class boss_void_reaver : public CreatureScript
|
||||
{
|
||||
boss_void_reaverAI(Creature* creature) : BossAI(creature, DATA_REAVER)
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_DISPEL, DISPEL_POISON, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_HEALTH_LEECH, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_POWER_DRAIN, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_PERIODIC_LEECH, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_PERIODIC_MANA_LEECH, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_DISPEL, DISPEL_POISON, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_HEALTH_LEECH, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_POWER_DRAIN, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_PERIODIC_LEECH, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_PERIODIC_MANA_LEECH, true);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
BossAI::Reset();
|
||||
BossAI::Reset();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && roll_chance_i(50))
|
||||
Talk(SAY_SLAY);
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && roll_chance_i(50))
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
BossAI::JustDied(killer);
|
||||
BossAI::JustDied(killer);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
BossAI::EnterCombat(who);
|
||||
BossAI::EnterCombat(who);
|
||||
|
||||
events.ScheduleEvent(EVENT_SPELL_POUNDING, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANEORB, 3000);
|
||||
events.ScheduleEvent(EVENT_SPELL_KNOCK_AWAY, 30000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 600000);
|
||||
me->CallForHelp(105.0f);
|
||||
events.ScheduleEvent(EVENT_SPELL_POUNDING, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANEORB, 3000);
|
||||
events.ScheduleEvent(EVENT_SPELL_KNOCK_AWAY, 30000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 600000);
|
||||
me->CallForHelp(105.0f);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
@@ -75,41 +75,41 @@ class boss_void_reaver : public CreatureScript
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
break;
|
||||
case EVENT_SPELL_POUNDING:
|
||||
Talk(SAY_POUNDING);
|
||||
me->CastSpell(me, SPELL_POUNDING, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_POUNDING, 15000);
|
||||
break;
|
||||
case EVENT_SPELL_ARCANEORB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, -18.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCANE_ORB, false);
|
||||
else if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCANE_ORB, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANEORB, 4000);
|
||||
break;
|
||||
case EVENT_SPELL_KNOCK_AWAY:
|
||||
me->CastSpell(me->GetVictim(), SPELL_KNOCK_AWAY, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_POUNDING, 25000);
|
||||
break;
|
||||
}
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
break;
|
||||
case EVENT_SPELL_POUNDING:
|
||||
Talk(SAY_POUNDING);
|
||||
me->CastSpell(me, SPELL_POUNDING, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_POUNDING, 15000);
|
||||
break;
|
||||
case EVENT_SPELL_ARCANEORB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, -18.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCANE_ORB, false);
|
||||
else if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCANE_ORB, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANEORB, 4000);
|
||||
break;
|
||||
case EVENT_SPELL_KNOCK_AWAY:
|
||||
me->CastSpell(me->GetVictim(), SPELL_KNOCK_AWAY, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_POUNDING, 25000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
EnterEvadeIfOutOfCombatArea();
|
||||
}
|
||||
|
||||
bool CheckEvadeIfOutOfCombatArea() const
|
||||
{
|
||||
return me->GetDistance2d(432.59f, 371.93f) > 105.0f;
|
||||
}
|
||||
|
||||
bool CheckEvadeIfOutOfCombatArea() const
|
||||
{
|
||||
return me->GetDistance2d(432.59f, 371.93f) > 105.0f;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
|
||||
@@ -20,79 +20,79 @@ class instance_the_eye : public InstanceMapScript
|
||||
uint64 GrandAstromancerCapernianGUID;
|
||||
uint64 MasterEngineerTelonicusGUID;
|
||||
uint64 AlarGUID;
|
||||
uint64 KaelthasGUID;
|
||||
uint64 BridgeWindowGUID;
|
||||
uint64 KaelStateRightGUID;
|
||||
uint64 KaelStateLeftGUID;
|
||||
uint64 KaelthasGUID;
|
||||
uint64 BridgeWindowGUID;
|
||||
uint64 KaelStateRightGUID;
|
||||
uint64 KaelStateLeftGUID;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
AlarGUID = 0;
|
||||
KaelthasGUID = 0;
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
AlarGUID = 0;
|
||||
KaelthasGUID = 0;
|
||||
ThaladredTheDarkenerGUID = 0;
|
||||
LordSanguinarGUID = 0;
|
||||
GrandAstromancerCapernianGUID = 0;
|
||||
MasterEngineerTelonicusGUID = 0;
|
||||
BridgeWindowGUID = 0;
|
||||
KaelStateRightGUID = 0;
|
||||
KaelStateLeftGUID = 0;
|
||||
BridgeWindowGUID = 0;
|
||||
KaelStateRightGUID = 0;
|
||||
KaelStateLeftGUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_ALAR:
|
||||
AlarGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_KAELTHAS:
|
||||
KaelthasGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_THALADRED:
|
||||
ThaladredTheDarkenerGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_TELONICUS:
|
||||
MasterEngineerTelonicusGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_CAPERNIAN:
|
||||
GrandAstromancerCapernianGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_LORD_SANGUINAR:
|
||||
LordSanguinarGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_ALAR:
|
||||
AlarGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_KAELTHAS:
|
||||
KaelthasGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_THALADRED:
|
||||
ThaladredTheDarkenerGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_TELONICUS:
|
||||
MasterEngineerTelonicusGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_CAPERNIAN:
|
||||
GrandAstromancerCapernianGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_LORD_SANGUINAR:
|
||||
LordSanguinarGUID = creature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gobject)
|
||||
{
|
||||
switch (gobject->GetEntry())
|
||||
{
|
||||
case GO_BRIDGE_WINDOW:
|
||||
BridgeWindowGUID = gobject->GetGUID();
|
||||
break;
|
||||
case GO_KAEL_STATUE_RIGHT:
|
||||
KaelStateRightGUID = gobject->GetGUID();
|
||||
break;
|
||||
case GO_KAEL_STATUE_LEFT:
|
||||
KaelStateLeftGUID = gobject->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
void OnGameObjectCreate(GameObject* gobject)
|
||||
{
|
||||
switch (gobject->GetEntry())
|
||||
{
|
||||
case GO_BRIDGE_WINDOW:
|
||||
BridgeWindowGUID = gobject->GetGUID();
|
||||
break;
|
||||
case GO_KAEL_STATUE_RIGHT:
|
||||
KaelStateRightGUID = gobject->GetGUID();
|
||||
break;
|
||||
case GO_KAEL_STATUE_LEFT:
|
||||
KaelStateLeftGUID = gobject->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
case GO_BRIDGE_WINDOW: return BridgeWindowGUID;
|
||||
case GO_KAEL_STATUE_RIGHT: return KaelStateRightGUID;
|
||||
case GO_KAEL_STATUE_LEFT: return KaelStateLeftGUID;
|
||||
case NPC_ALAR: return AlarGUID;
|
||||
case NPC_KAELTHAS: return KaelthasGUID;
|
||||
case DATA_KAEL_ADVISOR1: return ThaladredTheDarkenerGUID;
|
||||
case DATA_KAEL_ADVISOR2: return LordSanguinarGUID;
|
||||
case DATA_KAEL_ADVISOR3: return GrandAstromancerCapernianGUID;
|
||||
case DATA_KAEL_ADVISOR4: return MasterEngineerTelonicusGUID;
|
||||
case GO_BRIDGE_WINDOW: return BridgeWindowGUID;
|
||||
case GO_KAEL_STATUE_RIGHT: return KaelStateRightGUID;
|
||||
case GO_KAEL_STATUE_LEFT: return KaelStateLeftGUID;
|
||||
case NPC_ALAR: return AlarGUID;
|
||||
case NPC_KAELTHAS: return KaelthasGUID;
|
||||
case DATA_KAEL_ADVISOR1: return ThaladredTheDarkenerGUID;
|
||||
case DATA_KAEL_ADVISOR2: return LordSanguinarGUID;
|
||||
case DATA_KAEL_ADVISOR3: return GrandAstromancerCapernianGUID;
|
||||
case DATA_KAEL_ADVISOR4: return MasterEngineerTelonicusGUID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ class instance_the_eye : public InstanceMapScript
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
@@ -156,11 +156,11 @@ class spell_the_eye_countercharge : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_the_eye_counterchargeScript);
|
||||
|
||||
bool PrepareProc(ProcEventInfo& eventInfo)
|
||||
bool PrepareProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
// xinef: prevent charge drop
|
||||
PreventDefaultAction();
|
||||
return true;
|
||||
// xinef: prevent charge drop
|
||||
PreventDefaultAction();
|
||||
return true;
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -178,5 +178,5 @@ class spell_the_eye_countercharge : public SpellScriptLoader
|
||||
void AddSC_instance_the_eye()
|
||||
{
|
||||
new instance_the_eye();
|
||||
new spell_the_eye_countercharge();
|
||||
new spell_the_eye_countercharge();
|
||||
}
|
||||
|
||||
@@ -7,33 +7,33 @@ REWRITTEN BY XINEF
|
||||
|
||||
enum EyeData
|
||||
{
|
||||
DATA_ALAR = 0,
|
||||
DATA_ASTROMANCER = 1,
|
||||
DATA_REAVER = 2,
|
||||
DATA_KAELTHAS = 3,
|
||||
MAX_ENCOUNTER = 4,
|
||||
DATA_ALAR = 0,
|
||||
DATA_ASTROMANCER = 1,
|
||||
DATA_REAVER = 2,
|
||||
DATA_KAELTHAS = 3,
|
||||
MAX_ENCOUNTER = 4,
|
||||
|
||||
DATA_KAEL_ADVISOR1 = 10,
|
||||
DATA_KAEL_ADVISOR2 = 11,
|
||||
DATA_KAEL_ADVISOR3 = 12,
|
||||
DATA_KAEL_ADVISOR4 = 13
|
||||
DATA_KAEL_ADVISOR1 = 10,
|
||||
DATA_KAEL_ADVISOR2 = 11,
|
||||
DATA_KAEL_ADVISOR3 = 12,
|
||||
DATA_KAEL_ADVISOR4 = 13
|
||||
};
|
||||
|
||||
enum EyeNPCs
|
||||
{
|
||||
NPC_ALAR = 19514,
|
||||
NPC_KAELTHAS = 19622,
|
||||
NPC_THALADRED = 20064,
|
||||
NPC_LORD_SANGUINAR = 20060,
|
||||
NPC_CAPERNIAN = 20062,
|
||||
NPC_TELONICUS = 20063
|
||||
NPC_ALAR = 19514,
|
||||
NPC_KAELTHAS = 19622,
|
||||
NPC_THALADRED = 20064,
|
||||
NPC_LORD_SANGUINAR = 20060,
|
||||
NPC_CAPERNIAN = 20062,
|
||||
NPC_TELONICUS = 20063
|
||||
};
|
||||
|
||||
enum EyeGOs
|
||||
{
|
||||
GO_BRIDGE_WINDOW = 184069,
|
||||
GO_KAEL_STATUE_RIGHT = 184596,
|
||||
GO_KAEL_STATUE_LEFT = 184597
|
||||
GO_BRIDGE_WINDOW = 184069,
|
||||
GO_KAEL_STATUE_RIGHT = 184596,
|
||||
GO_KAEL_STATUE_LEFT = 184597
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user