mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 22:26:22 +00:00
Big re-organization of repository [W.I.P]
This commit is contained in:
@@ -1,249 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
enum ExarchMaladaar
|
||||
{
|
||||
SAY_INTRO = 0,
|
||||
SAY_SUMMON = 1,
|
||||
SAY_AGGRO = 2,
|
||||
SAY_ROAR = 3,
|
||||
SAY_SLAY = 4,
|
||||
SAY_DEATH = 5,
|
||||
|
||||
SPELL_RIBBON_OF_SOULS = 32422,
|
||||
SPELL_SOUL_SCREAM = 32421,
|
||||
SPELL_STOLEN_SOUL = 32346,
|
||||
SPELL_STOLEN_SOUL_VISUAL = 32395,
|
||||
SPELL_SUMMON_AVATAR = 32424,
|
||||
|
||||
ENTRY_STOLEN_SOUL = 18441,
|
||||
|
||||
EVENT_SPELL_FEAR = 1,
|
||||
EVENT_SPELL_RIBBON = 2,
|
||||
EVENT_SPELL_SOUL = 3,
|
||||
EVENT_CHECK_HEALTH = 4
|
||||
};
|
||||
|
||||
class boss_exarch_maladaar : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_exarch_maladaar() : CreatureScript("boss_exarch_maladaar") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_exarch_maladaarAI (creature);
|
||||
}
|
||||
|
||||
struct boss_exarch_maladaarAI : public ScriptedAI
|
||||
{
|
||||
boss_exarch_maladaarAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_talked = false;
|
||||
}
|
||||
|
||||
bool _talked;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!_talked && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 150.0f))
|
||||
{
|
||||
Talk(SAY_INTRO);
|
||||
_talked = true;
|
||||
}
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit*)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
events.ScheduleEvent(EVENT_SPELL_FEAR, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_RIBBON, 5000);
|
||||
events.ScheduleEvent(EVENT_SPELL_SOUL, 25000);
|
||||
events.ScheduleEvent(EVENT_CHECK_HEALTH, 5000);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit*)
|
||||
{
|
||||
if (urand(0,1))
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit*)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
//When Exarch Maladar is defeated D'ore appear.
|
||||
me->SummonCreature(19412, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_CHECK_HEALTH:
|
||||
if (HealthBelowPct(25))
|
||||
{
|
||||
Talk(SAY_SUMMON);
|
||||
me->CastSpell(me, SPELL_SUMMON_AVATAR, false);
|
||||
events.PopEvent();
|
||||
return;
|
||||
}
|
||||
events.RepeatEvent(2000);
|
||||
break;
|
||||
case EVENT_SPELL_SOUL:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
{
|
||||
Talk(SAY_ROAR);
|
||||
me->CastSpell(target, SPELL_STOLEN_SOUL, false);
|
||||
if (Creature* summon = me->SummonCreature(ENTRY_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000))
|
||||
{
|
||||
summon->CastSpell(summon, SPELL_STOLEN_SOUL_VISUAL, false);
|
||||
summon->SetDisplayId(target->GetDisplayId());
|
||||
summon->AI()->DoAction(target->getClass());
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(urand(25000, 30000));
|
||||
break;
|
||||
case EVENT_SPELL_RIBBON:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->CastSpell(target, SPELL_RIBBON_OF_SOULS, false);
|
||||
events.RepeatEvent(urand(10000, 20000));
|
||||
break;
|
||||
case EVENT_SPELL_FEAR:
|
||||
me->CastSpell(me, SPELL_SOUL_SCREAM, false);
|
||||
events.RepeatEvent(urand(15000, 25000));
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
enum stolenSoul
|
||||
{
|
||||
SPELL_MOONFIRE = 37328,
|
||||
SPELL_FIREBALL = 37329,
|
||||
SPELL_MIND_FLAY = 37330,
|
||||
SPELL_HEMORRHAGE = 37331,
|
||||
SPELL_FROSTSHOCK = 37332,
|
||||
SPELL_CURSE_OF_AGONY = 37334,
|
||||
SPELL_MORTAL_STRIKE = 37335,
|
||||
SPELL_FREEZING_TRAP = 37368,
|
||||
SPELL_HAMMER_OF_JUSTICE = 37369,
|
||||
SPELL_PLAGUE_STRIKE = 58839,
|
||||
|
||||
EVENT_STOLEN_SOUL_SPELL = 1,
|
||||
};
|
||||
|
||||
class npc_stolen_soul : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_stolen_soul() : CreatureScript("npc_stolen_soul") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_stolen_soulAI (creature);
|
||||
}
|
||||
|
||||
struct npc_stolen_soulAI : public ScriptedAI
|
||||
{
|
||||
npc_stolen_soulAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint8 myClass;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
myClass = CLASS_WARRIOR;
|
||||
events.ScheduleEvent(EVENT_STOLEN_SOUL_SPELL, 1000);
|
||||
}
|
||||
|
||||
void DoAction(int32 pClass)
|
||||
{
|
||||
myClass = pClass;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (events.GetEvent() == EVENT_STOLEN_SOUL_SPELL)
|
||||
{
|
||||
switch (myClass)
|
||||
{
|
||||
case CLASS_WARRIOR:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MORTAL_STRIKE, false);
|
||||
events.RepeatEvent(6000);
|
||||
break;
|
||||
case CLASS_PALADIN:
|
||||
me->CastSpell(me->GetVictim(), SPELL_HAMMER_OF_JUSTICE, false);
|
||||
events.RepeatEvent(6000);
|
||||
break;
|
||||
case CLASS_HUNTER:
|
||||
me->CastSpell(me->GetVictim(), SPELL_FREEZING_TRAP, false);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case CLASS_ROGUE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_HEMORRHAGE, false);
|
||||
events.RepeatEvent(10000);
|
||||
break;
|
||||
case CLASS_PRIEST:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MIND_FLAY, false);
|
||||
events.RepeatEvent(5000);
|
||||
break;
|
||||
case CLASS_SHAMAN:
|
||||
me->CastSpell(me->GetVictim(), SPELL_FROSTSHOCK, false);
|
||||
events.RepeatEvent(8000);
|
||||
break;
|
||||
case CLASS_MAGE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_FIREBALL, false);
|
||||
events.RepeatEvent(5000);
|
||||
break;
|
||||
case CLASS_WARLOCK:
|
||||
me->CastSpell(me->GetVictim(), SPELL_CURSE_OF_AGONY, false);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case CLASS_DRUID:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MOONFIRE, false);
|
||||
events.RepeatEvent(10000);
|
||||
break;
|
||||
case CLASS_DEATH_KNIGHT:
|
||||
me->CastSpell(me->GetVictim(), SPELL_PLAGUE_STRIKE, false);
|
||||
events.RepeatEvent(6000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_exarch_maladaar()
|
||||
{
|
||||
new boss_exarch_maladaar();
|
||||
new npc_stolen_soul();
|
||||
}
|
||||
@@ -1,224 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Player.h"
|
||||
|
||||
enum eShirrak
|
||||
{
|
||||
|
||||
SPELL_INHIBIT_MAGIC = 32264,
|
||||
SPELL_ATTRACT_MAGIC = 32265,
|
||||
SPELL_CARNIVOROUS_BITE_N = 36383,
|
||||
SPELL_CARNIVOROUS_BITE_H = 39382,
|
||||
|
||||
SPELL_FIERY_BLAST_N = 32302,
|
||||
SPELL_FIERY_BLAST_H = 38382,
|
||||
SPELL_FOCUS_FIRE_VISUAL = 32286,
|
||||
SPELL_FOCUS_CAST = 32300,
|
||||
|
||||
EVENT_SPELL_INHIBIT_MAGIC = 1,
|
||||
EVENT_SPELL_ATTRACT_MAGIC = 2,
|
||||
EVENT_SPELL_CARNIVOROUS = 3,
|
||||
EVENT_SPELL_FOCUS_FIRE = 4,
|
||||
EVENT_SPELL_FOCUS_FIRE_2 = 5,
|
||||
EVENT_SPELL_FOCUS_FIRE_3 = 6,
|
||||
|
||||
ENTRY_FOCUS_FIRE = 18374,
|
||||
|
||||
EMOTE_FOCUSED = 0
|
||||
};
|
||||
|
||||
class boss_shirrak_the_dead_watcher : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_shirrak_the_dead_watcher() : CreatureScript("boss_shirrak_the_dead_watcher") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_shirrak_the_dead_watcherAI (creature);
|
||||
}
|
||||
|
||||
struct boss_shirrak_the_dead_watcherAI : public ScriptedAI
|
||||
{
|
||||
boss_shirrak_the_dead_watcherAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
uint64 focusGUID;
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
focusGUID = 0;
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit*)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SPELL_INHIBIT_MAGIC, 0);
|
||||
events.ScheduleEvent(EVENT_SPELL_ATTRACT_MAGIC, 28000);
|
||||
events.ScheduleEvent(EVENT_SPELL_CARNIVOROUS, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FOCUS_FIRE, 17000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summon->CastSpell(summon, SPELL_FOCUS_FIRE_VISUAL, true);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
|
||||
{
|
||||
if (spellInfo->Id == SPELL_FOCUS_CAST)
|
||||
target->CastSpell(target, DUNGEON_MODE(SPELL_FIERY_BLAST_N, SPELL_FIERY_BLAST_H), false);
|
||||
}
|
||||
|
||||
uint8 getStackCount(float dist)
|
||||
{
|
||||
if (dist < 15)
|
||||
return 4;
|
||||
if (dist < 25)
|
||||
return 3;
|
||||
if (dist < 35)
|
||||
return 2;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
events.Update(diff);
|
||||
uint32 eventId = events.GetEvent();
|
||||
|
||||
if (eventId == EVENT_SPELL_INHIBIT_MAGIC)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* player = i->GetSource())
|
||||
{
|
||||
float dist = me->GetDistance(player);
|
||||
if (player->IsAlive() && dist < 45.0f)
|
||||
{
|
||||
Aura* aura = player->GetAura(SPELL_INHIBIT_MAGIC);
|
||||
if (!aura)
|
||||
aura = me->AddAura(SPELL_INHIBIT_MAGIC, player);
|
||||
else
|
||||
aura->RefreshDuration();
|
||||
|
||||
if (aura)
|
||||
aura->SetStackAmount(getStackCount(dist));
|
||||
}
|
||||
else
|
||||
player->RemoveAurasDueToSpell(SPELL_INHIBIT_MAGIC);
|
||||
}
|
||||
events.RepeatEvent(3000);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SPELL_ATTRACT_MAGIC:
|
||||
me->CastSpell(me, SPELL_ATTRACT_MAGIC, false);
|
||||
events.RepeatEvent(30000);
|
||||
events.RescheduleEvent(EVENT_SPELL_CARNIVOROUS, 1500);
|
||||
break;
|
||||
case EVENT_SPELL_CARNIVOROUS:
|
||||
me->CastSpell(me, DUNGEON_MODE(SPELL_CARNIVOROUS_BITE_N, SPELL_CARNIVOROUS_BITE_H), false);
|
||||
events.RepeatEvent(10000);
|
||||
break;
|
||||
case EVENT_SPELL_FOCUS_FIRE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 60.0f, true))
|
||||
{
|
||||
if (Creature* cr = me->SummonCreature(ENTRY_FOCUS_FIRE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 7000))
|
||||
focusGUID = cr->GetGUID();
|
||||
Talk(EMOTE_FOCUSED, target);
|
||||
}
|
||||
events.RepeatEvent(urand(15000, 20000));
|
||||
events.ScheduleEvent(EVENT_SPELL_FOCUS_FIRE_2, 3000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FOCUS_FIRE_2, 3500);
|
||||
events.ScheduleEvent(EVENT_SPELL_FOCUS_FIRE_2, 4000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FOCUS_FIRE_3, 5000);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
break;
|
||||
case EVENT_SPELL_FOCUS_FIRE_2:
|
||||
if (Unit* flare = ObjectAccessor::GetCreature(*me, focusGUID))
|
||||
me->CastSpell(flare, SPELL_FOCUS_CAST, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SPELL_FOCUS_FIRE_3:
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_auchenai_possess : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_auchenai_possess() : SpellScriptLoader("spell_auchenai_possess") { }
|
||||
|
||||
class spell_auchenai_possess_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_auchenai_possess_AuraScript);
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Unit* target = GetTarget())
|
||||
caster->CastSpell(target, 32830 /*POSSESS*/, true);
|
||||
}
|
||||
|
||||
void CalcPeriodic(AuraEffect const* /*effect*/, bool& isPeriodic, int32& amplitude)
|
||||
{
|
||||
isPeriodic = true;
|
||||
amplitude = 2000;
|
||||
}
|
||||
|
||||
void Update(AuraEffect* effect)
|
||||
{
|
||||
// Xinef: Charm is removed when target is at or below 50%hp
|
||||
if (Unit* owner = GetUnitOwner())
|
||||
if (owner->GetHealthPct() <= 50)
|
||||
SetDuration(0);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
// Base channel
|
||||
if (m_scriptSpellId == 33401)
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_auchenai_possess_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
||||
else
|
||||
{
|
||||
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_auchenai_possess_AuraScript::CalcPeriodic, EFFECT_0, SPELL_AURA_MOD_CHARM);
|
||||
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_auchenai_possess_AuraScript::Update, EFFECT_0, SPELL_AURA_MOD_CHARM);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_auchenai_possess_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_shirrak_the_dead_watcher()
|
||||
{
|
||||
new boss_shirrak_the_dead_watcher();
|
||||
new spell_auchenai_possess();
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
enum ePrince
|
||||
{
|
||||
SAY_INTRO = 0,
|
||||
SAY_AGGRO = 1,
|
||||
SAY_SLAY = 2,
|
||||
SAY_SUMMON = 3,
|
||||
SAY_DEAD = 4,
|
||||
|
||||
SPELL_BLINK = 34605,
|
||||
SPELL_FROSTBOLT = 32364,
|
||||
SPELL_FIREBALL = 32363,
|
||||
SPELL_FROSTNOVA = 32365,
|
||||
|
||||
SPELL_ETHEREAL_BEACON = 32371, // Summons NPC_BEACON
|
||||
SPELL_ETHEREAL_BEACON_VISUAL = 32368,
|
||||
|
||||
NPC_BEACON = 18431,
|
||||
NPC_SHAFFAR = 18344,
|
||||
|
||||
EVENT_SPELL_BEACON = 1,
|
||||
EVENT_SPELL_FR_FI = 2,
|
||||
EVENT_SPELL_FROST_NOVA = 3,
|
||||
EVENT_SPELL_BLINK = 4,
|
||||
};
|
||||
|
||||
class boss_nexusprince_shaffar : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_nexusprince_shaffar() : CreatureScript("boss_nexusprince_shaffar") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_nexusprince_shaffarAI (creature);
|
||||
}
|
||||
|
||||
struct boss_nexusprince_shaffarAI : public ScriptedAI
|
||||
{
|
||||
boss_nexusprince_shaffarAI(Creature* creature) : ScriptedAI(creature), summons(me)
|
||||
{
|
||||
HasTaunted = false;
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
bool HasTaunted;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
float dist = 8.0f;
|
||||
float posX, posY, posZ, angle;
|
||||
me->GetHomePosition(posX, posY, posZ, angle);
|
||||
|
||||
summons.DespawnAll();
|
||||
events.Reset();
|
||||
me->SummonCreature(NPC_BEACON, posX - dist, posY - dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
|
||||
me->SummonCreature(NPC_BEACON, posX - dist, posY + dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
|
||||
me->SummonCreature(NPC_BEACON, posX + dist, posY, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!HasTaunted && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
|
||||
{
|
||||
Talk(SAY_INTRO);
|
||||
HasTaunted = true;
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit*)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
me->SetInCombatWithZone();
|
||||
summons.DoZoneInCombat();
|
||||
|
||||
events.ScheduleEvent(EVENT_SPELL_BEACON, 10000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FR_FI, 4000);
|
||||
events.ScheduleEvent(EVENT_SPELL_FROST_NOVA, 15000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
if (me->IsInCombat() && summon->GetEntry() == NPC_BEACON)
|
||||
{
|
||||
summon->CastSpell(summon, SPELL_ETHEREAL_BEACON_VISUAL, false);
|
||||
if (Unit* target = SelectTargetFromPlayerList(50.0f))
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Talk(SAY_DEAD);
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_FROST_NOVA:
|
||||
me->CastSpell(me, SPELL_FROSTNOVA, false);
|
||||
events.RepeatEvent(urand(16000, 23000));
|
||||
events.DelayEvents(1500);
|
||||
events.ScheduleEvent(EVENT_SPELL_BLINK, 1500);
|
||||
break;
|
||||
case EVENT_SPELL_FR_FI:
|
||||
me->CastSpell(me->GetVictim(), RAND(SPELL_FROSTBOLT, SPELL_FIREBALL), false);
|
||||
events.RepeatEvent(urand(3000, 4000));
|
||||
break;
|
||||
case EVENT_SPELL_BLINK:
|
||||
me->CastSpell(me, SPELL_BLINK, false);
|
||||
events.PopEvent();
|
||||
events.RescheduleEvent(EVENT_SPELL_FR_FI, 0);
|
||||
break;
|
||||
case EVENT_SPELL_BEACON:
|
||||
if (!urand(0, 3))
|
||||
Talk(SAY_SUMMON);
|
||||
|
||||
me->CastSpell(me, SPELL_ETHEREAL_BEACON, true);
|
||||
events.RepeatEvent(10000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_nexusprince_shaffar()
|
||||
{
|
||||
new boss_nexusprince_shaffar();
|
||||
}
|
||||
@@ -1,324 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "sethekk_halls.h"
|
||||
|
||||
enum TailonkingIkiss
|
||||
{
|
||||
SAY_INTRO = 0,
|
||||
SAY_AGGRO = 1,
|
||||
SAY_SLAY = 2,
|
||||
SAY_DEATH = 3,
|
||||
EMOTE_ARCANE_EXP = 4,
|
||||
|
||||
SPELL_BLINK = 38194,
|
||||
SPELL_BLINK_TELEPORT = 38203,
|
||||
SPELL_MANA_SHIELD = 38151,
|
||||
SPELL_ARCANE_BUBBLE = 9438,
|
||||
SPELL_SLOW = 35032,
|
||||
SPELL_POLYMORPH_N = 38245, // Difficulty data
|
||||
SPELL_POLYMORPH_H = 43309,
|
||||
SPELL_ARCANE_VOLLEY_N = 35059, // Difficulty data
|
||||
SPELL_ARCANE_VOLLEY_H = 40424,
|
||||
SPELL_ARCANE_EXPLOSION_N = 38197, // Difficulty data
|
||||
SPELL_ARCANE_EXPLOSION_H = 40425,
|
||||
|
||||
EVENT_SPELL_BLINK = 1,
|
||||
EVENT_SPELL_POLYMORPH = 2,
|
||||
EVENT_SPELL_SLOW = 3,
|
||||
EVENT_SPELL_ARCANE_VOLLEY = 4,
|
||||
EVENT_SPELL_ARCANE_EXPLO = 5,
|
||||
EVENT_HEALTH_CHECK = 6,
|
||||
EVENT_SPELL_BLINK_2 = 7
|
||||
};
|
||||
|
||||
class boss_talon_king_ikiss : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_talon_king_ikiss() : CreatureScript("boss_talon_king_ikiss") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_talon_king_ikissAI (creature);
|
||||
}
|
||||
|
||||
struct boss_talon_king_ikissAI : public ScriptedAI
|
||||
{
|
||||
boss_talon_king_ikissAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
bool _spoken;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_spoken = false;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!_spoken && who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Talk(SAY_INTRO);
|
||||
_spoken = true;
|
||||
}
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
events.ScheduleEvent(EVENT_SPELL_BLINK, 35000);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANE_VOLLEY, 5000);
|
||||
events.ScheduleEvent(EVENT_SPELL_POLYMORPH, 8000);
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 2000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_SPELL_SLOW, urand(15000, 25000));
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
instance->SetData(DATA_IKISSDOOREVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
if (urand(0,1))
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_ARCANE_VOLLEY:
|
||||
me->CastSpell(me, SPELL_ARCANE_VOLLEY_N, false);
|
||||
events.RepeatEvent(urand(7000, 12000));
|
||||
break;
|
||||
case EVENT_SPELL_POLYMORPH:
|
||||
if (Unit* target = (IsHeroic() ? SelectTarget(SELECT_TARGET_RANDOM, 0) : SelectTarget(SELECT_TARGET_TOPAGGRO, 1)))
|
||||
me->CastSpell(target, SPELL_POLYMORPH_N, false);
|
||||
events.RepeatEvent(urand(15000, 17500));
|
||||
break;
|
||||
case EVENT_SPELL_SLOW:
|
||||
me->CastSpell(me, SPELL_SLOW, false);
|
||||
events.RepeatEvent(urand(15000, 30000));
|
||||
break;
|
||||
case EVENT_HEALTH_CHECK:
|
||||
if (me->HealthBelowPct(20))
|
||||
{
|
||||
me->CastSpell(me, SPELL_MANA_SHIELD, false);
|
||||
events.PopEvent();
|
||||
return;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_SPELL_BLINK:
|
||||
Talk(EMOTE_ARCANE_EXP);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
me->CastSpell(target, SPELL_BLINK, false);
|
||||
me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation());
|
||||
|
||||
DoCast(target, SPELL_BLINK_TELEPORT);
|
||||
}
|
||||
events.RepeatEvent(urand(35000, 40000));
|
||||
events.DelayEvents(500);
|
||||
events.ScheduleEvent(EVENT_SPELL_BLINK_2, 0);
|
||||
return;
|
||||
case EVENT_SPELL_BLINK_2:
|
||||
me->CastSpell(me, SPELL_ARCANE_EXPLOSION_N, false);
|
||||
me->CastSpell(me, SPELL_ARCANE_BUBBLE, true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
enum Anzu
|
||||
{
|
||||
SAY_ANZU_INTRO1 = 0,
|
||||
SAY_ANZU_INTRO2 = 1,
|
||||
SAY_SUMMON = 2,
|
||||
|
||||
SPELL_PARALYZING_SCREECH = 40184,
|
||||
SPELL_SPELL_BOMB = 40303,
|
||||
SPELL_CYCLONE = 40321,
|
||||
SPELL_BANISH_SELF = 42354,
|
||||
SPELL_SHADOWFORM = 40973,
|
||||
|
||||
EVENT_SPELL_SCREECH = 1,
|
||||
EVENT_SPELL_BOMB = 2,
|
||||
EVENT_SPELL_CYCLONE = 3,
|
||||
EVENT_ANZU_HEALTH1 = 4,
|
||||
EVENT_ANZU_HEALTH2 = 5
|
||||
};
|
||||
|
||||
class boss_anzu : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_anzu() : CreatureScript("boss_anzu") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_anzuAI (creature);
|
||||
}
|
||||
|
||||
struct boss_anzuAI : public ScriptedAI
|
||||
{
|
||||
boss_anzuAI(Creature* creature) : ScriptedAI(creature), summons(me)
|
||||
{
|
||||
talkTimer = 1;
|
||||
me->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->AddAura(SPELL_SHADOWFORM, me);
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
uint32 talkTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
summons.DespawnAll();
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
if (instance->GetData(TYPE_ANZU_ENCOUNTER) != DONE)
|
||||
instance->SetData(TYPE_ANZU_ENCOUNTER, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->AI()->AttackStart(me->GetVictim());
|
||||
}
|
||||
|
||||
void SummonedCreatureDies(Creature* summon, Unit*)
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
summons.RemoveNotExisting();
|
||||
if (summons.empty())
|
||||
me->RemoveAurasDueToSpell(SPELL_BANISH_SELF);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_SPELL_SCREECH, 14000);
|
||||
events.ScheduleEvent(EVENT_SPELL_BOMB, 5000);
|
||||
events.ScheduleEvent(EVENT_SPELL_CYCLONE, 8000);
|
||||
events.ScheduleEvent(EVENT_ANZU_HEALTH1, 2000);
|
||||
events.ScheduleEvent(EVENT_ANZU_HEALTH2, 2001);
|
||||
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
instance->SetData(TYPE_ANZU_ENCOUNTER, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
instance->SetData(TYPE_ANZU_ENCOUNTER, DONE);
|
||||
}
|
||||
|
||||
void SummonBroods()
|
||||
{
|
||||
Talk(SAY_SUMMON);
|
||||
me->CastSpell(me, SPELL_BANISH_SELF, true);
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
me->SummonCreature(23132 /*NPC_BROOD_OF_ANZU*/, me->GetPositionX()+20*cos((float)i), me->GetPositionY()+20*sin((float)i), me->GetPositionZ()+25.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (talkTimer)
|
||||
{
|
||||
talkTimer += diff;
|
||||
if (talkTimer >= 1000 && talkTimer < 10000)
|
||||
{
|
||||
Talk(SAY_ANZU_INTRO1);
|
||||
talkTimer = 10000;
|
||||
}
|
||||
else if (talkTimer >= 16000)
|
||||
{
|
||||
me->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
|
||||
me->RemoveAurasDueToSpell(SPELL_SHADOWFORM);
|
||||
Talk(SAY_ANZU_INTRO2);
|
||||
talkTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING|UNIT_STATE_STUNNED))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_SCREECH:
|
||||
me->CastSpell(me, SPELL_PARALYZING_SCREECH, false);
|
||||
events.RepeatEvent(23000);
|
||||
events.DelayEvents(3000);
|
||||
break;
|
||||
case EVENT_SPELL_BOMB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_SPELL_BOMB, false);
|
||||
events.RepeatEvent(urand(16000, 24500));
|
||||
events.DelayEvents(3000);
|
||||
break;
|
||||
case EVENT_SPELL_CYCLONE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 45.0f, true))
|
||||
me->CastSpell(target, SPELL_CYCLONE, false);
|
||||
events.RepeatEvent(urand(22000, 27000));
|
||||
events.DelayEvents(3000);
|
||||
break;
|
||||
case EVENT_ANZU_HEALTH1:
|
||||
if (me->HealthBelowPct(66))
|
||||
{
|
||||
SummonBroods();
|
||||
events.PopEvent();
|
||||
events.DelayEvents(10000);
|
||||
return;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_ANZU_HEALTH2:
|
||||
if (me->HealthBelowPct(33))
|
||||
{
|
||||
SummonBroods();
|
||||
events.PopEvent();
|
||||
events.DelayEvents(10000);
|
||||
return;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_talon_king_ikiss()
|
||||
{
|
||||
new boss_talon_king_ikiss();
|
||||
new boss_anzu();
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "sethekk_halls.h"
|
||||
|
||||
class instance_sethekk_halls : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_sethekk_halls() : InstanceMapScript("instance_sethekk_halls", 556) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_sethekk_halls_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_sethekk_halls_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_sethekk_halls_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint32 AnzuEncounter;
|
||||
uint64 m_uiIkissDoorGUID;
|
||||
uint64 _talonKingsCofferGUID;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
AnzuEncounter = NOT_STARTED;
|
||||
m_uiIkissDoorGUID = 0;
|
||||
_talonKingsCofferGUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
if (creature->GetEntry() == NPC_ANZU || creature->GetEntry() == NPC_VOICE_OF_THE_RAVEN_GOD)
|
||||
if (AnzuEncounter >= IN_PROGRESS)
|
||||
creature->DespawnOrUnsummon(1);
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_IKISS_DOOR:
|
||||
m_uiIkissDoorGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_THE_TALON_KINGS_COFFER:
|
||||
_talonKingsCofferGUID = go->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_IKISSDOOREVENT:
|
||||
if (data == DONE)
|
||||
{
|
||||
DoUseDoorOrButton(m_uiIkissDoorGUID, DAY*IN_MILLISECONDS);
|
||||
if (GameObject* coffer = instance->GetGameObject(_talonKingsCofferGUID))
|
||||
coffer->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE|GO_FLAG_INTERACT_COND);
|
||||
}
|
||||
break;
|
||||
case TYPE_ANZU_ENCOUNTER:
|
||||
AnzuEncounter = data;
|
||||
SaveToDB();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "S H " << AnzuEncounter;
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(const char* strIn)
|
||||
{
|
||||
if (!strIn)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(strIn);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
|
||||
std::istringstream loadStream(strIn);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'S' && dataHead2 == 'H')
|
||||
{
|
||||
loadStream >> AnzuEncounter;
|
||||
if (AnzuEncounter == IN_PROGRESS)
|
||||
AnzuEncounter = NOT_STARTED;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_instance_sethekk_halls()
|
||||
{
|
||||
new instance_sethekk_halls();
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#ifndef DEF_SETHEKK_HALLS_H
|
||||
#define DEF_SETHEKK_HALLS_H
|
||||
|
||||
enum eTypes
|
||||
{
|
||||
DATA_IKISSDOOREVENT = 1,
|
||||
TYPE_ANZU_ENCOUNTER = 2,
|
||||
};
|
||||
|
||||
enum eIds
|
||||
{
|
||||
NPC_VOICE_OF_THE_RAVEN_GOD = 21851,
|
||||
NPC_ANZU = 23035,
|
||||
|
||||
GO_IKISS_DOOR = 177203,
|
||||
GO_THE_TALON_KINGS_COFFER = 187372
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,161 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "shadow_labyrinth.h"
|
||||
|
||||
enum eEnums
|
||||
{
|
||||
SAY_INTRO = 0,
|
||||
SAY_AGGRO = 1,
|
||||
SAY_HELP = 2,
|
||||
SAY_SLAY = 3,
|
||||
SAY_DEATH = 4,
|
||||
|
||||
SPELL_BANISH = 30231,
|
||||
SPELL_CORROSIVE_ACID = 33551,
|
||||
SPELL_FEAR = 33547,
|
||||
SPELL_ENRAGE = 34970,
|
||||
|
||||
EVENT_SPELL_CORROSIVE = 1,
|
||||
EVENT_SPELL_FEAR = 2,
|
||||
EVENT_SPELL_ENRAGE = 3
|
||||
};
|
||||
|
||||
class boss_ambassador_hellmaw : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_ambassador_hellmaw() : CreatureScript("boss_ambassador_hellmaw") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_ambassador_hellmawAI(creature);
|
||||
}
|
||||
|
||||
struct boss_ambassador_hellmawAI : public npc_escortAI
|
||||
{
|
||||
boss_ambassador_hellmawAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
bool isBanished;
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param != 1)
|
||||
return;
|
||||
|
||||
me->RemoveAurasDueToSpell(SPELL_BANISH);
|
||||
Talk(SAY_INTRO);
|
||||
Start(true, false, 0, NULL, false, true);
|
||||
isBanished = false;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
isBanished = false;
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_HELLMAW, NOT_STARTED);
|
||||
if (instance->GetData(TYPE_OVERSEER) != DONE)
|
||||
{
|
||||
isBanished = true;
|
||||
me->CastSpell(me, SPELL_BANISH, true);
|
||||
}
|
||||
else
|
||||
Start(true, false, 0, NULL, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit*)
|
||||
{
|
||||
if (isBanished)
|
||||
return;
|
||||
Talk(SAY_AGGRO);
|
||||
events.ScheduleEvent(EVENT_SPELL_CORROSIVE, urand(5000, 10000));
|
||||
events.ScheduleEvent(EVENT_SPELL_FEAR, urand(15000, 20000));
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_SPELL_ENRAGE, 180000);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_HELLMAW, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (isBanished)
|
||||
return;
|
||||
npc_escortAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (isBanished)
|
||||
return;
|
||||
npc_escortAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 /*waypointId*/)
|
||||
{
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && urand(0,1))
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_HELLMAW, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (isBanished)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_CORROSIVE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_CORROSIVE_ACID, false);
|
||||
events.RepeatEvent(urand(15000, 25000));
|
||||
break;
|
||||
case EVENT_SPELL_FEAR:
|
||||
me->CastSpell(me, SPELL_FEAR, false);
|
||||
events.RepeatEvent(urand(20000, 35000));
|
||||
break;
|
||||
case EVENT_SPELL_ENRAGE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_ENRAGE, false);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_ambassador_hellmaw()
|
||||
{
|
||||
new boss_ambassador_hellmaw();
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "shadow_labyrinth.h"
|
||||
|
||||
enum BlackheartTheInciter
|
||||
{
|
||||
SPELL_INCITE_CHAOS = 33676,
|
||||
SPELL_INCITE_CHAOS_B = 33684, //debuff applied to each member of party
|
||||
SPELL_CHARGE = 33709,
|
||||
SPELL_WAR_STOMP = 33707,
|
||||
|
||||
SAY_INTRO = 0,
|
||||
SAY_AGGRO = 1,
|
||||
SAY_SLAY = 2,
|
||||
SAY_HELP = 3,
|
||||
SAY_DEATH = 4,
|
||||
|
||||
EVENT_SPELL_INCITE = 1,
|
||||
EVENT_INCITE_WAIT = 2,
|
||||
EVENT_SPELL_CHARGE = 3,
|
||||
EVENT_SPELL_KNOCKBACK = 4
|
||||
};
|
||||
|
||||
class boss_blackheart_the_inciter : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_blackheart_the_inciter() : CreatureScript("boss_blackheart_the_inciter") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_blackheart_the_inciterAI (creature);
|
||||
}
|
||||
|
||||
struct boss_blackheart_the_inciterAI : public ScriptedAI
|
||||
{
|
||||
boss_blackheart_the_inciterAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
|
||||
bool InciteChaos;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
InciteChaos = false;
|
||||
events.Reset();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && urand(0,1))
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (instance)
|
||||
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
events.ScheduleEvent(EVENT_SPELL_INCITE, 20000);
|
||||
events.ScheduleEvent(EVENT_INCITE_WAIT, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_CHARGE, 0);
|
||||
events.ScheduleEvent(EVENT_SPELL_KNOCKBACK, 15000);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
if (InciteChaos && SelectTargetFromPlayerList(100.0f))
|
||||
return;
|
||||
CreatureAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_INCITE_WAIT:
|
||||
InciteChaos = false;
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SPELL_INCITE:
|
||||
{
|
||||
me->CastSpell(me, SPELL_INCITE_CHAOS, false);
|
||||
|
||||
std::list<HostileReference*> t_list = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
me->CastSpell(target, SPELL_INCITE_CHAOS_B, true);
|
||||
}
|
||||
|
||||
DoResetThreat();
|
||||
InciteChaos = true;
|
||||
events.DelayEvents(15000);
|
||||
events.RepeatEvent(40000);
|
||||
events.ScheduleEvent(EVENT_INCITE_WAIT, 15000);
|
||||
break;
|
||||
}
|
||||
case EVENT_SPELL_CHARGE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->CastSpell(target, SPELL_CHARGE, false);
|
||||
events.RepeatEvent(urand(15000, 25000));
|
||||
break;
|
||||
case EVENT_SPELL_KNOCKBACK:
|
||||
me->CastSpell(me, SPELL_WAR_STOMP, false);
|
||||
events.RepeatEvent(urand(18000, 24000));
|
||||
break;
|
||||
}
|
||||
|
||||
if (InciteChaos)
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_blackheart_the_inciter()
|
||||
{
|
||||
new boss_blackheart_the_inciter();
|
||||
}
|
||||
@@ -1,263 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "shadow_labyrinth.h"
|
||||
#include "Player.h"
|
||||
|
||||
enum GrandmasterVorpil
|
||||
{
|
||||
SAY_INTRO = 0,
|
||||
SAY_AGGRO = 1,
|
||||
SAY_HELP = 2,
|
||||
SAY_SLAY = 3,
|
||||
SAY_DEATH = 4,
|
||||
|
||||
SPELL_RAIN_OF_FIRE_N = 33617,
|
||||
SPELL_RAIN_OF_FIRE_H = 39363,
|
||||
|
||||
SPELL_DRAW_SHADOWS = 33563,
|
||||
SPELL_SHADOWBOLT_VOLLEY = 33841,
|
||||
SPELL_BANISH = 38791,
|
||||
|
||||
NPC_VOID_TRAVELER = 19226,
|
||||
SPELL_SACRIFICE = 33587,
|
||||
SPELL_SHADOW_NOVA = 33846,
|
||||
SPELL_EMPOWERING_SHADOWS_N = 33783,
|
||||
SPELL_EMPOWERING_SHADOWS_H = 39364,
|
||||
|
||||
NPC_VOID_PORTAL = 19224,
|
||||
SPELL_VOID_PORTAL_VISUAL = 33569,
|
||||
|
||||
EVENT_SPELL_SHADOWBOLT = 1,
|
||||
EVENT_SPELL_DRAWSHADOWS = 2,
|
||||
EVENT_SUMMON_TRAVELER = 3,
|
||||
EVENT_SPELL_BANISH = 4
|
||||
};
|
||||
|
||||
float VorpilPosition[3] = {-252.8820f, -264.3030f, 17.1f};
|
||||
|
||||
float VoidPortalCoords[5][3] =
|
||||
{
|
||||
{-283.5894f, -239.5718f, 12.7f},
|
||||
{-306.5853f, -258.4539f, 12.7f},
|
||||
{-295.8789f, -269.0899f, 12.7f},
|
||||
{-209.3401f, -262.7564f, 17.1f},
|
||||
{-261.4533f, -297.3298f, 17.1f}
|
||||
};
|
||||
|
||||
class boss_grandmaster_vorpil : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_grandmaster_vorpil() : CreatureScript("boss_grandmaster_vorpil") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_grandmaster_vorpilAI (creature);
|
||||
}
|
||||
|
||||
struct boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
{
|
||||
boss_grandmaster_vorpilAI(Creature* creature) : ScriptedAI(creature), summons(me)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
sayIntro = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
|
||||
bool sayIntro, sayHelp;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
sayHelp = false;
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_GRANDMASTERVORPILEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void summonPortals()
|
||||
{
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
me->SummonCreature(NPC_VOID_PORTAL, VoidPortalCoords[i][0], VoidPortalCoords[i][1], VoidPortalCoords[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 3000000);
|
||||
}
|
||||
|
||||
void spawnVoidTraveler()
|
||||
{
|
||||
uint8 pos = urand(0, 4);
|
||||
me->SummonCreature(NPC_VOID_TRAVELER, VoidPortalCoords[pos][0], VoidPortalCoords[pos][1], VoidPortalCoords[pos][2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
if (!sayHelp)
|
||||
{
|
||||
Talk(SAY_HELP);
|
||||
sayHelp = true;
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if (summon->GetEntry() == NPC_VOID_TRAVELER)
|
||||
summon->AI()->SetGUID(me->GetGUID());
|
||||
else if (summon->GetEntry() == NPC_VOID_PORTAL)
|
||||
summon->CastSpell(summon, SPELL_VOID_PORTAL_VISUAL, false);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
summons.DespawnAll();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_GRANDMASTERVORPILEVENT, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
summonPortals();
|
||||
|
||||
events.ScheduleEvent(EVENT_SPELL_SHADOWBOLT, urand(7000, 14000));
|
||||
events.ScheduleEvent(EVENT_SPELL_DRAWSHADOWS, 45000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_TRAVELER, 5000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_SPELL_BANISH, 17000);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_GRANDMASTERVORPILEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
|
||||
if (!sayIntro && who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Talk(SAY_INTRO);
|
||||
sayIntro = true;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_SHADOWBOLT:
|
||||
me->CastSpell(me, SPELL_SHADOWBOLT_VOLLEY, false);
|
||||
events.RepeatEvent(urand(15000, 30000));
|
||||
break;
|
||||
case EVENT_SPELL_BANISH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, false))
|
||||
me->CastSpell(target, SPELL_BANISH, false);
|
||||
events.RepeatEvent(16000);
|
||||
break;
|
||||
case EVENT_SUMMON_TRAVELER:
|
||||
spawnVoidTraveler();
|
||||
events.RepeatEvent(HealthBelowPct(20) ? 5000: 10000);
|
||||
break;
|
||||
case EVENT_SPELL_DRAWSHADOWS:
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* player = i->GetSource())
|
||||
if (player->IsAlive() && !player->HasAura(SPELL_BANISH))
|
||||
player->TeleportTo(me->GetMapId(), VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
|
||||
me->NearTeleportTo(VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0.0f);
|
||||
me->CastSpell(me, SPELL_DRAW_SHADOWS, true);
|
||||
me->CastSpell(me, SPELL_RAIN_OF_FIRE_N);
|
||||
|
||||
events.RepeatEvent(24000);
|
||||
events.DelayEvents(6000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class npc_voidtraveler : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_voidtraveler() : CreatureScript("npc_voidtraveler") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_voidtravelerAI (creature);
|
||||
}
|
||||
|
||||
struct npc_voidtravelerAI : public ScriptedAI
|
||||
{
|
||||
npc_voidtravelerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
VorpilGUID = 0;
|
||||
moveTimer = 1000;
|
||||
sacrificed = false;
|
||||
}
|
||||
|
||||
uint64 VorpilGUID;
|
||||
uint32 moveTimer;
|
||||
bool sacrificed;
|
||||
|
||||
void SetGUID(uint64 guid, int32)
|
||||
{
|
||||
VorpilGUID = guid;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
moveTimer += diff;
|
||||
if (moveTimer >= 1000)
|
||||
{
|
||||
moveTimer = 0;
|
||||
Creature* Vorpil = ObjectAccessor::GetCreature(*me, VorpilGUID);
|
||||
if (!Vorpil)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
me->GetMotionMaster()->MoveFollow(Vorpil, 0.0f, 0.0f);
|
||||
|
||||
if (sacrificed)
|
||||
{
|
||||
me->AddAura(DUNGEON_MODE(SPELL_EMPOWERING_SHADOWS_N, SPELL_EMPOWERING_SHADOWS_H), Vorpil);
|
||||
Vorpil->ModifyHealth(int32(Vorpil->CountPctFromMaxHealth(4)));
|
||||
me->CastSpell(me, SPELL_SHADOW_NOVA, true);
|
||||
Unit::Kill(me, me);
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->IsWithinDist(Vorpil, 3.0f))
|
||||
{
|
||||
me->CastSpell(me, SPELL_SACRIFICE, false);
|
||||
sacrificed = true;
|
||||
moveTimer = 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_grandmaster_vorpil()
|
||||
{
|
||||
new boss_grandmaster_vorpil();
|
||||
new npc_voidtraveler();
|
||||
}
|
||||
@@ -1,217 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "shadow_labyrinth.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
enum Murmur
|
||||
{
|
||||
EMOTE_SONIC_BOOM = 0,
|
||||
|
||||
SPELL_RESONANCE = 33657,
|
||||
SPELL_MAGNETIC_PULL = 33689,
|
||||
SPELL_SONIC_SHOCK = 38797,
|
||||
SPELL_THUNDERING_STORM = 39365,
|
||||
|
||||
SPELL_SONIC_BOOM_CAST_N = 33923,
|
||||
SPELL_SONIC_BOOM_CAST_H = 38796,
|
||||
SPELL_SONIC_BOOM_EFFECT_N = 38795,
|
||||
SPELL_SONIC_BOOM_EFFECT_H = 33666,
|
||||
SPELL_MURMURS_TOUCH_N = 33711,
|
||||
SPELL_MURMURS_TOUCH_H = 38794,
|
||||
|
||||
EVENT_SPELL_SONIC_BOOM = 1,
|
||||
EVENT_SPELL_SONIC_BOOM_EFFECT = 2,
|
||||
EVENT_SPELL_MURMURS_TOUCH = 3,
|
||||
EVENT_SPELL_RESONANCE = 4,
|
||||
EVENT_SPELL_MAGNETIC = 5,
|
||||
EVENT_SPELL_THUNDERING = 6,
|
||||
EVENT_SPELL_SONIC_SHOCK = 7
|
||||
};
|
||||
|
||||
class boss_murmur : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_murmur() : CreatureScript("boss_murmur") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_murmurAI (creature);
|
||||
}
|
||||
|
||||
struct boss_murmurAI : public ScriptedAI
|
||||
{
|
||||
boss_murmurAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
me->SetHealth(me->CountPctFromMaxHealth(40));
|
||||
me->ResetPlayerDamageReq();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MURMUREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SPELL_SONIC_BOOM, 30000);
|
||||
events.ScheduleEvent(EVENT_SPELL_MURMURS_TOUCH, urand(8000, 20000));
|
||||
events.ScheduleEvent(EVENT_SPELL_RESONANCE, 5000);
|
||||
events.ScheduleEvent(EVENT_SPELL_MAGNETIC, urand(15000, 30000));
|
||||
if (IsHeroic())
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SPELL_THUNDERING, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_SONIC_SHOCK, 10000);
|
||||
}
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MURMUREVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit*)
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_MURMUREVENT, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SPELL_SONIC_BOOM:
|
||||
Talk(EMOTE_SONIC_BOOM);
|
||||
me->CastSpell(me, DUNGEON_MODE(SPELL_SONIC_BOOM_CAST_N, SPELL_SONIC_BOOM_CAST_H), false);
|
||||
events.RepeatEvent(28500);
|
||||
events.DelayEvents(1500);
|
||||
events.ScheduleEvent(EVENT_SPELL_SONIC_BOOM_EFFECT, 0);
|
||||
return;
|
||||
case EVENT_SPELL_SONIC_BOOM_EFFECT:
|
||||
me->CastSpell(me, DUNGEON_MODE(SPELL_SONIC_BOOM_EFFECT_N, SPELL_SONIC_BOOM_EFFECT_H), true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SPELL_MURMURS_TOUCH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 80.0f, true))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_MURMURS_TOUCH_N, SPELL_MURMURS_TOUCH_H), false);
|
||||
events.RepeatEvent(urand(25000, 35000));
|
||||
break;
|
||||
case EVENT_SPELL_RESONANCE:
|
||||
if (!me->IsWithinMeleeRange(me->GetVictim()))
|
||||
me->CastSpell(me, SPELL_RESONANCE, false);
|
||||
events.RepeatEvent(5000);
|
||||
break;
|
||||
case EVENT_SPELL_MAGNETIC:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 80.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_MAGNETIC_PULL, false);
|
||||
events.RepeatEvent(urand(15000, 30000));
|
||||
return;
|
||||
}
|
||||
events.RepeatEvent(500);
|
||||
break;
|
||||
case EVENT_SPELL_THUNDERING:
|
||||
me->CastSpell(me, SPELL_THUNDERING_STORM, true);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_SPELL_SONIC_SHOCK:
|
||||
me->CastSpell(me->GetVictim(), SPELL_SONIC_SHOCK, false);
|
||||
events.RepeatEvent(urand(10000, 20000));
|
||||
break;
|
||||
}
|
||||
|
||||
if (!me->isAttackReady())
|
||||
return;
|
||||
|
||||
if (!me->IsWithinMeleeRange(me->GetVictim()))
|
||||
{
|
||||
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i)
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
|
||||
if (target->IsAlive() && me->IsWithinMeleeRange(target))
|
||||
{
|
||||
me->TauntApply(target);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_murmur_sonic_boom_effect : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_murmur_sonic_boom_effect() : SpellScriptLoader("spell_murmur_sonic_boom_effect") { }
|
||||
|
||||
class spell_murmur_sonic_boom_effect_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_murmur_sonic_boom_effect_SpellScript)
|
||||
|
||||
public:
|
||||
spell_murmur_sonic_boom_effect_SpellScript() : SpellScript() { }
|
||||
|
||||
void RecalculateDamage()
|
||||
{
|
||||
SetHitDamage(GetHitUnit()->CountPctFromMaxHealth(90));
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnHit += SpellHitFn(spell_murmur_sonic_boom_effect_SpellScript::RecalculateDamage);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_murmur_sonic_boom_effect_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_murmur_thundering_storm : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_murmur_thundering_storm() : SpellScriptLoader("spell_murmur_thundering_storm") { }
|
||||
|
||||
class spell_murmur_thundering_storm_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_murmur_thundering_storm_SpellScript);
|
||||
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(Trinity::AllWorldObjectsInExactRange(GetCaster(), 100.0f, true));
|
||||
targets.remove_if(Trinity::AllWorldObjectsInExactRange(GetCaster(), 25.0f, false));
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_murmur_thundering_storm_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_murmur_thundering_storm_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_murmur()
|
||||
{
|
||||
new boss_murmur();
|
||||
new spell_murmur_sonic_boom_effect();
|
||||
new spell_murmur_thundering_storm();
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "shadow_labyrinth.h"
|
||||
|
||||
class instance_shadow_labyrinth : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_shadow_labyrinth() : InstanceMapScript("instance_shadow_labyrinth", 555) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_shadow_labyrinth_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_shadow_labyrinth_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_shadow_labyrinth_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
uint64 m_uiHellmawGUID;
|
||||
uint64 m_uiRefectoryDoorGUID;
|
||||
uint64 m_uiScreamingHallDoorGUID;
|
||||
|
||||
uint32 m_uiFelOverseerCount;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
m_uiHellmawGUID = 0;
|
||||
m_uiRefectoryDoorGUID = 0;
|
||||
m_uiScreamingHallDoorGUID = 0;
|
||||
|
||||
m_uiFelOverseerCount = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case REFECTORY_DOOR:
|
||||
m_uiRefectoryDoorGUID = go->GetGUID();
|
||||
if (m_auiEncounter[DATA_BLACKHEARTTHEINCITEREVENT] == DONE)
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case SCREAMING_HALL_DOOR:
|
||||
m_uiScreamingHallDoorGUID = go->GetGUID();
|
||||
if (m_auiEncounter[DATA_GRANDMASTERVORPILEVENT] == DONE)
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_FEL_OVERSEER:
|
||||
if (creature->IsAlive())
|
||||
++m_uiFelOverseerCount;
|
||||
break;
|
||||
case NPC_HELLMAW:
|
||||
m_uiHellmawGUID = creature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 uiData)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case TYPE_OVERSEER:
|
||||
if (!--m_uiFelOverseerCount)
|
||||
{
|
||||
m_auiEncounter[type] = DONE;
|
||||
if (Creature* cr = instance->GetCreature(m_uiHellmawGUID))
|
||||
cr->AI()->DoAction(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case DATA_BLACKHEARTTHEINCITEREVENT:
|
||||
if (uiData == DONE)
|
||||
DoUseDoorOrButton(m_uiRefectoryDoorGUID);
|
||||
m_auiEncounter[type] = uiData;
|
||||
break;
|
||||
|
||||
case DATA_GRANDMASTERVORPILEVENT:
|
||||
if (uiData == DONE)
|
||||
DoUseDoorOrButton(m_uiScreamingHallDoorGUID);
|
||||
m_auiEncounter[type] = uiData;
|
||||
break;
|
||||
|
||||
case DATA_MURMUREVENT:
|
||||
case TYPE_HELLMAW:
|
||||
m_auiEncounter[type] = uiData;
|
||||
break;
|
||||
}
|
||||
|
||||
if (uiData == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == TYPE_OVERSEER)
|
||||
return m_auiEncounter[0];
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "S L " << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' '
|
||||
<< m_auiEncounter[2] << ' ' << m_auiEncounter[3] << ' ' << m_auiEncounter[4];
|
||||
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
if (dataHead1 == 'S' && dataHead2 == 'L')
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
{
|
||||
loadStream >> m_auiEncounter[i];
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
}
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_instance_shadow_labyrinth()
|
||||
{
|
||||
new instance_shadow_labyrinth();
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#ifndef DEF_SHADOW_LABYRINTH_H
|
||||
#define DEF_SHADOW_LABYRINTH_H
|
||||
|
||||
enum slData
|
||||
{
|
||||
TYPE_OVERSEER = 0,
|
||||
TYPE_HELLMAW = 1,
|
||||
DATA_BLACKHEARTTHEINCITEREVENT = 2,
|
||||
DATA_GRANDMASTERVORPILEVENT = 3,
|
||||
DATA_MURMUREVENT = 4,
|
||||
MAX_ENCOUNTER = 5
|
||||
};
|
||||
|
||||
enum slNPCandGO
|
||||
{
|
||||
NPC_FEL_OVERSEER = 18796,
|
||||
NPC_HELLMAW = 18731,
|
||||
|
||||
REFECTORY_DOOR = 183296, //door opened when blackheart the inciter dies
|
||||
SCREAMING_HALL_DOOR = 183295 //door opened when grandmaster vorpil dies
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user