mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
converted all tabs to 4 spaces
This commit is contained in:
@@ -54,8 +54,8 @@ class boss_gatewatcher_gyrokill : public CreatureScript
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
@@ -74,8 +74,8 @@ class boss_gatewatcher_gyrokill : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, urand(12000, 14000));
|
||||
break;
|
||||
case EVENT_SAW_BLADE:
|
||||
if (Unit* target= SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f))
|
||||
me->CastSpell(target, SPELL_SAW_BLADE, false);
|
||||
if (Unit* target= SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f))
|
||||
me->CastSpell(target, SPELL_SAW_BLADE, false);
|
||||
Talk(SAY_SAW_BLADE);
|
||||
events.ScheduleEvent(EVENT_SAW_BLADE, 25000);
|
||||
break;
|
||||
|
||||
@@ -49,7 +49,7 @@ class boss_gatewatcher_iron_hand : public CreatureScript
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
@@ -71,17 +71,17 @@ class boss_gatewatcher_iron_hand : public CreatureScript
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_STREAM_OF_MACHINE_FLUID:
|
||||
me->CastSpell(me->GetVictim(), SPELL_STREAM_OF_MACHINE_FLUID, false);
|
||||
me->CastSpell(me->GetVictim(), SPELL_STREAM_OF_MACHINE_FLUID, false);
|
||||
events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 20000);
|
||||
break;
|
||||
case EVENT_JACKHAMMER:
|
||||
Talk(EMOTE_HAMMER);
|
||||
Talk(SAY_HAMMER);
|
||||
me->CastSpell(me, SPELL_JACKHAMMER, false);
|
||||
me->CastSpell(me, SPELL_JACKHAMMER, false);
|
||||
events.ScheduleEvent(EVENT_JACKHAMMER, 40000);
|
||||
break;
|
||||
case EVENT_SHADOW_POWER:
|
||||
me->CastSpell(me, SPELL_SHADOW_POWER, false);
|
||||
me->CastSpell(me, SPELL_SHADOW_POWER, false);
|
||||
events.ScheduleEvent(EVENT_SHADOW_POWER, 25000);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -57,13 +57,13 @@ class boss_mechano_lord_capacitus : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_HEADCRACK, 6000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_NETHER_CHARGE, 10000);
|
||||
events.ScheduleEvent(EVENT_BERSERK, 180000);
|
||||
events.ScheduleEvent(IsHeroic() ? EVENT_POSITIVE_SHIFT : EVENT_REFLECTIVE_DAMAGE_SHIELD, 15000);
|
||||
events.ScheduleEvent(IsHeroic() ? EVENT_POSITIVE_SHIFT : EVENT_REFLECTIVE_DAMAGE_SHIELD, 15000);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(YELL_KILL);
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(YELL_KILL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*victim*/)
|
||||
@@ -72,11 +72,11 @@ class boss_mechano_lord_capacitus : public CreatureScript
|
||||
Talk(YELL_DEATH);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->GetMotionMaster()->MoveRandom(30.0f);
|
||||
}
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->GetMotionMaster()->MoveRandom(30.0f);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
@@ -90,12 +90,12 @@ class boss_mechano_lord_capacitus : public CreatureScript
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_HEADCRACK:
|
||||
me->CastSpell(me->GetVictim(), SPELL_HEADCRACK, false);
|
||||
me->CastSpell(me->GetVictim(), SPELL_HEADCRACK, false);
|
||||
events.ScheduleEvent(EVENT_HEADCRACK, 20000);
|
||||
break;
|
||||
case EVENT_REFLECTIVE_DAMAGE_SHIELD:
|
||||
Talk(YELL_REFLECTIVE_DAMAGE_SHIELD);
|
||||
me->CastSpell(me, SPELL_REFLECTIVE_DAMAGE_SHIELD, false);
|
||||
me->CastSpell(me, SPELL_REFLECTIVE_DAMAGE_SHIELD, false);
|
||||
events.ScheduleEvent(EVENT_REFLECTIVE_MAGIE_SHIELD, 20000);
|
||||
break;
|
||||
case EVENT_REFLECTIVE_MAGIE_SHIELD:
|
||||
@@ -107,14 +107,14 @@ class boss_mechano_lord_capacitus : public CreatureScript
|
||||
Position pos;
|
||||
me->GetRandomNearPosition(pos, 8.0f);
|
||||
me->SummonCreature(NPC_NETHER_CHARGE, pos, TEMPSUMMON_TIMED_DESPAWN, 18000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_NETHER_CHARGE, 5000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_NETHER_CHARGE, 5000);
|
||||
break;
|
||||
case EVENT_POSITIVE_SHIFT:
|
||||
me->CastSpell(me, SPELL_POLARITY_SHIFT, true);
|
||||
me->CastSpell(me, SPELL_POLARITY_SHIFT, true);
|
||||
events.ScheduleEvent(EVENT_POSITIVE_SHIFT, 30000);
|
||||
break;
|
||||
case EVENT_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ class spell_capacitus_polarity_charge : public SpellScriptLoader
|
||||
|
||||
if (count)
|
||||
{
|
||||
uint32 spellId = GetSpellInfo()->Id == SPELL_POSITIVE_CHARGE ? SPELL_POSITIVE_CHARGE_STACK : SPELL_NEGATIVE_CHARGE_STACK;
|
||||
uint32 spellId = GetSpellInfo()->Id == SPELL_POSITIVE_CHARGE ? SPELL_POSITIVE_CHARGE_STACK : SPELL_NEGATIVE_CHARGE_STACK;
|
||||
GetCaster()->SetAuraStack(spellId, GetCaster(), count);
|
||||
}
|
||||
}
|
||||
@@ -198,8 +198,8 @@ class spell_capacitus_polarity_shift : public SpellScriptLoader
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, NULL, NULL, GetCaster()->GetGUID());
|
||||
if (Unit* target = GetHitUnit())
|
||||
target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, NULL, NULL, GetCaster()->GetGUID());
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
@@ -46,39 +46,39 @@ class boss_nethermancer_sepethrea : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_DRAGONS_BREATH, 18000);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
me->CastSpell(me, SPELL_SUMMON_RAGIN_FLAMES, true);
|
||||
}
|
||||
me->CastSpell(me, SPELL_SUMMON_RAGIN_FLAMES, true);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if (Unit* victim = me->GetVictim())
|
||||
{
|
||||
summon->AI()->AttackStart(victim);
|
||||
summon->AddThreat(victim, 1000.0f);
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
}
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if (Unit* victim = me->GetVictim())
|
||||
{
|
||||
summon->AI()->AttackStart(victim);
|
||||
summon->AddThreat(victim, 1000.0f);
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
events.Reset();
|
||||
if (instance)
|
||||
{
|
||||
instance->SetBossState(DATA_NETHERMANCER_SEPRETHREA, DONE);
|
||||
instance->SaveToDB();
|
||||
}
|
||||
if (instance)
|
||||
{
|
||||
instance->SetBossState(DATA_NETHERMANCER_SEPRETHREA, DONE);
|
||||
instance->SaveToDB();
|
||||
}
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
|
||||
Unit::Kill(summon, summon);
|
||||
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
|
||||
Unit::Kill(summon, summon);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
@@ -93,15 +93,15 @@ class boss_nethermancer_sepethrea : public CreatureScript
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_FROST_ATTACK:
|
||||
me->CastSpell(me->GetVictim(), SPELL_FROST_ATTACK, false);
|
||||
me->CastSpell(me->GetVictim(), SPELL_FROST_ATTACK, false);
|
||||
events.ScheduleEvent(EVENT_FROST_ATTACK, 8000);
|
||||
break;
|
||||
case EVENT_ARCANE_BLAST:
|
||||
me->CastSpell(me->GetVictim(), SPELL_ARCANE_BLAST, false);
|
||||
me->CastSpell(me->GetVictim(), SPELL_ARCANE_BLAST, false);
|
||||
events.ScheduleEvent(EVENT_ARCANE_BLAST, 12000);
|
||||
break;
|
||||
case EVENT_DRAGONS_BREATH:
|
||||
me->CastSpell(me->GetVictim(), SPELL_DRAGONS_BREATH, true);
|
||||
me->CastSpell(me->GetVictim(), SPELL_DRAGONS_BREATH, true);
|
||||
events.ScheduleEvent(EVENT_DRAGONS_BREATH, 16000);
|
||||
if (roll_chance_i(50))
|
||||
Talk(SAY_DRAGONS_BREATH);
|
||||
@@ -120,12 +120,12 @@ class boss_nethermancer_sepethrea : public CreatureScript
|
||||
|
||||
enum raginFlames
|
||||
{
|
||||
SPELL_INFERNO = 35268,
|
||||
SPELL_FIRE_TAIL = 35278,
|
||||
SPELL_INFERNO_DAMAGE = 35283,
|
||||
SPELL_INFERNO = 35268,
|
||||
SPELL_FIRE_TAIL = 35278,
|
||||
SPELL_INFERNO_DAMAGE = 35283,
|
||||
|
||||
EVENT_SPELL_FIRE_TAIL = 1,
|
||||
EVENT_SPELL_INFERNO = 2
|
||||
EVENT_SPELL_FIRE_TAIL = 1,
|
||||
EVENT_SPELL_INFERNO = 2
|
||||
};
|
||||
|
||||
class npc_ragin_flames : public CreatureScript
|
||||
@@ -137,41 +137,41 @@ class npc_ragin_flames : public CreatureScript
|
||||
{
|
||||
npc_ragin_flamesAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
EventMap events;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, true);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit*)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SPELL_FIRE_TAIL, 500);
|
||||
events.ScheduleEvent(EVENT_SPELL_INFERNO, urand(10000, 20000));
|
||||
}
|
||||
void EnterCombat(Unit*)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SPELL_FIRE_TAIL, 500);
|
||||
events.ScheduleEvent(EVENT_SPELL_INFERNO, urand(10000, 20000));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SPELL_INFERNO:
|
||||
if (me->IsWithinCombatRange(me->GetVictim(), 5.0f))
|
||||
{
|
||||
me->CastSpell(me, SPELL_INFERNO, true);
|
||||
events.ScheduleEvent(EVENT_SPELL_INFERNO, 20000);
|
||||
}
|
||||
else
|
||||
events.ScheduleEvent(EVENT_SPELL_INFERNO, 1000);
|
||||
break;
|
||||
case EVENT_SPELL_FIRE_TAIL:
|
||||
me->CastSpell(me, SPELL_FIRE_TAIL, true);
|
||||
events.ScheduleEvent(EVENT_SPELL_FIRE_TAIL, 500);
|
||||
break;
|
||||
}
|
||||
events.Update(diff);
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SPELL_INFERNO:
|
||||
if (me->IsWithinCombatRange(me->GetVictim(), 5.0f))
|
||||
{
|
||||
me->CastSpell(me, SPELL_INFERNO, true);
|
||||
events.ScheduleEvent(EVENT_SPELL_INFERNO, 20000);
|
||||
}
|
||||
else
|
||||
events.ScheduleEvent(EVENT_SPELL_INFERNO, 1000);
|
||||
break;
|
||||
case EVENT_SPELL_FIRE_TAIL:
|
||||
me->CastSpell(me, SPELL_FIRE_TAIL, true);
|
||||
events.ScheduleEvent(EVENT_SPELL_FIRE_TAIL, 500);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -194,8 +194,8 @@ class spell_ragin_flames_inferno : public SpellScriptLoader
|
||||
|
||||
void HandlePeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
int32 damage = aurEff->GetAmount();
|
||||
GetUnitOwner()->CastCustomSpell(SPELL_INFERNO_DAMAGE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetUnitOwner(), TRIGGERED_FULL_MASK);
|
||||
int32 damage = aurEff->GetAmount();
|
||||
GetUnitOwner()->CastCustomSpell(SPELL_INFERNO_DAMAGE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetUnitOwner(), TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -214,5 +214,5 @@ void AddSC_boss_nethermancer_sepethrea()
|
||||
{
|
||||
new boss_nethermancer_sepethrea();
|
||||
new npc_ragin_flames();
|
||||
new spell_ragin_flames_inferno();
|
||||
new spell_ragin_flames_inferno();
|
||||
}
|
||||
|
||||
@@ -8,36 +8,36 @@ REWRITTEN BY XINEF
|
||||
|
||||
enum Says
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
SAY_DOMINATION = 1,
|
||||
SAY_SUMMON = 2,
|
||||
SAY_ENRAGE = 3,
|
||||
SAY_SLAY = 4,
|
||||
SAY_DEATH = 5,
|
||||
SAY_APPEAR = 6
|
||||
SAY_AGGRO = 0,
|
||||
SAY_DOMINATION = 1,
|
||||
SAY_SUMMON = 2,
|
||||
SAY_ENRAGE = 3,
|
||||
SAY_SLAY = 4,
|
||||
SAY_DEATH = 5,
|
||||
SAY_APPEAR = 6
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_ARCANE_EXPLOSION = 15453,
|
||||
SPELL_DISGRUNTLED_ANGER = 35289,
|
||||
SPELL_ARCANE_TORRENT = 36022,
|
||||
SPELL_MANA_TAP = 36021,
|
||||
SPELL_DOMINATION = 35280,
|
||||
SPELL_SUMMON_NETHER_WRAITH_1 = 35285,
|
||||
SPELL_SUMMON_NETHER_WRAITH_2 = 35286,
|
||||
SPELL_SUMMON_NETHER_WRAITH_3 = 35287,
|
||||
SPELL_SUMMON_NETHER_WRAITH_4 = 35288,
|
||||
SPELL_ARCANE_EXPLOSION = 15453,
|
||||
SPELL_DISGRUNTLED_ANGER = 35289,
|
||||
SPELL_ARCANE_TORRENT = 36022,
|
||||
SPELL_MANA_TAP = 36021,
|
||||
SPELL_DOMINATION = 35280,
|
||||
SPELL_SUMMON_NETHER_WRAITH_1 = 35285,
|
||||
SPELL_SUMMON_NETHER_WRAITH_2 = 35286,
|
||||
SPELL_SUMMON_NETHER_WRAITH_3 = 35287,
|
||||
SPELL_SUMMON_NETHER_WRAITH_4 = 35288,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SUMMON = 1,
|
||||
EVENT_MANA_TAP = 2,
|
||||
EVENT_ARCANE_TORRENT = 3,
|
||||
EVENT_DOMINATION = 4,
|
||||
EVENT_ARCANE_EXPLOSION = 5,
|
||||
EVENT_FRENZY = 6,
|
||||
EVENT_SUMMON = 1,
|
||||
EVENT_MANA_TAP = 2,
|
||||
EVENT_ARCANE_TORRENT = 3,
|
||||
EVENT_DOMINATION = 4,
|
||||
EVENT_ARCANE_EXPLOSION = 5,
|
||||
EVENT_FRENZY = 6,
|
||||
};
|
||||
|
||||
class boss_pathaleon_the_calculator : public CreatureScript
|
||||
@@ -49,21 +49,21 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
{
|
||||
boss_pathaleon_the_calculatorAI(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR) { }
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
BossAI::InitializeAI();
|
||||
me->SetVisible(false);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
void InitializeAI()
|
||||
{
|
||||
BossAI::InitializeAI();
|
||||
me->SetVisible(false);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
me->SetVisible(true);
|
||||
me->CastSpell(me, SPELL_TELEPORT_VISUAL, true);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
Talk(SAY_APPEAR);
|
||||
}
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
me->SetVisible(true);
|
||||
me->CastSpell(me, SPELL_TELEPORT_VISUAL, true);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
Talk(SAY_APPEAR);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
@@ -73,14 +73,14 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_ARCANE_TORRENT, 16000);
|
||||
events.ScheduleEvent(EVENT_DOMINATION, 25000);
|
||||
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 8000);
|
||||
events.ScheduleEvent(EVENT_FRENZY, 1000);
|
||||
events.ScheduleEvent(EVENT_FRENZY, 1000);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
@@ -101,39 +101,39 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_ARCANE_EXPLOSION:
|
||||
me->CastSpell(me, SPELL_ARCANE_EXPLOSION, false);
|
||||
me->CastSpell(me, SPELL_ARCANE_EXPLOSION, false);
|
||||
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 12000);
|
||||
break;
|
||||
case EVENT_ARCANE_TORRENT:
|
||||
me->RemoveAurasDueToSpell(SPELL_MANA_TAP);
|
||||
me->ModifyPower(POWER_MANA, 5000);
|
||||
me->RemoveAurasDueToSpell(SPELL_MANA_TAP);
|
||||
me->ModifyPower(POWER_MANA, 5000);
|
||||
me->CastSpell(me, SPELL_ARCANE_TORRENT, false);
|
||||
events.ScheduleEvent(EVENT_ARCANE_TORRENT, 15000);
|
||||
break;
|
||||
case EVENT_MANA_TAP:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, PowerUsersSelector(me, POWER_MANA, 40.0f, false)))
|
||||
me->CastSpell(target, SPELL_MANA_TAP, false);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, PowerUsersSelector(me, POWER_MANA, 40.0f, false)))
|
||||
me->CastSpell(target, SPELL_MANA_TAP, false);
|
||||
events.ScheduleEvent(EVENT_MANA_TAP, 18000);
|
||||
break;
|
||||
case EVENT_DOMINATION:
|
||||
Talk(SAY_DOMINATION);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 50.0f))
|
||||
me->CastSpell(target, SPELL_DOMINATION, false);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 50.0f))
|
||||
me->CastSpell(target, SPELL_DOMINATION, false);
|
||||
events.ScheduleEvent(EVENT_DOMINATION, 30000);
|
||||
break;
|
||||
case EVENT_FRENZY:
|
||||
if (me->HealthBelowPct(20))
|
||||
{
|
||||
summons.DespawnAll();
|
||||
me->CastSpell(me, SPELL_DISGRUNTLED_ANGER, true);
|
||||
Talk(SAY_ENRAGE);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_FRENZY, 1000);
|
||||
break;
|
||||
case EVENT_FRENZY:
|
||||
if (me->HealthBelowPct(20))
|
||||
{
|
||||
summons.DespawnAll();
|
||||
me->CastSpell(me, SPELL_DISGRUNTLED_ANGER, true);
|
||||
Talk(SAY_ENRAGE);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_FRENZY, 1000);
|
||||
break;
|
||||
case EVENT_SUMMON:
|
||||
for (uint8 i = 0; i < DUNGEON_MODE(3, 4); ++i)
|
||||
me->CastSpell(me, SPELL_SUMMON_NETHER_WRAITH_1+i, true);
|
||||
me->CastSpell(me, SPELL_SUMMON_NETHER_WRAITH_1+i, true);
|
||||
|
||||
Talk(SAY_SUMMON);
|
||||
events.ScheduleEvent(EVENT_SUMMON, urand(30000, 45000));
|
||||
|
||||
@@ -26,10 +26,10 @@ class instance_mechanar : public InstanceMapScript
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
_pathaleonGUID = 0;
|
||||
_passageEncounter = 0;
|
||||
_passageTimer = 0;
|
||||
_passageGUIDs.clear();
|
||||
_pathaleonGUID = 0;
|
||||
_passageEncounter = 0;
|
||||
_passageTimer = 0;
|
||||
_passageGUIDs.clear();
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameObject)
|
||||
@@ -60,125 +60,125 @@ class instance_mechanar : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
if (creature->GetEntry() == NPC_PATHALEON_THE_CALCULATOR)
|
||||
_pathaleonGUID = creature->GetGUID();
|
||||
}
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
if (creature->GetEntry() == NPC_PATHALEON_THE_CALCULATOR)
|
||||
_pathaleonGUID = creature->GetGUID();
|
||||
}
|
||||
|
||||
void OnUnitDeath(Unit* unit)
|
||||
{
|
||||
if (unit->GetTypeId() == TYPEID_UNIT)
|
||||
if (_passageEncounter > ENCOUNTER_PASSAGE_NOT_STARTED && _passageEncounter < ENCOUNTER_PASSAGE_DONE)
|
||||
if (_passageGUIDs.find(unit->GetGUID()) != _passageGUIDs.end())
|
||||
_passageGUIDs.erase(unit->GetGUID());
|
||||
}
|
||||
void OnUnitDeath(Unit* unit)
|
||||
{
|
||||
if (unit->GetTypeId() == TYPEID_UNIT)
|
||||
if (_passageEncounter > ENCOUNTER_PASSAGE_NOT_STARTED && _passageEncounter < ENCOUNTER_PASSAGE_DONE)
|
||||
if (_passageGUIDs.find(unit->GetGUID()) != _passageGUIDs.end())
|
||||
_passageGUIDs.erase(unit->GetGUID());
|
||||
}
|
||||
|
||||
Player* GetPassagePlayer(float x)
|
||||
{
|
||||
Map::PlayerList const& pl = instance->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
if (player->GetPositionX() < x && player->GetPositionZ() > 24.0f && player->GetPositionY() > -30.0f)
|
||||
return player;
|
||||
return NULL;
|
||||
}
|
||||
Player* GetPassagePlayer(float x)
|
||||
{
|
||||
Map::PlayerList const& pl = instance->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
if (player->GetPositionX() < x && player->GetPositionZ() > 24.0f && player->GetPositionY() > -30.0f)
|
||||
return player;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DoSummonAction(Creature* summon, Player* player)
|
||||
{
|
||||
summon->CastSpell(summon, SPELL_TELEPORT_VISUAL, true);
|
||||
summon->AI()->AttackStart(player);
|
||||
_passageGUIDs.insert(summon->GetGUID());
|
||||
}
|
||||
void DoSummonAction(Creature* summon, Player* player)
|
||||
{
|
||||
summon->CastSpell(summon, SPELL_TELEPORT_VISUAL, true);
|
||||
summon->AI()->AttackStart(player);
|
||||
_passageGUIDs.insert(summon->GetGUID());
|
||||
}
|
||||
|
||||
void Update(uint32 diff)
|
||||
{
|
||||
if (_passageEncounter == ENCOUNTER_PASSAGE_DONE)
|
||||
return;
|
||||
void Update(uint32 diff)
|
||||
{
|
||||
if (_passageEncounter == ENCOUNTER_PASSAGE_DONE)
|
||||
return;
|
||||
|
||||
_passageTimer += diff;
|
||||
if (_passageTimer >= 1000)
|
||||
{
|
||||
_passageTimer = 0;
|
||||
if (_passageEncounter == ENCOUNTER_PASSAGE_NOT_STARTED)
|
||||
{
|
||||
if (Player* player = GetPassagePlayer(250.0f))
|
||||
{
|
||||
_passageEncounter++;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
Position pos = {238.0f, -27.0f + 3.0f*i, 26.328f, 0.0f};
|
||||
if (Creature* creature = instance->SummonCreature(i==1 || i==2 ? NPC_SUNSEEKER_ASTROMAGE : NPC_BLOODWARDER_CENTURION, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!_passageGUIDs.empty())
|
||||
return;
|
||||
_passageTimer += diff;
|
||||
if (_passageTimer >= 1000)
|
||||
{
|
||||
_passageTimer = 0;
|
||||
if (_passageEncounter == ENCOUNTER_PASSAGE_NOT_STARTED)
|
||||
{
|
||||
if (Player* player = GetPassagePlayer(250.0f))
|
||||
{
|
||||
_passageEncounter++;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
Position pos = {238.0f, -27.0f + 3.0f*i, 26.328f, 0.0f};
|
||||
if (Creature* creature = instance->SummonCreature(i==1 || i==2 ? NPC_SUNSEEKER_ASTROMAGE : NPC_BLOODWARDER_CENTURION, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!_passageGUIDs.empty())
|
||||
return;
|
||||
|
||||
if (_passageEncounter < ENCOUNTER_PASSAGE_PHASE3)
|
||||
{
|
||||
if (Player* player = GetPassagePlayer(250.0f))
|
||||
{
|
||||
if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE1)
|
||||
{
|
||||
Position pos = {214.37f, -23.5f, 24.88f, 0.0f};
|
||||
if (Creature* creature = instance->SummonCreature(NPC_TEMPEST_KEEPER_DESTROYER, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
else if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE2)
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Position pos = {199.76f, -26.0f + 2.5f*i, 24.88f, 0.0f};
|
||||
if (Creature* creature = instance->SummonCreature(i==1 ? NPC_SUNSEEKER_ENGINEER : NPC_BLOODWARDER_PHYSICIAN, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
}
|
||||
_passageEncounter++;
|
||||
SaveToDB();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Player* player = GetPassagePlayer(148.0f))
|
||||
{
|
||||
if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE3)
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Position pos = {135.0f + 2.5f*i, 36.76f, 24.88f};
|
||||
if (Creature* creature = instance->SummonCreature(i==1 ? NPC_SUNSEEKER_ASTROMAGE : NPC_BLOODWARDER_PHYSICIAN, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
}
|
||||
else if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE4)
|
||||
{
|
||||
Position pos = {137.62f, 62.23f, 24.88f, M_PI*1.5f};
|
||||
if (Creature* creature = instance->SummonCreature(NPC_TEMPEST_KEEPER_DESTROYER, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
else if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE5)
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
Position pos = {133.0f + 3.5f*i, 92.88f, 26.38f, M_PI*1.5f};
|
||||
if (Creature* creature = instance->SummonCreature(i==1||i==2 ? NPC_SUNSEEKER_ASTROMAGE : NPC_SUNSEEKER_ENGINEER, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
}
|
||||
else if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE6)
|
||||
{
|
||||
if (Creature* creature = instance->GetCreature(_pathaleonGUID))
|
||||
creature->AI()->DoAction(1);
|
||||
}
|
||||
_passageEncounter++;
|
||||
SaveToDB();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_passageEncounter < ENCOUNTER_PASSAGE_PHASE3)
|
||||
{
|
||||
if (Player* player = GetPassagePlayer(250.0f))
|
||||
{
|
||||
if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE1)
|
||||
{
|
||||
Position pos = {214.37f, -23.5f, 24.88f, 0.0f};
|
||||
if (Creature* creature = instance->SummonCreature(NPC_TEMPEST_KEEPER_DESTROYER, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
else if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE2)
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Position pos = {199.76f, -26.0f + 2.5f*i, 24.88f, 0.0f};
|
||||
if (Creature* creature = instance->SummonCreature(i==1 ? NPC_SUNSEEKER_ENGINEER : NPC_BLOODWARDER_PHYSICIAN, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
}
|
||||
_passageEncounter++;
|
||||
SaveToDB();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Player* player = GetPassagePlayer(148.0f))
|
||||
{
|
||||
if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE3)
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Position pos = {135.0f + 2.5f*i, 36.76f, 24.88f};
|
||||
if (Creature* creature = instance->SummonCreature(i==1 ? NPC_SUNSEEKER_ASTROMAGE : NPC_BLOODWARDER_PHYSICIAN, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
}
|
||||
else if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE4)
|
||||
{
|
||||
Position pos = {137.62f, 62.23f, 24.88f, M_PI*1.5f};
|
||||
if (Creature* creature = instance->SummonCreature(NPC_TEMPEST_KEEPER_DESTROYER, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
else if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE5)
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
Position pos = {133.0f + 3.5f*i, 92.88f, 26.38f, M_PI*1.5f};
|
||||
if (Creature* creature = instance->SummonCreature(i==1||i==2 ? NPC_SUNSEEKER_ASTROMAGE : NPC_SUNSEEKER_ENGINEER, pos))
|
||||
DoSummonAction(creature, player);
|
||||
}
|
||||
}
|
||||
else if (_passageEncounter == ENCOUNTER_PASSAGE_PHASE6)
|
||||
{
|
||||
if (Creature* creature = instance->GetCreature(_pathaleonGUID))
|
||||
creature->AI()->DoAction(1);
|
||||
}
|
||||
_passageEncounter++;
|
||||
SaveToDB();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state)
|
||||
{
|
||||
@@ -193,7 +193,7 @@ class instance_mechanar : public InstanceMapScript
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
// Xinef: no space needed
|
||||
// Xinef: no space needed
|
||||
saveStream << "M E " << GetBossSaveData() << _passageEncounter;
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
@@ -226,9 +226,9 @@ class instance_mechanar : public InstanceMapScript
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
|
||||
loadStream >> _passageEncounter;
|
||||
if (_passageEncounter == ENCOUNTER_PASSAGE_DONE)
|
||||
_passageEncounter = ENCOUNTER_PASSAGE_PHASE6;
|
||||
loadStream >> _passageEncounter;
|
||||
if (_passageEncounter == ENCOUNTER_PASSAGE_DONE)
|
||||
_passageEncounter = ENCOUNTER_PASSAGE_PHASE6;
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
@@ -236,11 +236,11 @@ class instance_mechanar : public InstanceMapScript
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _pathaleonGUID;
|
||||
uint32 _passageTimer;
|
||||
uint32 _passageEncounter;
|
||||
std::set<uint64> _passageGUIDs;
|
||||
private:
|
||||
uint64 _pathaleonGUID;
|
||||
uint32 _passageTimer;
|
||||
uint32 _passageEncounter;
|
||||
std::set<uint64> _passageGUIDs;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
|
||||
@@ -12,27 +12,27 @@ enum DataTypes
|
||||
DATA_MECHANOLORD_CAPACITUS = 2,
|
||||
DATA_NETHERMANCER_SEPRETHREA = 3,
|
||||
DATA_PATHALEON_THE_CALCULATOR = 4,
|
||||
MAX_ENCOUNTER = 5,
|
||||
MAX_ENCOUNTER = 5,
|
||||
|
||||
ENCOUNTER_PASSAGE_NOT_STARTED = 0,
|
||||
ENCOUNTER_PASSAGE_PHASE1 = 1,
|
||||
ENCOUNTER_PASSAGE_PHASE2 = 2,
|
||||
ENCOUNTER_PASSAGE_PHASE3 = 3,
|
||||
ENCOUNTER_PASSAGE_PHASE4 = 4,
|
||||
ENCOUNTER_PASSAGE_PHASE5 = 5,
|
||||
ENCOUNTER_PASSAGE_PHASE6 = 6,
|
||||
ENCOUNTER_PASSAGE_DONE = 7,
|
||||
ENCOUNTER_PASSAGE_NOT_STARTED = 0,
|
||||
ENCOUNTER_PASSAGE_PHASE1 = 1,
|
||||
ENCOUNTER_PASSAGE_PHASE2 = 2,
|
||||
ENCOUNTER_PASSAGE_PHASE3 = 3,
|
||||
ENCOUNTER_PASSAGE_PHASE4 = 4,
|
||||
ENCOUNTER_PASSAGE_PHASE5 = 5,
|
||||
ENCOUNTER_PASSAGE_PHASE6 = 6,
|
||||
ENCOUNTER_PASSAGE_DONE = 7,
|
||||
};
|
||||
|
||||
enum NpcIds
|
||||
{
|
||||
NPC_SUNSEEKER_ASTROMAGE = 19168,
|
||||
NPC_SUNSEEKER_ENGINEER = 20988,
|
||||
NPC_BLOODWARDER_CENTURION = 19510,
|
||||
NPC_BLOODWARDER_PHYSICIAN = 20990,
|
||||
NPC_TEMPEST_KEEPER_DESTROYER = 19735,
|
||||
NPC_SUNSEEKER_ASTROMAGE = 19168,
|
||||
NPC_SUNSEEKER_ENGINEER = 20988,
|
||||
NPC_BLOODWARDER_CENTURION = 19510,
|
||||
NPC_BLOODWARDER_PHYSICIAN = 20990,
|
||||
NPC_TEMPEST_KEEPER_DESTROYER = 19735,
|
||||
|
||||
NPC_PATHALEON_THE_CALCULATOR = 19220
|
||||
NPC_PATHALEON_THE_CALCULATOR = 19220
|
||||
};
|
||||
|
||||
enum GameobjectIds
|
||||
@@ -44,7 +44,7 @@ enum GameobjectIds
|
||||
|
||||
enum SpellIds
|
||||
{
|
||||
SPELL_TELEPORT_VISUAL = 35517
|
||||
SPELL_TELEPORT_VISUAL = 35517
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user