Merge pull request #3467 from Studioworks/master

Core: Style cleanup in boss_illidan.cpp
This commit is contained in:
megamage
2011-10-13 13:53:00 -07:00
@@ -66,69 +66,71 @@ const char* SAY_KILL2 = "This is too easy!";
#define SAY_ENRAGE "You've wasted too much time mortals, now you shall fall!" #define SAY_ENRAGE "You've wasted too much time mortals, now you shall fall!"
#define SOUND_ENRAGE 11474 #define SOUND_ENRAGE 11474
/************** Spells *************/ enum Spells
// Normal Form // Normal Form
#define SPELL_SHEAR 37335 // 41032 is bugged, cannot be block/dodge/parry// Reduces Max. Health by 60% for 7 seconds. Can stack 19 times. 1.5f second cast {
#define SPELL_FLAME_CRASH 40832 // Summons an invis/unselect passive mob that has an aura of flame in a circle around him. SPELL_SHEAR = 37335, // 41032 is bugged, cannot be block/dodge/parry// Reduces Max. Health by 60% for 7 seconds. Can stack 19 times. 1.5f second cast
#define SPELL_DRAW_SOUL 40904 // 5k Shadow Damage in front of him. Heals Illidan for 100k health (script effect) SPELL_FLAME_CRASH = 40832,
#define SPELL_PARASITIC_SHADOWFIEND 41917 // DoT of 3k Shadow every 2 seconds. Lasts 10 seconds. (Script effect: Summon 2 parasites once the debuff has ticked off) SPELL_DRAW_SOUL = 40904,
#define SPELL_PARASITIC_SHADOWFIEND2 41914 // Used by Parasitic SPELL_PARASITIC_SHADOWFIEND = 41917,
#define SPELL_SUMMON_PARASITICS 41915 // Summons 2 Parasitic Shadowfiends on the target. It's supposed to be cast as soon as the Parasitic Shadowfiend debuff is gone, but the spells aren't linked :( SPELL_PARASITIC_SHADOWFIEND2 = 41914,
#define SPELL_AGONIZING_FLAMES 40932 // 4k fire damage initial to target and anyone w/i 5 yards. PHASE 3 ONLY SPELL_SUMMON_PARASITICS = 41915,
#define SPELL_ENRAGE 40683 // Increases damage by 50% and attack speed by 30%. 20 seconds, PHASE 5 ONLY SPELL_AGONIZING_FLAMES = 40932,
SPELL_ENRAGE = 40683,
// Flying (Phase 2) // Flying (Phase 2)
#define SPELL_THROW_GLAIVE 39635 // Throws a glaive on the ground SPELL_THROW_GLAIVE = 39635,
#define SPELL_THROW_GLAIVE2 39849 // Animation for the above spell SPELL_THROW_GLAIVE2 = 39849, // Animation for the spell above
#define SPELL_GLAIVE_RETURNS 39873 // Glaive flies back to Illidan SPELL_GLAIVE_RETURNS = 39873,
#define SPELL_FIREBALL 40598 // 2.5fk-3.5fk damage in 10 yard radius. 2 second cast time. SPELL_FIREBALL = 40598,
#define SPELL_DARK_BARRAGE 40585 // 10 second channeled spell, 3k shadow damage per second. SPELL_DARK_BARRAGE = 40585,
// Demon Form // Demon Form
#define SPELL_DEMON_TRANSFORM_1 40511 // First phase of animations for transforming into Dark Illidan (fall to ground) SPELL_DEMON_TRANSFORM_1 = 40511,
#define SPELL_DEMON_TRANSFORM_2 40398 // Second phase of animations (kneel) SPELL_DEMON_TRANSFORM_2 = 40398,
#define SPELL_DEMON_TRANSFORM_3 40510 // Final phase of animations (stand up and roar) SPELL_DEMON_TRANSFORM_3 = 40510,
#define SPELL_DEMON_FORM 40506 // Transforms into Demon Illidan. Has an Aura of Dread on him. SPELL_DEMON_FORM = 40506,
#define SPELL_SHADOW_BLAST 41078 // 8k - 11k Shadow Damage. Targets highest threat. Has a splash effect, damaging anyone in 20 yards of the target. SPELL_SHADOW_BLAST = 41078,
#define SPELL_FLAME_BURST 41126 // Hurls fire at entire raid for ~3.5fk damage every 10 seconds. Resistable. (Does not work: Script effect) SPELL_FLAME_BURST = 41126,
#define SPELL_FLAME_BURST_EFFECT 41131 // The actual damage. Have each player cast it on itself (workaround) SPELL_FLAME_BURST_EFFECT = 41131, // The actual damage. Have each player cast it on itself (workaround)
// Other Illidan spells // Other Illidan spells
#define SPELL_KNEEL 39656 // Before beginning encounter, this is how he appears (talking to skully). SPELL_KNEEL = 39656, // Before beginning encounter, this is how he appears (talking to skully).
#define SPELL_SHADOW_PRISON 40647 // Illidan casts this spell to immobilize entire raid when he summons Maiev. SPELL_SHADOW_PRISON = 40647,
#define SPELL_DEATH 41220 // This spell doesn't do anything except stun Illidan and set him on his knees. SPELL_DEATH = 41220,
#define SPELL_BERSERK 45078 // Damage increased by 500%, attack speed by 150% SPELL_BERSERK = 45078,
#define SPELL_DUAL_WIELD 42459 SPELL_DUAL_WIELD = 42459,
//Phase Normal spells // Phase Normal spells
#define SPELL_FLAME_CRASH_EFFECT 40836 // Firey blue ring of circle that the other flame crash summons SPELL_FLAME_CRASH_EFFECT = 40836,
#define SPELL_SUMMON_SHADOWDEMON 41117 // Summon four shadowfiends SPELL_SUMMON_SHADOWDEMON = 41117,
#define SPELL_SHADOWFIEND_PASSIVE 41913 // Passive aura for shadowfiends SPELL_SHADOWFIEND_PASSIVE = 41913,
#define SPELL_SHADOW_DEMON_PASSIVE 41079 // Adds the "shadowform" aura to Shadow Demons. SPELL_SHADOW_DEMON_PASSIVE = 41079,
#define SPELL_CONSUME_SOUL 41080 // Once the Shadow Demons reach their target, they use this to kill them SPELL_CONSUME_SOUL = 41080,
#define SPELL_PARALYZE 41083 // Shadow Demons cast this on their target SPELL_PARALYZE = 41083,
#define SPELL_PURPLE_BEAM 39123 // Purple Beam connecting Shadow Demon to their target SPELL_PURPLE_BEAM = 39123,
//Phase Flight spells // Phase Flight spells
#define SPELL_AZZINOTH_CHANNEL 39857 // Glaives cast it on Flames. Not sure if this is the right spell. SPELL_AZZINOTH_CHANNEL = 39857, // Glaives cast it on Flames. Not sure if this is the right spell.
#define SPELL_EYE_BLAST_TRIGGER 40017 // This summons Demon Form every few seconds and deals ~20k damage in its radius SPELL_EYE_BLAST_TRIGGER = 40017,
#define SPELL_EYE_BLAST 39908 // This does the blue flamey animation. SPELL_EYE_BLAST = 39908,
#define SPELL_BLAZE_EFFECT 40610 // Green flame on the ground, triggers damage (5k) every few seconds SPELL_BLAZE_EFFECT = 40610,
#define SPELL_BLAZE_SUMMON 40637 // Summons the Blaze creature SPELL_BLAZE_SUMMON = 40637,
#define SPELL_DEMON_FIRE 40029 // Blue fire trail left by Eye Blast. Deals 2k per second if players stand on it. SPELL_DEMON_FIRE = 40029,
#define SPELL_FLAME_BLAST 40631 // Flames of Azzinoth use this. Frontal cone AoE 7k-9k damage. SPELL_FLAME_BLAST = 40631,
#define SPELL_CHARGE 41581 //40602 // Flames of Azzinoth charges whoever is too far from them. They enrage after this. For simplicity, we'll use the same enrage as Illidan. SPELL_CHARGE = 41581,
#define SPELL_FLAME_ENRAGE 45078 SPELL_FLAME_ENRAGE = 45078,
//Akama spells // Akama spells
#define SPELL_AKAMA_DOOR_CHANNEL 41268 // Akama's channel spell on the door before the Temple Summit SPELL_AKAMA_DOOR_CHANNEL = 41268,
#define SPELL_DEATHSWORN_DOOR_CHANNEL 41269 // Olum and Udalo's channel spell on the door before the Temple Summit SPELL_DEATHSWORN_DOOR_CHANNEL = 41269,
#define SPELL_AKAMA_DOOR_FAIL 41271 // Not sure where this is really used... SPELL_AKAMA_DOOR_FAIL = 41271, // Not sure where this is really used...
#define SPELL_HEALING_POTION 40535 // Akama uses this to heal himself to full. SPELL_HEALING_POTION = 40535,
#define SPELL_CHAIN_LIGHTNING 40536 // 6938 to 8062 for 5 targets SPELL_CHAIN_LIGHTNING = 40536,
//Maiev spells // Maiev spells
#define SPELL_CAGE_TRAP_DUMMY 40761 // Put this in DB for cage trap GO. SPELL_CAGE_TRAP_DUMMY = 40761, // Put this in DB for cage trap GO.
#define SPELL_CAGED 40695 // Caged Trap triggers will cast this on Illidan if he is within 3 yards SPELL_CAGED = 40695,
#define SPELL_CAGE_TRAP_SUMMON 40694 // Summons a Cage Trap GO (bugged) on the ground along with a Cage Trap Disturb Trigger mob (working) SPELL_CAGE_TRAP_SUMMON = 40694, // Summons a Cage Trap GO (bugged) on the ground along with a Cage Trap Disturb Trigger mob (working)
#define SPELL_CAGE_TRAP_BEAM 40713 // 8 Triggers on the ground in an octagon cast spells like this on Illidan 'caging him' SPELL_CAGE_TRAP_BEAM = 40713,
#define SPELL_TELEPORT_VISUAL 41232 // Teleport visual for Maiev SPELL_TELEPORT_VISUAL = 41232,
#define SPELL_SHADOW_STRIKE 40685 // 4375 to 5625 every 3 seconds for 12 seconds SPELL_SHADOW_STRIKE = 40685,
#define SPELL_THROW_DAGGER 41152 // 5400 to 6600 damage, need dagger SPELL_THROW_DAGGER = 41152,
#define SPELL_FAN_BLADES 39954 // bugged visual SPELL_FAN_BLADES = 39954, // bugged visual
};
// Other defines // Other defines
#define CENTER_X 676.740f #define CENTER_X 676.740f
@@ -174,7 +176,7 @@ enum PhaseIllidan
PHASE_FLIGHT_SEQUENCE = 7, PHASE_FLIGHT_SEQUENCE = 7,
PHASE_TRANSFORM_SEQUENCE = 8, PHASE_TRANSFORM_SEQUENCE = 8,
PHASE_ILLIDAN_MAX = 9, PHASE_ILLIDAN_MAX = 9,
};//Maiev uses the same phase }; // Maiev uses the same phase
enum PhaseAkama enum PhaseAkama
{ {
@@ -191,7 +193,7 @@ enum EventIllidan
{ {
EVENT_NULL = 0, EVENT_NULL = 0,
EVENT_BERSERK = 1, EVENT_BERSERK = 1,
//normal phase // normal phase
EVENT_TAUNT = 2, EVENT_TAUNT = 2,
EVENT_SHEAR = 3, EVENT_SHEAR = 3,
EVENT_FLAME_CRASH = 4, EVENT_FLAME_CRASH = 4,
@@ -201,17 +203,17 @@ enum EventIllidan
EVENT_AGONIZING_FLAMES = 8, EVENT_AGONIZING_FLAMES = 8,
EVENT_TRANSFORM_NORMAL = 9, EVENT_TRANSFORM_NORMAL = 9,
EVENT_ENRAGE = 10, EVENT_ENRAGE = 10,
//flight phase // flight phase
EVENT_FIREBALL = 2, EVENT_FIREBALL = 2,
EVENT_DARK_BARRAGE = 3, EVENT_DARK_BARRAGE = 3,
EVENT_EYE_BLAST = 4, EVENT_EYE_BLAST = 4,
EVENT_MOVE_POINT = 5, EVENT_MOVE_POINT = 5,
//demon phase // demon phase
EVENT_SHADOW_BLAST = 2, EVENT_SHADOW_BLAST = 2,
EVENT_FLAME_BURST = 3, EVENT_FLAME_BURST = 3,
EVENT_SHADOWDEMON = 4, EVENT_SHADOWDEMON = 4,
EVENT_TRANSFORM_DEMON = 5, EVENT_TRANSFORM_DEMON = 5,
//sequence phase // sequence phase
EVENT_TALK_SEQUENCE = 2, EVENT_TALK_SEQUENCE = 2,
EVENT_FLIGHT_SEQUENCE = 2, EVENT_FLIGHT_SEQUENCE = 2,
EVENT_TRANSFORM_SEQUENCE = 2, EVENT_TRANSFORM_SEQUENCE = 2,
@@ -249,6 +251,7 @@ struct Yells
}; };
static const Yells Conversation[22] = static const Yells Conversation[22] =
{ {
{11463, "Akama... your duplicity is hardly surprising. I should have slaughtered you and your malformed brethren long ago.", ILLIDAN_STORMRAGE, 8000, 0, true}, {11463, "Akama... your duplicity is hardly surprising. I should have slaughtered you and your malformed brethren long ago.", ILLIDAN_STORMRAGE, 8000, 0, true},
{0, "", ILLIDAN_STORMRAGE, 5000, 396, true}, {0, "", ILLIDAN_STORMRAGE, 5000, 396, true},
@@ -259,19 +262,20 @@ static const Yells Conversation[22] =
{0, "", AKAMA, 2000, 15, true}, {0, "", AKAMA, 2000, 15, true},
{11466, "You are not prepared!", ILLIDAN_STORMRAGE, 3000, 406, true}, {11466, "You are not prepared!", ILLIDAN_STORMRAGE, 3000, 406, true},
{0, "", EMPTY, 1000, 0, true}, {0, "", EMPTY, 1000, 0, true},
{0, "", EMPTY, 0, 0, false}, //9 {0, "", EMPTY, 0, 0, false}, // 9
{11476, "Is this it, mortals? Is this all the fury you can muster?", ILLIDAN_STORMRAGE, 8000, 0, true}, {11476, "Is this it, mortals? Is this all the fury you can muster?", ILLIDAN_STORMRAGE, 8000, 0, true},
{11491, "Their fury pales before mine, Illidan. We have some unsettled business between us.", MAIEV_SHADOWSONG, 8000, 5, true}, {11491, "Their fury pales before mine, Illidan. We have some unsettled business between us.", MAIEV_SHADOWSONG, 8000, 5, true},
{11477, "Maiev... How is this even possible?", ILLIDAN_STORMRAGE, 5000, 1, true}, {11477, "Maiev... How is this even possible?", ILLIDAN_STORMRAGE, 5000, 1, true},
{11492, "Ah... my long hunt is finally over. Today, Justice will be done!", MAIEV_SHADOWSONG, 8000, 15, true}, {11492, "Ah... my long hunt is finally over. Today, Justice will be done!", MAIEV_SHADOWSONG, 8000, 15, true},
{11470, "Feel the hatred of ten thousand years!", ILLIDAN_STORMRAGE, 1000, 0, false}, //14 {11470, "Feel the hatred of ten thousand years!", ILLIDAN_STORMRAGE, 1000, 0, false}, // 14
{11496, "Ahh... It is finished. You are beaten.", MAIEV_SHADOWSONG, 6000, 0, true}, //15 {11496, "Ahh... It is finished. You are beaten.", MAIEV_SHADOWSONG, 6000, 0, true}, // 15
{11478, "You have won... Maiev...but the huntress... is nothing...without the hunt... you... are nothing... without me..", ILLIDAN_STORMRAGE, 30000, 65, true}, // Emote dead for now. Kill him later {11478, "You have won... Maiev...but the huntress... is nothing...without the hunt... you... are nothing... without me..", ILLIDAN_STORMRAGE, 30000, 65, true}, // Emote dead for now. Kill him later
{11497, "He is right. I feel nothing... I am nothing... Farewell, champions.", MAIEV_SHADOWSONG, 9000, 0, true}, {11497, "He is right. I feel nothing... I am nothing... Farewell, champions.", MAIEV_SHADOWSONG, 9000, 0, true},
{11498, "", MAIEV_SHADOWSONG, 5000, 0, true}, {11498, "", MAIEV_SHADOWSONG, 5000, 0, true},
{11498, "", EMPTY, 1000, 0, true}, //19 Maiev disappear {11498, "", EMPTY, 1000, 0, true}, // 19 Maiev disappear
{11387, "The Light will fill these dismal halls once again. I swear it.", AKAMA, 8000, 0, true}, {11387, "The Light will fill these dismal halls once again. I swear it.", AKAMA, 8000, 0, true},
{0, "", EMPTY, 1000, 0, false}//21 {0, "", EMPTY, 1000, 0, false} // 21
}; };
static const Yells RandomTaunts[4]= static const Yells RandomTaunts[4]=
@@ -306,14 +310,14 @@ static const Locations HoverPosition[4]=
static const Locations GlaivePosition[4]= static const Locations GlaivePosition[4]=
{ {
{695.105f, 305.303f, 354.256f}, {695.105f, 305.303f, 354.256f},
{659.338f, 305.303f, 354.256f}, //the distance between two glaives is 36 {659.338f, 305.303f, 354.256f}, // the distance between two glaives is 36
{700.105f, 305.303f, 354.256f}, {700.105f, 305.303f, 354.256f},
{664.338f, 305.303f, 354.256f} {664.338f, 305.303f, 354.256f}
}; };
static const Locations EyeBlast[2]= static const Locations EyeBlast[2]=
{ {
{677.0f, 350.0f, 354.0f}, //start point, pass through glaive point {677.0f, 350.0f, 354.0f}, // start point, pass through glaive point
{677.0f, 260.0f, 354.0f} {677.0f, 260.0f, 354.0f}
}; };
@@ -350,7 +354,7 @@ static const Animation DemonTransformation[10]=
{ {
{SPELL_DEMON_TRANSFORM_1, 0, 1000, 0, 0, 6, true}, {SPELL_DEMON_TRANSFORM_1, 0, 1000, 0, 0, 6, true},
{SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, 6, true}, {SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, 6, true},
{0, 0, 3000, 1073741824, 21322, 6, false}, //stunned, cannot cast demon form {0, 0, 3000, 1073741824, 21322, 6, false}, // stunned, cannot cast demon form
{SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, 6, false}, {SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, 6, false},
{SPELL_DEMON_FORM, SPELL_DEMON_TRANSFORM_3, 0, 0, 0, 4, false}, {SPELL_DEMON_FORM, SPELL_DEMON_TRANSFORM_3, 0, 0, 0, 4, false},
{SPELL_DEMON_TRANSFORM_1, 0, 1000, 0, 0, 6, false}, {SPELL_DEMON_TRANSFORM_1, 0, 1000, 0, 0, 6, false},
@@ -435,10 +439,10 @@ public:
if (FlameBlastTimer <= diff) if (FlameBlastTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_BLAZE_SUMMON, true); //appear at victim DoCast(me->getVictim(), SPELL_BLAZE_SUMMON, true); // appear at victim
DoCast(me->getVictim(), SPELL_FLAME_BLAST); DoCast(me->getVictim(), SPELL_FLAME_BLAST);
FlameBlastTimer = 15000; //10000 is official-like? FlameBlastTimer = 15000; // 10000 is official-like?
DoZoneInCombat(); //in case someone is revived DoZoneInCombat(); // in case someone is revived
} else FlameBlastTimer -= diff; } else FlameBlastTimer -= diff;
if (CheckTimer <= diff) if (CheckTimer <= diff)
@@ -515,7 +519,7 @@ public:
void MovementInform(uint32 /*MovementType*/, uint32 /*Data*/) void MovementInform(uint32 /*MovementType*/, uint32 /*Data*/)
{ {
if (FlightCount == 7) //change hover point if (FlightCount == 7) // change hover point
{ {
if (me->getVictim()) if (me->getVictim())
{ {
@@ -678,7 +682,7 @@ public:
me->AttackStop(); me->AttackStop();
break; break;
case PHASE_FLIGHT_SEQUENCE: case PHASE_FLIGHT_SEQUENCE:
if (Phase == PHASE_NORMAL) //lift off if (Phase == PHASE_NORMAL) // lift off
{ {
FlightCount = 1; FlightCount = 1;
Timer[EVENT_FLIGHT_SEQUENCE] = 1; Timer[EVENT_FLIGHT_SEQUENCE] = 1;
@@ -688,7 +692,7 @@ public:
me->GetMotionMaster()->Clear(false); me->GetMotionMaster()->Clear(false);
me->AttackStop(); me->AttackStop();
} }
else //land else // land
Timer[EVENT_FLIGHT_SEQUENCE] = 2000; Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
break; break;
case PHASE_TRANSFORM_SEQUENCE: case PHASE_TRANSFORM_SEQUENCE:
@@ -749,7 +753,7 @@ public:
Trigger->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); Trigger->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
Trigger->GetMotionMaster()->MovePoint(0, final.x, final.y, final.z); Trigger->GetMotionMaster()->MovePoint(0, final.x, final.y, final.z);
//Trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); // Trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetTarget(Trigger->GetGUID()); me->SetTarget(Trigger->GetGUID());
DoCast(Trigger, SPELL_EYE_BLAST); DoCast(Trigger, SPELL_EYE_BLAST);
} }
@@ -792,7 +796,7 @@ public:
{ {
switch (FlightCount) switch (FlightCount)
{ {
case 1://lift off case 1: // lift off
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
me->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING); me->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
me->StopMoving(); me->StopMoving();
@@ -800,11 +804,11 @@ public:
DoPlaySoundToSet(me, SOUND_TAKEOFF); DoPlaySoundToSet(me, SOUND_TAKEOFF);
Timer[EVENT_FLIGHT_SEQUENCE] = 3000; Timer[EVENT_FLIGHT_SEQUENCE] = 3000;
break; break;
case 2://move to center case 2: // move to center
me->GetMotionMaster()->MovePoint(0, CENTER_X + 5, CENTER_Y, CENTER_Z); //+5, for SPELL_THROW_GLAIVE bug me->GetMotionMaster()->MovePoint(0, CENTER_X + 5, CENTER_Y, CENTER_Z); // +5, for SPELL_THROW_GLAIVE bug
Timer[EVENT_FLIGHT_SEQUENCE] = 0; Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break; break;
case 3://throw one glaive case 3: // throw one glaive
{ {
uint8 i=1; uint8 i=1;
Creature* Glaive = me->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); Creature* Glaive = me->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
@@ -819,7 +823,7 @@ public:
} }
Timer[EVENT_FLIGHT_SEQUENCE] = 700; Timer[EVENT_FLIGHT_SEQUENCE] = 700;
break; break;
case 4://throw another case 4: // throw another
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
{ {
uint8 i=0; uint8 i=0;
@@ -835,19 +839,19 @@ public:
} }
Timer[EVENT_FLIGHT_SEQUENCE] = 5000; Timer[EVENT_FLIGHT_SEQUENCE] = 5000;
break; break;
case 5://summon flames case 5: // summon flames
SummonFlamesOfAzzinoth(); SummonFlamesOfAzzinoth();
Timer[EVENT_FLIGHT_SEQUENCE] = 3000; Timer[EVENT_FLIGHT_SEQUENCE] = 3000;
break; break;
case 6://fly to hover point case 6: // fly to hover point
me->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z); me->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z);
Timer[EVENT_FLIGHT_SEQUENCE] = 0; Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break; break;
case 7://return to center case 7: // return to center
me->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z); me->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z);
Timer[EVENT_FLIGHT_SEQUENCE] = 0; Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break; break;
case 8://glaive return case 8: // glaive return
for (uint8 i = 0; i < 2; ++i) for (uint8 i = 0; i < 2; ++i)
{ {
if (GlaiveGUID[i]) if (GlaiveGUID[i])
@@ -862,7 +866,7 @@ public:
} }
Timer[EVENT_FLIGHT_SEQUENCE] = 2000; Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
break; break;
case 9://land case 9: // land
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->StopMoving(); me->StopMoving();
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND); me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
@@ -880,7 +884,7 @@ public:
} }
Timer[EVENT_FLIGHT_SEQUENCE] = 2000; Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
break; break;
case 10://attack case 10: // attack
DoResetThreat(); DoResetThreat();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
@@ -1001,12 +1005,12 @@ public:
{ {
switch (Event) switch (Event)
{ {
//PHASE_NORMAL // PHASE_NORMAL
case EVENT_BERSERK: case EVENT_BERSERK:
me->MonsterYell(SAY_ENRAGE, LANG_UNIVERSAL, 0); me->MonsterYell(SAY_ENRAGE, LANG_UNIVERSAL, 0);
DoPlaySoundToSet(me, SOUND_ENRAGE); DoPlaySoundToSet(me, SOUND_ENRAGE);
DoCast(me, SPELL_BERSERK, true); DoCast(me, SPELL_BERSERK, true);
Timer[EVENT_BERSERK] = 5000;//The buff actually lasts forever. Timer[EVENT_BERSERK] = 5000; // The buff actually lasts forever.
break; break;
case EVENT_TAUNT: case EVENT_TAUNT:
@@ -1023,7 +1027,7 @@ public:
case EVENT_SHEAR: case EVENT_SHEAR:
// no longer exists in 3.0f.2 // no longer exists in 3.0f.2
//DoCast(me->getVictim(), SPELL_SHEAR); // DoCast(me->getVictim(), SPELL_SHEAR);
Timer[EVENT_SHEAR] = 25000 + (rand()%16 * 1000); Timer[EVENT_SHEAR] = 25000 + (rand()%16 * 1000);
break; break;
@@ -1049,7 +1053,7 @@ public:
Timer[EVENT_DRAW_SOUL] = 50000 + rand()%10000; Timer[EVENT_DRAW_SOUL] = 50000 + rand()%10000;
break; break;
//PHASE_NORMAL_2 // PHASE_NORMAL_2
case EVENT_AGONIZING_FLAMES: case EVENT_AGONIZING_FLAMES:
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_AGONIZING_FLAMES); DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_AGONIZING_FLAMES);
Timer[EVENT_AGONIZING_FLAMES] = 0; Timer[EVENT_AGONIZING_FLAMES] = 0;
@@ -1059,7 +1063,7 @@ public:
EnterPhase(PHASE_TRANSFORM_SEQUENCE); EnterPhase(PHASE_TRANSFORM_SEQUENCE);
break; break;
//PHASE_NORMAL_MAIEV // PHASE_NORMAL_MAIEV
case EVENT_ENRAGE: case EVENT_ENRAGE:
DoCast(me, SPELL_ENRAGE); DoCast(me, SPELL_ENRAGE);
Timer[EVENT_ENRAGE] = 0; Timer[EVENT_ENRAGE] = 0;
@@ -1092,7 +1096,7 @@ public:
case EVENT_MOVE_POINT: case EVENT_MOVE_POINT:
Phase = PHASE_FLIGHT_SEQUENCE; Phase = PHASE_FLIGHT_SEQUENCE;
Timer[EVENT_FLIGHT_SEQUENCE] = 0;//do not start Event when changing hover point Timer[EVENT_FLIGHT_SEQUENCE] = 0; // do not start Event when changing hover point
HoverPoint += (rand()%3 + 1); HoverPoint += (rand()%3 + 1);
if (HoverPoint > 3) if (HoverPoint > 3)
HoverPoint -= 4; HoverPoint -= 4;
@@ -1204,7 +1208,7 @@ public:
{ {
GETUNIT(Illidan, IllidanGUID); GETUNIT(Illidan, IllidanGUID);
if (Illidan && me->IsWithinDistInMap(Illidan, 25)) if (Illidan && me->IsWithinDistInMap(Illidan, 25))
BlinkToPlayer();//Do not let dread aura hurt her. BlinkToPlayer();// Do not let dread aura hurt her.
AttackStartNoMove(who); AttackStartNoMove(who);
} }
else else
@@ -1217,7 +1221,7 @@ public:
EnterPhase(PhaseIllidan(param)); EnterPhase(PhaseIllidan(param));
} }
void EnterPhase(PhaseIllidan NextPhase)//This is in fact Illidan's phase. void EnterPhase(PhaseIllidan NextPhase) // This is in fact Illidan's phase.
{ {
switch (NextPhase) switch (NextPhase)
{ {
@@ -1350,7 +1354,7 @@ public:
if (GETCRE(Illidan, IllidanGUID)) if (GETCRE(Illidan, IllidanGUID))
CAST_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(me->GetGUID()); CAST_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(me->GetGUID());
me->AttackStop(); me->AttackStop();
Timer[EVENT_MAIEV_STEALTH] = 60000; //reappear after 1 minute Timer[EVENT_MAIEV_STEALTH] = 60000; // reappear after 1 minute
MaxTimer = 1; MaxTimer = 1;
} }
@@ -1403,17 +1407,19 @@ public:
DoorGUID[0] = instance->GetData64(DATA_GAMEOBJECT_ILLIDAN_DOOR_R); DoorGUID[0] = instance->GetData64(DATA_GAMEOBJECT_ILLIDAN_DOOR_R);
DoorGUID[1] = instance->GetData64(DATA_GAMEOBJECT_ILLIDAN_DOOR_L); DoorGUID[1] = instance->GetData64(DATA_GAMEOBJECT_ILLIDAN_DOOR_L);
if (JustCreated)//close all doors at create if (JustCreated) // close all doors at create
{ {
instance->HandleGameObject(GateGUID, false); instance->HandleGameObject(GateGUID, false);
for (uint8 i = 0; i < 2; ++i) for (uint8 i = 0; i < 2; ++i)
instance->HandleGameObject(DoorGUID[i], false);
//JustCreated = false; Instance->HandleGameObject(DoorGUID[i], false);
// JustCreated = false;
}else }else
{//open all doors, raid wiped { // open all doors, raid wiped
instance->HandleGameObject(GateGUID, true); instance->HandleGameObject(GateGUID, true);
WalkCount = 1;//skip first wp WalkCount = 1; // skip first wp
for (uint8 i = 0; i < 2; ++i) for (uint8 i = 0; i < 2; ++i)
instance->HandleGameObject(DoorGUID[i], true); instance->HandleGameObject(DoorGUID[i], true);
} }
@@ -1513,7 +1519,7 @@ public:
if (GETGO(Gate, GateGUID)) if (GETGO(Gate, GateGUID))
Gate->GetPosition(x, y, z); Gate->GetPosition(x, y, z);
else else
return;//if door not spawned, don't crash server return; // if door not spawned, don't crash server
if (Creature* Channel = me->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000)) if (Creature* Channel = me->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000))
{ {
@@ -1581,11 +1587,11 @@ public:
me->AddThreat(Illidan, 10000000.0f); me->AddThreat(Illidan, 10000000.0f);
me->GetMotionMaster()->MoveChase(Illidan); me->GetMotionMaster()->MoveChase(Illidan);
} }
Timer = 30000; //chain lightning Timer = 30000; // chain lightning
break; break;
case PHASE_FIGHT_MINIONS: case PHASE_FIGHT_MINIONS:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Timer = 10000 + rand()%6000;//summon minion Timer = 10000 + rand()%6000; // summon minion
break; break;
case PHASE_RETURN: case PHASE_RETURN:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -1655,7 +1661,7 @@ public:
Spirit[1]->CastSpell(Channel, SPELL_DEATHSWORN_DOOR_CHANNEL, false); Spirit[1]->CastSpell(Channel, SPELL_DEATHSWORN_DOOR_CHANNEL, false);
Timer = 5000; Timer = 5000;
break; break;
case 3: //open the gate case 3: // open the gate
me->InterruptNonMeleeSpells(true); me->InterruptNonMeleeSpells(true);
Spirit[0]->InterruptNonMeleeSpells(true); Spirit[0]->InterruptNonMeleeSpells(true);
Spirit[1]->InterruptNonMeleeSpells(true); Spirit[1]->InterruptNonMeleeSpells(true);
@@ -1767,7 +1773,7 @@ public:
float x, y, z; float x, y, z;
me->GetPosition(x, y, z); me->GetPosition(x, y, z);
Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x+rand()%10, y+rand()%10, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x+rand()%10, y+rand()%10, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
//Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x, y, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); // Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x, y, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
if (Elite) if (Elite)
{ {
Elite->AI()->AttackStart(me); Elite->AI()->AttackStart(me);
@@ -1975,10 +1981,11 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::HandleTalkSequence()
me->GetPosition(x, y, z); me->GetPosition(x, y, z);
x += 10; y += 10; x += 10; y += 10;
Akama->GetMotionMaster()->Clear(false); Akama->GetMotionMaster()->Clear(false);
//Akama->GetMotionMaster()->MoveIdle(); // Akama->GetMotionMaster()->MoveIdle();
Akama->SetPosition(x, y, z, 0.0f); Akama->SetPosition(x, y, z, 0.0f);
Akama->SendMonsterMove(x, y, z, 0, MOVEMENTFLAG_NONE, 0);//Illidan must not die until Akama arrives. Akama->SendMonsterMove(x, y, z, 0, MOVEMENTFLAG_NONE, 0); // Illidan must not die until Akama arrives.
Akama->GetMotionMaster()->MoveChase(me); Akama->GetMotionMaster()->MoveChase(me);
} }
} }
break; break;
@@ -2051,7 +2058,8 @@ public:
DespawnTimer = 5000; DespawnTimer = 5000;
if (who->HasAura(SPELL_ENRAGE)) if (who->HasAura(SPELL_ENRAGE))
who->RemoveAurasDueToSpell(SPELL_ENRAGE); // Dispel his enrage who->RemoveAurasDueToSpell(SPELL_ENRAGE); // Dispel his enrage
//if (GameObject* CageTrap = instance->instance->GetGameObject(instance->GetData64(CageTrapGUID))) // if (GameObject* CageTrap = instance->instance->GetGameObject(instance->GetData64(CageTrapGUID)))
// CageTrap->SetLootState(GO_JUST_DEACTIVATED); // CageTrap->SetLootState(GO_JUST_DEACTIVATED);
} }
} }
@@ -2067,13 +2075,13 @@ public:
else DespawnTimer -= diff; else DespawnTimer -= diff;
} }
//if (IllidanGUID && !SummonedBeams) // if (IllidanGUID && !SummonedBeams)
//{ // {
// if (Unit* Illidan = Unit::GetUnit(*me, IllidanGUID) // if (Unit* Illidan = Unit::GetUnit(*me, IllidanGUID)
// { // {
// //TODO: Find proper spells and properly apply 'caged' Illidan effect // // TODO: Find proper spells and properly apply 'caged' Illidan effect
// } // }
//} // }
} }
}; };
@@ -2166,7 +2174,7 @@ public:
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
{ {
if (spell->Id == SPELL_THROW_GLAIVE2 || spell->Id == SPELL_THROW_GLAIVE) if (spell->Id == SPELL_THROW_GLAIVE2 || spell->Id == SPELL_THROW_GLAIVE)
me->SetDisplayId(21431);//appear when hit by Illidan's glaive me->SetDisplayId(21431);// appear when hit by Illidan's glaive
} }
}; };
@@ -2214,9 +2222,9 @@ public:
if (!me->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND) if (!me->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND)
&& !me->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND2)) && !me->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND2))
{ {
if (Creature* illidan = Unit::GetCreature((*me), IllidanGUID))//summon only in 1. phase if (Creature* illidan = Unit::GetCreature((*me), IllidanGUID))// summon only in 1. phase
if (CAST_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, illidan->AI())->Phase == PHASE_NORMAL) if (CAST_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, illidan->AI())->Phase == PHASE_NORMAL)
me->CastSpell(me->getVictim(), SPELL_PARASITIC_SHADOWFIEND2, true, 0, 0, IllidanGUID); //do not stack me->CastSpell(me->getVictim(), SPELL_PARASITIC_SHADOWFIEND2, true, 0, 0, IllidanGUID); // do not stack
} }
me->AttackerStateUpdate(me->getVictim()); me->AttackerStateUpdate(me->getVictim());
me->resetAttackTimer(); me->resetAttackTimer();