mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-17 17:24:33 +00:00
converted all tabs to 4 spaces
This commit is contained in:
@@ -15,28 +15,28 @@ enum Says
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_IMPALE_10 = 28783,
|
||||
SPELL_IMPALE_25 = 56090,
|
||||
SPELL_LOCUST_SWARM_10 = 28785,
|
||||
SPELL_LOCUST_SWARM_25 = 54021,
|
||||
SPELL_SUMMON_CORPSE_SCRABS_5 = 29105,
|
||||
SPELL_SUMMON_CORPSE_SCRABS_10 = 28864,
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_IMPALE_10 = 28783,
|
||||
SPELL_IMPALE_25 = 56090,
|
||||
SPELL_LOCUST_SWARM_10 = 28785,
|
||||
SPELL_LOCUST_SWARM_25 = 54021,
|
||||
SPELL_SUMMON_CORPSE_SCRABS_5 = 29105,
|
||||
SPELL_SUMMON_CORPSE_SCRABS_10 = 28864,
|
||||
SPELL_BERSERK = 26662,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_IMPALE = 1,
|
||||
EVENT_SPELL_LOCUST_SWARM = 2,
|
||||
EVENT_SPELL_BERSERK = 3,
|
||||
EVENT_SPELL_IMPALE = 1,
|
||||
EVENT_SPELL_LOCUST_SWARM = 2,
|
||||
EVENT_SPELL_BERSERK = 3,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_CORPSE_SCARAB = 16698,
|
||||
NPC_CRYPT_GUARD = 16573,
|
||||
NPC_CORPSE_SCARAB = 16698,
|
||||
NPC_CRYPT_GUARD = 16573,
|
||||
|
||||
ACHIEV_TIMED_START_EVENT = 9891,
|
||||
ACHIEV_TIMED_START_EVENT = 9891,
|
||||
};
|
||||
|
||||
class boss_anubrekhan : public CreatureScript
|
||||
@@ -49,153 +49,153 @@ public:
|
||||
return new boss_anubrekhanAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_anubrekhanAI : public ScriptedAI
|
||||
{
|
||||
boss_anubrekhanAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
sayGreet = false;
|
||||
}
|
||||
struct boss_anubrekhanAI : public ScriptedAI
|
||||
{
|
||||
boss_anubrekhanAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
sayGreet = false;
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
bool sayGreet;
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
bool sayGreet;
|
||||
|
||||
void SummonCryptGuards()
|
||||
{
|
||||
me->SummonCreature(NPC_CRYPT_GUARD, 3308.590f, -3466.29f, 287.16f, M_PI, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||
if (IsHeroic())
|
||||
me->SummonCreature(NPC_CRYPT_GUARD, 3308.590f, -3486.29f, 287.16f, M_PI, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||
}
|
||||
void SummonCryptGuards()
|
||||
{
|
||||
me->SummonCreature(NPC_CRYPT_GUARD, 3308.590f, -3466.29f, 287.16f, M_PI, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||
if (IsHeroic())
|
||||
me->SummonCreature(NPC_CRYPT_GUARD, 3308.590f, -3486.29f, 287.16f, M_PI, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
SummonCryptGuards();
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
SummonCryptGuards();
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_ANUB, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_ANUB_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_ANUB, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_ANUB_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr)
|
||||
{
|
||||
if (me->IsInCombat())
|
||||
cr->SetInCombatWithZone();
|
||||
if (cr->GetEntry() == NPC_CORPSE_SCARAB)
|
||||
{
|
||||
cr->SetReactState(REACT_PASSIVE);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
cr->AI()->AttackStart(target);
|
||||
}
|
||||
void JustSummoned(Creature* cr)
|
||||
{
|
||||
if (me->IsInCombat())
|
||||
cr->SetInCombatWithZone();
|
||||
if (cr->GetEntry() == NPC_CORPSE_SCARAB)
|
||||
{
|
||||
cr->SetReactState(REACT_PASSIVE);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
cr->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
summons.Summon(cr);
|
||||
}
|
||||
summons.Summon(cr);
|
||||
}
|
||||
|
||||
void SummonedCreatureDies(Creature* cr, Unit*)
|
||||
{
|
||||
if (cr->GetEntry() == NPC_CRYPT_GUARD)
|
||||
cr->CastSpell(cr, SPELL_SUMMON_CORPSE_SCRABS_10, true, NULL, NULL, me->GetGUID());
|
||||
}
|
||||
void SummonedCreatureDies(Creature* cr, Unit*)
|
||||
{
|
||||
if (cr->GetEntry() == NPC_CRYPT_GUARD)
|
||||
cr->CastSpell(cr, SPELL_SUMMON_CORPSE_SCRABS_10, true, NULL, NULL, me->GetGUID());
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* cr) { summons.Despawn(cr); }
|
||||
void SummonedCreatureDespawn(Creature* cr) { summons.Despawn(cr); }
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
summons.DespawnAll();
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
pInstance->SetData(EVENT_ANUB, DONE);
|
||||
}
|
||||
}
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
summons.DespawnAll();
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
pInstance->SetData(EVENT_ANUB, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
//Force the player to spawn corpse scarabs via spell
|
||||
victim->CastSpell(victim, SPELL_SUMMON_CORPSE_SCRABS_5, true, NULL, NULL, me->GetGUID());
|
||||
//Force the player to spawn corpse scarabs via spell
|
||||
victim->CastSpell(victim, SPELL_SUMMON_CORPSE_SCRABS_5, true, NULL, NULL, me->GetGUID());
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->CallForHelp(30.0f); // catch helpers
|
||||
Talk(SAY_AGGRO);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_ANUB, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_ANUB_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->CallForHelp(30.0f); // catch helpers
|
||||
Talk(SAY_AGGRO);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_ANUB, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_ANUB_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_SPELL_IMPALE, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_LOCUST_SWARM, 70000+urand(0,50000));
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 600000);
|
||||
|
||||
if (!summons.HasEntry(NPC_CRYPT_GUARD))
|
||||
SummonCryptGuards();
|
||||
}
|
||||
events.ScheduleEvent(EVENT_SPELL_IMPALE, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_LOCUST_SWARM, 70000+urand(0,50000));
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 600000);
|
||||
|
||||
if (!summons.HasEntry(NPC_CRYPT_GUARD))
|
||||
SummonCryptGuards();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!sayGreet && who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Talk(SAY_GREET);
|
||||
sayGreet = true;
|
||||
}
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!sayGreet && who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Talk(SAY_GREET);
|
||||
sayGreet = true;
|
||||
}
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_IMPALE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->CastSpell(target, RAID_MODE(SPELL_IMPALE_10, SPELL_IMPALE_25), false);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_SPELL_LOCUST_SWARM:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_LOCUST_SWARM_10, SPELL_LOCUST_SWARM_25), false);
|
||||
Position pos;
|
||||
me->GetNearPosition(pos, 10.0f, rand_norm()*2*M_PI);
|
||||
me->SummonCreature(NPC_CRYPT_GUARD, pos);
|
||||
events.RepeatEvent(90000);
|
||||
break;
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_IMPALE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->CastSpell(target, RAID_MODE(SPELL_IMPALE_10, SPELL_IMPALE_25), false);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_SPELL_LOCUST_SWARM:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_LOCUST_SWARM_10, SPELL_LOCUST_SWARM_25), false);
|
||||
Position pos;
|
||||
me->GetNearPosition(pos, 10.0f, rand_norm()*2*M_PI);
|
||||
me->SummonCreature(NPC_CRYPT_GUARD, pos);
|
||||
events.RepeatEvent(90000);
|
||||
break;
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_anubrekhan()
|
||||
{
|
||||
new boss_anubrekhan();
|
||||
new boss_anubrekhan();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,26 +17,26 @@ enum Yells
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_POISON_BOLT_VOLLEY_10 = 28796,
|
||||
SPELL_POISON_BOLT_VOLLEY_25 = 54098,
|
||||
SPELL_RAIN_OF_FIRE_10 = 28794,
|
||||
SPELL_RAIN_OF_FIRE_25 = 54099,
|
||||
SPELL_FRENZY_10 = 28798,
|
||||
SPELL_FRENZY_25 = 54100,
|
||||
SPELL_WIDOWS_EMBRACE = 28732,
|
||||
SPELL_POISON_BOLT_VOLLEY_10 = 28796,
|
||||
SPELL_POISON_BOLT_VOLLEY_25 = 54098,
|
||||
SPELL_RAIN_OF_FIRE_10 = 28794,
|
||||
SPELL_RAIN_OF_FIRE_25 = 54099,
|
||||
SPELL_FRENZY_10 = 28798,
|
||||
SPELL_FRENZY_25 = 54100,
|
||||
SPELL_WIDOWS_EMBRACE = 28732,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_POISON_BOLT = 1,
|
||||
EVENT_SPELL_RAIN_OF_FIRE = 2,
|
||||
EVENT_SPELL_FRENZY = 3,
|
||||
EVENT_SPELL_POISON_BOLT = 1,
|
||||
EVENT_SPELL_RAIN_OF_FIRE = 2,
|
||||
EVENT_SPELL_FRENZY = 3,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_NAXXRAMAS_WORSHIPPER = 16506,
|
||||
NPC_NAXXRAMAS_FOLLOWER = 16505,
|
||||
NPC_NAXXRAMAS_WORSHIPPER = 16506,
|
||||
NPC_NAXXRAMAS_FOLLOWER = 16505,
|
||||
};
|
||||
|
||||
class boss_faerlina : public CreatureScript
|
||||
@@ -49,137 +49,137 @@ public:
|
||||
return new boss_faerlinaAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_faerlinaAI : public ScriptedAI
|
||||
{
|
||||
boss_faerlinaAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
sayGreet = false;
|
||||
}
|
||||
struct boss_faerlinaAI : public ScriptedAI
|
||||
{
|
||||
boss_faerlinaAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
sayGreet = false;
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
bool sayGreet;
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
bool sayGreet;
|
||||
|
||||
void SummonHelpers()
|
||||
{
|
||||
me->SummonCreature(NPC_NAXXRAMAS_WORSHIPPER, 3362.66f, -3620.97f, 261.08f, 4.57276f);
|
||||
me->SummonCreature(NPC_NAXXRAMAS_WORSHIPPER, 3344.3f, -3618.31f, 261.08f, 4.69494f);
|
||||
me->SummonCreature(NPC_NAXXRAMAS_WORSHIPPER, 3356.71f, -3620.05f, 261.08f, 4.57276f);
|
||||
me->SummonCreature(NPC_NAXXRAMAS_WORSHIPPER, 3350.26f, -3619.11f, 261.08f, 4.67748f);
|
||||
void SummonHelpers()
|
||||
{
|
||||
me->SummonCreature(NPC_NAXXRAMAS_WORSHIPPER, 3362.66f, -3620.97f, 261.08f, 4.57276f);
|
||||
me->SummonCreature(NPC_NAXXRAMAS_WORSHIPPER, 3344.3f, -3618.31f, 261.08f, 4.69494f);
|
||||
me->SummonCreature(NPC_NAXXRAMAS_WORSHIPPER, 3356.71f, -3620.05f, 261.08f, 4.57276f);
|
||||
me->SummonCreature(NPC_NAXXRAMAS_WORSHIPPER, 3350.26f, -3619.11f, 261.08f, 4.67748f);
|
||||
|
||||
// Followers
|
||||
if (Is25ManRaid())
|
||||
{
|
||||
me->SummonCreature(NPC_NAXXRAMAS_FOLLOWER, 3347.49f, -3617.59f, 261.0f, 4.49f);
|
||||
me->SummonCreature(NPC_NAXXRAMAS_FOLLOWER, 3359.64f, -3619.16f, 261.0f, 4.56f);
|
||||
}
|
||||
}
|
||||
// Followers
|
||||
if (Is25ManRaid())
|
||||
{
|
||||
me->SummonCreature(NPC_NAXXRAMAS_FOLLOWER, 3347.49f, -3617.59f, 261.0f, 4.49f);
|
||||
me->SummonCreature(NPC_NAXXRAMAS_FOLLOWER, 3359.64f, -3619.16f, 261.0f, 4.56f);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr) { summons.Summon(cr); }
|
||||
void JustSummoned(Creature* cr) { summons.Summon(cr); }
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
SummonHelpers();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_FAERLINA, NOT_STARTED);
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
SummonHelpers();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_FAERLINA, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
Talk(SAY_AGGRO);
|
||||
events.ScheduleEvent(EVENT_SPELL_POISON_BOLT, urand(12000,15000));
|
||||
events.ScheduleEvent(EVENT_SPELL_RAIN_OF_FIRE, urand(6000,18000));
|
||||
events.ScheduleEvent(EVENT_SPELL_FRENZY, urand(60000,80000), 1);
|
||||
events.SetPhase(1);
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
Talk(SAY_AGGRO);
|
||||
events.ScheduleEvent(EVENT_SPELL_POISON_BOLT, urand(12000,15000));
|
||||
events.ScheduleEvent(EVENT_SPELL_RAIN_OF_FIRE, urand(6000,18000));
|
||||
events.ScheduleEvent(EVENT_SPELL_FRENZY, urand(60000,80000), 1);
|
||||
events.SetPhase(1);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_FAERLINA, IN_PROGRESS);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_FAERLINA, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!sayGreet && who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Talk(SAY_GREET);
|
||||
sayGreet = true;
|
||||
}
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!sayGreet && who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Talk(SAY_GREET);
|
||||
sayGreet = true;
|
||||
}
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_FAERLINA, DONE);
|
||||
}
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_FAERLINA, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_POISON_BOLT:
|
||||
if (!me->HasAura(SPELL_WIDOWS_EMBRACE))
|
||||
me->CastCustomSpell(RAID_MODE(SPELL_POISON_BOLT_VOLLEY_10, SPELL_POISON_BOLT_VOLLEY_25), SPELLVALUE_MAX_TARGETS, 3, me, false);
|
||||
events.RepeatEvent(14000);
|
||||
break;
|
||||
case EVENT_SPELL_RAIN_OF_FIRE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->CastSpell(target, RAID_MODE(SPELL_RAIN_OF_FIRE_10, SPELL_RAIN_OF_FIRE_25), false);
|
||||
events.RepeatEvent(12000);
|
||||
break;
|
||||
case EVENT_SPELL_FRENZY:
|
||||
me->MonsterTextEmote("%s goes into a frenzy!", 0, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_FRENZY_10, SPELL_FRENZY_25), true);
|
||||
events.RepeatEvent(70000);
|
||||
break;
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_POISON_BOLT:
|
||||
if (!me->HasAura(SPELL_WIDOWS_EMBRACE))
|
||||
me->CastCustomSpell(RAID_MODE(SPELL_POISON_BOLT_VOLLEY_10, SPELL_POISON_BOLT_VOLLEY_25), SPELLVALUE_MAX_TARGETS, 3, me, false);
|
||||
events.RepeatEvent(14000);
|
||||
break;
|
||||
case EVENT_SPELL_RAIN_OF_FIRE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->CastSpell(target, RAID_MODE(SPELL_RAIN_OF_FIRE_10, SPELL_RAIN_OF_FIRE_25), false);
|
||||
events.RepeatEvent(12000);
|
||||
break;
|
||||
case EVENT_SPELL_FRENZY:
|
||||
me->MonsterTextEmote("%s goes into a frenzy!", 0, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_FRENZY_10, SPELL_FRENZY_25), true);
|
||||
events.RepeatEvent(70000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_WIDOWS_EMBRACE)
|
||||
{
|
||||
me->MonsterTextEmote("%s is affected by Widow's Embrace!", 0, true);
|
||||
if (me->HasAura(RAID_MODE(SPELL_FRENZY_10, SPELL_FRENZY_25)))
|
||||
{
|
||||
me->RemoveAurasDueToSpell(RAID_MODE(SPELL_FRENZY_10, SPELL_FRENZY_25));
|
||||
events.DelayEvents(60000, 1);
|
||||
}
|
||||
else
|
||||
events.DelayEvents(30000, 1);
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_WIDOWS_EMBRACE)
|
||||
{
|
||||
me->MonsterTextEmote("%s is affected by Widow's Embrace!", 0, true);
|
||||
if (me->HasAura(RAID_MODE(SPELL_FRENZY_10, SPELL_FRENZY_25)))
|
||||
{
|
||||
me->RemoveAurasDueToSpell(RAID_MODE(SPELL_FRENZY_10, SPELL_FRENZY_25));
|
||||
events.DelayEvents(60000, 1);
|
||||
}
|
||||
else
|
||||
events.DelayEvents(30000, 1);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_FRENZY_REMOVED, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_FRENZY_REMOVED, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_faerlina()
|
||||
|
||||
@@ -11,59 +11,59 @@ REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_BERSERK = 26662,
|
||||
|
||||
// Marks
|
||||
SPELL_MARK_OF_KORTHAZZ = 28832,
|
||||
SPELL_MARK_OF_BLAUMEUX = 28833,
|
||||
SPELL_MARK_OF_RIVENDARE = 28834,
|
||||
SPELL_MARK_OF_ZELIEK = 28835,
|
||||
SPELL_MARK_DAMAGE = 28836,
|
||||
// Marks
|
||||
SPELL_MARK_OF_KORTHAZZ = 28832,
|
||||
SPELL_MARK_OF_BLAUMEUX = 28833,
|
||||
SPELL_MARK_OF_RIVENDARE = 28834,
|
||||
SPELL_MARK_OF_ZELIEK = 28835,
|
||||
SPELL_MARK_DAMAGE = 28836,
|
||||
|
||||
// Korth'azz
|
||||
SPELL_KORTHAZZ_METEOR_10 = 28884,
|
||||
SPELL_KORTHAZZ_METEOR_25 = 57467,
|
||||
// Korth'azz
|
||||
SPELL_KORTHAZZ_METEOR_10 = 28884,
|
||||
SPELL_KORTHAZZ_METEOR_25 = 57467,
|
||||
|
||||
// Blaumeux
|
||||
SPELL_BLAUMEUX_SHADOW_BOLT_10 = 57374,
|
||||
SPELL_BLAUMEUX_SHADOW_BOLT_25 = 57464,
|
||||
SPELL_BLAUMEUX_VOID_ZONE_10 = 28863,
|
||||
SPELL_BLAUMEUX_VOID_ZONE_25 = 57463,
|
||||
SPELL_BLAUMEUX_UNYIELDING_PAIN = 57381,
|
||||
// Blaumeux
|
||||
SPELL_BLAUMEUX_SHADOW_BOLT_10 = 57374,
|
||||
SPELL_BLAUMEUX_SHADOW_BOLT_25 = 57464,
|
||||
SPELL_BLAUMEUX_VOID_ZONE_10 = 28863,
|
||||
SPELL_BLAUMEUX_VOID_ZONE_25 = 57463,
|
||||
SPELL_BLAUMEUX_UNYIELDING_PAIN = 57381,
|
||||
|
||||
// Zeliek
|
||||
SPELL_ZELIEK_HOLY_WRATH_10 = 28883,
|
||||
SPELL_ZELIEK_HOLY_WRATH_25 = 57466,
|
||||
SPELL_ZELIEK_HOLY_BOLT_10 = 57376,
|
||||
SPELL_ZELIEK_HOLY_BOLT_25 = 57465,
|
||||
SPELL_ZELIEK_CONDEMNATION = 57377,
|
||||
// Zeliek
|
||||
SPELL_ZELIEK_HOLY_WRATH_10 = 28883,
|
||||
SPELL_ZELIEK_HOLY_WRATH_25 = 57466,
|
||||
SPELL_ZELIEK_HOLY_BOLT_10 = 57376,
|
||||
SPELL_ZELIEK_HOLY_BOLT_25 = 57465,
|
||||
SPELL_ZELIEK_CONDEMNATION = 57377,
|
||||
|
||||
// Rivendare
|
||||
SPELL_RIVENDARE_UNHOLY_SHADOW_10 = 28882,
|
||||
SPELL_RIVENDARE_UNHOLY_SHADOW_25 = 57369,
|
||||
// Rivendare
|
||||
SPELL_RIVENDARE_UNHOLY_SHADOW_10 = 28882,
|
||||
SPELL_RIVENDARE_UNHOLY_SHADOW_25 = 57369,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_MARK_CAST = 1,
|
||||
EVENT_SPELL_PRIMARY = 2,
|
||||
EVENT_SPELL_SECONDARY = 3,
|
||||
EVENT_SPELL_PUNISH = 4,
|
||||
EVENT_BERSERK = 5,
|
||||
EVENT_SPELL_MARK_CAST = 1,
|
||||
EVENT_SPELL_PRIMARY = 2,
|
||||
EVENT_SPELL_SECONDARY = 3,
|
||||
EVENT_SPELL_PUNISH = 4,
|
||||
EVENT_BERSERK = 5,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
// Movement
|
||||
MOVE_PHASE_NONE = 0,
|
||||
MOVE_PHASE_STARTED = 1,
|
||||
MOVE_PHASE_FINISHED = 2,
|
||||
// Movement
|
||||
MOVE_PHASE_NONE = 0,
|
||||
MOVE_PHASE_STARTED = 1,
|
||||
MOVE_PHASE_FINISHED = 2,
|
||||
|
||||
// Horseman
|
||||
HORSEMAN_ZELIEK = 0,
|
||||
HORSEMAN_BLAUMEUX = 1,
|
||||
HORSEMAN_RIVENDARE = 2,
|
||||
HORSEMAN_KORTHAZZ = 3,
|
||||
// Horseman
|
||||
HORSEMAN_ZELIEK = 0,
|
||||
HORSEMAN_BLAUMEUX = 1,
|
||||
HORSEMAN_RIVENDARE = 2,
|
||||
HORSEMAN_KORTHAZZ = 3,
|
||||
};
|
||||
|
||||
enum FourHorsemen
|
||||
@@ -121,219 +121,219 @@ public:
|
||||
return new boss_four_horsemenAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_four_horsemenAI : public ScriptedAI
|
||||
{
|
||||
boss_four_horsemenAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_SIR_ZELIEK:
|
||||
horsemanId = HORSEMAN_ZELIEK;
|
||||
break;
|
||||
case NPC_LADY_BLAUMEUX:
|
||||
horsemanId = HORSEMAN_BLAUMEUX;
|
||||
break;
|
||||
case NPC_BARON_RIVENDARE:
|
||||
horsemanId = HORSEMAN_RIVENDARE;
|
||||
break;
|
||||
case NPC_THANE_KORTHAZZ:
|
||||
horsemanId = HORSEMAN_KORTHAZZ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
struct boss_four_horsemenAI : public ScriptedAI
|
||||
{
|
||||
boss_four_horsemenAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_SIR_ZELIEK:
|
||||
horsemanId = HORSEMAN_ZELIEK;
|
||||
break;
|
||||
case NPC_LADY_BLAUMEUX:
|
||||
horsemanId = HORSEMAN_BLAUMEUX;
|
||||
break;
|
||||
case NPC_BARON_RIVENDARE:
|
||||
horsemanId = HORSEMAN_RIVENDARE;
|
||||
break;
|
||||
case NPC_THANE_KORTHAZZ:
|
||||
horsemanId = HORSEMAN_KORTHAZZ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
uint8 currentWaypoint;
|
||||
uint8 movementPhase;
|
||||
uint8 horsemanId;
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
uint8 currentWaypoint;
|
||||
uint8 movementPhase;
|
||||
uint8 horsemanId;
|
||||
|
||||
void MoveToCorner()
|
||||
{
|
||||
switch(me->GetEntry())
|
||||
{
|
||||
case NPC_THANE_KORTHAZZ: currentWaypoint = 0; break;
|
||||
case NPC_LADY_BLAUMEUX: currentWaypoint = 3; break;
|
||||
case NPC_BARON_RIVENDARE: currentWaypoint = 6; break;
|
||||
case NPC_SIR_ZELIEK: currentWaypoint = 9; break;
|
||||
}
|
||||
me->GetMotionMaster()->MovePoint(currentWaypoint, WaypointPositions[currentWaypoint]);
|
||||
}
|
||||
void MoveToCorner()
|
||||
{
|
||||
switch(me->GetEntry())
|
||||
{
|
||||
case NPC_THANE_KORTHAZZ: currentWaypoint = 0; break;
|
||||
case NPC_LADY_BLAUMEUX: currentWaypoint = 3; break;
|
||||
case NPC_BARON_RIVENDARE: currentWaypoint = 6; break;
|
||||
case NPC_SIR_ZELIEK: currentWaypoint = 9; break;
|
||||
}
|
||||
me->GetMotionMaster()->MovePoint(currentWaypoint, WaypointPositions[currentWaypoint]);
|
||||
}
|
||||
|
||||
bool IsInRoom()
|
||||
{
|
||||
if (me->GetExactDist(2535.1f, -2968.7f, 241.3f) > 100.0f)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
bool IsInRoom()
|
||||
{
|
||||
if (me->GetExactDist(2535.1f, -2968.7f, 241.3f) > 100.0f)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->SetPosition(me->GetHomePosition());
|
||||
movementPhase = MOVE_PHASE_NONE;
|
||||
currentWaypoint = 0;
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
events.Reset();
|
||||
void Reset()
|
||||
{
|
||||
me->SetPosition(me->GetHomePosition());
|
||||
movementPhase = MOVE_PHASE_NONE;
|
||||
currentWaypoint = 0;
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
events.Reset();
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_HORSEMAN, NOT_STARTED);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_HORSEMAN, NOT_STARTED);
|
||||
|
||||
// Schedule Events
|
||||
events.RescheduleEvent(EVENT_SPELL_MARK_CAST, 24000);
|
||||
events.RescheduleEvent(EVENT_BERSERK, 100*15000);
|
||||
// Schedule Events
|
||||
events.RescheduleEvent(EVENT_SPELL_MARK_CAST, 24000);
|
||||
events.RescheduleEvent(EVENT_BERSERK, 100*15000);
|
||||
|
||||
if ((me->GetEntry() != NPC_LADY_BLAUMEUX && me->GetEntry() != NPC_SIR_ZELIEK))
|
||||
events.RescheduleEvent(EVENT_SPELL_PRIMARY, 10000+rand()%5000);
|
||||
else
|
||||
{
|
||||
events.RescheduleEvent(EVENT_SPELL_PUNISH, 5000);
|
||||
events.RescheduleEvent(EVENT_SPELL_SECONDARY, 15000);
|
||||
}
|
||||
}
|
||||
if ((me->GetEntry() != NPC_LADY_BLAUMEUX && me->GetEntry() != NPC_SIR_ZELIEK))
|
||||
events.RescheduleEvent(EVENT_SPELL_PRIMARY, 10000+rand()%5000);
|
||||
else
|
||||
{
|
||||
events.RescheduleEvent(EVENT_SPELL_PUNISH, 5000);
|
||||
events.RescheduleEvent(EVENT_SPELL_SECONDARY, 15000);
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
// final waypoint
|
||||
if (id % 3 == 2)
|
||||
{
|
||||
movementPhase = MOVE_PHASE_FINISHED;
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
// final waypoint
|
||||
if (id % 3 == 2)
|
||||
{
|
||||
movementPhase = MOVE_PHASE_FINISHED;
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
me->SetInCombatWithZone();
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
me->SetInCombatWithZone();
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->GetEntry() == NPC_LADY_BLAUMEUX || me->GetEntry() == NPC_SIR_ZELIEK)
|
||||
{
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (me->GetEntry() == NPC_LADY_BLAUMEUX || me->GetEntry() == NPC_SIR_ZELIEK)
|
||||
{
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
currentWaypoint = id+1;
|
||||
}
|
||||
currentWaypoint = id+1;
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (movementPhase == MOVE_PHASE_FINISHED)
|
||||
{
|
||||
if (me->GetEntry() == NPC_LADY_BLAUMEUX || me->GetEntry() == NPC_SIR_ZELIEK)
|
||||
me->Attack(who, false);
|
||||
else
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
}
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (movementPhase == MOVE_PHASE_FINISHED)
|
||||
{
|
||||
if (me->GetEntry() == NPC_LADY_BLAUMEUX || me->GetEntry() == NPC_SIR_ZELIEK)
|
||||
me->Attack(who, false);
|
||||
else
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!urand(0,4))
|
||||
Talk(SAY_SLAY);
|
||||
if (!urand(0,4))
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_HORSEMAN, DONE);
|
||||
if (pInstance->GetData(EVENT_HORSEMAN) == DONE)
|
||||
if (!me->GetMap()->GetPlayers().isEmpty())
|
||||
if (Player* player = me->GetMap()->GetPlayers().getFirst()->GetSource())
|
||||
player->SummonGameObject(RAID_MODE(GO_HORSEMEN_CHEST_10, GO_HORSEMEN_CHEST_25), 2514.8f, -2944.9f, 245.55f, 5.51f, 0, 0, 0, 0, 0);
|
||||
}
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_HORSEMAN, DONE);
|
||||
if (pInstance->GetData(EVENT_HORSEMAN) == DONE)
|
||||
if (!me->GetMap()->GetPlayers().isEmpty())
|
||||
if (Player* player = me->GetMap()->GetPlayers().getFirst()->GetSource())
|
||||
player->SummonGameObject(RAID_MODE(GO_HORSEMEN_CHEST_10, GO_HORSEMEN_CHEST_25), 2514.8f, -2944.9f, 245.55f, 5.51f, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_HORSEMAN, IN_PROGRESS);
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_HORSEMAN, IN_PROGRESS);
|
||||
|
||||
if (movementPhase == MOVE_PHASE_NONE)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
if (movementPhase == MOVE_PHASE_NONE)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
movementPhase = MOVE_PHASE_STARTED;
|
||||
me->SetSpeed(MOVE_RUN, me->GetSpeedRate(MOVE_RUN), true);
|
||||
MoveToCorner();
|
||||
}
|
||||
}
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
movementPhase = MOVE_PHASE_STARTED;
|
||||
me->SetSpeed(MOVE_RUN, me->GetSpeedRate(MOVE_RUN), true);
|
||||
MoveToCorner();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (movementPhase == MOVE_PHASE_STARTED && currentWaypoint)
|
||||
{
|
||||
me->GetMotionMaster()->MovePoint(currentWaypoint, WaypointPositions[currentWaypoint]);
|
||||
currentWaypoint = 0;
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (movementPhase == MOVE_PHASE_STARTED && currentWaypoint)
|
||||
{
|
||||
me->GetMotionMaster()->MovePoint(currentWaypoint, WaypointPositions[currentWaypoint]);
|
||||
currentWaypoint = 0;
|
||||
}
|
||||
|
||||
if (!IsInRoom())
|
||||
return;
|
||||
if (!IsInRoom())
|
||||
return;
|
||||
|
||||
if (movementPhase < MOVE_PHASE_FINISHED || !UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
if (movementPhase < MOVE_PHASE_FINISHED || !UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_MARK_CAST:
|
||||
me->CastSpell(me, TABLE_SPELL_MARK[horsemanId], false);
|
||||
events.RepeatEvent((me->GetEntry() == NPC_LADY_BLAUMEUX || me->GetEntry() == NPC_SIR_ZELIEK) ? 15000 : 12000);
|
||||
return;
|
||||
case EVENT_BERSERK:
|
||||
Talk(SAY_SPECIAL);
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
return;
|
||||
case EVENT_SPELL_PRIMARY:
|
||||
if (!urand(0,10))
|
||||
Talk(SAY_TAUNT);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_MARK_CAST:
|
||||
me->CastSpell(me, TABLE_SPELL_MARK[horsemanId], false);
|
||||
events.RepeatEvent((me->GetEntry() == NPC_LADY_BLAUMEUX || me->GetEntry() == NPC_SIR_ZELIEK) ? 15000 : 12000);
|
||||
return;
|
||||
case EVENT_BERSERK:
|
||||
Talk(SAY_SPECIAL);
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
return;
|
||||
case EVENT_SPELL_PRIMARY:
|
||||
if (!urand(0,10))
|
||||
Talk(SAY_TAUNT);
|
||||
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId]), false);
|
||||
events.RepeatEvent(15000);
|
||||
return;
|
||||
case EVENT_SPELL_PUNISH:
|
||||
if (!SelectTarget(SELECT_TARGET_NEAREST, 0, 45.0f, true))
|
||||
me->CastSpell(me, TABLE_SPELL_PUNISH[horsemanId], false);
|
||||
events.RepeatEvent(3000);
|
||||
return;
|
||||
case EVENT_SPELL_SECONDARY:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(TABLE_SPELL_SECONDARY_10[horsemanId], TABLE_SPELL_SECONDARY_25[horsemanId]), false);
|
||||
events.RepeatEvent(15000);
|
||||
return;
|
||||
}
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId]), false);
|
||||
events.RepeatEvent(15000);
|
||||
return;
|
||||
case EVENT_SPELL_PUNISH:
|
||||
if (!SelectTarget(SELECT_TARGET_NEAREST, 0, 45.0f, true))
|
||||
me->CastSpell(me, TABLE_SPELL_PUNISH[horsemanId], false);
|
||||
events.RepeatEvent(3000);
|
||||
return;
|
||||
case EVENT_SPELL_SECONDARY:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(TABLE_SPELL_SECONDARY_10[horsemanId], TABLE_SPELL_SECONDARY_25[horsemanId]), false);
|
||||
events.RepeatEvent(15000);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((me->GetEntry() == NPC_LADY_BLAUMEUX || me->GetEntry() == NPC_SIR_ZELIEK))
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0, 45.0f, true))
|
||||
me->CastSpell(target, RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId]), false);
|
||||
}
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
if ((me->GetEntry() == NPC_LADY_BLAUMEUX || me->GetEntry() == NPC_SIR_ZELIEK))
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0, 45.0f, true))
|
||||
me->CastSpell(target, RAID_MODE(TABLE_SPELL_PRIMARY_10[horsemanId], TABLE_SPELL_PRIMARY_25[horsemanId]), false);
|
||||
}
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_four_horsemen_mark : public SpellScriptLoader
|
||||
@@ -394,5 +394,5 @@ class spell_four_horsemen_mark : public SpellScriptLoader
|
||||
void AddSC_boss_four_horsemen()
|
||||
{
|
||||
new boss_four_horsemen();
|
||||
new spell_four_horsemen_mark();
|
||||
new spell_four_horsemen_mark();
|
||||
}
|
||||
@@ -10,29 +10,29 @@ REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_MORTAL_WOUND = 25646,
|
||||
SPELL_ENRAGE_10 = 28371,
|
||||
SPELL_ENRAGE_25 = 54427,
|
||||
SPELL_DECIMATE_10 = 28374,
|
||||
SPELL_DECIMATE_25 = 54426,
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_INFECTED_WOUND = 29306,
|
||||
SPELL_CHOW_SEARCHER = 28404,
|
||||
SPELL_MORTAL_WOUND = 25646,
|
||||
SPELL_ENRAGE_10 = 28371,
|
||||
SPELL_ENRAGE_25 = 54427,
|
||||
SPELL_DECIMATE_10 = 28374,
|
||||
SPELL_DECIMATE_25 = 54426,
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_INFECTED_WOUND = 29306,
|
||||
SPELL_CHOW_SEARCHER = 28404,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_MORTAL_WOUND = 1,
|
||||
EVENT_SPELL_ENRAGE = 2,
|
||||
EVENT_SPELL_DECIMATE = 3,
|
||||
EVENT_SPELL_BERSERK = 4,
|
||||
EVENT_SUMMON_ZOMBIE = 5,
|
||||
EVENT_CAN_EAT_ZOMBIE = 6,
|
||||
EVENT_SPELL_MORTAL_WOUND = 1,
|
||||
EVENT_SPELL_ENRAGE = 2,
|
||||
EVENT_SPELL_DECIMATE = 3,
|
||||
EVENT_SPELL_BERSERK = 4,
|
||||
EVENT_SUMMON_ZOMBIE = 5,
|
||||
EVENT_CAN_EAT_ZOMBIE = 6,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_ZOMBIE_CHOW = 16360,
|
||||
NPC_ZOMBIE_CHOW = 16360,
|
||||
};
|
||||
|
||||
const Position zombiePos[3] =
|
||||
@@ -52,157 +52,157 @@ public:
|
||||
return new boss_gluthAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_gluthAI : public ScriptedAI
|
||||
{
|
||||
boss_gluthAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_gluthAI : public ScriptedAI
|
||||
{
|
||||
boss_gluthAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
uint64 gazeTarget;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->ApplySpellImmune(29306, IMMUNITY_ID, 29306, true);
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
gazeTarget = 0;
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
uint64 gazeTarget;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->ApplySpellImmune(29306, IMMUNITY_ID, 29306, true);
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
gazeTarget = 0;
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GLUTH, NOT_STARTED);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GLUTH, NOT_STARTED);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if ((!me->GetVictim() || me->GetVictim()->GetEntry() != NPC_ZOMBIE_CHOW) && who->GetEntry() == NPC_ZOMBIE_CHOW && me->IsWithinDistInMap(who, 15))
|
||||
{
|
||||
SetGazeOn(who);
|
||||
me->MonsterTextEmote("%s spots a nearby zombie to devour!", 0, false);
|
||||
}
|
||||
else
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if ((!me->GetVictim() || me->GetVictim()->GetEntry() != NPC_ZOMBIE_CHOW) && who->GetEntry() == NPC_ZOMBIE_CHOW && me->IsWithinDistInMap(who, 15))
|
||||
{
|
||||
SetGazeOn(who);
|
||||
me->MonsterTextEmote("%s spots a nearby zombie to devour!", 0, false);
|
||||
}
|
||||
else
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_SPELL_MORTAL_WOUND, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_ENRAGE, 30000);
|
||||
events.ScheduleEvent(EVENT_SPELL_DECIMATE, 105000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 8*60000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_ZOMBIE, 10000);
|
||||
events.ScheduleEvent(EVENT_CAN_EAT_ZOMBIE, 1000);
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_SPELL_MORTAL_WOUND, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_ENRAGE, 30000);
|
||||
events.ScheduleEvent(EVENT_SPELL_DECIMATE, 105000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 8*60000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_ZOMBIE, 10000);
|
||||
events.ScheduleEvent(EVENT_CAN_EAT_ZOMBIE, 1000);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GLUTH, IN_PROGRESS);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GLUTH, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
if (summon->GetEntry() == NPC_ZOMBIE_CHOW)
|
||||
summon->AI()->AttackStart(me);
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
if (summon->GetEntry() == NPC_ZOMBIE_CHOW)
|
||||
summon->AI()->AttackStart(me);
|
||||
|
||||
summons.Summon(summon);
|
||||
}
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
void SummonedCreatureDies(Creature* cr, Unit*) { summons.Despawn(cr); }
|
||||
void SummonedCreatureDies(Creature* cr, Unit*) { summons.Despawn(cr); }
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (me->IsAlive() && who->GetEntry() == NPC_ZOMBIE_CHOW)
|
||||
me->ModifyHealth(int32(me->GetMaxHealth()*0.05f));
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (me->IsAlive() && who->GetEntry() == NPC_ZOMBIE_CHOW)
|
||||
me->ModifyHealth(int32(me->GetMaxHealth()*0.05f));
|
||||
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit*)
|
||||
{
|
||||
summons.DespawnAll();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GLUTH, DONE);
|
||||
}
|
||||
void JustDied(Unit*)
|
||||
{
|
||||
summons.DespawnAll();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GLUTH, DONE);
|
||||
}
|
||||
|
||||
bool SelectPlayerInRoom()
|
||||
{
|
||||
if (me->IsInCombat())
|
||||
return false;
|
||||
bool SelectPlayerInRoom()
|
||||
{
|
||||
if (me->IsInCombat())
|
||||
return false;
|
||||
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
if (!player || !player->IsAlive())
|
||||
continue;
|
||||
if (player->GetPositionZ() > 300.0f || me->GetExactDist(player) > 50.0f)
|
||||
continue;
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
if (!player || !player->IsAlive())
|
||||
continue;
|
||||
if (player->GetPositionZ() > 300.0f || me->GetExactDist(player) > 50.0f)
|
||||
continue;
|
||||
|
||||
AttackStart(player);
|
||||
return true;
|
||||
}
|
||||
AttackStart(player);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictimWithGaze() && !SelectPlayerInRoom())
|
||||
return;
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictimWithGaze() && !SelectPlayerInRoom())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SPELL_ENRAGE:
|
||||
me->MonsterTextEmote("Gluth becomes enraged!", 0, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_ENRAGE_10, SPELL_ENRAGE_25), true);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_SPELL_MORTAL_WOUND:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MORTAL_WOUND, false);
|
||||
events.RepeatEvent(10000);
|
||||
break;
|
||||
case EVENT_SPELL_DECIMATE:
|
||||
me->MonsterTextEmote("Gluth decimates all nearby flesh!", 0, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_DECIMATE_10, SPELL_DECIMATE_25), false);
|
||||
events.RepeatEvent(105000);
|
||||
break;
|
||||
case EVENT_SUMMON_ZOMBIE:
|
||||
{
|
||||
uint8 rand = urand(0,2);
|
||||
for (int32 i = 0; i < RAID_MODE(1,2); ++i)
|
||||
{
|
||||
me->SummonCreature(NPC_ZOMBIE_CHOW, zombiePos[urand(0,2)]);
|
||||
(rand == 2 ? rand = 0 : rand++);
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SPELL_ENRAGE:
|
||||
me->MonsterTextEmote("Gluth becomes enraged!", 0, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_ENRAGE_10, SPELL_ENRAGE_25), true);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_SPELL_MORTAL_WOUND:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MORTAL_WOUND, false);
|
||||
events.RepeatEvent(10000);
|
||||
break;
|
||||
case EVENT_SPELL_DECIMATE:
|
||||
me->MonsterTextEmote("Gluth decimates all nearby flesh!", 0, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_DECIMATE_10, SPELL_DECIMATE_25), false);
|
||||
events.RepeatEvent(105000);
|
||||
break;
|
||||
case EVENT_SUMMON_ZOMBIE:
|
||||
{
|
||||
uint8 rand = urand(0,2);
|
||||
for (int32 i = 0; i < RAID_MODE(1,2); ++i)
|
||||
{
|
||||
me->SummonCreature(NPC_ZOMBIE_CHOW, zombiePos[urand(0,2)]);
|
||||
(rand == 2 ? rand = 0 : rand++);
|
||||
}
|
||||
|
||||
events.RepeatEvent(10000);
|
||||
break;
|
||||
}
|
||||
case EVENT_CAN_EAT_ZOMBIE:
|
||||
events.RepeatEvent(1000);
|
||||
if (me->GetVictim()->GetEntry() == NPC_ZOMBIE_CHOW && me->IsWithinMeleeRange(me->GetVictim()))
|
||||
{
|
||||
me->CastCustomSpell(SPELL_CHOW_SEARCHER, SPELLVALUE_RADIUS_MOD, 20000, me, true);
|
||||
me->MonsterTextEmote("%s devour all nearby zombies!", 0, false);
|
||||
return; // leave it to skip DoMeleeAttackIfReady
|
||||
}
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(10000);
|
||||
break;
|
||||
}
|
||||
case EVENT_CAN_EAT_ZOMBIE:
|
||||
events.RepeatEvent(1000);
|
||||
if (me->GetVictim()->GetEntry() == NPC_ZOMBIE_CHOW && me->IsWithinMeleeRange(me->GetVictim()))
|
||||
{
|
||||
me->CastCustomSpell(SPELL_CHOW_SEARCHER, SPELLVALUE_RADIUS_MOD, 20000, me, true);
|
||||
me->MonsterTextEmote("%s devour all nearby zombies!", 0, false);
|
||||
return; // leave it to skip DoMeleeAttackIfReady
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_gluth_decimate : public SpellScriptLoader
|
||||
@@ -218,18 +218,18 @@ class spell_gluth_decimate : public SpellScriptLoader
|
||||
{
|
||||
if (Unit* unitTarget = GetHitUnit())
|
||||
{
|
||||
int32 damage = int32(unitTarget->GetHealth()) - int32(unitTarget->CountPctFromMaxHealth(5));
|
||||
if (damage <= 0)
|
||||
return;
|
||||
int32 damage = int32(unitTarget->GetHealth()) - int32(unitTarget->CountPctFromMaxHealth(5));
|
||||
if (damage <= 0)
|
||||
return;
|
||||
|
||||
if (Creature* cTarget = unitTarget->ToCreature())
|
||||
{
|
||||
cTarget->SetWalk(true);
|
||||
cTarget->GetMotionMaster()->MoveFollow(GetCaster(), 0.0f, 0.0f, MOTION_SLOT_CONTROLLED);
|
||||
cTarget->SetReactState(REACT_PASSIVE);
|
||||
Unit::DealDamage(GetCaster(), cTarget, damage);
|
||||
return;
|
||||
}
|
||||
if (Creature* cTarget = unitTarget->ToCreature())
|
||||
{
|
||||
cTarget->SetWalk(true);
|
||||
cTarget->GetMotionMaster()->MoveFollow(GetCaster(), 0.0f, 0.0f, MOTION_SLOT_CONTROLLED);
|
||||
cTarget->SetReactState(REACT_PASSIVE);
|
||||
Unit::DealDamage(GetCaster(), cTarget, damage);
|
||||
return;
|
||||
}
|
||||
|
||||
GetCaster()->CastCustomSpell(28375, SPELLVALUE_BASE_POINT0, damage, unitTarget);
|
||||
}
|
||||
@@ -237,7 +237,7 @@ class spell_gluth_decimate : public SpellScriptLoader
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gluth_decimate_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gluth_decimate_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -250,6 +250,6 @@ class spell_gluth_decimate : public SpellScriptLoader
|
||||
void AddSC_boss_gluth()
|
||||
{
|
||||
new boss_gluth();
|
||||
new spell_gluth_decimate();
|
||||
new spell_gluth_decimate();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,67 +19,67 @@ enum Yells
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_HARVEST_SOUL = 28679,
|
||||
SPELL_SHADOW_BOLT_10 = 29317,
|
||||
SPELL_SHADOW_BOLT_25 = 56405,
|
||||
SPELL_INFORM_LIVING_TRAINEE = 27892,
|
||||
SPELL_INFORM_LIVING_KNIGHT = 27928,
|
||||
SPELL_INFORM_LIVING_RIDER = 27935,
|
||||
SPELL_INFORM_DEAD_TRAINEE = 27915,
|
||||
SPELL_INFORM_DEAD_KNIGHT = 27931,
|
||||
SPELL_INFORM_DEAD_RIDER = 27937,
|
||||
SPELL_HARVEST_SOUL = 28679,
|
||||
SPELL_SHADOW_BOLT_10 = 29317,
|
||||
SPELL_SHADOW_BOLT_25 = 56405,
|
||||
SPELL_INFORM_LIVING_TRAINEE = 27892,
|
||||
SPELL_INFORM_LIVING_KNIGHT = 27928,
|
||||
SPELL_INFORM_LIVING_RIDER = 27935,
|
||||
SPELL_INFORM_DEAD_TRAINEE = 27915,
|
||||
SPELL_INFORM_DEAD_KNIGHT = 27931,
|
||||
SPELL_INFORM_DEAD_RIDER = 27937,
|
||||
|
||||
SPELL_SHADOW_MARK = 27825
|
||||
SPELL_SHADOW_MARK = 27825
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_LIVING_TRAINEE = 16124,
|
||||
NPC_LIVING_KNIGHT = 16125,
|
||||
NPC_LIVING_RIDER = 16126,
|
||||
NPC_DEAD_TRAINEE = 16127,
|
||||
NPC_DEAD_KNIGHT = 16148,
|
||||
NPC_DEAD_HORSE = 16149,
|
||||
NPC_DEAD_RIDER = 16150,
|
||||
NPC_LIVING_TRAINEE = 16124,
|
||||
NPC_LIVING_KNIGHT = 16125,
|
||||
NPC_LIVING_RIDER = 16126,
|
||||
NPC_DEAD_TRAINEE = 16127,
|
||||
NPC_DEAD_KNIGHT = 16148,
|
||||
NPC_DEAD_HORSE = 16149,
|
||||
NPC_DEAD_RIDER = 16150,
|
||||
|
||||
ACTION_GATE_OPEN = 1,
|
||||
ACTION_GATE_OPEN = 1,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SUMMON_ADDS = 1,
|
||||
EVENT_SPELL_HARVEST_SOUL = 2,
|
||||
EVENT_SPELL_SHADOW_BOLT = 3,
|
||||
EVENT_TELEPORT = 4,
|
||||
EVENT_CHECK_HEALTH = 5,
|
||||
EVENT_CHECK_PLAYERS = 6,
|
||||
EVENT_SUMMON_ADDS = 1,
|
||||
EVENT_SPELL_HARVEST_SOUL = 2,
|
||||
EVENT_SPELL_SHADOW_BOLT = 3,
|
||||
EVENT_TELEPORT = 4,
|
||||
EVENT_CHECK_HEALTH = 5,
|
||||
EVENT_CHECK_PLAYERS = 6,
|
||||
};
|
||||
|
||||
const uint32 gothikWaves[24][2] =
|
||||
{
|
||||
{NPC_LIVING_TRAINEE, 20000},
|
||||
{NPC_LIVING_TRAINEE, 20000},
|
||||
{NPC_LIVING_TRAINEE, 10000},
|
||||
{NPC_LIVING_KNIGHT, 10000},
|
||||
{NPC_LIVING_TRAINEE, 15000},
|
||||
{NPC_LIVING_KNIGHT, 10000},
|
||||
{NPC_LIVING_TRAINEE, 15000},
|
||||
{NPC_LIVING_TRAINEE, 0},
|
||||
{NPC_LIVING_KNIGHT, 10000},
|
||||
{NPC_LIVING_RIDER, 10000},
|
||||
{NPC_LIVING_TRAINEE, 5000},
|
||||
{NPC_LIVING_KNIGHT, 15000},
|
||||
{NPC_LIVING_RIDER, 0},
|
||||
{NPC_LIVING_TRAINEE, 10000},
|
||||
{NPC_LIVING_KNIGHT, 10000},
|
||||
{NPC_LIVING_TRAINEE, 10000},
|
||||
{NPC_LIVING_RIDER, 5000},
|
||||
{NPC_LIVING_KNIGHT, 5000},
|
||||
{NPC_LIVING_TRAINEE, 20000},
|
||||
{NPC_LIVING_RIDER, 0},
|
||||
{NPC_LIVING_KNIGHT, 0},
|
||||
{NPC_LIVING_TRAINEE, 15000},
|
||||
{NPC_LIVING_TRAINEE, 29000},
|
||||
{NPC_LIVING_TRAINEE, 20000},
|
||||
{NPC_LIVING_TRAINEE, 20000},
|
||||
{NPC_LIVING_TRAINEE, 10000},
|
||||
{NPC_LIVING_KNIGHT, 10000},
|
||||
{NPC_LIVING_TRAINEE, 15000},
|
||||
{NPC_LIVING_KNIGHT, 10000},
|
||||
{NPC_LIVING_TRAINEE, 15000},
|
||||
{NPC_LIVING_TRAINEE, 0},
|
||||
{NPC_LIVING_KNIGHT, 10000},
|
||||
{NPC_LIVING_RIDER, 10000},
|
||||
{NPC_LIVING_TRAINEE, 5000},
|
||||
{NPC_LIVING_KNIGHT, 15000},
|
||||
{NPC_LIVING_RIDER, 0},
|
||||
{NPC_LIVING_TRAINEE, 10000},
|
||||
{NPC_LIVING_KNIGHT, 10000},
|
||||
{NPC_LIVING_TRAINEE, 10000},
|
||||
{NPC_LIVING_RIDER, 5000},
|
||||
{NPC_LIVING_KNIGHT, 5000},
|
||||
{NPC_LIVING_TRAINEE, 20000},
|
||||
{NPC_LIVING_RIDER, 0},
|
||||
{NPC_LIVING_KNIGHT, 0},
|
||||
{NPC_LIVING_TRAINEE, 15000},
|
||||
{NPC_LIVING_TRAINEE, 29000},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
@@ -119,9 +119,9 @@ struct NotOnSameSide : public std::unary_function<Unit *, bool>
|
||||
bool m_inLiveSide;
|
||||
NotOnSameSide(Unit *pSource) : m_inLiveSide(IN_LIVE_SIDE(pSource)) {}
|
||||
|
||||
bool operator() (const Unit *pTarget)
|
||||
{
|
||||
return (m_inLiveSide != IN_LIVE_SIDE(pTarget));
|
||||
bool operator() (const Unit *pTarget)
|
||||
{
|
||||
return (m_inLiveSide != IN_LIVE_SIDE(pTarget));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -135,281 +135,281 @@ public:
|
||||
return new boss_gothikAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_gothikAI : public ScriptedAI
|
||||
{
|
||||
boss_gothikAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_gothikAI : public ScriptedAI
|
||||
{
|
||||
boss_gothikAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
bool secondPhase;
|
||||
bool gateOpened;
|
||||
uint8 waveCount;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
bool secondPhase;
|
||||
bool gateOpened;
|
||||
uint8 waveCount;
|
||||
|
||||
bool IsInRoom()
|
||||
{
|
||||
if (me->GetPositionX() > 2767 || me->GetPositionX() < 2618 || me->GetPositionY() > -3285 || me->GetPositionY() < -3435)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
bool IsInRoom()
|
||||
{
|
||||
if (me->GetPositionX() > 2767 || me->GetPositionX() < 2618 || me->GetPositionY() > -3285 || me->GetPositionY() < -3435)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_DISABLE_MOVE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
secondPhase = false;
|
||||
gateOpened = false;
|
||||
waveCount = 0;
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_DISABLE_MOVE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
secondPhase = false;
|
||||
gateOpened = false;
|
||||
waveCount = 0;
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_GOTHIK, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_ENTER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_EXIT_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_GOTHIK, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_ENTER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_EXIT_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
Talk(SAY_SPEECH);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_DISABLE_MOVE);
|
||||
me->NearTeleportTo(PosPlatform.GetPositionX(), PosPlatform.GetPositionY(), PosPlatform.GetPositionZ(), PosPlatform.GetOrientation());
|
||||
|
||||
events.ScheduleEvent(EVENT_SUMMON_ADDS, 30000);
|
||||
events.ScheduleEvent(EVENT_CHECK_PLAYERS, 120000);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_GOTHIK, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_ENTER_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
Talk(SAY_SPEECH);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_DISABLE_MOVE);
|
||||
me->NearTeleportTo(PosPlatform.GetPositionX(), PosPlatform.GetPositionY(), PosPlatform.GetPositionZ(), PosPlatform.GetOrientation());
|
||||
|
||||
events.ScheduleEvent(EVENT_SUMMON_ADDS, 30000);
|
||||
events.ScheduleEvent(EVENT_CHECK_PLAYERS, 120000);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_GOTHIK, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_ENTER_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
if (gateOpened)
|
||||
summon->AI()->DoAction(ACTION_GATE_OPEN);
|
||||
|
||||
summons.Summon(summon);
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
if (gateOpened)
|
||||
summon->AI()->DoAction(ACTION_GATE_OPEN);
|
||||
|
||||
summons.Summon(summon);
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* cr) { summons.Despawn(cr); }
|
||||
void SummonedCreatureDespawn(Creature* cr) { summons.Despawn(cr); }
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_KILL);
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_KILL);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
summons.DespawnAll();
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
summons.DespawnAll();
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_GOTHIK, DONE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_ENTER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_EXIT_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_GOTHIK, DONE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_ENTER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_EXIT_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
void SummonHelpers(uint32 entry)
|
||||
{
|
||||
switch(entry)
|
||||
{
|
||||
case NPC_LIVING_TRAINEE:
|
||||
me->SummonCreature(NPC_LIVING_TRAINEE, PosSummonLiving[0].GetPositionX(), PosSummonLiving[0].GetPositionY(), PosSummonLiving[0].GetPositionZ(), PosSummonLiving[0].GetOrientation());
|
||||
me->SummonCreature(NPC_LIVING_TRAINEE, PosSummonLiving[1].GetPositionX(), PosSummonLiving[1].GetPositionY(), PosSummonLiving[1].GetPositionZ(), PosSummonLiving[1].GetOrientation());
|
||||
if (Is25ManRaid())
|
||||
me->SummonCreature(NPC_LIVING_TRAINEE, PosSummonLiving[2].GetPositionX(), PosSummonLiving[2].GetPositionY(), PosSummonLiving[2].GetPositionZ(), PosSummonLiving[2].GetOrientation());
|
||||
break;
|
||||
case NPC_LIVING_KNIGHT:
|
||||
me->SummonCreature(NPC_LIVING_KNIGHT, PosSummonLiving[3].GetPositionX(), PosSummonLiving[3].GetPositionY(), PosSummonLiving[3].GetPositionZ(), PosSummonLiving[3].GetOrientation());
|
||||
if (Is25ManRaid())
|
||||
me->SummonCreature(NPC_LIVING_KNIGHT, PosSummonLiving[5].GetPositionX(), PosSummonLiving[5].GetPositionY(), PosSummonLiving[5].GetPositionZ(), PosSummonLiving[5].GetOrientation());
|
||||
break;
|
||||
case NPC_LIVING_RIDER:
|
||||
me->SummonCreature(NPC_LIVING_RIDER, PosSummonLiving[4].GetPositionX(), PosSummonLiving[4].GetPositionY(), PosSummonLiving[4].GetPositionZ(), PosSummonLiving[4].GetOrientation());
|
||||
break;
|
||||
}
|
||||
}
|
||||
void SummonHelpers(uint32 entry)
|
||||
{
|
||||
switch(entry)
|
||||
{
|
||||
case NPC_LIVING_TRAINEE:
|
||||
me->SummonCreature(NPC_LIVING_TRAINEE, PosSummonLiving[0].GetPositionX(), PosSummonLiving[0].GetPositionY(), PosSummonLiving[0].GetPositionZ(), PosSummonLiving[0].GetOrientation());
|
||||
me->SummonCreature(NPC_LIVING_TRAINEE, PosSummonLiving[1].GetPositionX(), PosSummonLiving[1].GetPositionY(), PosSummonLiving[1].GetPositionZ(), PosSummonLiving[1].GetOrientation());
|
||||
if (Is25ManRaid())
|
||||
me->SummonCreature(NPC_LIVING_TRAINEE, PosSummonLiving[2].GetPositionX(), PosSummonLiving[2].GetPositionY(), PosSummonLiving[2].GetPositionZ(), PosSummonLiving[2].GetOrientation());
|
||||
break;
|
||||
case NPC_LIVING_KNIGHT:
|
||||
me->SummonCreature(NPC_LIVING_KNIGHT, PosSummonLiving[3].GetPositionX(), PosSummonLiving[3].GetPositionY(), PosSummonLiving[3].GetPositionZ(), PosSummonLiving[3].GetOrientation());
|
||||
if (Is25ManRaid())
|
||||
me->SummonCreature(NPC_LIVING_KNIGHT, PosSummonLiving[5].GetPositionX(), PosSummonLiving[5].GetPositionY(), PosSummonLiving[5].GetPositionZ(), PosSummonLiving[5].GetOrientation());
|
||||
break;
|
||||
case NPC_LIVING_RIDER:
|
||||
me->SummonCreature(NPC_LIVING_RIDER, PosSummonLiving[4].GetPositionX(), PosSummonLiving[4].GetPositionY(), PosSummonLiving[4].GetPositionZ(), PosSummonLiving[4].GetOrientation());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool CheckGroupSplitted()
|
||||
{
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
{
|
||||
bool checklife = false;
|
||||
bool checkdead = false;
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
Player* player = i->GetSource();
|
||||
if (player->IsAlive() &&
|
||||
player->GetPositionX() <= POS_X_NORTH &&
|
||||
player->GetPositionX() >= POS_X_SOUTH &&
|
||||
player->GetPositionY() <= POS_Y_GATE &&
|
||||
player->GetPositionY() >= POS_Y_EAST)
|
||||
checklife = true;
|
||||
else if (player->IsAlive() &&
|
||||
player->GetPositionX() <= POS_X_NORTH &&
|
||||
player->GetPositionX() >= POS_X_SOUTH &&
|
||||
player->GetPositionY() >= POS_Y_GATE &&
|
||||
player->GetPositionY() <= POS_Y_WEST)
|
||||
checkdead = true;
|
||||
bool CheckGroupSplitted()
|
||||
{
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
{
|
||||
bool checklife = false;
|
||||
bool checkdead = false;
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
Player* player = i->GetSource();
|
||||
if (player->IsAlive() &&
|
||||
player->GetPositionX() <= POS_X_NORTH &&
|
||||
player->GetPositionX() >= POS_X_SOUTH &&
|
||||
player->GetPositionY() <= POS_Y_GATE &&
|
||||
player->GetPositionY() >= POS_Y_EAST)
|
||||
checklife = true;
|
||||
else if (player->IsAlive() &&
|
||||
player->GetPositionX() <= POS_X_NORTH &&
|
||||
player->GetPositionX() >= POS_X_SOUTH &&
|
||||
player->GetPositionY() >= POS_Y_GATE &&
|
||||
player->GetPositionY() <= POS_Y_WEST)
|
||||
checkdead = true;
|
||||
|
||||
if (checklife && checkdead)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (checklife && checkdead)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellInfo* spellInfo)
|
||||
{
|
||||
uint8 pos = urand(0,4);
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case SPELL_INFORM_LIVING_TRAINEE:
|
||||
me->SummonCreature(NPC_DEAD_TRAINEE, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
case SPELL_INFORM_LIVING_KNIGHT:
|
||||
me->SummonCreature(NPC_DEAD_KNIGHT, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
case SPELL_INFORM_LIVING_RIDER:
|
||||
me->SummonCreature(NPC_DEAD_RIDER, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
me->SummonCreature(NPC_DEAD_HORSE, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
}
|
||||
void SpellHit(Unit *caster, const SpellInfo* spellInfo)
|
||||
{
|
||||
uint8 pos = urand(0,4);
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case SPELL_INFORM_LIVING_TRAINEE:
|
||||
me->SummonCreature(NPC_DEAD_TRAINEE, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
case SPELL_INFORM_LIVING_KNIGHT:
|
||||
me->SummonCreature(NPC_DEAD_KNIGHT, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
case SPELL_INFORM_LIVING_RIDER:
|
||||
me->SummonCreature(NPC_DEAD_RIDER, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
me->SummonCreature(NPC_DEAD_HORSE, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
}
|
||||
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST);
|
||||
}
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32 &damage, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
if (!secondPhase)
|
||||
damage = 0;
|
||||
}
|
||||
void DamageTaken(Unit*, uint32 &damage, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
if (!secondPhase)
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!IsInRoom())
|
||||
return;
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!IsInRoom())
|
||||
return;
|
||||
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_SHADOW_BOLT:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_SHADOW_BOLT_10, SPELL_SHADOW_BOLT_25), false);
|
||||
events.RepeatEvent(2000);
|
||||
break;
|
||||
case EVENT_SPELL_HARVEST_SOUL:
|
||||
me->CastSpell(me, SPELL_HARVEST_SOUL, false);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_TELEPORT:
|
||||
me->AttackStop();
|
||||
if (IN_LIVE_SIDE(me))
|
||||
me->NearTeleportTo(PosGroundDeadSide.GetPositionX(), PosGroundDeadSide.GetPositionY(), PosGroundDeadSide.GetPositionZ(), PosGroundDeadSide.GetOrientation());
|
||||
else
|
||||
me->NearTeleportTo(PosGroundLivingSide.GetPositionX(), PosGroundLivingSide.GetPositionY(), PosGroundLivingSide.GetPositionZ(), PosGroundLivingSide.GetOrientation());
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_SHADOW_BOLT:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_SHADOW_BOLT_10, SPELL_SHADOW_BOLT_25), false);
|
||||
events.RepeatEvent(2000);
|
||||
break;
|
||||
case EVENT_SPELL_HARVEST_SOUL:
|
||||
me->CastSpell(me, SPELL_HARVEST_SOUL, false);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_TELEPORT:
|
||||
me->AttackStop();
|
||||
if (IN_LIVE_SIDE(me))
|
||||
me->NearTeleportTo(PosGroundDeadSide.GetPositionX(), PosGroundDeadSide.GetPositionY(), PosGroundDeadSide.GetPositionZ(), PosGroundDeadSide.GetOrientation());
|
||||
else
|
||||
me->NearTeleportTo(PosGroundLivingSide.GetPositionX(), PosGroundLivingSide.GetPositionY(), PosGroundLivingSide.GetPositionZ(), PosGroundLivingSide.GetOrientation());
|
||||
|
||||
me->getThreatManager().resetAggro(NotOnSameSide(me));
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_NEAREST, 0))
|
||||
{
|
||||
me->getThreatManager().addThreat(pTarget, 100.0f);
|
||||
AttackStart(pTarget);
|
||||
}
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_CHECK_HEALTH:
|
||||
if (me->HealthBelowPct(30) && pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
me->getThreatManager().resetAggro(NotOnSameSide(me));
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_NEAREST, 0))
|
||||
{
|
||||
me->getThreatManager().addThreat(pTarget, 100.0f);
|
||||
AttackStart(pTarget);
|
||||
}
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_CHECK_HEALTH:
|
||||
if (me->HealthBelowPct(30) && pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
events.CancelEvent(EVENT_TELEPORT);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_SUMMON_ADDS:
|
||||
if (gothikWaves[waveCount][0])
|
||||
{
|
||||
SummonHelpers(gothikWaves[waveCount][0]);
|
||||
events.RepeatEvent(gothikWaves[waveCount][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
secondPhase = true;
|
||||
Talk(SAY_TELEPORT);
|
||||
me->NearTeleportTo(PosGroundLivingSide.GetPositionX(), PosGroundLivingSide.GetPositionY(), PosGroundLivingSide.GetPositionZ(), PosGroundLivingSide.GetOrientation());
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_DISABLE_MOVE);
|
||||
|
||||
summons.DoAction(ACTION_GATE_OPEN);
|
||||
summons.DoZoneInCombat();
|
||||
events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 1000);
|
||||
events.ScheduleEvent(EVENT_SPELL_HARVEST_SOUL, urand(5000,15000));
|
||||
events.ScheduleEvent(EVENT_TELEPORT, 20000);
|
||||
events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000);
|
||||
events.PopEvent();
|
||||
}
|
||||
events.CancelEvent(EVENT_TELEPORT);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_SUMMON_ADDS:
|
||||
if (gothikWaves[waveCount][0])
|
||||
{
|
||||
SummonHelpers(gothikWaves[waveCount][0]);
|
||||
events.RepeatEvent(gothikWaves[waveCount][1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
secondPhase = true;
|
||||
Talk(SAY_TELEPORT);
|
||||
me->NearTeleportTo(PosGroundLivingSide.GetPositionX(), PosGroundLivingSide.GetPositionY(), PosGroundLivingSide.GetPositionZ(), PosGroundLivingSide.GetOrientation());
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_DISABLE_MOVE);
|
||||
|
||||
summons.DoAction(ACTION_GATE_OPEN);
|
||||
summons.DoZoneInCombat();
|
||||
events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 1000);
|
||||
events.ScheduleEvent(EVENT_SPELL_HARVEST_SOUL, urand(5000,15000));
|
||||
events.ScheduleEvent(EVENT_TELEPORT, 20000);
|
||||
events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000);
|
||||
events.PopEvent();
|
||||
}
|
||||
|
||||
waveCount++;
|
||||
break;
|
||||
case EVENT_CHECK_PLAYERS:
|
||||
if (!CheckGroupSplitted())
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
waveCount++;
|
||||
break;
|
||||
case EVENT_CHECK_PLAYERS:
|
||||
if (!CheckGroupSplitted())
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_GOTHIK_INNER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
summons.DoAction(ACTION_GATE_OPEN);
|
||||
summons.DoZoneInCombat();
|
||||
gateOpened = true;
|
||||
}
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
summons.DoAction(ACTION_GATE_OPEN);
|
||||
summons.DoZoneInCombat();
|
||||
gateOpened = true;
|
||||
}
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class npc_boss_gothik_minion : public CreatureScript
|
||||
@@ -422,57 +422,57 @@ public:
|
||||
return new npc_boss_gothik_minionAI (pCreature);
|
||||
}
|
||||
|
||||
struct npc_boss_gothik_minionAI : public CombatAI
|
||||
{
|
||||
npc_boss_gothik_minionAI(Creature *c) : CombatAI(c)
|
||||
{
|
||||
livingSide = IN_LIVE_SIDE(me);
|
||||
gateOpened = false;
|
||||
}
|
||||
struct npc_boss_gothik_minionAI : public CombatAI
|
||||
{
|
||||
npc_boss_gothik_minionAI(Creature *c) : CombatAI(c)
|
||||
{
|
||||
livingSide = IN_LIVE_SIDE(me);
|
||||
gateOpened = false;
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
bool livingSide;
|
||||
bool gateOpened;
|
||||
EventMap events;
|
||||
bool livingSide;
|
||||
bool gateOpened;
|
||||
|
||||
bool IsOnSameSide(Unit const* who) const { return livingSide == IN_LIVE_SIDE(who); }
|
||||
bool CanAIAttack(Unit const* target) const { return gateOpened || IsOnSameSide(target); }
|
||||
bool IsOnSameSide(Unit const* who) const { return livingSide == IN_LIVE_SIDE(who); }
|
||||
bool CanAIAttack(Unit const* target) const { return gateOpened || IsOnSameSide(target); }
|
||||
|
||||
void Reset() { events.Reset(); }
|
||||
void EnterCombat(Unit* who) { me->SetInCombatWithZone(); }
|
||||
void DamageTaken(Unit* attacker, uint32 &damage, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
if (!attacker || (!gateOpened && !IsOnSameSide(attacker)))
|
||||
damage = 0;
|
||||
}
|
||||
void Reset() { events.Reset(); }
|
||||
void EnterCombat(Unit* who) { me->SetInCombatWithZone(); }
|
||||
void DamageTaken(Unit* attacker, uint32 &damage, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
if (!attacker || (!gateOpened && !IsOnSameSide(attacker)))
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_GATE_OPEN)
|
||||
gateOpened = true;
|
||||
}
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_GATE_OPEN)
|
||||
gateOpened = true;
|
||||
}
|
||||
|
||||
void JustDied(Unit *)
|
||||
{
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_LIVING_TRAINEE:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_TRAINEE, true);
|
||||
break;
|
||||
case NPC_LIVING_KNIGHT:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_KNIGHT, true);
|
||||
break;
|
||||
case NPC_LIVING_RIDER:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_RIDER, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
void JustDied(Unit *)
|
||||
{
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_LIVING_TRAINEE:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_TRAINEE, true);
|
||||
break;
|
||||
case NPC_LIVING_KNIGHT:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_KNIGHT, true);
|
||||
break;
|
||||
case NPC_LIVING_RIDER:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_RIDER, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && me->GetInstanceScript())
|
||||
me->GetInstanceScript()->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
};
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && me->GetInstanceScript())
|
||||
me->GetInstanceScript()->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -10,29 +10,29 @@ REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_POISON_CLOUD = 28240,
|
||||
SPELL_MUTATING_INJECTION = 28169,
|
||||
SPELL_SLIME_SPRAY_10 = 28157,
|
||||
SPELL_SLIME_SPRAY_25 = 54364,
|
||||
SPELL_POISON_CLOUD_DAMAGE_AURA_10 = 28158,
|
||||
SPELL_POISON_CLOUD_DAMAGE_AURA_25 = 54362,
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_POISON_CLOUD = 28240,
|
||||
SPELL_MUTATING_INJECTION = 28169,
|
||||
SPELL_SLIME_SPRAY_10 = 28157,
|
||||
SPELL_SLIME_SPRAY_25 = 54364,
|
||||
SPELL_POISON_CLOUD_DAMAGE_AURA_10 = 28158,
|
||||
SPELL_POISON_CLOUD_DAMAGE_AURA_25 = 54362,
|
||||
SPELL_BERSERK = 26662,
|
||||
|
||||
SPELL_BOMBARD_SLIME = 28280, // Spawn slime when hit by slime spray
|
||||
SPELL_BOMBARD_SLIME = 28280, // Spawn slime when hit by slime spray
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_BERSERK = 1,
|
||||
EVENT_SPELL_POISON_CLOUD = 2,
|
||||
EVENT_SPELL_SLIME_SPRAY = 3,
|
||||
EVENT_SPELL_MUTATING_INJECTION = 4,
|
||||
EVENT_SPELL_BERSERK = 1,
|
||||
EVENT_SPELL_POISON_CLOUD = 2,
|
||||
EVENT_SPELL_SLIME_SPRAY = 3,
|
||||
EVENT_SPELL_MUTATING_INJECTION = 4,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_FALLOUT_SLIME = 16290,
|
||||
NPC_SEWAGE_SLIME = 16375,
|
||||
NPC_FALLOUT_SLIME = 16290,
|
||||
NPC_SEWAGE_SLIME = 16375,
|
||||
};
|
||||
|
||||
class boss_grobbulus : public CreatureScript
|
||||
@@ -45,114 +45,114 @@ public:
|
||||
return new boss_grobbulusAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_grobbulusAI : public ScriptedAI
|
||||
{
|
||||
boss_grobbulusAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_grobbulusAI : public ScriptedAI
|
||||
{
|
||||
boss_grobbulusAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
uint32 dropSludgeTimer;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
uint32 dropSludgeTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
dropSludgeTimer = 0;
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
dropSludgeTimer = 0;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GROBBULUS, NOT_STARTED);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GROBBULUS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_SPELL_POISON_CLOUD, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_MUTATING_INJECTION, 20000);
|
||||
events.ScheduleEvent(EVENT_SPELL_SLIME_SPRAY, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, RAID_MODE(12*MINUTE*IN_MILLISECONDS, 9*MINUTE*IN_MILLISECONDS));
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_SPELL_POISON_CLOUD, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_MUTATING_INJECTION, 20000);
|
||||
events.ScheduleEvent(EVENT_SPELL_SLIME_SPRAY, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, RAID_MODE(12*MINUTE*IN_MILLISECONDS, 9*MINUTE*IN_MILLISECONDS));
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GROBBULUS, IN_PROGRESS);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GROBBULUS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit *target, const SpellInfo* spellInfo)
|
||||
{
|
||||
if (spellInfo->Id == RAID_MODE(SPELL_SLIME_SPRAY_10, SPELL_SLIME_SPRAY_25) && target->GetTypeId() == TYPEID_PLAYER)
|
||||
me->SummonCreature(NPC_FALLOUT_SLIME, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||
}
|
||||
void SpellHitTarget(Unit *target, const SpellInfo* spellInfo)
|
||||
{
|
||||
if (spellInfo->Id == RAID_MODE(SPELL_SLIME_SPRAY_10, SPELL_SLIME_SPRAY_25) && target->GetTypeId() == TYPEID_PLAYER)
|
||||
me->SummonCreature(NPC_FALLOUT_SLIME, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr)
|
||||
{
|
||||
if (cr->GetEntry() == NPC_FALLOUT_SLIME)
|
||||
cr->SetInCombatWithZone();
|
||||
void JustSummoned(Creature* cr)
|
||||
{
|
||||
if (cr->GetEntry() == NPC_FALLOUT_SLIME)
|
||||
cr->SetInCombatWithZone();
|
||||
|
||||
summons.Summon(cr);
|
||||
}
|
||||
summons.Summon(cr);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon){ summons.Despawn(summon); }
|
||||
void SummonedCreatureDespawn(Creature* summon){ summons.Despawn(summon); }
|
||||
|
||||
void JustDied(Unit*)
|
||||
{
|
||||
summons.DespawnAll();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GROBBULUS, DONE);
|
||||
}
|
||||
void JustDied(Unit*)
|
||||
{
|
||||
summons.DespawnAll();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_GROBBULUS, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
// Some nice visuals
|
||||
dropSludgeTimer += diff;
|
||||
if (!me->IsInCombat() && dropSludgeTimer >= 5000)
|
||||
{
|
||||
if (me->IsWithinDist3d(3178, -3305, 319, 5.0f) && !summons.HasEntry(NPC_SEWAGE_SLIME))
|
||||
me->CastSpell(3128.96f+irand(-20, 20), -3312.96f+irand(-20, 20), 293.25f, SPELL_BOMBARD_SLIME, false);
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
// Some nice visuals
|
||||
dropSludgeTimer += diff;
|
||||
if (!me->IsInCombat() && dropSludgeTimer >= 5000)
|
||||
{
|
||||
if (me->IsWithinDist3d(3178, -3305, 319, 5.0f) && !summons.HasEntry(NPC_SEWAGE_SLIME))
|
||||
me->CastSpell(3128.96f+irand(-20, 20), -3312.96f+irand(-20, 20), 293.25f, SPELL_BOMBARD_SLIME, false);
|
||||
|
||||
dropSludgeTimer = 0;
|
||||
}
|
||||
dropSludgeTimer = 0;
|
||||
}
|
||||
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_POISON_CLOUD:
|
||||
me->CastSpell(me, SPELL_POISON_CLOUD, true);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SPELL_SLIME_SPRAY:
|
||||
me->MonsterTextEmote("Grobbulus sprays slime across the room!", 0, true);
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_SLIME_SPRAY_10, SPELL_SLIME_SPRAY_25), false);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_SPELL_MUTATING_INJECTION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true, -SPELL_MUTATING_INJECTION))
|
||||
me->CastSpell(target, SPELL_MUTATING_INJECTION, false);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_POISON_CLOUD:
|
||||
me->CastSpell(me, SPELL_POISON_CLOUD, true);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SPELL_SLIME_SPRAY:
|
||||
me->MonsterTextEmote("Grobbulus sprays slime across the room!", 0, true);
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_SLIME_SPRAY_10, SPELL_SLIME_SPRAY_25), false);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_SPELL_MUTATING_INJECTION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true, -SPELL_MUTATING_INJECTION))
|
||||
me->CastSpell(target, SPELL_MUTATING_INJECTION, false);
|
||||
|
||||
events.RepeatEvent(8000 + uint32(120 * me->GetHealthPct()));
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(8000 + uint32(120 * me->GetHealthPct()));
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class boss_grobbulus_poison_cloud : public CreatureScript
|
||||
@@ -165,47 +165,47 @@ public:
|
||||
return new boss_grobbulus_poison_cloudAI(pCreature);
|
||||
}
|
||||
|
||||
struct boss_grobbulus_poison_cloudAI : public NullCreatureAI
|
||||
{
|
||||
boss_grobbulus_poison_cloudAI(Creature* pCreature) : NullCreatureAI(pCreature)
|
||||
{
|
||||
}
|
||||
struct boss_grobbulus_poison_cloudAI : public NullCreatureAI
|
||||
{
|
||||
boss_grobbulus_poison_cloudAI(Creature* pCreature) : NullCreatureAI(pCreature)
|
||||
{
|
||||
}
|
||||
|
||||
uint32 sizeTimer;
|
||||
uint32 auraVisualTimer;
|
||||
uint32 sizeTimer;
|
||||
uint32 auraVisualTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
sizeTimer = 0;
|
||||
auraVisualTimer = 1;
|
||||
me->SetFloatValue(UNIT_FIELD_COMBATREACH, 2.0f);
|
||||
me->setFaction(21); // Grobbulus one
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
sizeTimer = 0;
|
||||
auraVisualTimer = 1;
|
||||
me->SetFloatValue(UNIT_FIELD_COMBATREACH, 2.0f);
|
||||
me->setFaction(21); // Grobbulus one
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && me->GetInstanceScript())
|
||||
me->GetInstanceScript()->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && me->GetInstanceScript())
|
||||
me->GetInstanceScript()->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
// this has to be delayed to be visible :/
|
||||
if (auraVisualTimer)
|
||||
{
|
||||
auraVisualTimer += diff;
|
||||
if (auraVisualTimer >= 1000)
|
||||
{
|
||||
me->CastSpell(me, (me->GetMap()->Is25ManRaid() ? SPELL_POISON_CLOUD_DAMAGE_AURA_25 : SPELL_POISON_CLOUD_DAMAGE_AURA_10), true);
|
||||
auraVisualTimer = 0;
|
||||
}
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
// this has to be delayed to be visible :/
|
||||
if (auraVisualTimer)
|
||||
{
|
||||
auraVisualTimer += diff;
|
||||
if (auraVisualTimer >= 1000)
|
||||
{
|
||||
me->CastSpell(me, (me->GetMap()->Is25ManRaid() ? SPELL_POISON_CLOUD_DAMAGE_AURA_25 : SPELL_POISON_CLOUD_DAMAGE_AURA_10), true);
|
||||
auraVisualTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
sizeTimer += diff;
|
||||
// increase size to 15yd in 60 seconds, 0.00025 is the growth of size in 1ms
|
||||
me->SetFloatValue(UNIT_FIELD_COMBATREACH, 2.0f+(0.00025f*sizeTimer));
|
||||
}
|
||||
};
|
||||
sizeTimer += diff;
|
||||
// increase size to 15yd in 60 seconds, 0.00025 is the growth of size in 1ms
|
||||
me->SetFloatValue(UNIT_FIELD_COMBATREACH, 2.0f+(0.00025f*sizeTimer));
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -221,13 +221,13 @@ class spell_grobbulus_poison : public SpellScriptLoader
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
std::list<WorldObject*> tmplist;
|
||||
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
if (GetCaster()->IsWithinDist3d((*itr), 0.0f))
|
||||
tmplist.push_back(*itr);
|
||||
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
if (GetCaster()->IsWithinDist3d((*itr), 0.0f))
|
||||
tmplist.push_back(*itr);
|
||||
|
||||
targets.clear();
|
||||
for( std::list<WorldObject*>::iterator itr = tmplist.begin(); itr != tmplist.end(); ++itr )
|
||||
targets.push_back(*itr);
|
||||
targets.clear();
|
||||
for( std::list<WorldObject*>::iterator itr = tmplist.begin(); itr != tmplist.end(); ++itr )
|
||||
targets.push_back(*itr);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -246,5 +246,5 @@ void AddSC_boss_grobbulus()
|
||||
{
|
||||
new boss_grobbulus();
|
||||
new boss_grobbulus_poison_cloud();
|
||||
new spell_grobbulus_poison();
|
||||
new spell_grobbulus_poison();
|
||||
}
|
||||
@@ -17,25 +17,25 @@ enum Says
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_SPELL_DISRUPTION = 29310,
|
||||
SPELL_DECREPIT_FEVER_10 = 29998,
|
||||
SPELL_DECREPIT_FEVER_25 = 55011,
|
||||
SPELL_PLAGUE_CLOUD = 29350,
|
||||
SPELL_SPELL_DISRUPTION = 29310,
|
||||
SPELL_DECREPIT_FEVER_10 = 29998,
|
||||
SPELL_DECREPIT_FEVER_25 = 55011,
|
||||
SPELL_PLAGUE_CLOUD = 29350,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_SPELL_DISRUPTION = 1,
|
||||
EVENT_SPELL_DECEPIT_FEVER = 2,
|
||||
EVENT_ERUPT_SECTION = 3,
|
||||
EVENT_SWITCH_PHASE = 4,
|
||||
EVENT_SAFETY_DANCE = 5,
|
||||
EVENT_SPELL_SPELL_DISRUPTION = 1,
|
||||
EVENT_SPELL_DECEPIT_FEVER = 2,
|
||||
EVENT_ERUPT_SECTION = 3,
|
||||
EVENT_SWITCH_PHASE = 4,
|
||||
EVENT_SAFETY_DANCE = 5,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
PHASE_SLOW_DANCE = 0,
|
||||
PHASE_FAST_DANCE = 1,
|
||||
PHASE_SLOW_DANCE = 0,
|
||||
PHASE_FAST_DANCE = 1,
|
||||
};
|
||||
|
||||
class boss_heigan : public CreatureScript
|
||||
@@ -48,174 +48,174 @@ public:
|
||||
return new boss_heiganAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_heiganAI : public ScriptedAI
|
||||
{
|
||||
boss_heiganAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_heiganAI : public ScriptedAI
|
||||
{
|
||||
boss_heiganAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
uint8 currentPhase;
|
||||
uint8 currentSection;
|
||||
bool moveRight;
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
uint8 currentPhase;
|
||||
uint8 currentSection;
|
||||
bool moveRight;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
currentPhase = 0;
|
||||
currentSection = 3;
|
||||
moveRight = true;
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
currentPhase = 0;
|
||||
currentSection = 3;
|
||||
moveRight = true;
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_HEIGAN, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HEIGAN_ENTER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_HEIGAN, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HEIGAN_ENTER_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_HEIGAN, DONE);
|
||||
}
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_HEIGAN, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
Talk(SAY_AGGRO);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_HEIGAN, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HEIGAN_ENTER_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
Talk(SAY_AGGRO);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_HEIGAN, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HEIGAN_ENTER_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
StartFightPhase(PHASE_SLOW_DANCE);
|
||||
}
|
||||
StartFightPhase(PHASE_SLOW_DANCE);
|
||||
}
|
||||
|
||||
void StartFightPhase(uint8 phase)
|
||||
{
|
||||
currentSection = 3;
|
||||
currentPhase = phase;
|
||||
events.Reset();
|
||||
if (phase == PHASE_SLOW_DANCE)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SPELL_SPELL_DISRUPTION, 0);
|
||||
events.ScheduleEvent(EVENT_SPELL_DECEPIT_FEVER, 12000);
|
||||
events.ScheduleEvent(EVENT_ERUPT_SECTION, 10000);
|
||||
events.ScheduleEvent(EVENT_SWITCH_PHASE, 90000);
|
||||
}
|
||||
else // if (phase == PHASE_FAST_DANCE)
|
||||
{
|
||||
me->MonsterTextEmote("%s teleports and begins to channel a spell!", 0, true);
|
||||
// teleport
|
||||
float x, y, z, o;
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
me->NearTeleportTo(x, y, z, o);
|
||||
void StartFightPhase(uint8 phase)
|
||||
{
|
||||
currentSection = 3;
|
||||
currentPhase = phase;
|
||||
events.Reset();
|
||||
if (phase == PHASE_SLOW_DANCE)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SPELL_SPELL_DISRUPTION, 0);
|
||||
events.ScheduleEvent(EVENT_SPELL_DECEPIT_FEVER, 12000);
|
||||
events.ScheduleEvent(EVENT_ERUPT_SECTION, 10000);
|
||||
events.ScheduleEvent(EVENT_SWITCH_PHASE, 90000);
|
||||
}
|
||||
else // if (phase == PHASE_FAST_DANCE)
|
||||
{
|
||||
me->MonsterTextEmote("%s teleports and begins to channel a spell!", 0, true);
|
||||
// teleport
|
||||
float x, y, z, o;
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
me->NearTeleportTo(x, y, z, o);
|
||||
|
||||
me->CastSpell(me, SPELL_PLAGUE_CLOUD, false);
|
||||
events.ScheduleEvent(EVENT_ERUPT_SECTION, 4000);
|
||||
events.ScheduleEvent(EVENT_SWITCH_PHASE, 45000);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_SAFETY_DANCE, 5000);
|
||||
}
|
||||
me->CastSpell(me, SPELL_PLAGUE_CLOUD, false);
|
||||
events.ScheduleEvent(EVENT_ERUPT_SECTION, 4000);
|
||||
events.ScheduleEvent(EVENT_SWITCH_PHASE, 45000);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_SAFETY_DANCE, 5000);
|
||||
}
|
||||
|
||||
bool IsInRoom(Unit* who)
|
||||
{
|
||||
if (who->GetPositionX() > 2826 || who->GetPositionX() < 2723 || who->GetPositionY() > -3641 || who->GetPositionY() < -3736)
|
||||
{
|
||||
if (who->GetGUID() == me->GetGUID())
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
bool IsInRoom(Unit* who)
|
||||
{
|
||||
if (who->GetPositionX() > 2826 || who->GetPositionX() < 2723 || who->GetPositionY() > -3641 || who->GetPositionY() < -3736)
|
||||
{
|
||||
if (who->GetGUID() == me->GetGUID())
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!IsInRoom(me))
|
||||
return;
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!IsInRoom(me))
|
||||
return;
|
||||
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_SPELL_DISRUPTION:
|
||||
me->CastSpell(me, SPELL_SPELL_DISRUPTION, false);
|
||||
events.RepeatEvent(10000);
|
||||
break;
|
||||
case EVENT_SPELL_DECEPIT_FEVER:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_DECREPIT_FEVER_10, SPELL_DECREPIT_FEVER_25), false);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_SWITCH_PHASE:
|
||||
StartFightPhase(currentPhase == PHASE_SLOW_DANCE ? PHASE_FAST_DANCE : PHASE_SLOW_DANCE);
|
||||
// no pop, there is reset in start fight
|
||||
break;
|
||||
case EVENT_ERUPT_SECTION:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_HEIGAN_ERUPTION, currentSection);
|
||||
if (currentSection == 3)
|
||||
moveRight = false;
|
||||
else if (currentSection == 0)
|
||||
moveRight = true;
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_SPELL_DISRUPTION:
|
||||
me->CastSpell(me, SPELL_SPELL_DISRUPTION, false);
|
||||
events.RepeatEvent(10000);
|
||||
break;
|
||||
case EVENT_SPELL_DECEPIT_FEVER:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_DECREPIT_FEVER_10, SPELL_DECREPIT_FEVER_25), false);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_SWITCH_PHASE:
|
||||
StartFightPhase(currentPhase == PHASE_SLOW_DANCE ? PHASE_FAST_DANCE : PHASE_SLOW_DANCE);
|
||||
// no pop, there is reset in start fight
|
||||
break;
|
||||
case EVENT_ERUPT_SECTION:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_HEIGAN_ERUPTION, currentSection);
|
||||
if (currentSection == 3)
|
||||
moveRight = false;
|
||||
else if (currentSection == 0)
|
||||
moveRight = true;
|
||||
|
||||
moveRight ? currentSection++ : currentSection--;
|
||||
}
|
||||
moveRight ? currentSection++ : currentSection--;
|
||||
}
|
||||
|
||||
if (currentPhase == PHASE_SLOW_DANCE && !urand(0,3))
|
||||
Talk(SAY_TAUNT);
|
||||
if (currentPhase == PHASE_SLOW_DANCE && !urand(0,3))
|
||||
Talk(SAY_TAUNT);
|
||||
|
||||
events.RepeatEvent(currentPhase == PHASE_SLOW_DANCE ? 10000 : 4000);
|
||||
break;
|
||||
case EVENT_SAFETY_DANCE:
|
||||
{
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
|
||||
{
|
||||
if (IsInRoom(itr->GetSource()) && !itr->GetSource()->IsAlive())
|
||||
{
|
||||
events.PopEvent();
|
||||
pInstance->SetData(DATA_DANCE_FAIL, 0);
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
return;
|
||||
}
|
||||
events.RepeatEvent(currentPhase == PHASE_SLOW_DANCE ? 10000 : 4000);
|
||||
break;
|
||||
case EVENT_SAFETY_DANCE:
|
||||
{
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
|
||||
{
|
||||
if (IsInRoom(itr->GetSource()) && !itr->GetSource()->IsAlive())
|
||||
{
|
||||
events.PopEvent();
|
||||
pInstance->SetData(DATA_DANCE_FAIL, 0);
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
events.RepeatEvent(5000);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(5000);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_heigan()
|
||||
{
|
||||
new boss_heigan();
|
||||
new boss_heigan();
|
||||
}
|
||||
|
||||
@@ -24,63 +24,63 @@ enum Yells
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_FROST_BOLT_SINGLE_10 = 28478,
|
||||
SPELL_FROST_BOLT_SINGLE_25 = 55802,
|
||||
SPELL_FROST_BOLT_MULTI_10 = 28479,
|
||||
SPELL_FROST_BOLT_MULTI_25 = 55807,
|
||||
SPELL_SHADOW_FISURE = 27810,
|
||||
SPELL_VOID_BLAST = 27812,
|
||||
SPELL_DETONATE_MANA = 27819,
|
||||
SPELL_MANA_DETONATION_DAMAGE = 27820,
|
||||
SPELL_FROST_BLAST = 27808,
|
||||
SPELL_CHAINS_OF_KELTHUZAD = 28410, //28408 script effect
|
||||
SPELL_BERSERK = 28498,
|
||||
SPELL_FROST_BOLT_SINGLE_10 = 28478,
|
||||
SPELL_FROST_BOLT_SINGLE_25 = 55802,
|
||||
SPELL_FROST_BOLT_MULTI_10 = 28479,
|
||||
SPELL_FROST_BOLT_MULTI_25 = 55807,
|
||||
SPELL_SHADOW_FISURE = 27810,
|
||||
SPELL_VOID_BLAST = 27812,
|
||||
SPELL_DETONATE_MANA = 27819,
|
||||
SPELL_MANA_DETONATION_DAMAGE = 27820,
|
||||
SPELL_FROST_BLAST = 27808,
|
||||
SPELL_CHAINS_OF_KELTHUZAD = 28410, //28408 script effect
|
||||
SPELL_BERSERK = 28498,
|
||||
|
||||
// Minions
|
||||
SPELL_FRENZY = 28468,
|
||||
SPELL_MORTAL_WOUND = 28467,
|
||||
SPELL_BLOOD_TAP = 28470,
|
||||
// Minions
|
||||
SPELL_FRENZY = 28468,
|
||||
SPELL_MORTAL_WOUND = 28467,
|
||||
SPELL_BLOOD_TAP = 28470,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_SOLDIER_OF_THE_FROZEN_WASTES = 16427,
|
||||
NPC_UNSTOPPABLE_ABOMINATION = 16428,
|
||||
NPC_SOUL_WEAVER = 16429,
|
||||
NPC_GUARDIAN_OF_ICECROWN = 16441,
|
||||
NPC_SOLDIER_OF_THE_FROZEN_WASTES = 16427,
|
||||
NPC_UNSTOPPABLE_ABOMINATION = 16428,
|
||||
NPC_SOUL_WEAVER = 16429,
|
||||
NPC_GUARDIAN_OF_ICECROWN = 16441,
|
||||
|
||||
ACTION_CALL_HELP_ON = 1,
|
||||
ACTION_CALL_HELP_OFF = 2,
|
||||
ACTION_SECOND_PHASE = 3,
|
||||
ACTION_CALL_HELP_ON = 1,
|
||||
ACTION_CALL_HELP_OFF = 2,
|
||||
ACTION_SECOND_PHASE = 3,
|
||||
};
|
||||
|
||||
enum Event
|
||||
{
|
||||
// Kel'Thuzad
|
||||
EVENT_SUMMON_SOLDIER = 1,
|
||||
EVENT_SUMMON_UNSTOPPABLE_ABOMINATION = 2,
|
||||
EVENT_SUMMON_SOUL_WEAVER = 3,
|
||||
EVENT_START_SECOND_PHASE = 4,
|
||||
EVENT_SPELL_FROST_BOLT_SINGLE = 5,
|
||||
EVENT_SPELL_FROST_BOLT_MULTI = 6,
|
||||
EVENT_SPELL_DETONATE_MANA = 7,
|
||||
EVENT_SECOND_PHASE_HEALTH_CHECK = 8,
|
||||
EVENT_THIRD_PHASE_LICH_KING_SAY = 9,
|
||||
EVENT_SPELL_SHADOW_FISSURE = 10,
|
||||
EVENT_SPELL_FROST_BLAST = 11,
|
||||
EVENT_SPELL_CHAINS = 12,
|
||||
EVENT_SUMMON_GUARDIAN_OF_ICECROWN = 13,
|
||||
EVENT_FLOOR_CHANGE = 14,
|
||||
// Kel'Thuzad
|
||||
EVENT_SUMMON_SOLDIER = 1,
|
||||
EVENT_SUMMON_UNSTOPPABLE_ABOMINATION = 2,
|
||||
EVENT_SUMMON_SOUL_WEAVER = 3,
|
||||
EVENT_START_SECOND_PHASE = 4,
|
||||
EVENT_SPELL_FROST_BOLT_SINGLE = 5,
|
||||
EVENT_SPELL_FROST_BOLT_MULTI = 6,
|
||||
EVENT_SPELL_DETONATE_MANA = 7,
|
||||
EVENT_SECOND_PHASE_HEALTH_CHECK = 8,
|
||||
EVENT_THIRD_PHASE_LICH_KING_SAY = 9,
|
||||
EVENT_SPELL_SHADOW_FISSURE = 10,
|
||||
EVENT_SPELL_FROST_BLAST = 11,
|
||||
EVENT_SPELL_CHAINS = 12,
|
||||
EVENT_SUMMON_GUARDIAN_OF_ICECROWN = 13,
|
||||
EVENT_FLOOR_CHANGE = 14,
|
||||
|
||||
// Minions
|
||||
EVENT_MINION_SPELL_FRENZY = 100,
|
||||
EVENT_MINION_SPELL_MORTAL_WOUND = 101,
|
||||
EVENT_MINION_SPELL_BLOOD_TAP = 102,
|
||||
// Minions
|
||||
EVENT_MINION_SPELL_FRENZY = 100,
|
||||
EVENT_MINION_SPELL_MORTAL_WOUND = 101,
|
||||
EVENT_MINION_SPELL_BLOOD_TAP = 102,
|
||||
};
|
||||
|
||||
const Position SummonPositions[12] =
|
||||
{
|
||||
// Portals
|
||||
// Portals
|
||||
{3783.272705f, -5062.697266f, 143.711203f, 3.617599f}, //LEFT_FAR
|
||||
{3730.291260f, -5027.239258f, 143.956909f, 4.461900f}, //LEFT_MIDDLE
|
||||
{3683.868652f, -5057.281250f, 143.183884f, 5.237086f}, //LEFT_NEAR
|
||||
@@ -88,7 +88,7 @@ const Position SummonPositions[12] =
|
||||
{3700.724365f, -5185.123047f, 143.928024f, 1.309310f}, //RIGHT_MIDDLE
|
||||
{3665.121094f, -5138.679199f, 143.183212f, 0.604023f}, //RIGHT_NEAR
|
||||
|
||||
// Edges
|
||||
// Edges
|
||||
//{3754.431396f, -5080.727734f, 142.036316f, 3.736189f}, //LEFT_FAR
|
||||
// {3724.396484f, -5061.330566f, 142.032700f, 4.564785f}, //LEFT_MIDDLE
|
||||
//{3687.158424f, -5076.834473f, 142.017319f, 5.237086f}, //LEFT_NEAR
|
||||
@@ -96,13 +96,13 @@ const Position SummonPositions[12] =
|
||||
//{3707.990733f, -5151.450195f, 142.032562f, 1.376855f}, //RIGHT_MIDDLE
|
||||
// {3739.500000f, -5141.883989f, 142.014113f, 2.121412f} //RIGHT_NEAR
|
||||
|
||||
// Middle
|
||||
{3769.34f, -5071.80f, 143.2082f, 3.658f},
|
||||
{3729.78f, -5043.56f, 143.3867f, 4.475f},
|
||||
{3682.75f, -5055.26f, 143.1848f, 5.295f},
|
||||
{3752.58f, -5161.82f, 143.2944f, 2.126f},
|
||||
{3702.83f, -5171.70f, 143.4356f, 1.305f},
|
||||
{3665.30f, -5141.55f, 143.1846f, 0.566f}
|
||||
// Middle
|
||||
{3769.34f, -5071.80f, 143.2082f, 3.658f},
|
||||
{3729.78f, -5043.56f, 143.3867f, 4.475f},
|
||||
{3682.75f, -5055.26f, 143.1848f, 5.295f},
|
||||
{3752.58f, -5161.82f, 143.2944f, 2.126f},
|
||||
{3702.83f, -5171.70f, 143.4356f, 1.305f},
|
||||
{3665.30f, -5141.55f, 143.1846f, 0.566f}
|
||||
};
|
||||
|
||||
class boss_kelthuzad : public CreatureScript
|
||||
@@ -115,292 +115,292 @@ public:
|
||||
return new boss_kelthuzadAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_kelthuzadAI : public ScriptedAI
|
||||
{
|
||||
boss_kelthuzadAI(Creature* c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
|
||||
float NormalizeOrientation(float o)
|
||||
struct boss_kelthuzadAI : public ScriptedAI
|
||||
{
|
||||
boss_kelthuzadAI(Creature* c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
// Only positive values will be passed
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
|
||||
float NormalizeOrientation(float o)
|
||||
{
|
||||
// Only positive values will be passed
|
||||
return fmod(o, 2.0f * static_cast<float>(M_PI));
|
||||
}
|
||||
|
||||
void SpawnHelpers()
|
||||
{
|
||||
// Ehhh...
|
||||
// in short: 6 rooms, 8 soldiers, 3 abominations and 1 weaver in each room
|
||||
// middle positions in table starts from 6
|
||||
for (uint8 i = 6; i < 12; ++i)
|
||||
for (uint8 j = 0; j < 8; ++j)
|
||||
{
|
||||
float angle = M_PI*2/8*j;
|
||||
me->SummonCreature(NPC_SOLDIER_OF_THE_FROZEN_WASTES, SummonPositions[i].GetPositionX()+6*cos(angle), SummonPositions[i].GetPositionY()+6*sin(angle), SummonPositions[i].GetPositionZ()+0.5f, SummonPositions[i].GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
|
||||
}
|
||||
for (uint8 i = 6; i < 12; ++i)
|
||||
for (uint8 j = 1; j < 4; ++j)
|
||||
{
|
||||
float dist = j == 2 ? 0.0f : 8.0f; // second in middle
|
||||
float angle = SummonPositions[i].GetOrientation() + M_PI*2/4*j;
|
||||
NormalizeOrientation(angle);
|
||||
me->SummonCreature(NPC_UNSTOPPABLE_ABOMINATION, SummonPositions[i].GetPositionX()+dist*cos(angle), SummonPositions[i].GetPositionY()+dist*sin(angle), SummonPositions[i].GetPositionZ()+0.5f, SummonPositions[i].GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
|
||||
}
|
||||
for (uint8 i = 6; i < 12; ++i)
|
||||
for (uint8 j = 0; j < 1; ++j)
|
||||
{
|
||||
float angle = SummonPositions[i].GetOrientation() + M_PI;
|
||||
NormalizeOrientation(angle);
|
||||
me->SummonCreature(NPC_SOUL_WEAVER, SummonPositions[i].GetPositionX()+6*cos(angle), SummonPositions[i].GetPositionY()+6*sin(angle), SummonPositions[i].GetPositionZ()+0.5f, SummonPositions[i].GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
|
||||
}
|
||||
}
|
||||
void SpawnHelpers()
|
||||
{
|
||||
// Ehhh...
|
||||
// in short: 6 rooms, 8 soldiers, 3 abominations and 1 weaver in each room
|
||||
// middle positions in table starts from 6
|
||||
for (uint8 i = 6; i < 12; ++i)
|
||||
for (uint8 j = 0; j < 8; ++j)
|
||||
{
|
||||
float angle = M_PI*2/8*j;
|
||||
me->SummonCreature(NPC_SOLDIER_OF_THE_FROZEN_WASTES, SummonPositions[i].GetPositionX()+6*cos(angle), SummonPositions[i].GetPositionY()+6*sin(angle), SummonPositions[i].GetPositionZ()+0.5f, SummonPositions[i].GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
|
||||
}
|
||||
for (uint8 i = 6; i < 12; ++i)
|
||||
for (uint8 j = 1; j < 4; ++j)
|
||||
{
|
||||
float dist = j == 2 ? 0.0f : 8.0f; // second in middle
|
||||
float angle = SummonPositions[i].GetOrientation() + M_PI*2/4*j;
|
||||
NormalizeOrientation(angle);
|
||||
me->SummonCreature(NPC_UNSTOPPABLE_ABOMINATION, SummonPositions[i].GetPositionX()+dist*cos(angle), SummonPositions[i].GetPositionY()+dist*sin(angle), SummonPositions[i].GetPositionZ()+0.5f, SummonPositions[i].GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
|
||||
}
|
||||
for (uint8 i = 6; i < 12; ++i)
|
||||
for (uint8 j = 0; j < 1; ++j)
|
||||
{
|
||||
float angle = SummonPositions[i].GetOrientation() + M_PI;
|
||||
NormalizeOrientation(angle);
|
||||
me->SummonCreature(NPC_SOUL_WEAVER, SummonPositions[i].GetPositionX()+6*cos(angle), SummonPositions[i].GetPositionY()+6*sin(angle), SummonPositions[i].GetPositionZ()+0.5f, SummonPositions[i].GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
|
||||
}
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_DISABLE_MOVE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_KELTHUZAD, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR)))
|
||||
{
|
||||
go->SetPhaseMask(1, true);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_DISABLE_MOVE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_KELTHUZAD, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR)))
|
||||
{
|
||||
go->SetPhaseMask(1, true);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_DISABLE_MOVE);
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_DISABLE_MOVE);
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
summons.DespawnAll();
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_KELTHUZAD, DONE);
|
||||
}
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
summons.DespawnAll();
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_KELTHUZAD, DONE);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!me->IsInCombat() && who->GetTypeId() == TYPEID_PLAYER && who->IsAlive() && me->GetDistance(who) <= 50.0f)
|
||||
AttackStart(who);
|
||||
}
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!me->IsInCombat() && who->GetTypeId() == TYPEID_PLAYER && who->IsAlive() && me->GetDistance(who) <= 50.0f)
|
||||
AttackStart(who);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
Talk(SAY_SUMMON_MINIONS);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE);
|
||||
me->RemoveAllAttackers();
|
||||
me->SetTarget(0);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
Talk(SAY_SUMMON_MINIONS);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE);
|
||||
me->RemoveAllAttackers();
|
||||
me->SetTarget(0);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
|
||||
// Spawn helpers
|
||||
SpawnHelpers();
|
||||
// Spawn helpers
|
||||
SpawnHelpers();
|
||||
|
||||
events.ScheduleEvent(EVENT_SUMMON_SOLDIER, 3200);
|
||||
events.ScheduleEvent(EVENT_SUMMON_UNSTOPPABLE_ABOMINATION, 10000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SOUL_WEAVER, 24000);
|
||||
events.ScheduleEvent(EVENT_START_SECOND_PHASE, 228000);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_KELTHUZAD, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR)))
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FLOOR_CHANGE, 15000);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
events.ScheduleEvent(EVENT_SUMMON_SOLDIER, 3200);
|
||||
events.ScheduleEvent(EVENT_SUMMON_UNSTOPPABLE_ABOMINATION, 10000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SOUL_WEAVER, 24000);
|
||||
events.ScheduleEvent(EVENT_START_SECOND_PHASE, 228000);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_KELTHUZAD, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR)))
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FLOOR_CHANGE, 15000);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr) { summons.Summon(cr); }
|
||||
void JustSummoned(Creature* cr) { summons.Summon(cr); }
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_FLOOR_CHANGE:
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR)))
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FLOOR_CHANGE, 15000);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
go->SetPhaseMask(2, true);
|
||||
}
|
||||
}
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SUMMON_SOLDIER:
|
||||
if (Creature* cr = me->SummonCreature(NPC_SOLDIER_OF_THE_FROZEN_WASTES, SummonPositions[urand(0,5)], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
|
||||
{
|
||||
if (Unit* target = SelectTargetFromPlayerList(100.0f))
|
||||
{
|
||||
cr->AI()->DoAction(ACTION_CALL_HELP_OFF);
|
||||
cr->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_FLOOR_CHANGE:
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_FLOOR)))
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FLOOR_CHANGE, 15000);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
go->SetPhaseMask(2, true);
|
||||
}
|
||||
}
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SUMMON_SOLDIER:
|
||||
if (Creature* cr = me->SummonCreature(NPC_SOLDIER_OF_THE_FROZEN_WASTES, SummonPositions[urand(0,5)], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
|
||||
{
|
||||
if (Unit* target = SelectTargetFromPlayerList(100.0f))
|
||||
{
|
||||
cr->AI()->DoAction(ACTION_CALL_HELP_OFF);
|
||||
cr->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
events.RepeatEvent(3200);
|
||||
break;
|
||||
case EVENT_SUMMON_UNSTOPPABLE_ABOMINATION:
|
||||
if (Creature* cr = me->SummonCreature(NPC_UNSTOPPABLE_ABOMINATION, SummonPositions[urand(0,5)], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
|
||||
{
|
||||
if (Unit* target = SelectTargetFromPlayerList(100.0f))
|
||||
{
|
||||
cr->AI()->DoAction(ACTION_CALL_HELP_OFF);
|
||||
cr->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(3200);
|
||||
break;
|
||||
case EVENT_SUMMON_UNSTOPPABLE_ABOMINATION:
|
||||
if (Creature* cr = me->SummonCreature(NPC_UNSTOPPABLE_ABOMINATION, SummonPositions[urand(0,5)], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
|
||||
{
|
||||
if (Unit* target = SelectTargetFromPlayerList(100.0f))
|
||||
{
|
||||
cr->AI()->DoAction(ACTION_CALL_HELP_OFF);
|
||||
cr->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_SUMMON_SOUL_WEAVER:
|
||||
if (Creature* cr = me->SummonCreature(NPC_SOUL_WEAVER, SummonPositions[urand(0,5)], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
|
||||
{
|
||||
if (Unit* target = SelectTargetFromPlayerList(100.0f))
|
||||
{
|
||||
cr->AI()->DoAction(ACTION_CALL_HELP_OFF);
|
||||
cr->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_SUMMON_SOUL_WEAVER:
|
||||
if (Creature* cr = me->SummonCreature(NPC_SOUL_WEAVER, SummonPositions[urand(0,5)], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
|
||||
{
|
||||
if (Unit* target = SelectTargetFromPlayerList(100.0f))
|
||||
{
|
||||
cr->AI()->DoAction(ACTION_CALL_HELP_OFF);
|
||||
cr->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_START_SECOND_PHASE:
|
||||
// same as pop
|
||||
Talk(SAY_AGGRO);
|
||||
events.Reset();
|
||||
summons.DoAction(ACTION_SECOND_PHASE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE);
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
events.ScheduleEvent(EVENT_SPELL_FROST_BOLT_SINGLE, 2000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FROST_BOLT_MULTI, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_DETONATE_MANA, 20000);
|
||||
events.ScheduleEvent(EVENT_SECOND_PHASE_HEALTH_CHECK, 1000);
|
||||
events.ScheduleEvent(EVENT_SPELL_SHADOW_FISSURE, 25000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FROST_BLAST, 45000);
|
||||
if (Is25ManRaid())
|
||||
events.ScheduleEvent(EVENT_SPELL_CHAINS, 50000);
|
||||
break;
|
||||
case EVENT_SPELL_FROST_BOLT_SINGLE:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_FROST_BOLT_SINGLE_10, SPELL_FROST_BOLT_SINGLE_25), false);
|
||||
events.RepeatEvent(urand(2000, 15000));
|
||||
break;
|
||||
case EVENT_SPELL_FROST_BOLT_MULTI:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_FROST_BOLT_MULTI_10, SPELL_FROST_BOLT_MULTI_25), false);
|
||||
events.RepeatEvent(24000);
|
||||
break;
|
||||
case EVENT_SPELL_SHADOW_FISSURE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
me->CastSpell(target, SPELL_SHADOW_FISURE, false);
|
||||
events.RepeatEvent(25000);
|
||||
break;
|
||||
case EVENT_SPELL_FROST_BLAST:
|
||||
if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, RAID_MODE(1,0), 0, true))
|
||||
me->CastSpell(target, SPELL_FROST_BLAST, false);
|
||||
|
||||
if (!urand(0,2))
|
||||
Talk(SAY_FROST_BLAST);
|
||||
events.RepeatEvent(45000);
|
||||
break;
|
||||
case EVENT_SPELL_CHAINS:
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 200, true, -SPELL_CHAINS_OF_KELTHUZAD))
|
||||
me->CastSpell(target, SPELL_CHAINS_OF_KELTHUZAD, true);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_START_SECOND_PHASE:
|
||||
// same as pop
|
||||
Talk(SAY_AGGRO);
|
||||
events.Reset();
|
||||
summons.DoAction(ACTION_SECOND_PHASE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE);
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
events.ScheduleEvent(EVENT_SPELL_FROST_BOLT_SINGLE, 2000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FROST_BOLT_MULTI, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_DETONATE_MANA, 20000);
|
||||
events.ScheduleEvent(EVENT_SECOND_PHASE_HEALTH_CHECK, 1000);
|
||||
events.ScheduleEvent(EVENT_SPELL_SHADOW_FISSURE, 25000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FROST_BLAST, 45000);
|
||||
if (Is25ManRaid())
|
||||
events.ScheduleEvent(EVENT_SPELL_CHAINS, 50000);
|
||||
break;
|
||||
case EVENT_SPELL_FROST_BOLT_SINGLE:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_FROST_BOLT_SINGLE_10, SPELL_FROST_BOLT_SINGLE_25), false);
|
||||
events.RepeatEvent(urand(2000, 15000));
|
||||
break;
|
||||
case EVENT_SPELL_FROST_BOLT_MULTI:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_FROST_BOLT_MULTI_10, SPELL_FROST_BOLT_MULTI_25), false);
|
||||
events.RepeatEvent(24000);
|
||||
break;
|
||||
case EVENT_SPELL_SHADOW_FISSURE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
me->CastSpell(target, SPELL_SHADOW_FISURE, false);
|
||||
events.RepeatEvent(25000);
|
||||
break;
|
||||
case EVENT_SPELL_FROST_BLAST:
|
||||
if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, RAID_MODE(1,0), 0, true))
|
||||
me->CastSpell(target, SPELL_FROST_BLAST, false);
|
||||
|
||||
if (!urand(0,2))
|
||||
Talk(SAY_FROST_BLAST);
|
||||
events.RepeatEvent(45000);
|
||||
break;
|
||||
case EVENT_SPELL_CHAINS:
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 200, true, -SPELL_CHAINS_OF_KELTHUZAD))
|
||||
me->CastSpell(target, SPELL_CHAINS_OF_KELTHUZAD, true);
|
||||
|
||||
if (!urand(0,2))
|
||||
Talk(SAY_CHAIN);
|
||||
events.RepeatEvent(50000);
|
||||
break;
|
||||
case EVENT_SPELL_DETONATE_MANA:
|
||||
{
|
||||
std::vector<Unit*> unitList;
|
||||
ThreatContainer::StorageType const& threatList = me->getThreatManager().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER
|
||||
&& (*itr)->getTarget()->getPowerType() == POWER_MANA
|
||||
&& (*itr)->getTarget()->GetPower(POWER_MANA))
|
||||
unitList.push_back((*itr)->getTarget());
|
||||
}
|
||||
if (!urand(0,2))
|
||||
Talk(SAY_CHAIN);
|
||||
events.RepeatEvent(50000);
|
||||
break;
|
||||
case EVENT_SPELL_DETONATE_MANA:
|
||||
{
|
||||
std::vector<Unit*> unitList;
|
||||
ThreatContainer::StorageType const& threatList = me->getThreatManager().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER
|
||||
&& (*itr)->getTarget()->getPowerType() == POWER_MANA
|
||||
&& (*itr)->getTarget()->GetPower(POWER_MANA))
|
||||
unitList.push_back((*itr)->getTarget());
|
||||
}
|
||||
|
||||
if (!unitList.empty())
|
||||
{
|
||||
std::vector<Unit*>::iterator itr = unitList.begin();
|
||||
advance(itr, urand(0, unitList.size()-1));
|
||||
me->CastSpell(*itr, SPELL_DETONATE_MANA, false);
|
||||
if (!urand(0,2))
|
||||
Talk(SAY_SPECIAL);
|
||||
}
|
||||
if (!unitList.empty())
|
||||
{
|
||||
std::vector<Unit*>::iterator itr = unitList.begin();
|
||||
advance(itr, urand(0, unitList.size()-1));
|
||||
me->CastSpell(*itr, SPELL_DETONATE_MANA, false);
|
||||
if (!urand(0,2))
|
||||
Talk(SAY_SPECIAL);
|
||||
}
|
||||
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
}
|
||||
case EVENT_SECOND_PHASE_HEALTH_CHECK:
|
||||
if (me->HealthBelowPct(45))
|
||||
{
|
||||
events.PopEvent();
|
||||
Talk(SAY_REQUEST_AID);
|
||||
events.DelayEvents(5500);
|
||||
events.ScheduleEvent(EVENT_THIRD_PHASE_LICH_KING_SAY, 5000);
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_THIRD_PHASE_LICH_KING_SAY:
|
||||
if (pInstance)
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_LICH_KING_BOSS)))
|
||||
cr->AI()->Talk(SAY_ANSWER_REQUEST);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
}
|
||||
case EVENT_SECOND_PHASE_HEALTH_CHECK:
|
||||
if (me->HealthBelowPct(45))
|
||||
{
|
||||
events.PopEvent();
|
||||
Talk(SAY_REQUEST_AID);
|
||||
events.DelayEvents(5500);
|
||||
events.ScheduleEvent(EVENT_THIRD_PHASE_LICH_KING_SAY, 5000);
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_THIRD_PHASE_LICH_KING_SAY:
|
||||
if (pInstance)
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_LICH_KING_BOSS)))
|
||||
cr->AI()->Talk(SAY_ANSWER_REQUEST);
|
||||
|
||||
for (uint8 i = 0 ; i < RAID_MODE(2,4); ++i)
|
||||
events.ScheduleEvent(EVENT_SUMMON_GUARDIAN_OF_ICECROWN, 10000+(i*5000));
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SUMMON_GUARDIAN_OF_ICECROWN:
|
||||
me->MonsterTextEmote("A Guardian of Icecrown enter the fight!", 0, true);
|
||||
if (Creature* cr = me->SummonCreature(NPC_GUARDIAN_OF_ICECROWN, SummonPositions[RAND(0, 1, 3, 4)]))
|
||||
cr->AI()->AttackStart(me->GetVictim());
|
||||
for (uint8 i = 0 ; i < RAID_MODE(2,4); ++i)
|
||||
events.ScheduleEvent(EVENT_SUMMON_GUARDIAN_OF_ICECROWN, 10000+(i*5000));
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SUMMON_GUARDIAN_OF_ICECROWN:
|
||||
me->MonsterTextEmote("A Guardian of Icecrown enter the fight!", 0, true);
|
||||
if (Creature* cr = me->SummonCreature(NPC_GUARDIAN_OF_ICECROWN, SummonPositions[RAND(0, 1, 3, 4)]))
|
||||
cr->AI()->AttackStart(me->GetVictim());
|
||||
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class boss_kelthuzad_minion : public CreatureScript
|
||||
@@ -413,158 +413,158 @@ public:
|
||||
return new boss_kelthuzad_minionAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_kelthuzad_minionAI : public ScriptedAI
|
||||
{
|
||||
boss_kelthuzad_minionAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
struct boss_kelthuzad_minionAI : public ScriptedAI
|
||||
{
|
||||
boss_kelthuzad_minionAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
bool callHelp;
|
||||
EventMap events;
|
||||
bool callHelp;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->SetNoCallAssistance(true);
|
||||
callHelp = true;
|
||||
events.Reset();
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
me->SetNoCallAssistance(true);
|
||||
callHelp = true;
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_CALL_HELP_ON)
|
||||
callHelp = true;
|
||||
else if (param == ACTION_CALL_HELP_OFF)
|
||||
callHelp = false;
|
||||
else if (param == ACTION_SECOND_PHASE)
|
||||
{
|
||||
if (!me->IsInCombat())
|
||||
me->DespawnOrUnsummon(500);
|
||||
}
|
||||
}
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_CALL_HELP_ON)
|
||||
callHelp = true;
|
||||
else if (param == ACTION_CALL_HELP_OFF)
|
||||
callHelp = false;
|
||||
else if (param == ACTION_SECOND_PHASE)
|
||||
{
|
||||
if (!me->IsInCombat())
|
||||
me->DespawnOrUnsummon(500);
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER && !who->IsPet())
|
||||
return;
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER && !who->IsPet())
|
||||
return;
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void JustDied(Unit* )
|
||||
{
|
||||
if (me->GetEntry() == NPC_UNSTOPPABLE_ABOMINATION && me->GetInstanceScript())
|
||||
me->GetInstanceScript()->SetData(DATA_ABOMINATION_KILLED, 0);
|
||||
}
|
||||
void JustDied(Unit* )
|
||||
{
|
||||
if (me->GetEntry() == NPC_UNSTOPPABLE_ABOMINATION && me->GetInstanceScript())
|
||||
me->GetInstanceScript()->SetData(DATA_ABOMINATION_KILLED, 0);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
ScriptedAI::AttackStart(who);
|
||||
if (callHelp)
|
||||
{
|
||||
std::list<Creature*> targets;
|
||||
me->GetCreaturesWithEntryInRange(targets, 15.0f, me->GetEntry());
|
||||
for (std::list<Creature*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetGUID() != me->GetGUID())
|
||||
{
|
||||
(*itr)->ToCreature()->AI()->DoAction(ACTION_CALL_HELP_OFF);
|
||||
(*itr)->ToCreature()->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
}
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
ScriptedAI::AttackStart(who);
|
||||
if (callHelp)
|
||||
{
|
||||
std::list<Creature*> targets;
|
||||
me->GetCreaturesWithEntryInRange(targets, 15.0f, me->GetEntry());
|
||||
for (std::list<Creature*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetGUID() != me->GetGUID())
|
||||
{
|
||||
(*itr)->ToCreature()->AI()->DoAction(ACTION_CALL_HELP_OFF);
|
||||
(*itr)->ToCreature()->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (me->GetEntry() != NPC_UNSTOPPABLE_ABOMINATION && me->GetEntry() != NPC_GUARDIAN_OF_ICECROWN)
|
||||
me->AddThreat(who, 1000000.0f);
|
||||
}
|
||||
if (me->GetEntry() != NPC_UNSTOPPABLE_ABOMINATION && me->GetEntry() != NPC_GUARDIAN_OF_ICECROWN)
|
||||
me->AddThreat(who, 1000000.0f);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
if (me->GetEntry() == NPC_UNSTOPPABLE_ABOMINATION)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_FRENZY, 1000);
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_MORTAL_WOUND, 5000);
|
||||
}
|
||||
else if (me->GetEntry() == NPC_GUARDIAN_OF_ICECROWN)
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_BLOOD_TAP, 15000);
|
||||
}
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
if (me->GetEntry() == NPC_UNSTOPPABLE_ABOMINATION)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_FRENZY, 1000);
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_MORTAL_WOUND, 5000);
|
||||
}
|
||||
else if (me->GetEntry() == NPC_GUARDIAN_OF_ICECROWN)
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_BLOOD_TAP, 15000);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && me->GetInstanceScript())
|
||||
me->GetInstanceScript()->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && me->GetInstanceScript())
|
||||
me->GetInstanceScript()->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_MINION_SPELL_MORTAL_WOUND:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MORTAL_WOUND, false);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_MINION_SPELL_FRENZY:
|
||||
if (me->HealthBelowPct(35))
|
||||
{
|
||||
me->CastSpell(me, SPELL_FRENZY, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_MINION_SPELL_BLOOD_TAP:
|
||||
me->CastSpell(me->GetVictim(), SPELL_BLOOD_TAP, false);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_MINION_SPELL_MORTAL_WOUND:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MORTAL_WOUND, false);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_MINION_SPELL_FRENZY:
|
||||
if (me->HealthBelowPct(35))
|
||||
{
|
||||
me->CastSpell(me, SPELL_FRENZY, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_MINION_SPELL_BLOOD_TAP:
|
||||
me->CastSpell(me->GetVictim(), SPELL_BLOOD_TAP, false);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_kelthuzad_frost_blast : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_kelthuzad_frost_blast() : SpellScriptLoader("spell_kelthuzad_frost_blast") { }
|
||||
public:
|
||||
spell_kelthuzad_frost_blast() : SpellScriptLoader("spell_kelthuzad_frost_blast") { }
|
||||
|
||||
class spell_kelthuzad_frost_blast_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_kelthuzad_frost_blast_SpellScript);
|
||||
class spell_kelthuzad_frost_blast_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_kelthuzad_frost_blast_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || !caster->ToCreature())
|
||||
return;
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || !caster->ToCreature())
|
||||
return;
|
||||
|
||||
std::list<WorldObject*> tmplist;
|
||||
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
if (!(*itr)->ToUnit()->HasAura(SPELL_FROST_BLAST))
|
||||
tmplist.push_back(*itr);
|
||||
std::list<WorldObject*> tmplist;
|
||||
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
if (!(*itr)->ToUnit()->HasAura(SPELL_FROST_BLAST))
|
||||
tmplist.push_back(*itr);
|
||||
|
||||
targets.clear();
|
||||
for (std::list<WorldObject*>::iterator itr = tmplist.begin(); itr != tmplist.end(); ++itr)
|
||||
targets.push_back(*itr);
|
||||
}
|
||||
targets.clear();
|
||||
for (std::list<WorldObject*>::iterator itr = tmplist.begin(); itr != tmplist.end(); ++itr)
|
||||
targets.push_back(*itr);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kelthuzad_frost_blast_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_DEST_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kelthuzad_frost_blast_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_DEST_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_kelthuzad_frost_blast_SpellScript();
|
||||
}
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_kelthuzad_frost_blast_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_kelthuzad_detonate_mana : public SpellScriptLoader
|
||||
@@ -610,8 +610,8 @@ class spell_kelthuzad_detonate_mana : public SpellScriptLoader
|
||||
|
||||
void AddSC_boss_kelthuzad()
|
||||
{
|
||||
new boss_kelthuzad();
|
||||
new boss_kelthuzad_minion();
|
||||
new spell_kelthuzad_frost_blast();
|
||||
new spell_kelthuzad_detonate_mana();
|
||||
new boss_kelthuzad();
|
||||
new boss_kelthuzad_minion();
|
||||
new spell_kelthuzad_frost_blast();
|
||||
new spell_kelthuzad_detonate_mana();
|
||||
}
|
||||
|
||||
@@ -8,21 +8,21 @@ REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_NECROTIC_AURA = 55593,
|
||||
SPELL_SUMMON_SPORE = 29234,
|
||||
SPELL_DEATHBLOOM_10 = 29865,
|
||||
SPELL_DEATHBLOOM_25 = 55053,
|
||||
SPELL_INEVITABLE_DOOM_10 = 29204,
|
||||
SPELL_INEVITABLE_DOOM_25 = 55052,
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_NECROTIC_AURA = 55593,
|
||||
SPELL_SUMMON_SPORE = 29234,
|
||||
SPELL_DEATHBLOOM_10 = 29865,
|
||||
SPELL_DEATHBLOOM_25 = 55053,
|
||||
SPELL_INEVITABLE_DOOM_10 = 29204,
|
||||
SPELL_INEVITABLE_DOOM_25 = 55052,
|
||||
SPELL_BERSERK = 26662,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_NECROTIC_AURA = 1,
|
||||
EVENT_SPELL_DEATHBLOOM = 2,
|
||||
EVENT_SPELL_INEVITABLE_DOOM = 3,
|
||||
EVENT_SPELL_BERSERK = 4,
|
||||
EVENT_SPELL_NECROTIC_AURA = 1,
|
||||
EVENT_SPELL_DEATHBLOOM = 2,
|
||||
EVENT_SPELL_INEVITABLE_DOOM = 3,
|
||||
EVENT_SPELL_BERSERK = 4,
|
||||
};
|
||||
|
||||
enum Texts
|
||||
@@ -42,96 +42,96 @@ public:
|
||||
return new boss_loathebAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_loathebAI : public ScriptedAI
|
||||
{
|
||||
boss_loathebAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_loathebAI : public ScriptedAI
|
||||
{
|
||||
boss_loathebAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_LOATHEB, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_LOATHEB_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_LOATHEB, NOT_STARTED);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_LOATHEB_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr) { cr->SetInCombatWithZone(); }
|
||||
void JustSummoned(Creature* cr) { cr->SetInCombatWithZone(); }
|
||||
|
||||
void SummonedCreatureDies(Creature* cr, Unit*)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_SPORE_KILLED, 0);
|
||||
}
|
||||
void SummonedCreatureDies(Creature* cr, Unit*)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_SPORE_KILLED, 0);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_LOATHEB, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_LOATHEB_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_LOATHEB, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_LOATHEB_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_SPELL_NECROTIC_AURA, 0);
|
||||
events.ScheduleEvent(EVENT_SPELL_DEATHBLOOM, 25000);
|
||||
events.ScheduleEvent(EVENT_SPELL_INEVITABLE_DOOM, 120000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 720000);
|
||||
}
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_SPELL_NECROTIC_AURA, 0);
|
||||
events.ScheduleEvent(EVENT_SPELL_DEATHBLOOM, 25000);
|
||||
events.ScheduleEvent(EVENT_SPELL_INEVITABLE_DOOM, 120000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 720000);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_LOATHEB, DONE);
|
||||
}
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_LOATHEB, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_NECROTIC_AURA:
|
||||
me->CastSpell(me, SPELL_NECROTIC_AURA, true);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_SPELL_DEATHBLOOM:
|
||||
me->CastSpell(me, SPELL_SUMMON_SPORE, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_DEATHBLOOM_10, SPELL_DEATHBLOOM_25), false);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_SPELL_INEVITABLE_DOOM:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_INEVITABLE_DOOM_10, SPELL_INEVITABLE_DOOM_25), false);
|
||||
events.RepeatEvent(events.GetTimer() < 5*MINUTE*IN_MILLISECONDS ? 30000 : 15000);
|
||||
break;
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_NECROTIC_AURA:
|
||||
me->CastSpell(me, SPELL_NECROTIC_AURA, true);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_SPELL_DEATHBLOOM:
|
||||
me->CastSpell(me, SPELL_SUMMON_SPORE, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_DEATHBLOOM_10, SPELL_DEATHBLOOM_25), false);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_SPELL_INEVITABLE_DOOM:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_INEVITABLE_DOOM_10, SPELL_INEVITABLE_DOOM_25), false);
|
||||
events.RepeatEvent(events.GetTimer() < 5*MINUTE*IN_MILLISECONDS ? 30000 : 15000);
|
||||
break;
|
||||
case EVENT_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_loatheb_necrotic_aura_warning : public SpellScriptLoader
|
||||
@@ -145,14 +145,14 @@ class spell_loatheb_necrotic_aura_warning : public SpellScriptLoader
|
||||
|
||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Creature* target = GetTarget()->ToCreature();
|
||||
Creature* target = GetTarget()->ToCreature();
|
||||
if (target->IsAIEnabled)
|
||||
target->AI()->Talk(SAY_NECROTIC_AURA_APPLIED);
|
||||
}
|
||||
|
||||
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Creature* target = GetTarget()->ToCreature();
|
||||
Creature* target = GetTarget()->ToCreature();
|
||||
if (target->IsAIEnabled)
|
||||
target->AI()->Talk(SAY_NECROTIC_AURA_REMOVED);
|
||||
}
|
||||
@@ -173,5 +173,5 @@ class spell_loatheb_necrotic_aura_warning : public SpellScriptLoader
|
||||
void AddSC_boss_loatheb()
|
||||
{
|
||||
new boss_loatheb();
|
||||
new spell_loatheb_necrotic_aura_warning();
|
||||
new spell_loatheb_necrotic_aura_warning();
|
||||
}
|
||||
|
||||
@@ -9,31 +9,31 @@ REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_WEB_WRAP = 28622,
|
||||
SPELL_WEB_SPRAY_10 = 29484,
|
||||
SPELL_WEB_SPRAY_25 = 54125,
|
||||
SPELL_POISON_SHOCK_10 = 28741,
|
||||
SPELL_POISON_SHOCK_25 = 54122,
|
||||
SPELL_NECROTIC_POISON_10 = 54121,
|
||||
SPELL_NECROTIC_POISON_25 = 28776,
|
||||
SPELL_FRENZY_10 = 54123,
|
||||
SPELL_FRENZY_25 = 54124,
|
||||
SPELL_WEB_WRAP = 28622,
|
||||
SPELL_WEB_SPRAY_10 = 29484,
|
||||
SPELL_WEB_SPRAY_25 = 54125,
|
||||
SPELL_POISON_SHOCK_10 = 28741,
|
||||
SPELL_POISON_SHOCK_25 = 54122,
|
||||
SPELL_NECROTIC_POISON_10 = 54121,
|
||||
SPELL_NECROTIC_POISON_25 = 28776,
|
||||
SPELL_FRENZY_10 = 54123,
|
||||
SPELL_FRENZY_25 = 54124,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_WEB_SPRAY = 1,
|
||||
EVENT_SPELL_POISON_SHOCK = 2,
|
||||
EVENT_SPELL_NECROTIC_POISON = 3,
|
||||
EVENT_WEB_WRAP = 4,
|
||||
EVENT_HEALTH_CHECK = 5,
|
||||
EVENT_SUMMON_SPIDERLINGS = 6,
|
||||
EVENT_SPELL_WEB_SPRAY = 1,
|
||||
EVENT_SPELL_POISON_SHOCK = 2,
|
||||
EVENT_SPELL_NECROTIC_POISON = 3,
|
||||
EVENT_WEB_WRAP = 4,
|
||||
EVENT_HEALTH_CHECK = 5,
|
||||
EVENT_SUMMON_SPIDERLINGS = 6,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_WEB_WRAP = 16486,
|
||||
NPC_MAEXXNA_SPIDERLING = 17055,
|
||||
NPC_WEB_WRAP = 16486,
|
||||
NPC_MAEXXNA_SPIDERLING = 17055,
|
||||
};
|
||||
|
||||
const Position PosWrap[3] =
|
||||
@@ -53,146 +53,146 @@ public:
|
||||
return new boss_maexxnaAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_maexxnaAI : public ScriptedAI
|
||||
{
|
||||
boss_maexxnaAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_maexxnaAI : public ScriptedAI
|
||||
{
|
||||
boss_maexxnaAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
|
||||
bool IsInRoom()
|
||||
{
|
||||
if (me->GetExactDist(3486.6f, -3890.6f, 291.8f) > 100.0f)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
bool IsInRoom()
|
||||
{
|
||||
if (me->GetExactDist(3486.6f, -3890.6f, 291.8f) > 100.0f)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_MAEXXNA, NOT_STARTED);
|
||||
if (pInstance->GetData(EVENT_FAERLINA) == DONE)
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_MAEXXNA_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_MAEXXNA, NOT_STARTED);
|
||||
if (pInstance->GetData(EVENT_FAERLINA) == DONE)
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_MAEXXNA_GATE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_WEB_WRAP, 20000);
|
||||
events.ScheduleEvent(EVENT_SPELL_WEB_SPRAY, 40000);
|
||||
events.ScheduleEvent(EVENT_SPELL_POISON_SHOCK, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_NECROTIC_POISON, 5000);
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SPIDERLINGS, 30000);
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_WEB_WRAP, 20000);
|
||||
events.ScheduleEvent(EVENT_SPELL_WEB_SPRAY, 40000);
|
||||
events.ScheduleEvent(EVENT_SPELL_POISON_SHOCK, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_NECROTIC_POISON, 5000);
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SPIDERLINGS, 30000);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_MAEXXNA, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_MAEXXNA_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_MAEXXNA, IN_PROGRESS);
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_MAEXXNA_GATE)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_MAEXXNA, DONE);
|
||||
}
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_MAEXXNA, DONE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr)
|
||||
{
|
||||
if (cr->GetEntry() == NPC_MAEXXNA_SPIDERLING)
|
||||
{
|
||||
cr->SetInCombatWithZone();
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
cr->AI()->AttackStart(target);
|
||||
}
|
||||
void JustSummoned(Creature* cr)
|
||||
{
|
||||
if (cr->GetEntry() == NPC_MAEXXNA_SPIDERLING)
|
||||
{
|
||||
cr->SetInCombatWithZone();
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
cr->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
summons.Summon(cr);
|
||||
}
|
||||
summons.Summon(cr);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!IsInRoom())
|
||||
return;
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!IsInRoom())
|
||||
return;
|
||||
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_WEB_SPRAY:
|
||||
me->MonsterTextEmote("%s sprays strands of web everywhere!", 0, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_WEB_SPRAY_10, SPELL_WEB_SPRAY_25), true);
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
case EVENT_SPELL_POISON_SHOCK:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_POISON_SHOCK_10, SPELL_POISON_SHOCK_25), false);
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
case EVENT_SPELL_NECROTIC_POISON:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_NECROTIC_POISON_10, SPELL_NECROTIC_POISON_25), false);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_SUMMON_SPIDERLINGS:
|
||||
me->MonsterTextEmote("Spiderlings appear on the web!", 0, true);
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
me->SummonCreature(NPC_MAEXXNA_SPIDERLING, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
case EVENT_HEALTH_CHECK:
|
||||
if (me->GetHealthPct() < 30)
|
||||
{
|
||||
me->CastSpell(me, RAID_MODE(SPELL_FRENZY_10, SPELL_FRENZY_25), true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_WEB_SPRAY:
|
||||
me->MonsterTextEmote("%s sprays strands of web everywhere!", 0, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_WEB_SPRAY_10, SPELL_WEB_SPRAY_25), true);
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
case EVENT_SPELL_POISON_SHOCK:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_POISON_SHOCK_10, SPELL_POISON_SHOCK_25), false);
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
case EVENT_SPELL_NECROTIC_POISON:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_NECROTIC_POISON_10, SPELL_NECROTIC_POISON_25), false);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_SUMMON_SPIDERLINGS:
|
||||
me->MonsterTextEmote("Spiderlings appear on the web!", 0, true);
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
me->SummonCreature(NPC_MAEXXNA_SPIDERLING, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
case EVENT_HEALTH_CHECK:
|
||||
if (me->GetHealthPct() < 30)
|
||||
{
|
||||
me->CastSpell(me, RAID_MODE(SPELL_FRENZY_10, SPELL_FRENZY_25), true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_WEB_WRAP:
|
||||
me->MonsterTextEmote("%s spins her web into a cocoon!", 0, true);
|
||||
for (uint8 i = 0; i < RAID_MODE(1,2); ++i)
|
||||
if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true, -SPELL_WEB_WRAP))
|
||||
{
|
||||
target->RemoveAura(RAID_MODE(SPELL_WEB_SPRAY_10, SPELL_WEB_SPRAY_25));
|
||||
uint8 pos = urand(0,2);
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_WEB_WRAP:
|
||||
me->MonsterTextEmote("%s spins her web into a cocoon!", 0, true);
|
||||
for (uint8 i = 0; i < RAID_MODE(1,2); ++i)
|
||||
if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true, -SPELL_WEB_WRAP))
|
||||
{
|
||||
target->RemoveAura(RAID_MODE(SPELL_WEB_SPRAY_10, SPELL_WEB_SPRAY_25));
|
||||
uint8 pos = urand(0,2);
|
||||
|
||||
target->GetMotionMaster()->MoveJump(PosWrap[pos].GetPositionX(), PosWrap[pos].GetPositionY(), PosWrap[pos].GetPositionZ(), 20, 20);
|
||||
if (Creature *wrap = me->SummonCreature(NPC_WEB_WRAP, PosWrap[pos].GetPositionX(), PosWrap[pos].GetPositionY(), PosWrap[pos].GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
wrap->AI()->SetGUID(target->GetGUID());
|
||||
}
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
}
|
||||
target->GetMotionMaster()->MoveJump(PosWrap[pos].GetPositionX(), PosWrap[pos].GetPositionY(), PosWrap[pos].GetPositionZ(), 20, 20);
|
||||
if (Creature *wrap = me->SummonCreature(NPC_WEB_WRAP, PosWrap[pos].GetPositionX(), PosWrap[pos].GetPositionY(), PosWrap[pos].GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
wrap->AI()->SetGUID(target->GetGUID());
|
||||
}
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -206,31 +206,31 @@ public:
|
||||
return new boss_maexxna_webwrapAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_maexxna_webwrapAI : public NullCreatureAI
|
||||
{
|
||||
boss_maexxna_webwrapAI(Creature *c) : NullCreatureAI(c), victimGUID(0) {}
|
||||
struct boss_maexxna_webwrapAI : public NullCreatureAI
|
||||
{
|
||||
boss_maexxna_webwrapAI(Creature *c) : NullCreatureAI(c), victimGUID(0) {}
|
||||
|
||||
uint64 victimGUID;
|
||||
void SetGUID(uint64 guid, int32 param)
|
||||
{
|
||||
victimGUID = guid;
|
||||
if (me->m_spells[0] && victimGUID)
|
||||
if (Unit *victim = ObjectAccessor::GetUnit(*me, victimGUID))
|
||||
victim->CastSpell(victim, me->m_spells[0], true, NULL, NULL, me->GetGUID());
|
||||
}
|
||||
uint64 victimGUID;
|
||||
void SetGUID(uint64 guid, int32 param)
|
||||
{
|
||||
victimGUID = guid;
|
||||
if (me->m_spells[0] && victimGUID)
|
||||
if (Unit *victim = ObjectAccessor::GetUnit(*me, victimGUID))
|
||||
victim->CastSpell(victim, me->m_spells[0], true, NULL, NULL, me->GetGUID());
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (me->m_spells[0] && victimGUID)
|
||||
if (Unit *victim = ObjectAccessor::GetUnit(*me, victimGUID))
|
||||
victim->RemoveAurasDueToSpell(me->m_spells[0], me->GetGUID());
|
||||
}
|
||||
};
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (me->m_spells[0] && victimGUID)
|
||||
if (Unit *victim = ObjectAccessor::GetUnit(*me, victimGUID))
|
||||
victim->RemoveAurasDueToSpell(me->m_spells[0], me->GetGUID());
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_maexxna()
|
||||
{
|
||||
new boss_maexxna();
|
||||
new boss_maexxna_webwrap();
|
||||
new boss_maexxna();
|
||||
new boss_maexxna_webwrap();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,33 +16,33 @@ enum Says
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_CURSE_OF_THE_PLAGUEBRINGER_10 = 29213,
|
||||
SPELL_CURSE_OF_THE_PLAGUEBRINGER_25 = 54835,
|
||||
SPELL_CRIPPLE_10 = 29212,
|
||||
SPELL_CRIPPLE_25 = 54814,
|
||||
SPELL_SUMMON_PLAGUED_WARRIORS = 29237,
|
||||
SPELL_TELEPORT = 29216,
|
||||
SPELL_BLINK = 29208,
|
||||
SPELL_CURSE_OF_THE_PLAGUEBRINGER_10 = 29213,
|
||||
SPELL_CURSE_OF_THE_PLAGUEBRINGER_25 = 54835,
|
||||
SPELL_CRIPPLE_10 = 29212,
|
||||
SPELL_CRIPPLE_25 = 54814,
|
||||
SPELL_SUMMON_PLAGUED_WARRIORS = 29237,
|
||||
SPELL_TELEPORT = 29216,
|
||||
SPELL_BLINK = 29208,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_CURSE = 1,
|
||||
EVENT_SPELL_CRIPPLE = 2,
|
||||
EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE = 3,
|
||||
EVENT_MOVE_TO_BALCONY = 4,
|
||||
EVENT_SPELL_BLINK = 5,
|
||||
EVENT_MOVE_TO_GROUND = 6,
|
||||
EVENT_SUMMON_PLAGUED_WARRIOR_REAL = 7,
|
||||
EVENT_BALCONY_SUMMON_ANNOUNCE = 8,
|
||||
EVENT_BALCONY_SUMMON_REAL = 9,
|
||||
EVENT_SPELL_CURSE = 1,
|
||||
EVENT_SPELL_CRIPPLE = 2,
|
||||
EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE = 3,
|
||||
EVENT_MOVE_TO_BALCONY = 4,
|
||||
EVENT_SPELL_BLINK = 5,
|
||||
EVENT_MOVE_TO_GROUND = 6,
|
||||
EVENT_SUMMON_PLAGUED_WARRIOR_REAL = 7,
|
||||
EVENT_BALCONY_SUMMON_ANNOUNCE = 8,
|
||||
EVENT_BALCONY_SUMMON_REAL = 9,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_PLAGUED_WARRIOR = 16984,
|
||||
NPC_PLAGUED_CHAMPION = 16983,
|
||||
NPC_PLAGUED_GUARDIAN = 16981,
|
||||
NPC_PLAGUED_WARRIOR = 16984,
|
||||
NPC_PLAGUED_CHAMPION = 16983,
|
||||
NPC_PLAGUED_GUARDIAN = 16981,
|
||||
};
|
||||
|
||||
const Position summoningPosition[5] =
|
||||
@@ -66,187 +66,187 @@ public:
|
||||
return new boss_nothAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_nothAI : public ScriptedAI
|
||||
{
|
||||
boss_nothAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_nothAI : public ScriptedAI
|
||||
{
|
||||
boss_nothAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
uint8 totalPhase;
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
uint8 totalPhase;
|
||||
|
||||
void StartGroundPhase()
|
||||
{
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
void StartGroundPhase()
|
||||
{
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_MOVE_TO_BALCONY, (totalPhase < 2 ? 110000 : (110000 / totalPhase)));
|
||||
events.ScheduleEvent(EVENT_SPELL_CURSE, 15000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE, 25000);
|
||||
if (Is25ManRaid())
|
||||
events.ScheduleEvent(EVENT_SPELL_BLINK, 26000);
|
||||
}
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_MOVE_TO_BALCONY, (totalPhase < 2 ? 110000 : (110000 / totalPhase)));
|
||||
events.ScheduleEvent(EVENT_SPELL_CURSE, 15000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE, 25000);
|
||||
if (Is25ManRaid())
|
||||
events.ScheduleEvent(EVENT_SPELL_BLINK, 26000);
|
||||
}
|
||||
|
||||
void StartBalconyPhase()
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AttackStop();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
void StartBalconyPhase()
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AttackStop();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_BALCONY_SUMMON_ANNOUNCE, 4000);
|
||||
events.ScheduleEvent(EVENT_MOVE_TO_GROUND, 70000);
|
||||
}
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_BALCONY_SUMMON_ANNOUNCE, 4000);
|
||||
events.ScheduleEvent(EVENT_MOVE_TO_GROUND, 70000);
|
||||
}
|
||||
|
||||
void SummonHelper(uint32 entry, uint32 count)
|
||||
{
|
||||
for (uint8 i = 0; i < count; ++i)
|
||||
me->SummonCreature(entry, summoningPosition[urand(0,4)]);
|
||||
}
|
||||
void SummonHelper(uint32 entry, uint32 count)
|
||||
{
|
||||
for (uint8 i = 0; i < count; ++i)
|
||||
me->SummonCreature(entry, summoningPosition[urand(0,4)]);
|
||||
}
|
||||
|
||||
bool IsInRoom()
|
||||
{
|
||||
if (me->GetPositionX() > 2730 || me->GetPositionX() < 2614 || me->GetPositionY() > -3455 || me->GetPositionY() < -3553)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
bool IsInRoom()
|
||||
{
|
||||
if (me->GetPositionX() > 2730 || me->GetPositionX() < 2614 || me->GetPositionY() > -3455 || me->GetPositionY() < -3553)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
totalPhase = 0;
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
totalPhase = 0;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_NOTH, NOT_STARTED);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_NOTH, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_NOTH, IN_PROGRESS);
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_NOTH, IN_PROGRESS);
|
||||
|
||||
StartGroundPhase();
|
||||
}
|
||||
StartGroundPhase();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_NOTH, DONE);
|
||||
}
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_NOTH, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!IsInRoom())
|
||||
return;
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!IsInRoom())
|
||||
return;
|
||||
|
||||
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.GetEvent())
|
||||
{
|
||||
// GROUND
|
||||
case EVENT_SPELL_CURSE:
|
||||
me->CastCustomSpell(RAID_MODE(SPELL_CURSE_OF_THE_PLAGUEBRINGER_10, SPELL_CURSE_OF_THE_PLAGUEBRINGER_25), SPELLVALUE_MAX_TARGETS, RAID_MODE(3, 10), me, false);
|
||||
events.RepeatEvent(25000);
|
||||
break;
|
||||
case EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE:
|
||||
me->MonsterTextEmote("Noth the Plaguebringer summons forth Skeletal Warriors!", 0, true);
|
||||
Talk(SAY_SUMMON);
|
||||
events.RepeatEvent(25000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_PLAGUED_WARRIOR_REAL, 4000);
|
||||
break;
|
||||
case EVENT_SUMMON_PLAGUED_WARRIOR_REAL:
|
||||
me->CastSpell(me, SPELL_SUMMON_PLAGUED_WARRIORS, true);
|
||||
SummonHelper(NPC_PLAGUED_WARRIOR, RAID_MODE(2,3));
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_MOVE_TO_BALCONY:
|
||||
me->MonsterTextEmote("%s teleports to the balcony above!", 0, true);
|
||||
me->CastSpell(me, SPELL_TELEPORT, true);
|
||||
StartBalconyPhase();
|
||||
//events.PopEvent(); events.Reset()!!
|
||||
break;
|
||||
case EVENT_SPELL_BLINK:
|
||||
DoResetThreat();
|
||||
me->MonsterTextEmote("%s blinks away!", 0, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_CRIPPLE_10, SPELL_CRIPPLE_25), false);
|
||||
me->CastSpell(me, SPELL_BLINK, true);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
// BALCONY
|
||||
case EVENT_BALCONY_SUMMON_ANNOUNCE:
|
||||
me->MonsterTextEmote("%s raises more skeletons!", 0, true);
|
||||
events.RepeatEvent(25000);
|
||||
events.ScheduleEvent(EVENT_BALCONY_SUMMON_REAL, 4000);
|
||||
break;
|
||||
case EVENT_BALCONY_SUMMON_REAL:
|
||||
me->CastSpell(me, SPELL_SUMMON_PLAGUED_WARRIORS, true); // visual only
|
||||
if (totalPhase == 0)
|
||||
SummonHelper(NPC_PLAGUED_CHAMPION, RAID_MODE(2,4));
|
||||
else if (totalPhase == 1)
|
||||
{
|
||||
SummonHelper(NPC_PLAGUED_CHAMPION, RAID_MODE(1,2));
|
||||
SummonHelper(NPC_PLAGUED_GUARDIAN, RAID_MODE(1,2));
|
||||
}
|
||||
else
|
||||
SummonHelper(NPC_PLAGUED_GUARDIAN, RAID_MODE(2,4));
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_MOVE_TO_GROUND:
|
||||
me->MonsterTextEmote("%s teleports back into the battle!", 0, true);
|
||||
totalPhase++;
|
||||
StartGroundPhase();
|
||||
me->NearTeleportTo(nothPosition.GetPositionX(), nothPosition.GetPositionY(), nothPosition.GetPositionZ(), nothPosition.GetOrientation(), true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
// GROUND
|
||||
case EVENT_SPELL_CURSE:
|
||||
me->CastCustomSpell(RAID_MODE(SPELL_CURSE_OF_THE_PLAGUEBRINGER_10, SPELL_CURSE_OF_THE_PLAGUEBRINGER_25), SPELLVALUE_MAX_TARGETS, RAID_MODE(3, 10), me, false);
|
||||
events.RepeatEvent(25000);
|
||||
break;
|
||||
case EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE:
|
||||
me->MonsterTextEmote("Noth the Plaguebringer summons forth Skeletal Warriors!", 0, true);
|
||||
Talk(SAY_SUMMON);
|
||||
events.RepeatEvent(25000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_PLAGUED_WARRIOR_REAL, 4000);
|
||||
break;
|
||||
case EVENT_SUMMON_PLAGUED_WARRIOR_REAL:
|
||||
me->CastSpell(me, SPELL_SUMMON_PLAGUED_WARRIORS, true);
|
||||
SummonHelper(NPC_PLAGUED_WARRIOR, RAID_MODE(2,3));
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_MOVE_TO_BALCONY:
|
||||
me->MonsterTextEmote("%s teleports to the balcony above!", 0, true);
|
||||
me->CastSpell(me, SPELL_TELEPORT, true);
|
||||
StartBalconyPhase();
|
||||
//events.PopEvent(); events.Reset()!!
|
||||
break;
|
||||
case EVENT_SPELL_BLINK:
|
||||
DoResetThreat();
|
||||
me->MonsterTextEmote("%s blinks away!", 0, true);
|
||||
me->CastSpell(me, RAID_MODE(SPELL_CRIPPLE_10, SPELL_CRIPPLE_25), false);
|
||||
me->CastSpell(me, SPELL_BLINK, true);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
// BALCONY
|
||||
case EVENT_BALCONY_SUMMON_ANNOUNCE:
|
||||
me->MonsterTextEmote("%s raises more skeletons!", 0, true);
|
||||
events.RepeatEvent(25000);
|
||||
events.ScheduleEvent(EVENT_BALCONY_SUMMON_REAL, 4000);
|
||||
break;
|
||||
case EVENT_BALCONY_SUMMON_REAL:
|
||||
me->CastSpell(me, SPELL_SUMMON_PLAGUED_WARRIORS, true); // visual only
|
||||
if (totalPhase == 0)
|
||||
SummonHelper(NPC_PLAGUED_CHAMPION, RAID_MODE(2,4));
|
||||
else if (totalPhase == 1)
|
||||
{
|
||||
SummonHelper(NPC_PLAGUED_CHAMPION, RAID_MODE(1,2));
|
||||
SummonHelper(NPC_PLAGUED_GUARDIAN, RAID_MODE(1,2));
|
||||
}
|
||||
else
|
||||
SummonHelper(NPC_PLAGUED_GUARDIAN, RAID_MODE(2,4));
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_MOVE_TO_GROUND:
|
||||
me->MonsterTextEmote("%s teleports back into the battle!", 0, true);
|
||||
totalPhase++;
|
||||
StartGroundPhase();
|
||||
me->NearTeleportTo(nothPosition.GetPositionX(), nothPosition.GetPositionY(), nothPosition.GetPositionZ(), nothPosition.GetOrientation(), true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->HasReactState(REACT_AGGRESSIVE))
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
if (me->HasReactState(REACT_AGGRESSIVE))
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_noth()
|
||||
|
||||
@@ -17,24 +17,24 @@ enum Yells
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_HATEFUL_STRIKE_10 = 41926,
|
||||
SPELL_HATEFUL_STRIKE_25 = 59192,
|
||||
SPELL_FRENZY = 28131,
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_SLIME_BOLT = 32309,
|
||||
SPELL_HATEFUL_STRIKE_10 = 41926,
|
||||
SPELL_HATEFUL_STRIKE_25 = 59192,
|
||||
SPELL_FRENZY = 28131,
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_SLIME_BOLT = 32309,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_HEALTH_CHECK = 1,
|
||||
EVENT_SPELL_HATEFUL_STRIKE = 2,
|
||||
EVENT_SPELL_SLIME_BOLT = 3,
|
||||
EVENT_SPELL_BERSERK = 4,
|
||||
EVENT_HEALTH_CHECK = 1,
|
||||
EVENT_SPELL_HATEFUL_STRIKE = 2,
|
||||
EVENT_SPELL_SLIME_BOLT = 3,
|
||||
EVENT_SPELL_BERSERK = 4,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
ACHIEV_TIMED_START_EVENT = 10286,
|
||||
ACHIEV_TIMED_START_EVENT = 10286,
|
||||
};
|
||||
|
||||
class boss_patchwerk : public CreatureScript
|
||||
@@ -47,139 +47,139 @@ public:
|
||||
return new boss_patchwerkAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_patchwerkAI : public ScriptedAI
|
||||
{
|
||||
boss_patchwerkAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_patchwerkAI : public ScriptedAI
|
||||
{
|
||||
boss_patchwerkAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_PATCHWERK, NOT_STARTED);
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_PATCHWERK, NOT_STARTED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_PATCHWERK, DONE);
|
||||
}
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_PATCHWERK, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_SPELL_HATEFUL_STRIKE, 1200);
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 360000);
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
me->SetInCombatWithZone();
|
||||
events.ScheduleEvent(EVENT_SPELL_HATEFUL_STRIKE, 1200);
|
||||
events.ScheduleEvent(EVENT_SPELL_BERSERK, 360000);
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
pInstance->SetData(EVENT_PATCHWERK, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
pInstance->SetData(EVENT_PATCHWERK, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_HATEFUL_STRIKE:
|
||||
{
|
||||
//Cast Hateful strike on the player with the highest
|
||||
//amount of HP within melee distance, and second threat amount
|
||||
std::list<Unit*> meleeRangeTargets;
|
||||
Unit* finalTarget = NULL;
|
||||
uint8 counter = 0;
|
||||
|
||||
ThreatContainer::StorageType::const_iterator i = me->getThreatManager().getThreatList().begin();
|
||||
for (; i != me->getThreatManager().getThreatList().end(); ++i, ++counter)
|
||||
{
|
||||
// Gather all units with melee range
|
||||
Unit *target = (*i)->getTarget();
|
||||
if (me->IsWithinMeleeRange(target))
|
||||
meleeRangeTargets.push_back(target);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_HATEFUL_STRIKE:
|
||||
{
|
||||
//Cast Hateful strike on the player with the highest
|
||||
//amount of HP within melee distance, and second threat amount
|
||||
std::list<Unit*> meleeRangeTargets;
|
||||
Unit* finalTarget = NULL;
|
||||
uint8 counter = 0;
|
||||
|
||||
ThreatContainer::StorageType::const_iterator i = me->getThreatManager().getThreatList().begin();
|
||||
for (; i != me->getThreatManager().getThreatList().end(); ++i, ++counter)
|
||||
{
|
||||
// Gather all units with melee range
|
||||
Unit *target = (*i)->getTarget();
|
||||
if (me->IsWithinMeleeRange(target))
|
||||
meleeRangeTargets.push_back(target);
|
||||
|
||||
// and add threat to most hated
|
||||
if (counter < RAID_MODE(2,3))
|
||||
me->AddThreat(target, 500.0f);
|
||||
}
|
||||
// and add threat to most hated
|
||||
if (counter < RAID_MODE(2,3))
|
||||
me->AddThreat(target, 500.0f);
|
||||
}
|
||||
|
||||
counter = 0;
|
||||
for (std::list<Unit*>::const_iterator i = meleeRangeTargets.begin(); i != meleeRangeTargets.end(); ++i, ++counter)
|
||||
{
|
||||
// if there is only one target available
|
||||
if (meleeRangeTargets.size() == 1)
|
||||
finalTarget = (*i);
|
||||
else if (counter > 0) // skip first target
|
||||
{
|
||||
if (!finalTarget || (*i)->GetHealth() > finalTarget->GetHealth())
|
||||
finalTarget = (*i);
|
||||
counter = 0;
|
||||
for (std::list<Unit*>::const_iterator i = meleeRangeTargets.begin(); i != meleeRangeTargets.end(); ++i, ++counter)
|
||||
{
|
||||
// if there is only one target available
|
||||
if (meleeRangeTargets.size() == 1)
|
||||
finalTarget = (*i);
|
||||
else if (counter > 0) // skip first target
|
||||
{
|
||||
if (!finalTarget || (*i)->GetHealth() > finalTarget->GetHealth())
|
||||
finalTarget = (*i);
|
||||
|
||||
// third loop
|
||||
if (counter >= 2)
|
||||
break;
|
||||
}
|
||||
}
|
||||
// third loop
|
||||
if (counter >= 2)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (finalTarget)
|
||||
me->CastSpell(finalTarget, RAID_MODE(SPELL_HATEFUL_STRIKE_10, SPELL_HATEFUL_STRIKE_25), false);
|
||||
if (finalTarget)
|
||||
me->CastSpell(finalTarget, RAID_MODE(SPELL_HATEFUL_STRIKE_10, SPELL_HATEFUL_STRIKE_25), false);
|
||||
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
}
|
||||
case EVENT_SPELL_BERSERK:
|
||||
Talk(EMOTE_BERSERK);
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.ScheduleEvent(EVENT_SPELL_SLIME_BOLT, 2000);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SPELL_SLIME_BOLT:
|
||||
me->CastSpell(me, SPELL_SLIME_BOLT, false);
|
||||
events.RepeatEvent(3000);
|
||||
break;
|
||||
case EVENT_HEALTH_CHECK:
|
||||
if (me->GetHealthPct() <= 5)
|
||||
{
|
||||
Talk(EMOTE_ENRAGE);
|
||||
me->CastSpell(me, SPELL_FRENZY, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
}
|
||||
case EVENT_SPELL_BERSERK:
|
||||
Talk(EMOTE_BERSERK);
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.ScheduleEvent(EVENT_SPELL_SLIME_BOLT, 2000);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SPELL_SLIME_BOLT:
|
||||
me->CastSpell(me, SPELL_SLIME_BOLT, false);
|
||||
events.RepeatEvent(3000);
|
||||
break;
|
||||
case EVENT_HEALTH_CHECK:
|
||||
if (me->GetHealthPct() <= 5)
|
||||
{
|
||||
Talk(EMOTE_ENRAGE);
|
||||
me->CastSpell(me, SPELL_FRENZY, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_patchwerk()
|
||||
|
||||
@@ -8,46 +8,46 @@ REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
|
||||
enum Sounds
|
||||
{
|
||||
SOUND_AGGRO_1 = 8852,
|
||||
SOUND_AGGRO_2 = 8853,
|
||||
SOUND_AGGRO_3 = 8854,
|
||||
SOUND_SLAY = 8861,
|
||||
SOUND_COMMAND_1 = 8855,
|
||||
SOUND_COMMAND_2 = 8856,
|
||||
SOUND_COMMAND_3 = 8858,
|
||||
SOUND_COMMAND_4 = 8859,
|
||||
SOUND_COMMAND_5 = 8861,
|
||||
SOUND_DEATH = 8860,
|
||||
SOUND_AGGRO_1 = 8852,
|
||||
SOUND_AGGRO_2 = 8853,
|
||||
SOUND_AGGRO_3 = 8854,
|
||||
SOUND_SLAY = 8861,
|
||||
SOUND_COMMAND_1 = 8855,
|
||||
SOUND_COMMAND_2 = 8856,
|
||||
SOUND_COMMAND_3 = 8858,
|
||||
SOUND_COMMAND_4 = 8859,
|
||||
SOUND_COMMAND_5 = 8861,
|
||||
SOUND_DEATH = 8860,
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_UNBALANCING_STRIKE = 26613,
|
||||
SPELL_DISRUPTING_SHOUT_10 = 29107,
|
||||
SPELL_DISRUPTING_SHOUT_25 = 55543,
|
||||
SPELL_JAGGED_KNIFE = 55550,
|
||||
SPELL_HOPELESS = 29125,
|
||||
SPELL_UNBALANCING_STRIKE = 26613,
|
||||
SPELL_DISRUPTING_SHOUT_10 = 29107,
|
||||
SPELL_DISRUPTING_SHOUT_25 = 55543,
|
||||
SPELL_JAGGED_KNIFE = 55550,
|
||||
SPELL_HOPELESS = 29125,
|
||||
|
||||
SPELL_BONE_BARRIER = 29061,
|
||||
SPELL_BLOOD_STRIKE = 61696,
|
||||
SPELL_BONE_BARRIER = 29061,
|
||||
SPELL_BLOOD_STRIKE = 61696,
|
||||
};
|
||||
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_UNBALANCING_STRIKE = 1,
|
||||
EVENT_SPELL_DISRUPTING_SHOUT = 2,
|
||||
EVENT_SPELL_JAGGED_KNIFE = 3,
|
||||
EVENT_PLAY_COMMAND = 4,
|
||||
EVENT_SPELL_UNBALANCING_STRIKE = 1,
|
||||
EVENT_SPELL_DISRUPTING_SHOUT = 2,
|
||||
EVENT_SPELL_JAGGED_KNIFE = 3,
|
||||
EVENT_PLAY_COMMAND = 4,
|
||||
|
||||
EVENT_MINION_BLOOD_STRIKE = 10,
|
||||
EVENT_MINION_BONE_BARRIER = 11,
|
||||
EVENT_MINION_BLOOD_STRIKE = 10,
|
||||
EVENT_MINION_BONE_BARRIER = 11,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_DEATH_KNIGHT_UNDERSTUDY = 16803,
|
||||
NPC_RAZUVIOUS = 16061,
|
||||
NPC_DEATH_KNIGHT_UNDERSTUDY = 16803,
|
||||
NPC_RAZUVIOUS = 16061,
|
||||
};
|
||||
|
||||
class boss_razuvious : public CreatureScript
|
||||
@@ -60,147 +60,147 @@ public:
|
||||
return new boss_razuviousAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_razuviousAI : public ScriptedAI
|
||||
{
|
||||
boss_razuviousAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_razuviousAI : public ScriptedAI
|
||||
{
|
||||
boss_razuviousAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
InstanceScript* pInstance;
|
||||
|
||||
void SpawnHelpers()
|
||||
{
|
||||
me->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2782.45f, -3088.03f, 267.685f, 0.75f);
|
||||
me->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2778.56f, -3113.74f, 267.685f, 5.28f);
|
||||
if (Is25ManRaid())
|
||||
{
|
||||
me->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2762.23f, -3085.07f, 267.685f, 1.95f);
|
||||
me->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2758.24f, -3110.97f, 267.685f, 3.94f);
|
||||
}
|
||||
}
|
||||
void SpawnHelpers()
|
||||
{
|
||||
me->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2782.45f, -3088.03f, 267.685f, 0.75f);
|
||||
me->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2778.56f, -3113.74f, 267.685f, 5.28f);
|
||||
if (Is25ManRaid())
|
||||
{
|
||||
me->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2762.23f, -3085.07f, 267.685f, 1.95f);
|
||||
me->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2758.24f, -3110.97f, 267.685f, 3.94f);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr) { summons.Summon(cr); }
|
||||
void JustSummoned(Creature* cr) { summons.Summon(cr); }
|
||||
|
||||
void Reset()
|
||||
{
|
||||
summons.DespawnAll();
|
||||
events.Reset();
|
||||
SpawnHelpers();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_RAZUVIOUS, NOT_STARTED);
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
summons.DespawnAll();
|
||||
events.Reset();
|
||||
SpawnHelpers();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_RAZUVIOUS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!urand(0,3))
|
||||
{
|
||||
DoPlaySoundToSet(me, SOUND_SLAY);
|
||||
me->MonsterYell("You should've stayed home!", LANG_UNIVERSAL, 0);
|
||||
}
|
||||
if (!urand(0,3))
|
||||
{
|
||||
DoPlaySoundToSet(me, SOUND_SLAY);
|
||||
me->MonsterYell("You should've stayed home!", LANG_UNIVERSAL, 0);
|
||||
}
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* who, uint32& damage, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
// Damage done by the controlled Death Knight understudies should also count toward damage done by players
|
||||
if(who && who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_DEATH_KNIGHT_UNDERSTUDY)
|
||||
me->LowerPlayerDamageReq(damage);
|
||||
}
|
||||
void DamageTaken(Unit* who, uint32& damage, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
// Damage done by the controlled Death Knight understudies should also count toward damage done by players
|
||||
if(who && who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_DEATH_KNIGHT_UNDERSTUDY)
|
||||
me->LowerPlayerDamageReq(damage);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoPlaySoundToSet(me, SOUND_DEATH);
|
||||
me->MonsterYell("An honorable... death...", LANG_UNIVERSAL, 0);
|
||||
|
||||
me->CastSpell(me, SPELL_HOPELESS, true);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_RAZUVIOUS, DONE);
|
||||
}
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoPlaySoundToSet(me, SOUND_DEATH);
|
||||
me->MonsterYell("An honorable... death...", LANG_UNIVERSAL, 0);
|
||||
|
||||
me->CastSpell(me, SPELL_HOPELESS, true);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_RAZUVIOUS, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(me, SOUND_AGGRO_1);
|
||||
me->MonsterYell("Hah hah, I'm just getting warmed up!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(me, SOUND_AGGRO_2);
|
||||
me->MonsterYell("Stand and fight!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 2:
|
||||
DoPlaySoundToSet(me, SOUND_AGGRO_3);
|
||||
me->MonsterYell("Show me what you've got!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
}
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(me, SOUND_AGGRO_1);
|
||||
me->MonsterYell("Hah hah, I'm just getting warmed up!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(me, SOUND_AGGRO_2);
|
||||
me->MonsterYell("Stand and fight!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 2:
|
||||
DoPlaySoundToSet(me, SOUND_AGGRO_3);
|
||||
me->MonsterYell("Show me what you've got!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_SPELL_UNBALANCING_STRIKE, 30000);
|
||||
events.ScheduleEvent(EVENT_SPELL_DISRUPTING_SHOUT, 25000);
|
||||
events.ScheduleEvent(EVENT_SPELL_JAGGED_KNIFE, 15000);
|
||||
events.ScheduleEvent(EVENT_PLAY_COMMAND, 40000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_RAZUVIOUS, IN_PROGRESS);
|
||||
events.ScheduleEvent(EVENT_SPELL_UNBALANCING_STRIKE, 30000);
|
||||
events.ScheduleEvent(EVENT_SPELL_DISRUPTING_SHOUT, 25000);
|
||||
events.ScheduleEvent(EVENT_SPELL_JAGGED_KNIFE, 15000);
|
||||
events.ScheduleEvent(EVENT_PLAY_COMMAND, 40000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_RAZUVIOUS, IN_PROGRESS);
|
||||
|
||||
summons.DoZoneInCombat();
|
||||
}
|
||||
summons.DoZoneInCombat();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_UNBALANCING_STRIKE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_UNBALANCING_STRIKE, false);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_SPELL_DISRUPTING_SHOUT:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_DISRUPTING_SHOUT_10, SPELL_DISRUPTING_SHOUT_25), false);
|
||||
events.RepeatEvent(25000);
|
||||
break;
|
||||
case EVENT_SPELL_JAGGED_KNIFE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f))
|
||||
me->CastSpell(target, SPELL_JAGGED_KNIFE, false);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_UNBALANCING_STRIKE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_UNBALANCING_STRIKE, false);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_SPELL_DISRUPTING_SHOUT:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_DISRUPTING_SHOUT_10, SPELL_DISRUPTING_SHOUT_25), false);
|
||||
events.RepeatEvent(25000);
|
||||
break;
|
||||
case EVENT_SPELL_JAGGED_KNIFE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f))
|
||||
me->CastSpell(target, SPELL_JAGGED_KNIFE, false);
|
||||
|
||||
events.RepeatEvent(25000);
|
||||
break;
|
||||
case EVENT_PLAY_COMMAND:
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(me, SOUND_COMMAND_1);
|
||||
me->MonsterYell("Do as I taught you!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(me, SOUND_COMMAND_2);
|
||||
me->MonsterYell("Show them no mercy!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 2:
|
||||
DoPlaySoundToSet(me, SOUND_COMMAND_3);
|
||||
me->MonsterYell("You disappoint me, students!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(25000);
|
||||
break;
|
||||
case EVENT_PLAY_COMMAND:
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(me, SOUND_COMMAND_1);
|
||||
me->MonsterYell("Do as I taught you!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(me, SOUND_COMMAND_2);
|
||||
me->MonsterYell("Show them no mercy!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 2:
|
||||
DoPlaySoundToSet(me, SOUND_COMMAND_3);
|
||||
me->MonsterYell("You disappoint me, students!", LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class boss_razuvious_minion : public CreatureScript
|
||||
@@ -213,68 +213,68 @@ public:
|
||||
return new boss_razuvious_minionAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_razuvious_minionAI : public ScriptedAI
|
||||
{
|
||||
boss_razuvious_minionAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
struct boss_razuvious_minionAI : public ScriptedAI
|
||||
{
|
||||
boss_razuvious_minionAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (me->GetInstanceScript())
|
||||
me->GetInstanceScript()->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (me->GetInstanceScript())
|
||||
me->GetInstanceScript()->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (Creature* cr = me->FindNearestCreature(NPC_RAZUVIOUS, 100.0f))
|
||||
{
|
||||
cr->SetInCombatWithZone();
|
||||
cr->AI()->AttackStart(who);
|
||||
}
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (Creature* cr = me->FindNearestCreature(NPC_RAZUVIOUS, 100.0f))
|
||||
{
|
||||
cr->SetInCombatWithZone();
|
||||
cr->AI()->AttackStart(who);
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_MINION_BLOOD_STRIKE, 4000);
|
||||
events.ScheduleEvent(EVENT_MINION_BONE_BARRIER, 9000);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_MINION_BLOOD_STRIKE, 4000);
|
||||
events.ScheduleEvent(EVENT_MINION_BONE_BARRIER, 9000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING) || me->IsCharmed())
|
||||
return;
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING) || me->IsCharmed())
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_MINION_BLOOD_STRIKE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_BLOOD_STRIKE, false);
|
||||
events.RepeatEvent(8000);
|
||||
break;
|
||||
case EVENT_MINION_BONE_BARRIER:
|
||||
me->CastSpell(me, SPELL_BONE_BARRIER, true);
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_MINION_BLOOD_STRIKE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_BLOOD_STRIKE, false);
|
||||
events.RepeatEvent(8000);
|
||||
break;
|
||||
case EVENT_MINION_BONE_BARRIER:
|
||||
me->CastSpell(me, SPELL_BONE_BARRIER, true);
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_razuvious()
|
||||
{
|
||||
new boss_razuvious();
|
||||
new boss_razuvious_minion();
|
||||
new boss_razuvious_minion();
|
||||
}
|
||||
|
||||
@@ -18,53 +18,53 @@ enum Yells
|
||||
|
||||
enum Spells
|
||||
{
|
||||
// Fight
|
||||
SPELL_FROST_AURA_10 = 28531,
|
||||
SPELL_FROST_AURA_25 = 55799,
|
||||
SPELL_CLEAVE = 19983,
|
||||
SPELL_TAIL_SWEEP_10 = 55697,
|
||||
SPELL_TAIL_SWEEP_25 = 55696,
|
||||
SPELL_SUMMON_BLIZZARD = 28560,
|
||||
SPELL_LIFE_DRAIN_10 = 28542,
|
||||
SPELL_LIFE_DRAIN_25 = 55665,
|
||||
SPELL_BERSERK = 26662,
|
||||
// Fight
|
||||
SPELL_FROST_AURA_10 = 28531,
|
||||
SPELL_FROST_AURA_25 = 55799,
|
||||
SPELL_CLEAVE = 19983,
|
||||
SPELL_TAIL_SWEEP_10 = 55697,
|
||||
SPELL_TAIL_SWEEP_25 = 55696,
|
||||
SPELL_SUMMON_BLIZZARD = 28560,
|
||||
SPELL_LIFE_DRAIN_10 = 28542,
|
||||
SPELL_LIFE_DRAIN_25 = 55665,
|
||||
SPELL_BERSERK = 26662,
|
||||
|
||||
// Ice block
|
||||
SPELL_ICEBOLT_CAST = 28526,
|
||||
SPELL_ICEBOLT_TRIGGER = 28522,
|
||||
SPELL_FROST_MISSILE = 30101,
|
||||
SPELL_FROST_EXPLOSION = 28524,
|
||||
// Ice block
|
||||
SPELL_ICEBOLT_CAST = 28526,
|
||||
SPELL_ICEBOLT_TRIGGER = 28522,
|
||||
SPELL_FROST_MISSILE = 30101,
|
||||
SPELL_FROST_EXPLOSION = 28524,
|
||||
|
||||
// Visuals
|
||||
SPELL_SAPPHIRON_DIES = 29357,
|
||||
// Visuals
|
||||
SPELL_SAPPHIRON_DIES = 29357,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
GO_ICE_BLOCK = 181247,
|
||||
NPC_BLIZZARD = 16474,
|
||||
GO_ICE_BLOCK = 181247,
|
||||
NPC_BLIZZARD = 16474,
|
||||
|
||||
POINT_CENTER = 1,
|
||||
FAKE_POINTER = 1,
|
||||
POINT_CENTER = 1,
|
||||
FAKE_POINTER = 1,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
//EVENT_SAPPHIRON_BIRTH = 1,
|
||||
EVENT_BERSERK = 2,
|
||||
EVENT_SPELL_CLEAVE = 3,
|
||||
EVENT_SPELL_TAIL_SWEEP = 4,
|
||||
EVENT_SPELL_LIFE_DRAIN = 5,
|
||||
EVENT_SPELL_BLIZZARD = 6,
|
||||
EVENT_FLIGHT_START = 7,
|
||||
EVENT_FLIGHT_LIFTOFF = 8,
|
||||
EVENT_FLIGHT_ICEBOLT = 9,
|
||||
EVENT_FLIGHT_BREATH = 10,
|
||||
EVENT_FLIGHT_SPELL_EXPLOSION = 11,
|
||||
EVENT_FLIGHT_START_LAND = 12,
|
||||
EVENT_LAND = 13,
|
||||
EVENT_GROUND = 14,
|
||||
EVENT_HUNDRED_CLUB = 15,
|
||||
//EVENT_SAPPHIRON_BIRTH = 1,
|
||||
EVENT_BERSERK = 2,
|
||||
EVENT_SPELL_CLEAVE = 3,
|
||||
EVENT_SPELL_TAIL_SWEEP = 4,
|
||||
EVENT_SPELL_LIFE_DRAIN = 5,
|
||||
EVENT_SPELL_BLIZZARD = 6,
|
||||
EVENT_FLIGHT_START = 7,
|
||||
EVENT_FLIGHT_LIFTOFF = 8,
|
||||
EVENT_FLIGHT_ICEBOLT = 9,
|
||||
EVENT_FLIGHT_BREATH = 10,
|
||||
EVENT_FLIGHT_SPELL_EXPLOSION = 11,
|
||||
EVENT_FLIGHT_START_LAND = 12,
|
||||
EVENT_LAND = 13,
|
||||
EVENT_GROUND = 14,
|
||||
EVENT_HUNDRED_CLUB = 15,
|
||||
};
|
||||
|
||||
class boss_sapphiron : public CreatureScript
|
||||
@@ -77,362 +77,362 @@ public:
|
||||
return new boss_sapphironAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_sapphironAI : public ScriptedAI
|
||||
{
|
||||
boss_sapphironAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_sapphironAI : public ScriptedAI
|
||||
{
|
||||
boss_sapphironAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
uint8 iceboltCount;
|
||||
uint32 spawnTimer;
|
||||
std::list<uint64> blockList;
|
||||
uint64 currentTarget;
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
uint8 iceboltCount;
|
||||
uint32 spawnTimer;
|
||||
std::list<uint64> blockList;
|
||||
uint64 currentTarget;
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
me->SummonGameObject(GO_SAPPHIRON_BIRTH, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, 0, 0, 0, 0, 0);
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
ScriptedAI::InitializeAI();
|
||||
}
|
||||
void InitializeAI()
|
||||
{
|
||||
me->SummonGameObject(GO_SAPPHIRON_BIRTH, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, 0, 0, 0, 0, 0);
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
ScriptedAI::InitializeAI();
|
||||
}
|
||||
|
||||
bool IsInRoom()
|
||||
{
|
||||
if (me->GetExactDist(3523.5f, -5235.3f, 137.6f) > 100.0f)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
bool IsInRoom()
|
||||
{
|
||||
if (me->GetExactDist(3523.5f, -5235.3f, 137.6f) > 100.0f)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (me->IsVisible())
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
void Reset()
|
||||
{
|
||||
if (me->IsVisible())
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
events.Reset();
|
||||
iceboltCount = 0;
|
||||
spawnTimer = 0;
|
||||
currentTarget = 0;
|
||||
blockList.clear();
|
||||
events.Reset();
|
||||
iceboltCount = 0;
|
||||
spawnTimer = 0;
|
||||
currentTarget = 0;
|
||||
blockList.clear();
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_SAPPHIRON, NOT_STARTED);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_SAPPHIRON, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombatSelfFunction()
|
||||
{
|
||||
Map::PlayerList const &PlList = me->GetMap()->GetPlayers();
|
||||
if (PlList.isEmpty())
|
||||
return;
|
||||
for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
|
||||
{
|
||||
if (Player* player = i->GetSource())
|
||||
{
|
||||
if (player->IsGameMaster())
|
||||
continue;
|
||||
if (player->IsAlive() && me->GetDistance(player) < 80.0f)
|
||||
{
|
||||
me->SetInCombatWith(player);
|
||||
player->SetInCombatWith(me);
|
||||
me->AddThreat(player, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void EnterCombatSelfFunction()
|
||||
{
|
||||
Map::PlayerList const &PlList = me->GetMap()->GetPlayers();
|
||||
if (PlList.isEmpty())
|
||||
return;
|
||||
for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
|
||||
{
|
||||
if (Player* player = i->GetSource())
|
||||
{
|
||||
if (player->IsGameMaster())
|
||||
continue;
|
||||
if (player->IsAlive() && me->GetDistance(player) < 80.0f)
|
||||
{
|
||||
me->SetInCombatWith(player);
|
||||
player->SetInCombatWith(me);
|
||||
me->AddThreat(player, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
EnterCombatSelfFunction();
|
||||
me->CastSpell(me, RAID_MODE(SPELL_FROST_AURA_10, SPELL_FROST_AURA_25), true);
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
EnterCombatSelfFunction();
|
||||
me->CastSpell(me, RAID_MODE(SPELL_FROST_AURA_10, SPELL_FROST_AURA_25), true);
|
||||
|
||||
events.ScheduleEvent(EVENT_BERSERK, 15*60000);
|
||||
events.ScheduleEvent(EVENT_SPELL_CLEAVE, 5000);
|
||||
events.ScheduleEvent(EVENT_SPELL_TAIL_SWEEP, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_LIFE_DRAIN, 17000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BLIZZARD, 21000);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_START, 45000);
|
||||
events.ScheduleEvent(EVENT_HUNDRED_CLUB, 5000);
|
||||
events.ScheduleEvent(EVENT_BERSERK, 15*60000);
|
||||
events.ScheduleEvent(EVENT_SPELL_CLEAVE, 5000);
|
||||
events.ScheduleEvent(EVENT_SPELL_TAIL_SWEEP, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_LIFE_DRAIN, 17000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BLIZZARD, 21000);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_START, 45000);
|
||||
events.ScheduleEvent(EVENT_HUNDRED_CLUB, 5000);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_SAPPHIRON, IN_PROGRESS);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_SAPPHIRON, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* who)
|
||||
{
|
||||
me->CastSpell(me, SPELL_SAPPHIRON_DIES, true);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_SAPPHIRON, DONE);
|
||||
}
|
||||
void JustDied(Unit* who)
|
||||
{
|
||||
me->CastSpell(me, SPELL_SAPPHIRON_DIES, true);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_SAPPHIRON, DONE);
|
||||
}
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_SAPPHIRON_BIRTH)
|
||||
spawnTimer = 1;
|
||||
}
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_SAPPHIRON_BIRTH)
|
||||
spawnTimer = 1;
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type == POINT_MOTION_TYPE && id == POINT_CENTER)
|
||||
events.ScheduleEvent(EVENT_FLIGHT_LIFTOFF, 500);
|
||||
}
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type == POINT_MOTION_TYPE && id == POINT_CENTER)
|
||||
events.ScheduleEvent(EVENT_FLIGHT_LIFTOFF, 500);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
|
||||
{
|
||||
if (spellInfo->Id == SPELL_ICEBOLT_CAST)
|
||||
{
|
||||
me->CastSpell(target, SPELL_ICEBOLT_TRIGGER, true);
|
||||
}
|
||||
}
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
|
||||
{
|
||||
if (spellInfo->Id == SPELL_ICEBOLT_CAST)
|
||||
{
|
||||
me->CastSpell(target, SPELL_ICEBOLT_TRIGGER, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool IsValidExplosionTarget(WorldObject* target)
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
{
|
||||
if (target->GetGUID() == (*itr))
|
||||
return false;
|
||||
bool IsValidExplosionTarget(WorldObject* target)
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
{
|
||||
if (target->GetGUID() == (*itr))
|
||||
return false;
|
||||
|
||||
if (Unit* block = ObjectAccessor::GetUnit(*me, *itr))
|
||||
{
|
||||
if (block->IsInBetween(me, target, 2.0f) && block->IsWithinDist(target, 10.0f))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (Unit* block = ObjectAccessor::GetUnit(*me, *itr))
|
||||
{
|
||||
if (block->IsInBetween(me, target, 2.0f) && block->IsWithinDist(target, 10.0f))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (spawnTimer)
|
||||
{
|
||||
spawnTimer += diff;
|
||||
if (spawnTimer >= 21500)
|
||||
{
|
||||
me->SetVisible(true);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
spawnTimer = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (spawnTimer)
|
||||
{
|
||||
spawnTimer += diff;
|
||||
if (spawnTimer >= 21500)
|
||||
{
|
||||
me->SetVisible(true);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
spawnTimer = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsInRoom())
|
||||
return;
|
||||
if (!IsInRoom())
|
||||
return;
|
||||
|
||||
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.GetEvent())
|
||||
{
|
||||
case EVENT_BERSERK:
|
||||
Talk(EMOTE_ENRAGE);
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
return;
|
||||
case EVENT_SPELL_CLEAVE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_CLEAVE, false);
|
||||
events.RepeatEvent(10000);
|
||||
return;
|
||||
case EVENT_SPELL_TAIL_SWEEP:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_TAIL_SWEEP_10, SPELL_TAIL_SWEEP_25), false);
|
||||
events.RepeatEvent(10000);
|
||||
return;
|
||||
case EVENT_SPELL_LIFE_DRAIN:
|
||||
me->CastCustomSpell(RAID_MODE(SPELL_LIFE_DRAIN_10, SPELL_LIFE_DRAIN_25), SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5), me, false);
|
||||
events.RepeatEvent(24000);
|
||||
return;
|
||||
case EVENT_SPELL_BLIZZARD:
|
||||
{
|
||||
Creature* cr;
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
cr = me->SummonCreature(NPC_BLIZZARD, *target, TEMPSUMMON_TIMED_DESPAWN, 16000);
|
||||
else
|
||||
cr = me->SummonCreature(NPC_BLIZZARD, *me, TEMPSUMMON_TIMED_DESPAWN, 16000);
|
||||
|
||||
if (cr)
|
||||
cr->GetMotionMaster()->MoveRandom(40);
|
||||
events.RepeatEvent(RAID_MODE(8000, 6500));
|
||||
return;
|
||||
}
|
||||
case EVENT_FLIGHT_START:
|
||||
if (me->HealthBelowPct(11))
|
||||
{
|
||||
events.PopEvent();
|
||||
return;
|
||||
}
|
||||
events.RepeatEvent(45000);
|
||||
events.DelayEvents(35000);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AttackStop();
|
||||
float x, y, z, o;
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
me->GetMotionMaster()->MovePoint(POINT_CENTER, x, y, z);
|
||||
return;
|
||||
case EVENT_FLIGHT_LIFTOFF:
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SendMeleeAttackStop(me->GetVictim());
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
me->SetDisableGravity(true);
|
||||
currentTarget = 0;
|
||||
events.PopEvent();
|
||||
events.ScheduleEvent(EVENT_FLIGHT_ICEBOLT, 3000);
|
||||
iceboltCount = RAID_MODE(2, 3);
|
||||
return;
|
||||
case EVENT_FLIGHT_ICEBOLT:
|
||||
{
|
||||
events.PopEvent();
|
||||
if (currentTarget)
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, currentTarget))
|
||||
me->SummonGameObject(GO_ICE_BLOCK, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0);
|
||||
|
||||
std::vector<Unit*> targets;
|
||||
ThreatContainer::StorageType::const_iterator i = me->getThreatManager().getThreatList().begin();
|
||||
for (; i != me->getThreatManager().getThreatList().end(); ++i)
|
||||
if ((*i)->getTarget()->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
bool inList = false;
|
||||
if (!blockList.empty())
|
||||
for (std::list<uint64>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
if ((*i)->getTarget()->GetGUID() == *itr)
|
||||
{
|
||||
inList = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!inList)
|
||||
targets.push_back((*i)->getTarget());
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_BERSERK:
|
||||
Talk(EMOTE_ENRAGE);
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
return;
|
||||
case EVENT_SPELL_CLEAVE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_CLEAVE, false);
|
||||
events.RepeatEvent(10000);
|
||||
return;
|
||||
case EVENT_SPELL_TAIL_SWEEP:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_TAIL_SWEEP_10, SPELL_TAIL_SWEEP_25), false);
|
||||
events.RepeatEvent(10000);
|
||||
return;
|
||||
case EVENT_SPELL_LIFE_DRAIN:
|
||||
me->CastCustomSpell(RAID_MODE(SPELL_LIFE_DRAIN_10, SPELL_LIFE_DRAIN_25), SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5), me, false);
|
||||
events.RepeatEvent(24000);
|
||||
return;
|
||||
case EVENT_SPELL_BLIZZARD:
|
||||
{
|
||||
Creature* cr;
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
cr = me->SummonCreature(NPC_BLIZZARD, *target, TEMPSUMMON_TIMED_DESPAWN, 16000);
|
||||
else
|
||||
cr = me->SummonCreature(NPC_BLIZZARD, *me, TEMPSUMMON_TIMED_DESPAWN, 16000);
|
||||
|
||||
if (cr)
|
||||
cr->GetMotionMaster()->MoveRandom(40);
|
||||
events.RepeatEvent(RAID_MODE(8000, 6500));
|
||||
return;
|
||||
}
|
||||
case EVENT_FLIGHT_START:
|
||||
if (me->HealthBelowPct(11))
|
||||
{
|
||||
events.PopEvent();
|
||||
return;
|
||||
}
|
||||
events.RepeatEvent(45000);
|
||||
events.DelayEvents(35000);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AttackStop();
|
||||
float x, y, z, o;
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
me->GetMotionMaster()->MovePoint(POINT_CENTER, x, y, z);
|
||||
return;
|
||||
case EVENT_FLIGHT_LIFTOFF:
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SendMeleeAttackStop(me->GetVictim());
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
me->SetDisableGravity(true);
|
||||
currentTarget = 0;
|
||||
events.PopEvent();
|
||||
events.ScheduleEvent(EVENT_FLIGHT_ICEBOLT, 3000);
|
||||
iceboltCount = RAID_MODE(2, 3);
|
||||
return;
|
||||
case EVENT_FLIGHT_ICEBOLT:
|
||||
{
|
||||
events.PopEvent();
|
||||
if (currentTarget)
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, currentTarget))
|
||||
me->SummonGameObject(GO_ICE_BLOCK, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0);
|
||||
|
||||
std::vector<Unit*> targets;
|
||||
ThreatContainer::StorageType::const_iterator i = me->getThreatManager().getThreatList().begin();
|
||||
for (; i != me->getThreatManager().getThreatList().end(); ++i)
|
||||
if ((*i)->getTarget()->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
bool inList = false;
|
||||
if (!blockList.empty())
|
||||
for (std::list<uint64>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
if ((*i)->getTarget()->GetGUID() == *itr)
|
||||
{
|
||||
inList = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!inList)
|
||||
targets.push_back((*i)->getTarget());
|
||||
}
|
||||
|
||||
if (!targets.empty() && iceboltCount)
|
||||
{
|
||||
std::vector<Unit*>::iterator itr = targets.begin();
|
||||
advance(itr, urand(0, targets.size()-1));
|
||||
me->CastSpell(*itr, SPELL_ICEBOLT_CAST, false);
|
||||
blockList.push_back((*itr)->GetGUID());
|
||||
currentTarget = (*itr)->GetGUID();
|
||||
--iceboltCount;
|
||||
events.ScheduleEvent(EVENT_FLIGHT_ICEBOLT, (me->GetExactDist(*itr) / 13.0f)*IN_MILLISECONDS);
|
||||
}
|
||||
else
|
||||
events.ScheduleEvent(EVENT_FLIGHT_BREATH, 1000);
|
||||
return;
|
||||
}
|
||||
case EVENT_FLIGHT_BREATH:
|
||||
currentTarget = 0;
|
||||
Talk(EMOTE_BREATH);
|
||||
me->CastSpell(me, SPELL_FROST_MISSILE, false);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SPELL_EXPLOSION, 8500);
|
||||
events.PopEvent();
|
||||
return;
|
||||
case EVENT_FLIGHT_SPELL_EXPLOSION:
|
||||
if (!targets.empty() && iceboltCount)
|
||||
{
|
||||
std::vector<Unit*>::iterator itr = targets.begin();
|
||||
advance(itr, urand(0, targets.size()-1));
|
||||
me->CastSpell(*itr, SPELL_ICEBOLT_CAST, false);
|
||||
blockList.push_back((*itr)->GetGUID());
|
||||
currentTarget = (*itr)->GetGUID();
|
||||
--iceboltCount;
|
||||
events.ScheduleEvent(EVENT_FLIGHT_ICEBOLT, (me->GetExactDist(*itr) / 13.0f)*IN_MILLISECONDS);
|
||||
}
|
||||
else
|
||||
events.ScheduleEvent(EVENT_FLIGHT_BREATH, 1000);
|
||||
return;
|
||||
}
|
||||
case EVENT_FLIGHT_BREATH:
|
||||
currentTarget = 0;
|
||||
Talk(EMOTE_BREATH);
|
||||
me->CastSpell(me, SPELL_FROST_MISSILE, false);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SPELL_EXPLOSION, 8500);
|
||||
events.PopEvent();
|
||||
return;
|
||||
case EVENT_FLIGHT_SPELL_EXPLOSION:
|
||||
me->CastSpell(me, SPELL_FROST_EXPLOSION, true);
|
||||
events.PopEvent();
|
||||
events.PopEvent();
|
||||
events.ScheduleEvent(EVENT_FLIGHT_START_LAND, 3000);
|
||||
return;
|
||||
case EVENT_FLIGHT_START_LAND:
|
||||
if (!blockList.empty())
|
||||
for (std::list<uint64>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
if (Unit* block = ObjectAccessor::GetUnit(*me, *itr))
|
||||
block->RemoveAurasDueToSpell(SPELL_ICEBOLT_TRIGGER);
|
||||
case EVENT_FLIGHT_START_LAND:
|
||||
if (!blockList.empty())
|
||||
for (std::list<uint64>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
|
||||
if (Unit* block = ObjectAccessor::GetUnit(*me, *itr))
|
||||
block->RemoveAurasDueToSpell(SPELL_ICEBOLT_TRIGGER);
|
||||
|
||||
blockList.clear();
|
||||
me->RemoveAllGameObjects();
|
||||
events.ScheduleEvent(EVENT_LAND, 1000);
|
||||
events.PopEvent();
|
||||
return;
|
||||
blockList.clear();
|
||||
me->RemoveAllGameObjects();
|
||||
events.ScheduleEvent(EVENT_LAND, 1000);
|
||||
events.PopEvent();
|
||||
return;
|
||||
case EVENT_LAND:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
||||
me->SetDisableGravity(false);
|
||||
|
||||
events.PopEvent();
|
||||
events.PopEvent();
|
||||
events.ScheduleEvent(EVENT_GROUND, 1500);
|
||||
return;
|
||||
case EVENT_GROUND:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetInCombatWithZone();
|
||||
events.PopEvent();
|
||||
events.PopEvent();
|
||||
return;
|
||||
case EVENT_HUNDRED_CLUB:
|
||||
{
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
|
||||
{
|
||||
if (itr->GetSource()->GetResistance(SPELL_SCHOOL_FROST) > 100 && pInstance)
|
||||
{
|
||||
events.PopEvent();
|
||||
pInstance->SetData(DATA_HUNDRED_CLUB, 0);
|
||||
return;
|
||||
}
|
||||
case EVENT_HUNDRED_CLUB:
|
||||
{
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
|
||||
{
|
||||
if (itr->GetSource()->GetResistance(SPELL_SCHOOL_FROST) > 100 && pInstance)
|
||||
{
|
||||
events.PopEvent();
|
||||
pInstance->SetData(DATA_HUNDRED_CLUB, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
events.RepeatEvent(5000);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(5000);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_sapphiron_frost_explosion : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_sapphiron_frost_explosion() : SpellScriptLoader("spell_sapphiron_frost_explosion") { }
|
||||
public:
|
||||
spell_sapphiron_frost_explosion() : SpellScriptLoader("spell_sapphiron_frost_explosion") { }
|
||||
|
||||
class spell_sapphiron_frost_explosion_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_sapphiron_frost_explosion_SpellScript);
|
||||
class spell_sapphiron_frost_explosion_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_sapphiron_frost_explosion_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || !caster->ToCreature())
|
||||
return;
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || !caster->ToCreature())
|
||||
return;
|
||||
|
||||
std::list<WorldObject*> tmplist;
|
||||
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
{
|
||||
if (CAST_AI(boss_sapphiron::boss_sapphironAI, caster->ToCreature()->AI())->IsValidExplosionTarget(*itr))
|
||||
tmplist.push_back(*itr);
|
||||
}
|
||||
std::list<WorldObject*> tmplist;
|
||||
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
{
|
||||
if (CAST_AI(boss_sapphiron::boss_sapphironAI, caster->ToCreature()->AI())->IsValidExplosionTarget(*itr))
|
||||
tmplist.push_back(*itr);
|
||||
}
|
||||
|
||||
targets.clear();
|
||||
for (std::list<WorldObject*>::iterator itr = tmplist.begin(); itr != tmplist.end(); ++itr)
|
||||
targets.push_back(*itr);
|
||||
}
|
||||
targets.clear();
|
||||
for (std::list<WorldObject*>::iterator itr = tmplist.begin(); itr != tmplist.end(); ++itr)
|
||||
targets.push_back(*itr);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sapphiron_frost_explosion_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sapphiron_frost_explosion_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_sapphiron_frost_explosion_SpellScript();
|
||||
}
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_sapphiron_frost_explosion_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_sapphiron()
|
||||
{
|
||||
new boss_sapphiron();
|
||||
new spell_sapphiron_frost_explosion();
|
||||
new spell_sapphiron_frost_explosion();
|
||||
}
|
||||
|
||||
@@ -10,17 +10,17 @@ REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
|
||||
enum Says
|
||||
{
|
||||
// Stalagg
|
||||
// Stalagg
|
||||
SAY_STAL_AGGRO = 0,
|
||||
SAY_STAL_SLAY = 1,
|
||||
SAY_STAL_DEATH = 2,
|
||||
|
||||
// Feugen
|
||||
// Feugen
|
||||
SAY_FEUG_AGGRO = 0,
|
||||
SAY_FEUG_SLAY = 1,
|
||||
SAY_FEUG_DEATH = 2,
|
||||
|
||||
// Thaddius
|
||||
// Thaddius
|
||||
SAY_GREET = 0,
|
||||
SAY_AGGRO = 1,
|
||||
SAY_SLAY = 2,
|
||||
@@ -31,57 +31,57 @@ enum Says
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_MAGNETIC_PULL = 28337,
|
||||
SPELL_TESLA_SHOCK = 28099,
|
||||
SPELL_MAGNETIC_PULL = 28337,
|
||||
SPELL_TESLA_SHOCK = 28099,
|
||||
|
||||
// Stalagg
|
||||
SPELL_POWER_SURGE_10 = 54529,
|
||||
SPELL_POWER_SURGE_25 = 28134,
|
||||
SPELL_STALAGG_CHAIN = 28096,
|
||||
// Stalagg
|
||||
SPELL_POWER_SURGE_10 = 54529,
|
||||
SPELL_POWER_SURGE_25 = 28134,
|
||||
SPELL_STALAGG_CHAIN = 28096,
|
||||
|
||||
// Feugen
|
||||
SPELL_STATIC_FIELD_10 = 28135,
|
||||
SPELL_STATIC_FIELD_25 = 54528,
|
||||
SPELL_FEUGEN_CHAIN = 28111,
|
||||
// Feugen
|
||||
SPELL_STATIC_FIELD_10 = 28135,
|
||||
SPELL_STATIC_FIELD_25 = 54528,
|
||||
SPELL_FEUGEN_CHAIN = 28111,
|
||||
|
||||
// Thaddius
|
||||
SPELL_POLARITY_SHIFT = 28089,
|
||||
SPELL_BALL_LIGHTNING = 28299,
|
||||
SPELL_CHAIN_LIGHTNING_10 = 28167,
|
||||
SPELL_CHAIN_LIGHTNING_25 = 54531,
|
||||
SPELL_BERSERK = 27680,
|
||||
// Thaddius
|
||||
SPELL_POLARITY_SHIFT = 28089,
|
||||
SPELL_BALL_LIGHTNING = 28299,
|
||||
SPELL_CHAIN_LIGHTNING_10 = 28167,
|
||||
SPELL_CHAIN_LIGHTNING_25 = 54531,
|
||||
SPELL_BERSERK = 27680,
|
||||
|
||||
SPELL_THADDIUS_VISUAL_LIGHTNING = 28136,
|
||||
SPELL_THADDIUS_SPAWN_STUN = 28160,
|
||||
SPELL_THADDIUS_VISUAL_LIGHTNING = 28136,
|
||||
SPELL_THADDIUS_SPAWN_STUN = 28160,
|
||||
|
||||
SPELL_POSITIVE_CHARGE = 28062,
|
||||
SPELL_POSITIVE_CHARGE_STACK = 29659,
|
||||
SPELL_NEGATIVE_CHARGE = 28085,
|
||||
SPELL_NEGATIVE_CHARGE_STACK = 29660,
|
||||
SPELL_POSITIVE_POLARITY = 28059,
|
||||
SPELL_NEGATIVE_POLARITY = 28084,
|
||||
SPELL_POSITIVE_CHARGE = 28062,
|
||||
SPELL_POSITIVE_CHARGE_STACK = 29659,
|
||||
SPELL_NEGATIVE_CHARGE = 28085,
|
||||
SPELL_NEGATIVE_CHARGE_STACK = 29660,
|
||||
SPELL_POSITIVE_POLARITY = 28059,
|
||||
SPELL_NEGATIVE_POLARITY = 28084,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_MINION_SPELL_POWER_SURGE = 1,
|
||||
EVENT_MINION_SPELL_MAGNETIC_PULL = 2,
|
||||
EVENT_MINION_CHECK_DISTANCE = 3,
|
||||
EVENT_MINION_SPELL_STATIC_FIELD = 4,
|
||||
EVENT_MINION_SPELL_POWER_SURGE = 1,
|
||||
EVENT_MINION_SPELL_MAGNETIC_PULL = 2,
|
||||
EVENT_MINION_CHECK_DISTANCE = 3,
|
||||
EVENT_MINION_SPELL_STATIC_FIELD = 4,
|
||||
|
||||
EVENT_THADDIUS_START = 10,
|
||||
EVENT_THADDIUS_SPELL_CHAIN_LIGHTNING= 11,
|
||||
EVENT_THADDIUS_SPELL_BERSERK = 12,
|
||||
EVENT_THADDIUS_POLARITY_SHIFT = 13,
|
||||
EVENT_THADDIUS_START_2 = 14,
|
||||
EVENT_THADDIUS_START = 10,
|
||||
EVENT_THADDIUS_SPELL_CHAIN_LIGHTNING= 11,
|
||||
EVENT_THADDIUS_SPELL_BERSERK = 12,
|
||||
EVENT_THADDIUS_POLARITY_SHIFT = 13,
|
||||
EVENT_THADDIUS_START_2 = 14,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
ACTION_MAGNETIC_PULL = 1,
|
||||
ACTION_SUMMON_DIED = 2,
|
||||
ACTION_RESTORE = 3,
|
||||
NPC_TESLA_COIL = 16218, //the coils (emotes "Tesla Coil overloads!")
|
||||
ACTION_MAGNETIC_PULL = 1,
|
||||
ACTION_SUMMON_DIED = 2,
|
||||
ACTION_RESTORE = 3,
|
||||
NPC_TESLA_COIL = 16218, //the coils (emotes "Tesla Coil overloads!")
|
||||
};
|
||||
|
||||
class boss_thaddius : public CreatureScript
|
||||
@@ -94,398 +94,398 @@ public:
|
||||
return new boss_thaddiusAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_thaddiusAI : public ScriptedAI
|
||||
{
|
||||
boss_thaddiusAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_thaddiusAI : public ScriptedAI
|
||||
{
|
||||
boss_thaddiusAI(Creature *c) : ScriptedAI(c), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
uint32 summonTimer;
|
||||
uint32 reviveTimer;
|
||||
uint32 resetTimer;
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
uint32 summonTimer;
|
||||
uint32 reviveTimer;
|
||||
uint32 resetTimer;
|
||||
|
||||
void StartEvent()
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
events.ScheduleEvent(EVENT_THADDIUS_START_2, 1000);
|
||||
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, (*itr)))
|
||||
if (cr->GetEntry() == NPC_TESLA_COIL)
|
||||
{
|
||||
cr->CastSpell(me, SPELL_TESLA_SHOCK, true); // till smth better is found ;( ZOMG
|
||||
Unit::Kill(cr, cr);
|
||||
}
|
||||
}
|
||||
void StartEvent()
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
events.ScheduleEvent(EVENT_THADDIUS_START_2, 1000);
|
||||
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, (*itr)))
|
||||
if (cr->GetEntry() == NPC_TESLA_COIL)
|
||||
{
|
||||
cr->CastSpell(me, SPELL_TESLA_SHOCK, true); // till smth better is found ;( ZOMG
|
||||
Unit::Kill(cr, cr);
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_SUMMON_DIED)
|
||||
{
|
||||
// Hooray, we did it!
|
||||
if (summonTimer)
|
||||
{
|
||||
summonTimer = 0;
|
||||
reviveTimer = 1;
|
||||
//events.ScheduleEvent(EVENT_THADDIUS_START, 12000);
|
||||
return;
|
||||
}
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_SUMMON_DIED)
|
||||
{
|
||||
// Hooray, we did it!
|
||||
if (summonTimer)
|
||||
{
|
||||
summonTimer = 0;
|
||||
reviveTimer = 1;
|
||||
//events.ScheduleEvent(EVENT_THADDIUS_START, 12000);
|
||||
return;
|
||||
}
|
||||
|
||||
summonTimer = 1;
|
||||
}
|
||||
}
|
||||
summonTimer = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
summonTimer = 0;
|
||||
reviveTimer = 0;
|
||||
resetTimer = 1;
|
||||
me->SetPosition(me->GetHomePosition());
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
summonTimer = 0;
|
||||
reviveTimer = 0;
|
||||
resetTimer = 1;
|
||||
me->SetPosition(me->GetHomePosition());
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_THADDIUS, NOT_STARTED);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_THADDIUS, NOT_STARTED);
|
||||
|
||||
me->SummonCreature(NPC_STALAGG, 3450.45f, -2931.42f, 312.091f, 5.49779f);
|
||||
me->SummonCreature(NPC_FEUGEN, 3508.14f, -2988.65f, 312.092f, 2.37365f);
|
||||
if (Creature* cr = me->SummonCreature(NPC_TESLA_COIL, 3527.34f, -2951.56f, 318.75f, 0.0f))
|
||||
{
|
||||
cr->RemoveAllAuras();
|
||||
cr->InterruptNonMeleeSpells(true);
|
||||
cr->CastSpell(cr, SPELL_FEUGEN_CHAIN, false);
|
||||
cr->SetDisableGravity(true);
|
||||
}
|
||||
if (Creature* cr = me->SummonCreature(NPC_TESLA_COIL, 3487.04f, -2911.68f, 318.75f, 0.0f))
|
||||
{
|
||||
cr->RemoveAllAuras();
|
||||
cr->InterruptNonMeleeSpells(true);
|
||||
cr->CastSpell(cr, SPELL_STALAGG_CHAIN, false);
|
||||
cr->SetDisableGravity(true);
|
||||
}
|
||||
}
|
||||
me->SummonCreature(NPC_STALAGG, 3450.45f, -2931.42f, 312.091f, 5.49779f);
|
||||
me->SummonCreature(NPC_FEUGEN, 3508.14f, -2988.65f, 312.092f, 2.37365f);
|
||||
if (Creature* cr = me->SummonCreature(NPC_TESLA_COIL, 3527.34f, -2951.56f, 318.75f, 0.0f))
|
||||
{
|
||||
cr->RemoveAllAuras();
|
||||
cr->InterruptNonMeleeSpells(true);
|
||||
cr->CastSpell(cr, SPELL_FEUGEN_CHAIN, false);
|
||||
cr->SetDisableGravity(true);
|
||||
}
|
||||
if (Creature* cr = me->SummonCreature(NPC_TESLA_COIL, 3487.04f, -2911.68f, 318.75f, 0.0f))
|
||||
{
|
||||
cr->RemoveAllAuras();
|
||||
cr->InterruptNonMeleeSpells(true);
|
||||
cr->CastSpell(cr, SPELL_STALAGG_CHAIN, false);
|
||||
cr->SetDisableGravity(true);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
if (!urand(0,3))
|
||||
Talk(SAY_SLAY);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_THADDIUS, DONE);
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(28059);
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(28084);
|
||||
}
|
||||
}
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_THADDIUS, DONE);
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(28059);
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(28084);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr) { summons.Summon(cr); }
|
||||
void JustSummoned(Creature* cr) { summons.Summon(cr); }
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
summons.DoZoneInCombat(NPC_FEUGEN);
|
||||
summons.DoZoneInCombat(NPC_STALAGG);
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
summons.DoZoneInCombat(NPC_FEUGEN);
|
||||
summons.DoZoneInCombat(NPC_STALAGG);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_THADDIUS, IN_PROGRESS);
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_THADDIUS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (resetTimer)
|
||||
{
|
||||
resetTimer += diff;
|
||||
if (resetTimer > 1000)
|
||||
{
|
||||
resetTimer = 0;
|
||||
me->CastSpell(me, SPELL_THADDIUS_SPAWN_STUN, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (reviveTimer)
|
||||
{
|
||||
reviveTimer += diff;
|
||||
if (reviveTimer >= 12000)
|
||||
{
|
||||
StartEvent();
|
||||
reviveTimer = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (resetTimer)
|
||||
{
|
||||
resetTimer += diff;
|
||||
if (resetTimer > 1000)
|
||||
{
|
||||
resetTimer = 0;
|
||||
me->CastSpell(me, SPELL_THADDIUS_SPAWN_STUN, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (reviveTimer)
|
||||
{
|
||||
reviveTimer += diff;
|
||||
if (reviveTimer >= 12000)
|
||||
{
|
||||
StartEvent();
|
||||
reviveTimer = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
// Revive code!
|
||||
if (summonTimer)
|
||||
{
|
||||
summonTimer += diff;
|
||||
if (summonTimer >= 5000)
|
||||
{
|
||||
summons.DoAction(ACTION_RESTORE);
|
||||
summonTimer = 0;
|
||||
}
|
||||
}
|
||||
// Revive code!
|
||||
if (summonTimer)
|
||||
{
|
||||
summonTimer += diff;
|
||||
if (summonTimer >= 5000)
|
||||
{
|
||||
summons.DoAction(ACTION_RESTORE);
|
||||
summonTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
//case EVENT_THADDIUS_START:
|
||||
// StartEvent();
|
||||
// events.PopEvent();
|
||||
// break;
|
||||
case EVENT_THADDIUS_START_2:
|
||||
events.PopEvent();
|
||||
Talk(SAY_AGGRO);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->setAttackTimer(BASE_ATTACK, 4000);
|
||||
|
||||
events.ScheduleEvent(EVENT_THADDIUS_SPELL_CHAIN_LIGHTNING, 14000);
|
||||
events.ScheduleEvent(EVENT_THADDIUS_SPELL_BERSERK, 360000);
|
||||
events.ScheduleEvent(EVENT_THADDIUS_POLARITY_SHIFT, 30000);
|
||||
return;
|
||||
case EVENT_THADDIUS_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_THADDIUS_SPELL_CHAIN_LIGHTNING:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_CHAIN_LIGHTNING_10, SPELL_CHAIN_LIGHTNING_25), false);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_THADDIUS_POLARITY_SHIFT:
|
||||
me->CastSpell(me, SPELL_POLARITY_SHIFT, false);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
}
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
//case EVENT_THADDIUS_START:
|
||||
// StartEvent();
|
||||
// events.PopEvent();
|
||||
// break;
|
||||
case EVENT_THADDIUS_START_2:
|
||||
events.PopEvent();
|
||||
Talk(SAY_AGGRO);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->setAttackTimer(BASE_ATTACK, 4000);
|
||||
|
||||
events.ScheduleEvent(EVENT_THADDIUS_SPELL_CHAIN_LIGHTNING, 14000);
|
||||
events.ScheduleEvent(EVENT_THADDIUS_SPELL_BERSERK, 360000);
|
||||
events.ScheduleEvent(EVENT_THADDIUS_POLARITY_SHIFT, 30000);
|
||||
return;
|
||||
case EVENT_THADDIUS_SPELL_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_THADDIUS_SPELL_CHAIN_LIGHTNING:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_CHAIN_LIGHTNING_10, SPELL_CHAIN_LIGHTNING_25), false);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_THADDIUS_POLARITY_SHIFT:
|
||||
me->CastSpell(me, SPELL_POLARITY_SHIFT, false);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->isAttackReady())
|
||||
{
|
||||
if (!me->IsWithinMeleeRange(me->GetVictim()))
|
||||
me->CastSpell(me->GetVictim(), SPELL_BALL_LIGHTNING, false);
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
};
|
||||
if (me->isAttackReady())
|
||||
{
|
||||
if (!me->IsWithinMeleeRange(me->GetVictim()))
|
||||
me->CastSpell(me->GetVictim(), SPELL_BALL_LIGHTNING, false);
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class boss_thaddius_summon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_thaddius_summon() : CreatureScript("boss_thaddius_summon") { }
|
||||
boss_thaddius_summon() : CreatureScript("boss_thaddius_summon") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_thaddius_summonAI (pCreature);
|
||||
}
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_thaddius_summonAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_thaddius_summonAI : public ScriptedAI
|
||||
{
|
||||
boss_thaddius_summonAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
struct boss_thaddius_summonAI : public ScriptedAI
|
||||
{
|
||||
boss_thaddius_summonAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
uint32 pullTimer;
|
||||
uint32 visualTimer;
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
uint32 pullTimer;
|
||||
uint32 visualTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
pullTimer = 0;
|
||||
visualTimer = 1;
|
||||
|
||||
events.Reset();
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
if (Creature* cr = me->FindNearestCreature(NPC_TESLA_COIL, 150.0f))
|
||||
cr->CastSpell(cr, me->GetEntry() == NPC_STALAGG ? SPELL_STALAGG_CHAIN : SPELL_FEUGEN_CHAIN, false);
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
pullTimer = 0;
|
||||
visualTimer = 1;
|
||||
|
||||
events.Reset();
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
if (Creature* cr = me->FindNearestCreature(NPC_TESLA_COIL, 150.0f))
|
||||
cr->CastSpell(cr, me->GetEntry() == NPC_STALAGG ? SPELL_STALAGG_CHAIN : SPELL_FEUGEN_CHAIN, false);
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* pWho)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
void EnterCombat(Unit* pWho)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
|
||||
if (me->GetEntry() == NPC_STALAGG)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_POWER_SURGE, 10000);
|
||||
Talk(SAY_STAL_AGGRO);
|
||||
}
|
||||
else
|
||||
{
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_STATIC_FIELD, 5000);
|
||||
Talk(SAY_FEUG_AGGRO);
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_MINION_CHECK_DISTANCE, 5000);
|
||||
if (me->GetEntry() == NPC_STALAGG)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_POWER_SURGE, 10000);
|
||||
Talk(SAY_STAL_AGGRO);
|
||||
}
|
||||
else
|
||||
{
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_STATIC_FIELD, 5000);
|
||||
Talk(SAY_FEUG_AGGRO);
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_MINION_CHECK_DISTANCE, 5000);
|
||||
|
||||
// This event needs synchronisation, called for stalagg only
|
||||
if (me->GetEntry() == NPC_STALAGG)
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_MAGNETIC_PULL, 25000);
|
||||
// This event needs synchronisation, called for stalagg only
|
||||
if (me->GetEntry() == NPC_STALAGG)
|
||||
events.ScheduleEvent(EVENT_MINION_SPELL_MAGNETIC_PULL, 25000);
|
||||
|
||||
if (pInstance)
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_THADDIUS_BOSS)))
|
||||
{
|
||||
cr->AI()->AttackStart(pWho);
|
||||
cr->AddThreat(pWho, 10.0f);
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_THADDIUS_BOSS)))
|
||||
{
|
||||
cr->AI()->AttackStart(pWho);
|
||||
cr->AddThreat(pWho, 10.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_MAGNETIC_PULL)
|
||||
{
|
||||
pullTimer = 1;
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
}
|
||||
else if (param == ACTION_RESTORE)
|
||||
{
|
||||
if (!me->IsAlive())
|
||||
{
|
||||
me->Respawn();
|
||||
me->SetInCombatWithZone();
|
||||
}
|
||||
else
|
||||
me->SetHealth(me->GetMaxHealth());
|
||||
}
|
||||
}
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_MAGNETIC_PULL)
|
||||
{
|
||||
pullTimer = 1;
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
}
|
||||
else if (param == ACTION_RESTORE)
|
||||
{
|
||||
if (!me->IsAlive())
|
||||
{
|
||||
me->Respawn();
|
||||
me->SetInCombatWithZone();
|
||||
}
|
||||
else
|
||||
me->SetHealth(me->GetMaxHealth());
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* )
|
||||
{
|
||||
Talk(me->GetEntry() == NPC_STALAGG ? SAY_FEUG_DEATH : SAY_STAL_DEATH);
|
||||
if (pInstance)
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_THADDIUS_BOSS)))
|
||||
cr->AI()->DoAction(ACTION_SUMMON_DIED);
|
||||
}
|
||||
void JustDied(Unit* )
|
||||
{
|
||||
Talk(me->GetEntry() == NPC_STALAGG ? SAY_FEUG_DEATH : SAY_STAL_DEATH);
|
||||
if (pInstance)
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_THADDIUS_BOSS)))
|
||||
cr->AI()->DoAction(ACTION_SUMMON_DIED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
||||
|
||||
if (!urand(0,2))
|
||||
Talk(me->GetEntry() == NPC_STALAGG ? SAY_FEUG_SLAY : SAY_STAL_SLAY);
|
||||
}
|
||||
if (!urand(0,2))
|
||||
Talk(me->GetEntry() == NPC_STALAGG ? SAY_FEUG_SLAY : SAY_STAL_SLAY);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (visualTimer)
|
||||
{
|
||||
visualTimer += diff;
|
||||
if (visualTimer >= 3000)
|
||||
{
|
||||
visualTimer = 0;
|
||||
if (Creature* cr = me->FindNearestCreature(NPC_TESLA_COIL, 150.0f))
|
||||
cr->CastSpell(cr, me->GetEntry() == NPC_STALAGG ? SPELL_STALAGG_CHAIN : SPELL_FEUGEN_CHAIN, false);
|
||||
}
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (visualTimer)
|
||||
{
|
||||
visualTimer += diff;
|
||||
if (visualTimer >= 3000)
|
||||
{
|
||||
visualTimer = 0;
|
||||
if (Creature* cr = me->FindNearestCreature(NPC_TESLA_COIL, 150.0f))
|
||||
cr->CastSpell(cr, me->GetEntry() == NPC_STALAGG ? SPELL_STALAGG_CHAIN : SPELL_FEUGEN_CHAIN, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
// Disable AI during pull
|
||||
if (pullTimer)
|
||||
{
|
||||
pullTimer += diff;
|
||||
if (pullTimer >= 3000)
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
pullTimer = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Disable AI during pull
|
||||
if (pullTimer)
|
||||
{
|
||||
pullTimer += diff;
|
||||
if (pullTimer >= 3000)
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
pullTimer = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_MINION_SPELL_POWER_SURGE:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_POWER_SURGE_10, SPELL_POWER_SURGE_25), false);
|
||||
events.RepeatEvent(19000);
|
||||
break;
|
||||
case EVENT_MINION_SPELL_STATIC_FIELD:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_STATIC_FIELD_10, SPELL_STATIC_FIELD_25), false);
|
||||
events.RepeatEvent(3000);
|
||||
break;
|
||||
case EVENT_MINION_SPELL_MAGNETIC_PULL:
|
||||
events.RepeatEvent(25000);
|
||||
if (pInstance)
|
||||
if (Creature* feugen = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_FEUGEN_BOSS)))
|
||||
{
|
||||
if (!feugen->IsAlive() || !feugen->GetVictim() || !me->GetVictim())
|
||||
return;
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_MINION_SPELL_POWER_SURGE:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_POWER_SURGE_10, SPELL_POWER_SURGE_25), false);
|
||||
events.RepeatEvent(19000);
|
||||
break;
|
||||
case EVENT_MINION_SPELL_STATIC_FIELD:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_STATIC_FIELD_10, SPELL_STATIC_FIELD_25), false);
|
||||
events.RepeatEvent(3000);
|
||||
break;
|
||||
case EVENT_MINION_SPELL_MAGNETIC_PULL:
|
||||
events.RepeatEvent(25000);
|
||||
if (pInstance)
|
||||
if (Creature* feugen = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_FEUGEN_BOSS)))
|
||||
{
|
||||
if (!feugen->IsAlive() || !feugen->GetVictim() || !me->GetVictim())
|
||||
return;
|
||||
|
||||
float threatFeugen = feugen->getThreatManager().getThreat(feugen->GetVictim());
|
||||
float threatStalagg = me->getThreatManager().getThreat(me->GetVictim());
|
||||
Unit* tankFeugen = feugen->GetVictim();
|
||||
Unit* tankStalagg = me->GetVictim();
|
||||
float threatFeugen = feugen->getThreatManager().getThreat(feugen->GetVictim());
|
||||
float threatStalagg = me->getThreatManager().getThreat(me->GetVictim());
|
||||
Unit* tankFeugen = feugen->GetVictim();
|
||||
Unit* tankStalagg = me->GetVictim();
|
||||
|
||||
feugen->getThreatManager().modifyThreatPercent(tankFeugen, -100);
|
||||
feugen->AddThreat(tankStalagg, threatFeugen);
|
||||
feugen->CastSpell(tankStalagg, SPELL_MAGNETIC_PULL, true);
|
||||
feugen->AI()->DoAction(ACTION_MAGNETIC_PULL);
|
||||
feugen->getThreatManager().modifyThreatPercent(tankFeugen, -100);
|
||||
feugen->AddThreat(tankStalagg, threatFeugen);
|
||||
feugen->CastSpell(tankStalagg, SPELL_MAGNETIC_PULL, true);
|
||||
feugen->AI()->DoAction(ACTION_MAGNETIC_PULL);
|
||||
|
||||
me->getThreatManager().modifyThreatPercent(tankStalagg, -100);
|
||||
me->AddThreat(tankFeugen, threatStalagg);
|
||||
me->CastSpell(tankFeugen, SPELL_MAGNETIC_PULL, true);
|
||||
DoAction(ACTION_MAGNETIC_PULL);
|
||||
}
|
||||
|
||||
break;
|
||||
case EVENT_MINION_CHECK_DISTANCE:
|
||||
if (Creature* cr = me->FindNearestCreature(NPC_TESLA_COIL, 150.0f))
|
||||
{
|
||||
if (me->GetExactDist(cr) > 60.0f || me->GetExactDist(cr) < 20.0f)
|
||||
{
|
||||
cr->InterruptNonMeleeSpells(true);
|
||||
cr->CastSpell(me->GetVictim(), SPELL_TESLA_SHOCK, true); // dont know real spell
|
||||
events.RepeatEvent(1500);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
cr->CastSpell(cr, me->GetEntry() == NPC_STALAGG ? SPELL_STALAGG_CHAIN : SPELL_FEUGEN_CHAIN, false);
|
||||
}
|
||||
}
|
||||
me->getThreatManager().modifyThreatPercent(tankStalagg, -100);
|
||||
me->AddThreat(tankFeugen, threatStalagg);
|
||||
me->CastSpell(tankFeugen, SPELL_MAGNETIC_PULL, true);
|
||||
DoAction(ACTION_MAGNETIC_PULL);
|
||||
}
|
||||
|
||||
break;
|
||||
case EVENT_MINION_CHECK_DISTANCE:
|
||||
if (Creature* cr = me->FindNearestCreature(NPC_TESLA_COIL, 150.0f))
|
||||
{
|
||||
if (me->GetExactDist(cr) > 60.0f || me->GetExactDist(cr) < 20.0f)
|
||||
{
|
||||
cr->InterruptNonMeleeSpells(true);
|
||||
cr->CastSpell(me->GetVictim(), SPELL_TESLA_SHOCK, true); // dont know real spell
|
||||
events.RepeatEvent(1500);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
cr->CastSpell(cr, me->GetEntry() == NPC_STALAGG ? SPELL_STALAGG_CHAIN : SPELL_FEUGEN_CHAIN, false);
|
||||
}
|
||||
}
|
||||
|
||||
events.RepeatEvent(5000);
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(5000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_thaddius_pos_neg_charge : public SpellScriptLoader
|
||||
@@ -525,13 +525,13 @@ class spell_thaddius_pos_neg_charge : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
Unit* target = GetHitUnit();
|
||||
if (!target)
|
||||
return;
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
if (target->HasAura(GetTriggeringSpell()->Id) || target->GetTypeId() != TYPEID_PLAYER)
|
||||
SetHitDamage(0);
|
||||
else if (target->GetInstanceScript())
|
||||
target->GetInstanceScript()->SetData(DATA_CHARGES_CROSSED, 0);
|
||||
target->GetInstanceScript()->SetData(DATA_CHARGES_CROSSED, 0);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -587,6 +587,6 @@ void AddSC_boss_thaddius()
|
||||
new boss_thaddius();
|
||||
new boss_thaddius_summon();
|
||||
|
||||
new spell_thaddius_pos_neg_charge();
|
||||
new spell_thaddius_pos_neg_charge();
|
||||
new spell_thaddius_polarity_shift();
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,113 +7,113 @@ REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
|
||||
enum NXEncounter
|
||||
{
|
||||
EVENT_PATCHWERK = 0,
|
||||
EVENT_GROBBULUS = 1,
|
||||
EVENT_GLUTH = 2,
|
||||
EVENT_NOTH = 3,
|
||||
EVENT_HEIGAN = 4,
|
||||
EVENT_LOATHEB = 5,
|
||||
EVENT_ANUB = 6,
|
||||
EVENT_FAERLINA = 7,
|
||||
EVENT_MAEXXNA = 8,
|
||||
EVENT_THADDIUS = 9,
|
||||
EVENT_RAZUVIOUS = 10,
|
||||
EVENT_GOTHIK = 11,
|
||||
EVENT_HORSEMAN = 12,
|
||||
EVENT_SAPPHIRON = 13,
|
||||
EVENT_KELTHUZAD = 14,
|
||||
EVENT_PATCHWERK = 0,
|
||||
EVENT_GROBBULUS = 1,
|
||||
EVENT_GLUTH = 2,
|
||||
EVENT_NOTH = 3,
|
||||
EVENT_HEIGAN = 4,
|
||||
EVENT_LOATHEB = 5,
|
||||
EVENT_ANUB = 6,
|
||||
EVENT_FAERLINA = 7,
|
||||
EVENT_MAEXXNA = 8,
|
||||
EVENT_THADDIUS = 9,
|
||||
EVENT_RAZUVIOUS = 10,
|
||||
EVENT_GOTHIK = 11,
|
||||
EVENT_HORSEMAN = 12,
|
||||
EVENT_SAPPHIRON = 13,
|
||||
EVENT_KELTHUZAD = 14,
|
||||
MAX_ENCOUNTERS,
|
||||
};
|
||||
|
||||
enum NXData
|
||||
{
|
||||
DATA_HEIGAN_ERUPTION = 100,
|
||||
DATA_HEIGAN_ENTER_GATE = 101,
|
||||
DATA_LOATHEB_GATE = 102,
|
||||
DATA_ANUB_GATE = 103,
|
||||
DATA_MAEXXNA_GATE = 104,
|
||||
DATA_THADDIUS_BOSS = 105,
|
||||
DATA_STALAGG_BOSS = 106,
|
||||
DATA_FEUGEN_BOSS = 107,
|
||||
DATA_GOTHIK_ENTER_GATE = 108,
|
||||
DATA_GOTHIK_INNER_GATE = 109,
|
||||
DATA_GOTHIK_EXIT_GATE = 110,
|
||||
DATA_LICH_KING_BOSS = 111,
|
||||
DATA_KELTHUZAD_FLOOR = 112,
|
||||
DATA_ABOMINATION_KILLED = 113,
|
||||
DATA_FRENZY_REMOVED = 114,
|
||||
DATA_CHARGES_CROSSED = 115,
|
||||
DATA_SPORE_KILLED = 116,
|
||||
DATA_HUNDRED_CLUB = 117,
|
||||
DATA_DANCE_FAIL = 118,
|
||||
DATA_IMMORTAL_FAIL = 119,
|
||||
DATA_HEIGAN_ERUPTION = 100,
|
||||
DATA_HEIGAN_ENTER_GATE = 101,
|
||||
DATA_LOATHEB_GATE = 102,
|
||||
DATA_ANUB_GATE = 103,
|
||||
DATA_MAEXXNA_GATE = 104,
|
||||
DATA_THADDIUS_BOSS = 105,
|
||||
DATA_STALAGG_BOSS = 106,
|
||||
DATA_FEUGEN_BOSS = 107,
|
||||
DATA_GOTHIK_ENTER_GATE = 108,
|
||||
DATA_GOTHIK_INNER_GATE = 109,
|
||||
DATA_GOTHIK_EXIT_GATE = 110,
|
||||
DATA_LICH_KING_BOSS = 111,
|
||||
DATA_KELTHUZAD_FLOOR = 112,
|
||||
DATA_ABOMINATION_KILLED = 113,
|
||||
DATA_FRENZY_REMOVED = 114,
|
||||
DATA_CHARGES_CROSSED = 115,
|
||||
DATA_SPORE_KILLED = 116,
|
||||
DATA_HUNDRED_CLUB = 117,
|
||||
DATA_DANCE_FAIL = 118,
|
||||
DATA_IMMORTAL_FAIL = 119,
|
||||
};
|
||||
|
||||
enum NXGOs
|
||||
{
|
||||
GO_PATCHWERK_GATE = 181123,
|
||||
GO_GLUTH_GATE = 181120,
|
||||
GO_NOTH_GATE = 181201,
|
||||
GO_HEIGAN_ENTERANCE_GATE = 181202,
|
||||
GO_HEIGAN_EXIT_GATE = 181203,
|
||||
GO_LOATHEB_GATE = 181241,
|
||||
GO_ANUB_GATE = 181126,
|
||||
GO_ANUB_NEXT_GATE = 181195,
|
||||
GO_FAERLINA_GATE = 194022,
|
||||
GO_MAEXXNA_GATE = 181209,
|
||||
GO_THADDIUS_GATE = 181121,
|
||||
GO_GOTHIK_ENTER_GATE = 181124,
|
||||
GO_GOTHIK_INNER_GATE = 181170,
|
||||
GO_GOTHIK_EXIT_GATE = 181125,
|
||||
GO_HORSEMAN_GATE = 181119,
|
||||
GO_SAPPHIRON_GATE = 181225,
|
||||
GO_PATCHWERK_GATE = 181123,
|
||||
GO_GLUTH_GATE = 181120,
|
||||
GO_NOTH_GATE = 181201,
|
||||
GO_HEIGAN_ENTERANCE_GATE = 181202,
|
||||
GO_HEIGAN_EXIT_GATE = 181203,
|
||||
GO_LOATHEB_GATE = 181241,
|
||||
GO_ANUB_GATE = 181126,
|
||||
GO_ANUB_NEXT_GATE = 181195,
|
||||
GO_FAERLINA_GATE = 194022,
|
||||
GO_MAEXXNA_GATE = 181209,
|
||||
GO_THADDIUS_GATE = 181121,
|
||||
GO_GOTHIK_ENTER_GATE = 181124,
|
||||
GO_GOTHIK_INNER_GATE = 181170,
|
||||
GO_GOTHIK_EXIT_GATE = 181125,
|
||||
GO_HORSEMAN_GATE = 181119,
|
||||
GO_SAPPHIRON_GATE = 181225,
|
||||
|
||||
GO_HORSEMEN_CHEST_10 = 181366,
|
||||
GO_HORSEMEN_CHEST_25 = 193426,
|
||||
GO_HORSEMEN_CHEST_10 = 181366,
|
||||
GO_HORSEMEN_CHEST_25 = 193426,
|
||||
|
||||
GO_SAPPHIRON_BIRTH = 181356,
|
||||
GO_KELTHUZAD_FLOOR = 181444,
|
||||
GO_SAPPHIRON_BIRTH = 181356,
|
||||
GO_KELTHUZAD_FLOOR = 181444,
|
||||
|
||||
GO_DEATHKNIGHT_WING = 181577, //Loatheb portal
|
||||
GO_THADDIUS_PORTAL = 181576, //Thadius portal
|
||||
GO_MAEXXNA_PORTAL = 181575, //Maexxna portal
|
||||
GO_HORSEMAN_PORTAL = 181578, //Four Horseman portal
|
||||
GO_DEATHKNIGHT_WING = 181577, //Loatheb portal
|
||||
GO_THADDIUS_PORTAL = 181576, //Thadius portal
|
||||
GO_MAEXXNA_PORTAL = 181575, //Maexxna portal
|
||||
GO_HORSEMAN_PORTAL = 181578, //Four Horseman portal
|
||||
};
|
||||
|
||||
enum NXNPCs
|
||||
{
|
||||
// Thaddius
|
||||
NPC_THADDIUS = 15928,
|
||||
NPC_STALAGG = 15929,
|
||||
NPC_FEUGEN = 15930,
|
||||
// Thaddius
|
||||
NPC_THADDIUS = 15928,
|
||||
NPC_STALAGG = 15929,
|
||||
NPC_FEUGEN = 15930,
|
||||
|
||||
// Four horseman
|
||||
NPC_BARON_RIVENDARE = 30549,
|
||||
NPC_SIR_ZELIEK = 16063,
|
||||
NPC_LADY_BLAUMEUX = 16065,
|
||||
NPC_THANE_KORTHAZZ = 16064,
|
||||
// Four horseman
|
||||
NPC_BARON_RIVENDARE = 30549,
|
||||
NPC_SIR_ZELIEK = 16063,
|
||||
NPC_LADY_BLAUMEUX = 16065,
|
||||
NPC_THANE_KORTHAZZ = 16064,
|
||||
|
||||
// Sapphiron
|
||||
NPC_SAPPHIRON = 15989,
|
||||
// Sapphiron
|
||||
NPC_SAPPHIRON = 15989,
|
||||
|
||||
// Kel'Thuzad
|
||||
NPC_KELTHUZAD = 15990,
|
||||
NPC_LICH_KING = 16980,
|
||||
// Kel'Thuzad
|
||||
NPC_KELTHUZAD = 15990,
|
||||
NPC_LICH_KING = 16980,
|
||||
|
||||
// Frogger
|
||||
NPC_LIVING_POISON = 16027,
|
||||
NPC_NAXXRAMAS_TRIGGER = 16082,
|
||||
NPC_MR_BIGGLESWORTH = 16998
|
||||
// Frogger
|
||||
NPC_LIVING_POISON = 16027,
|
||||
NPC_NAXXRAMAS_TRIGGER = 16082,
|
||||
NPC_MR_BIGGLESWORTH = 16998
|
||||
};
|
||||
|
||||
enum NXMisc
|
||||
{
|
||||
// Spells
|
||||
SPELL_ERUPTION = 29371,
|
||||
SPELL_FROGGER_EXPLODE = 28433,
|
||||
// Spells
|
||||
SPELL_ERUPTION = 29371,
|
||||
SPELL_FROGGER_EXPLODE = 28433,
|
||||
|
||||
// Actions
|
||||
ACTION_SAPPHIRON_BIRTH = 1
|
||||
// Actions
|
||||
ACTION_SAPPHIRON_BIRTH = 1
|
||||
};
|
||||
|
||||
enum NXSays
|
||||
|
||||
Reference in New Issue
Block a user