21#define EMOTE_UNABLE_TO_SUMMON "%s is unable to summon Maiev Shadowsong and enter Phase 4. Resetting Encounter."
24#define CENTER_X 676.740f
25#define CENTER_Y 305.297f
26#define CENTER_Z 353.192f
265 {11463,
"Akama... your duplicity is hardly surprising. I should have slaughtered you and your malformed brethren long ago.",
ILLIDAN_STORMRAGE, 8000, 0,
true},
267 {11389,
"We've come to end your reign, Illidan. My people and all of Outland shall be free!",
AKAMA, 7000, 25,
true},
268 {0,
"",
AKAMA, 5000, 66,
true},
269 {11464,
"Boldly said. But I remain unconvinced.",
ILLIDAN_STORMRAGE, 8000, 396,
true},
270 {11380,
"The time has come! The moment is at hand!",
AKAMA, 3000, 22,
true},
271 {0,
"",
AKAMA, 2000, 15,
true},
273 {0,
"",
EMPTY, 1000, 0,
true},
274 {0,
"",
EMPTY, 0, 0,
false},
275 {11476,
"Is this it, mortals? Is this all the fury you can muster?",
ILLIDAN_STORMRAGE, 8000, 0,
true},
276 {11491,
"Their fury pales before mine, Illidan. We have some unsettled business between us.",
MAIEV_SHADOWSONG, 8000, 5,
true},
277 {11477,
"Maiev... How is this even possible?",
ILLIDAN_STORMRAGE, 5000, 1,
true},
278 {11492,
"Ah... my long hunt is finally over. Today, Justice will be done!",
MAIEV_SHADOWSONG, 8000, 15,
true},
279 {11470,
"Feel the hatred of ten thousand years!",
ILLIDAN_STORMRAGE, 1000, 0,
false},
280 {11496,
"Ahh... It is finished. You are beaten.",
MAIEV_SHADOWSONG, 6000, 0,
true},
282 {11478,
"You have won... Maiev...but the huntress... is nothing...without the hunt... you... are nothing... without me..",
ILLIDAN_STORMRAGE, 30000, 65,
true},
283 {11497,
"He is right. I feel nothing... I am nothing... Farewell, champions.",
MAIEV_SHADOWSONG, 9000, 0,
true},
285 {11498,
"",
EMPTY, 1000, 0,
true},
286 {11387,
"The Light will fill these dismal halls once again. I swear it.",
AKAMA, 8000, 0,
true},
287 {0,
"",
EMPTY, 1000, 0,
false}
297 {657.0f, 340.0f, 355.0f},
298 {657.0f, 275.0f, 355.0f},
299 {705.0f, 275.0f, 355.0f},
300 {705.0f, 340.0f, 355.0f}
305 {695.105f, 305.303f, 354.256f},
306 {659.338f, 305.303f, 354.256f},
307 {700.105f, 305.303f, 354.256f},
308 {664.338f, 305.303f, 354.256f}
313 {677.0f, 350.0f, 354.0f},
314 {677.0f, 260.0f, 354.0f}
319 {770.01f, 304.50f, 312.29f},
320 {780.66f, 304.50f, 319.74f},
321 {790.13f, 319.68f, 319.76f},
322 {787.17f, 347.38f, 341.42f},
323 {781.34f, 350.31f, 341.44f},
324 {762.60f, 361.06f, 353.60f},
325 {756.35f, 360.52f, 353.27f},
326 {743.82f, 342.21f, 353.00f},
327 {732.69f, 305.13f, 353.00f},
328 {738.11f, 365.44f, 353.00f},
329 {792.18f, 366.62f, 341.42f},
330 {796.84f, 304.89f, 319.76f},
331 {782.01f, 304.55f, 319.76f}
336 {755.5426f, 309.9156f, 312.2129f},
337 {755.5426f, 298.7923f, 312.0834f}
350 {0, 0, 3000, 1073741824, 21322, 6,
false},
386 me->AddThreat(target, 5000000.0f);
399 glaive->InterruptNonMeleeSpells(
true);
404 me->AddThreat(
me->GetVictim(), 5000000.0f);
479 for (uint8 i = 0; i < 2; ++i)
480 if (summon->GetGUID() == FlameGUID[i])
483 if (!FlameGUID[0] && !FlameGUID[1] && Phase != PHASE_ILLIDAN_NULL)
485 me->InterruptNonMeleeSpells(true);
486 EnterPhase(PHASE_FLIGHT_SEQUENCE);
498 me->SetInFront(
me->GetVictim());
550 if (damage >=
me->GetHealth() && done_by !=
me)
553 done_by->AddThreat(
me, -(3*(
float)damage)/4);
571 for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
573 if ((*itr)->getUnitGuid() == TargetGUID)
575 (*itr)->removeReference();
644 me->RemoveAllAuras();
645 me->InterruptNonMeleeSpells(
false);
647 me->GetMotionMaster()->Clear(
false);
655 me->RemoveAllAuras();
656 me->InterruptNonMeleeSpells(
false);
658 me->GetMotionMaster()->Clear(
false);
673 me->GetMotionMaster()->Clear();
682 if (maiev->IsAlive())
683 maiev->AI()->DoAction(NextPhase);
691 me->InterruptNonMeleeSpells(
false);
695 float distx, disty, dist[2];
696 for (
uint8 i = 0; i < 2; ++i)
700 dist[i] = distx * distx + disty * disty;
703 for (
uint8 i = 0; i < 2; ++i)
707 dist[i] = distx * distx + disty * disty;
711 final.x = 2 *
final.x - initial.
x;
712 final.y = 2 *
final.y - initial.
y;
731 for (
uint8 i = 0; i < 2; ++i)
737 flame->setFaction(
me->getFaction());
755 SF_LOG_ERROR(
"scripts",
"SD2 ERROR: Unable to summon Maiev Shadowsong (entry: 23197). Check your database to see if you have the proper SQL for Maiev Shadowsong (entry: 23197)");
759 void HandleTalkSequence();
767 me->SetDisableGravity(
true);
820 for (
uint8 i = 0; i < 2; ++i)
835 me->SetDisableGravity(
false);
838 for (
uint8 i = 0; i < 2; ++i)
843 glaive->DespawnOrUnsummon();
920 if (
Timer[i] <= diff)
925 else Timer[i] -= diff;
964 if (
me->IsNonMeleeSpellCasted(
false))
1071 me->GetMotionMaster()->Clear(
false);
1072 if (
me->GetVictim() && (!
me->IsWithinDistInMap(
me->GetVictim(), 50) || !
me->IsWithinLOSInMap(
me->GetVictim())))
1073 me->GetMotionMaster()->MoveChase(
me->GetVictim(), 30);
1075 me->GetMotionMaster()->MoveIdle();
1161 if (illidan->GetVictim() ==
me)
1162 damage =
me->CountPctFromMaxHealth(10);
1164 if (damage >=
me->GetHealth())
1179 if (
me->IsWithinDistInMap(illidan, 25))
1200 me->SetFullHealth();
1201 me->SetVisible(
true);
1204 me->InterruptNonMeleeSpells(
false);
1205 me->GetMotionMaster()->Clear(
false);
1233 me->InterruptNonMeleeSpells(
false);
1234 me->GetMotionMaster()->Clear(
false);
1245 if (!target || !
me->IsWithinDistInMap(target, 80) || illidan->IsWithinDistInMap(target, 20))
1247 uint8 pos = rand()%4;
1269 if (
Timer[i] <= diff)
1271 else Timer[i] -= diff;
1278 me->SetFullHealth();
1279 me->SetVisible(
true);
1303 if (!
me->IsWithinDistInMap(
me->GetVictim(), 40))
1304 me->GetMotionMaster()->MoveChase(
me->GetVictim(), 30);
1315 me->SetVisible(
false);
1371 for (
uint8 i = 0; i < 2; ++i)
1379 for (
uint8 i = 0; i < 2; ++i)
1406 me->setActive(
false);
1407 me->SetVisible(
false);
1413 me->RemoveAllAuras();
1414 me->DeleteThreatList();
1415 me->CombatStop(
true);
1430 if (damage >
me->GetHealth() || done_by->GetGUID() !=
IllidanGUID)
1437 std::vector<Unit*> eliteList;
1438 for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
1442 eliteList.push_back(unit);
1444 for (std::vector<Unit*>::const_iterator itr = eliteList.begin(); itr != eliteList.end(); ++itr)
1455 for (
uint8 i = 0; i < 2; ++i)
1460 me->SetInFront(illidan);
1461 illidan->SetInFront(
me);
1462 me->GetMotionMaster()->MoveIdle();
1463 illidan->GetMotionMaster()->MoveIdle();
1471 me->setActive(
true);
1477 gate->GetPosition(x, y, z);
1488 for (
uint8 i = 0; i < 2; ++i)
1491 Spirit->SetVisible(
false);
1544 me->AddThreat(illidan, 10000000.0f);
1545 me->GetMotionMaster()->MoveChase(illidan);
1551 Timer = std::rand() % 16000 + 10000;
1593 Unit* Spirit[2] = { NULL, NULL };
1599 if (!
Channel || !Spirit[0] || !Spirit[1])
1606 me->InterruptNonMeleeSpells(
true);
1621 me->InterruptNonMeleeSpells(
true);
1653 for (
uint8 i = 0; i < 2; ++i)
1678 if (!
me->IsVisible())
1683 me->SetVisible(
true);
1729 me->GetPosition(x, y, z);
1737 me->AddThreat(Elite, 1000000.0f);
1739 Timer = std::rand() % 16000 + 10000;
1741 if (illidan->HealthBelowPct(10))
1761 player->CLOSE_GOSSIP_MENU();
1795 if (!akama->IsAlive())
1798 akama->AI()->EnterEvadeMode();
1802 for (
uint8 i = 0; i < 2; ++i)
1822 me->SetDisableGravity(
false);
1823 me->setActive(
false);
1891 me->AddThreat(akama, 100.0f);
1902 maiev->SetVisible(
true);
1904 maiev->SetInFront(
me);
1905 me->SetInFront(maiev);
1906 maiev->GetMotionMaster()->MoveIdle();
1907 me->GetMotionMaster()->MoveIdle();
1915 maiev->AddThreat(
me, 10000000.0f);
1916 maiev->AI()->AttackStart(
me);
1927 if (!
me->IsWithinDistInMap(akama, 15))
1930 me->GetPosition(x, y, z);
1932 akama->GetMotionMaster()->Clear(
false);
1934 akama->SetPosition(x, y, z, 0.0f);
1935 akama->MonsterMoveWithSpeed(x, y, z, 0);
1936 akama->GetMotionMaster()->MoveChase(
me);
2047 player->GetPosition(x, y, z);
2094 me->AddThreat(
me->GetVictim(), 10000000.0f);
2099 if (
me->IsWithinDistInMap(
me->GetVictim(), 3))
2166 if (
me->isAttackReady() &&
me->IsWithinMeleeRange(
me->GetVictim()))
2175 me->AttackerStateUpdate(
me->GetVictim());
2176 me->resetAttackTimer();
2182 if (!
me->GetVictim())
2188 me->DespawnOrUnsummon();
2198 me->DespawnOrUnsummon();
#define SF_LOG_ERROR(filterType__,...)
@ TEMPSUMMON_CORPSE_DESPAWN
@ TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN
@ TEMPSUMMON_TIMED_DESPAWN
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
@ SPELL_SCHOOL_MASK_NORMAL
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_NOT_SELECTABLE
@ UNIT_FIELD_VIRTUAL_ITEM_ID
@ UNIT_FIELD_SHAPESHIFT_FORM
#define EMOTE_UNABLE_TO_SUMMON
@ EVENT_MAIEV_SHADOW_STRIKE
@ EVENT_MAIEV_THROW_DAGGER
static const Locations AkamaWP[13]
static const Locations EyeBlast[2]
@ EQUIP_ID_MAIN_HAND_MAIEV
static const Locations SpiritSpawns[2]
static const Yells Conversation[22]
@ SPELL_FLAME_CRASH_EFFECT
@ SPELL_SHADOWFIEND_PASSIVE
@ SPELL_SUMMON_PARASITICS
@ SPELL_FLAME_BURST_EFFECT
@ SPELL_DEATHSWORN_DOOR_CHANNEL
@ SPELL_AKAMA_DOOR_CHANNEL
@ SPELL_SHADOW_DEMON_PASSIVE
@ SPELL_DEMON_TRANSFORM_1
@ SPELL_DEMON_TRANSFORM_2
@ SPELL_EYE_BLAST_TRIGGER
@ SPELL_PARASITIC_SHADOWFIEND
@ SPELL_PARASITIC_SHADOWFIEND2
@ SPELL_SUMMON_SHADOWDEMON
@ SPELL_DEMON_TRANSFORM_3
@ PHASE_TRANSFORM_SEQUENCE
static const Animation DemonTransformation[10]
@ SAY_ILLIDAN_SUMMONFLAMES
@ SAY_MAIEV_SHADOWSONG_TAUNT
static const Locations GlaivePosition[4]
void AddSC_boss_illidan()
@ EVENT_TRANSFORM_SEQUENCE
@ EVENT_PARASITIC_SHADOWFIEND
static const EventIllidan MaxTimer[9]
static const Locations HoverPosition[4]
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
virtual void EnterEvadeMode()
void SetDisplayId(uint32 modelId) OVERRIDE
Unit * SelectNearestTarget(float dist=0, bool playerOnly=false) const
void setDeathState(DeathState s) OVERRIDE
bool IsInEvadeMode() const
CreatureScript(const char *name)
GameObjectScript(const char *name)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
NullCreatureAI(Creature *c)
static Creature * GetCreature(WorldObject const &u, uint64 guid)
static GameObject * GetGameObject(WorldObject const &u, uint64 guid)
void SetFlag(uint16 index, uint32 newFlag)
std::list< HostileReference * > StorageType
virtual void DoAction(int32)
void DoMeleeAttackIfReady()
void DoCast(uint32 spellId)
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
void DoCastVictim(uint32 spellId, bool triggered=false)
virtual void AttackStart(Unit *)
void setFaction(uint32 faction)
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
MotionMaster * GetMotionMaster()
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
static Creature * GetCreature(WorldObject &object, uint64 guid)
bool HealthBelowPct(int32 pct) const
static Unit * GetUnit(WorldObject &object, uint64 guid)
bool SetWalk(bool enable)
virtual void SetDisplayId(uint32 modelId)
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
void HandleEmoteCommand(uint32 anim_id)
InstanceScript * GetInstanceScript()
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
void MonsterYell(const char *text, Language language, WorldObject const *target)
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
npc_parasitic_shadowfiend()
CreatureAI * GetAI(Creature *creature) const OVERRIDE
void GetPosition(float &x, float &y) const
void SetEquipmentSlots(bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
void DoTeleportTo(float x, float y, float z, uint32 time=0)
bool HealthBelowPct(uint32 pct) const
void AttackStartNoMove(Unit *target)
ScriptedAI(Creature *creature)
void DoPlaySoundToSet(WorldObject *source, uint32 soundId)
void AttackStart(Unit *) OVERRIDE
void DeleteFromThreatList(uint64 TargetGUID)
void HandleTalkSequence()
void MovementInform(uint32, uint32) OVERRIDE
InstanceScript * instance
void EnterCombat(Unit *) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void JustSummoned(Creature *summon) OVERRIDE
void HandleFlightSequence()
void SpellHit(Unit *, const SpellInfo *spell) OVERRIDE
void MoveInLineOfSight(Unit *) OVERRIDE
void SummonFlamesOfAzzinoth()
void EnterPhase(PhaseIllidan NextPhase)
uint32 Timer[EVENT_ENRAGE+1]
void AttackStart(Unit *who) OVERRIDE
void SummonedCreatureDespawn(Creature *summon) OVERRIDE
void KilledUnit(Unit *victim) OVERRIDE
void JustDied(Unit *) OVERRIDE
void HandleTransformSequence()
boss_illidan_stormrageAI(Creature *creature)
void DamageTaken(Unit *done_by, uint32 &damage) OVERRIDE
void AttackStart(Unit *who) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void EnterPhase(PhaseIllidan NextPhase)
void DamageTaken(Unit *done_by, uint32 &damage) OVERRIDE
void GetIllidanGUID(uint64 guid)
boss_maievAI(Creature *creature)
void DoAction(int32 param) OVERRIDE
void EnterEvadeMode() OVERRIDE
void MoveInLineOfSight(Unit *) OVERRIDE
void BlinkTo(float x, float y, float z)
void EnterCombat(Unit *) OVERRIDE
void EnterPhase(PhaseAkama NextPhase)
void HandleChannelSequence()
InstanceScript * instance
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void HandleWalkSequence()
void DamageTaken(Unit *done_by, uint32 &damage) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
npc_akama_illidanAI(Creature *creature)
void MoveInLineOfSight(Unit *) OVERRIDE
void EnterEvadeMode() OVERRIDE
void HandleTalkSequence()
void sGossipSelect(Player *player, uint32, uint32) OVERRIDE
void MovementInform(uint32 MovementType, uint32) OVERRIDE
void SpellHit(Unit *, const SpellInfo *spell) OVERRIDE
blade_of_azzinothAI(Creature *creature)
cage_trap_triggerAI(Creature *creature)
void MoveInLineOfSight(Unit *who) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
flame_of_azzinothAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void EnterCombat(Unit *) OVERRIDE
void SetGlaiveGUID(uint64 guid)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_parasitic_shadowfiendAI(Creature *creature)
void DoMeleeAttackIfReady()
InstanceScript * instance
void EnterCombat(Unit *) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
void JustDied(Unit *) OVERRIDE
shadow_demonAI(Creature *creature)