aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp46
-rw-r--r--src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp32
-rw-r--r--src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp46
-rw-r--r--src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kiljaeden.cpp1194
-rw-r--r--src/bindings/scripts/scripts/zone/sunwell_plateau/boss_muru.cpp1028
-rw-r--r--src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h2
-rw-r--r--src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp56
8 files changed, 1203 insertions, 1203 deletions
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp
index beed5619320..292c0e2dadf 100644
--- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp
+++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp
@@ -30,7 +30,7 @@ enum Quotes
YELL_INTRO_CHARGE = -1580019,
YELL_INTRO_KILL_MADRIGOSA = -1580020,
YELL_INTRO_TAUNT = -1580021,
-
+
YELL_MADR_ICE_BARRIER = -1580031,
YELL_MADR_INTRO = -1580032,
YELL_MADR_ICE_BLOCK = -1580033,
@@ -71,7 +71,7 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
}
ScriptedInstance* pInstance;
- Unit* Madrigosa;
+ Unit* Madrigosa;
uint32 SlashTimer;
uint32 BurnTimer;
@@ -99,18 +99,18 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
IsIntro = false;
Enraged = false;
- Intro = true; //for debug
+ Intro = true; //for debug
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- Madrigosa = Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_MADRIGOSA));
- //Creature* boss = Unit::GetCreature((*m_creature),AzgalorGUID);
- if(!Madrigosa) error_log("Madrigosa ist nicht zu finden");
+ Madrigosa = Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_MADRIGOSA));
+ //Creature* boss = Unit::GetCreature((*m_creature),AzgalorGUID);
+ if(!Madrigosa) error_log("Madrigosa ist nicht zu finden");
if(Intro && Madrigosa){
if(!Madrigosa->isAlive())
EndIntro();
- else error_log("Madrigosa is Tod");
+ else error_log("Madrigosa is Tod");
}
else
EndIntro();
@@ -141,12 +141,12 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
{
DoScriptText(YELL_DEATH, m_creature);
- if(pInstance){
+ if(pInstance){
pInstance->SetData(DATA_BRUTALLUS_EVENT, DONE);
- float x,y,z;
- m_creature->GetPosition(x,y,z);
- m_creature->SummonCreature(FELMYST, x,y, z+30, m_creature->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 0);
- }
+ float x,y,z;
+ m_creature->GetPosition(x,y,z);
+ m_creature->SummonCreature(FELMYST, x,y, z+30, m_creature->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 0);
+ }
}
void StartIntro()
@@ -154,16 +154,16 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
if(!Intro)
return;
if(Madrigosa){
- Madrigosa->setDeathState(ALIVE);
+ Madrigosa->setDeathState(ALIVE);
Madrigosa->setActive(true);
IsIntro = true;
}
- error_log("Starte das Intro");
+ error_log("Starte das Intro");
}
void EndIntro()
{
- error_log("Beende das Intro");
+ error_log("Beende das Intro");
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Intro = false;
IsIntro = false;
@@ -184,7 +184,7 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
case 1:
m_creature->SetInFront(Madrigosa);
Madrigosa->SetInFront(m_creature);
- DoScriptText(YELL_MADR_INTRO, Madrigosa, m_creature);
+ DoScriptText(YELL_MADR_INTRO, Madrigosa, m_creature);
IntroPhaseTimer = 9000;
++IntroPhase;
break;
@@ -221,7 +221,7 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
case 7:
m_creature->DealDamage(Madrigosa, Madrigosa->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, true);
DoScriptText(YELL_MADR_DEATH, Madrigosa);
- m_creature->SetHealth(m_creature->GetMaxHealth());
+ m_creature->SetHealth(m_creature->GetMaxHealth());
m_creature->AttackStop();
m_creature->SetSpeed(MOVE_RUN, 1.0f, true);
IntroPhaseTimer = 3000;
@@ -245,10 +245,10 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
}
}
- void MoveInLineOfSight(Unit *who){
- if(pInstance && Intro)
- pInstance->SetData(DATA_BRUTALLUS_EVENT, SPECIAL);
- }
+ void MoveInLineOfSight(Unit *who){
+ if(pInstance && Intro)
+ pInstance->SetData(DATA_BRUTALLUS_EVENT, SPECIAL);
+ }
void UpdateAI(const uint32 diff)
{
@@ -273,7 +273,7 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
if(!UpdateVictim() || IsIntro)
return;
-
+
if(SlashTimer < diff)
{
DoCast(m_creature->getVictim(), SPELL_METEOR_SLASH);
@@ -314,7 +314,7 @@ CreatureAI* GetAI_boss_brutallus(Creature *_Creature)
{
return new boss_brutallusAI (_Creature);
}
-
+
void AddSC_boss_brutallus()
{
Script *newscript;
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp
index 8fe66026be1..f408212b129 100644
--- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp
+++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp
@@ -69,7 +69,7 @@ enum Spells
SPELL_SHADOW_FURY = 45270,
SPELL_IMAGE_VISUAL = 45263,
- //Misc spells
+ //Misc spells
SPELL_ENRAGE = 46587,
SPELL_EMPOWER = 45366,
SPELL_DARK_FLAME = 45345,
@@ -138,7 +138,7 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
ShadownovaTimer = 30000;
ConfoundingblowTimer = 25000;
ShadowimageTimer = 20000;
- ConflagrationTimer = 30000;
+ ConflagrationTimer = 30000;
EnrageTimer = 360000;
SisterDeath = false;
@@ -216,7 +216,7 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
{
target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
target->CastSpell(target, SPELL_DARK_FLAME, true);
- }else target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
+ }else target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
}
break;
case SPELL_DARK_TOUCHED:
@@ -226,7 +226,7 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
{
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
target->CastSpell(target, SPELL_DARK_FLAME, true);
- }else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
+ }else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
}
break;
}
@@ -244,7 +244,7 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
{
DoScriptText(YELL_SISTER_ALYTHESS_DEAD, m_creature);
DoCast(m_creature,SPELL_EMPOWER);
- m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
+ m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
SisterDeath = true;
}
}
@@ -279,7 +279,7 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
if(!SisterDeath)
{
- DoScriptText(EMOTE_SHADOW_NOVA, m_creature, target);
+ DoScriptText(EMOTE_SHADOW_NOVA, m_creature, target);
DoScriptText(YELL_SHADOW_NOVA, m_creature);
}
ShadownovaTimer = 30000+(rand()%5000);
@@ -396,7 +396,7 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
ConflagrationTimer = 45000;
BlazeTimer = 100;
PyrogenicsTimer = 15000;
- ShadownovaTimer = 40000;
+ ShadownovaTimer = 40000;
EnrageTimer = 360000;
FlamesearTimer = 15000;
IntroYellTimer = 10000;
@@ -522,7 +522,7 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
{
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
target->CastSpell(target, SPELL_DARK_FLAME, true);
- }else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
+ }else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
}
break;
}
@@ -534,7 +534,7 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
switch (step)
{
case 0: return 0;
- case 1:
+ case 1:
if(Sacrolash)
DoScriptText(YELL_INTRO_SAC_1, Sacrolash);
return 1000;
@@ -549,7 +549,7 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
DoScriptText(YELL_INTRO_SAC_5, Sacrolash);
return 2000;
case 6: DoScriptText(YELL_INTRO_ALY_6, m_creature); return 1000;
- case 7:
+ case 7:
if(Sacrolash)
DoScriptText(YELL_INTRO_SAC_7, Sacrolash);
return 3000;
@@ -576,9 +576,9 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SACROLASH));
if (Temp && Temp->isDead())
{
- DoScriptText(YELL_SISTER_SACROLASH_DEAD, m_creature);
+ DoScriptText(YELL_SISTER_SACROLASH_DEAD, m_creature);
DoCast(m_creature, SPELL_EMPOWER);
- m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
+ m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
SisterDeath = true;
}
}
@@ -614,7 +614,7 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
if(!SisterDeath)
{
- DoScriptText(EMOTE_CONFLAGRATION, m_creature, target);
+ DoScriptText(EMOTE_CONFLAGRATION, m_creature, target);
DoScriptText(YELL_CANFLAGRATION, m_creature);
}
@@ -695,7 +695,7 @@ struct TRINITY_DLL_DECL mob_shadow_imageAI : public ScriptedAI
{
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
target->CastSpell(target, SPELL_DARK_FLAME, true);
- }else target->CastSpell(target,SPELL_DARK_TOUCHED,true);
+ }else target->CastSpell(target,SPELL_DARK_TOUCHED,true);
}
break;
}
@@ -726,8 +726,8 @@ struct TRINITY_DLL_DECL mob_shadow_imageAI : public ScriptedAI
if(!m_creature->IsNonMeleeSpellCasted(false))
{
//If we are within range melee the target
- if( m_creature->IsWithinMeleeRange(m_creature->getVictim()))
- DoCast(m_creature->getVictim(), SPELL_DARK_STRIKE);
+ if( m_creature->IsWithinMeleeRange(m_creature->getVictim()))
+ DoCast(m_creature->getVictim(), SPELL_DARK_STRIKE);
}
DarkstrikeTimer = 3000;
}
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp
index 4783473d56d..230ba2e9cd3 100644
--- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp
+++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp
@@ -32,7 +32,7 @@ enum Quotes
YELL_TAKEOFF = -1580040,
YELL_BERSERK = -1580041,
YELL_DEATH = -1580042,
- YELL_KALECGOS = -1580043 //after felmyst's death spawned and say this
+ YELL_KALECGOS = -1580043 //after felmyst's death spawned and say this
};
enum Spells
@@ -41,7 +41,7 @@ enum Spells
AURA_SUNWELL_RADIANCE = 45769,
AURA_NOXIOUS_FUMES = 47002,
- //Land phase
+ //Land phase
SPELL_CLEAVE = 19983,
SPELL_CORROSION = 45866,
SPELL_GAS_NOVA = 45855,
@@ -290,7 +290,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
{
case 0:
//m_creature->AttackStop();
- error_log("prevent fly phase");
+ error_log("prevent fly phase");
m_creature->GetMotionMaster()->Clear(false);
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT);
@@ -299,15 +299,15 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
break;
case 1:
- error_log("Move to Fly point");
+ error_log("Move to Fly point");
m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+1, m_creature->GetPositionY(), m_creature->GetPositionZ()+10);
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break;
- case 2:{
- error_log("Summon Vapor case 2");
- Unit* target;
- target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
- if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
+ case 2:{
+ error_log("Summon Vapor case 2");
+ Unit* target;
+ target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
+ if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
if(target)
{
Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
@@ -320,15 +320,15 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
}
}else EnterEvadeMode();
Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
- break;}
- case 3: {
+ break;}
+ case 3: {
DespawnSummons(MOB_VAPOR_TRAIL);
- error_log("Summon Vapor case3");
+ error_log("Summon Vapor case3");
//m_creature->CastSpell(m_creature, SPELL_VAPOR_SELECT); need core support
- Unit* target;
- target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
- if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
- if(target)
+ Unit* target;
+ target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
+ if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
+ if(target)
{
//target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
@@ -341,16 +341,16 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
}
}else EnterEvadeMode();
Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
- break;}
+ break;}
case 4:
DespawnSummons(MOB_VAPOR_TRAIL);
Timer[EVENT_FLIGHT_SEQUENCE] = 1;
break;
- case 5:{
- Unit* target;
- target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
- if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
- if(target)
+ case 5:{
+ Unit* target;
+ target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
+ if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
+ if(target)
{
BreathX = target->GetPositionX();
BreathY = target->GetPositionY();
@@ -359,7 +359,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
m_creature->GetMotionMaster()->MovePoint(0, x, y, z+10);
}else EnterEvadeMode();
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
- break;}
+ break;}
case 6:
m_creature->SetOrientation(m_creature->GetAngle(BreathX, BreathY));
m_creature->StopMoving();
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
index f7ccbe9a21c..e39f7e02bd7 100644
--- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
+++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
@@ -33,7 +33,7 @@ enum Quotes
SAY_EVIL_SLAY1 = -1580003,
SAY_EVIL_SLAY2 = -1580004,
SAY_EVIL_ENRAGE = -1580005,
-
+
//Kalecgos humanoid form
SAY_GOOD_AGGRO = -1580006,
SAY_GOOD_NEAR_DEATH = -1580007,
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kiljaeden.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kiljaeden.cpp
index beb5a77e488..2ac90b87c35 100644
--- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kiljaeden.cpp
+++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kiljaeden.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Boss_Kiljaeden
SD%Complete: 70
-SDComment: Phase4, Phase5, Shadow Spike, Armageddon
+SDComment: Phase4, Phase5, Shadow Spike, Armageddon
SDCategory: Sunwell_Plateau
EndScriptData */
@@ -88,17 +88,17 @@ enum SpellIds
/* Kil'Jaeden's spells and cosmetics */
SPELL_TRANS = 23188, // Surprisingly, this seems to be the right spell.. (Where is it used?)
SPELL_REBIRTH = 44200, // Emerge from the Sunwell
- SPELL_SOUL_FLAY = 45442, // 9k Shadow damage over 3 seconds. Spammed throughout all the fight.
+ SPELL_SOUL_FLAY = 45442, // 9k Shadow damage over 3 seconds. Spammed throughout all the fight.
SPELL_SOUL_FLAY_SLOW = 47106,
SPELL_LEGION_LIGHTNING = 45664, // Chain Lightning, 4 targets, ~3k Shadow damage, 1.5k mana burn
SPELL_FIRE_BLOOM = 45641, // Places a debuff on 5 raid members, which causes them to deal 2k Fire damage to nearby allies and selves. MIGHT NOT WORK
-
+
SPELL_SINISTER_REFLECTION = 45785, // Summon shadow copies of 5 raid members that fight against KJ's enemies
SPELL_COPY_WEAPON = 41055, // }
SPELL_COPY_WEAPON2 = 41054, // }
SPELL_COPY_OFFHAND = 45206, // }- Spells used in Sinister Reflection creation
SPELL_COPY_OFFHAND_WEAPON = 45205, // }
-
+
SPELL_SHADOW_SPIKE = 46680, // Bombard random raid members with Shadow Spikes (Very similar to Void Reaver orbs)
SPELL_FLAME_DART = 45737, // Bombards the raid with flames every 3(?) seconds
SPELL_DARKNESS_OF_A_THOUSAND_SOULS = 46605, // Begins a 8-second channeling, after which he will deal 50'000 damage to the raid
@@ -112,8 +112,8 @@ enum SpellIds
SPELL_ARMAGEDDON_SUMMON_TRIGGER = 45921, // Summons the triggers that cast the spells on himself need random target select
SPELL_ARMAGEDDON_DAMAGE = 45915, // This does the area damage
- /* Shield Orb Spells*/
- SPELL_SHADOW_BOLT = 45680, //45679 would be correct but triggers to often //TODO fix console error
+ /* Shield Orb Spells*/
+ SPELL_SHADOW_BOLT = 45680, //45679 would be correct but triggers to often //TODO fix console error
/* Anveena's spells and cosmetics (Or, generally, everything that has "Anveena" in name) */
@@ -122,28 +122,28 @@ enum SpellIds
SPELL_SACRIFICE_OF_ANVEENA = 46474, // This is cast on Kil'Jaeden when Anveena sacrifices herself into the Sunwell
/* Sinister Reflection Spells */
- SPELL_SR_CURSE_OF_AGONY = 46190,
- SPELL_SR_SHADOW_BOLT = 47076,
-
+ SPELL_SR_CURSE_OF_AGONY = 46190,
+ SPELL_SR_SHADOW_BOLT = 47076,
+
SPELL_SR_EARTH_SHOCK = 47071,
SPELL_SR_FIREBALL = 47074,
SPELL_SR_HEMORRHAGE = 45897,
- SPELL_SR_HOLY_SHOCK = 38921,
- SPELL_SR_HAMMER_OF_JUSTICE = 37369,
+ SPELL_SR_HOLY_SHOCK = 38921,
+ SPELL_SR_HAMMER_OF_JUSTICE = 37369,
SPELL_SR_HOLY_SMITE = 47077,
SPELL_SR_RENEW = 47079,
- SPELL_SR_SHOOT = 16496,
- SPELL_SR_MULTI_SHOT = 48098,
- SPELL_SR_WING_CLIP = 40652,
+ SPELL_SR_SHOOT = 16496,
+ SPELL_SR_MULTI_SHOT = 48098,
+ SPELL_SR_WING_CLIP = 40652,
SPELL_SR_WHIRLWIND = 17207,
- SPELL_SR_MOONFIRE = 47072,
+ SPELL_SR_MOONFIRE = 47072,
//SPELL_SR_PLAGU STRIKE = 58843, Dk Spell!
/*** Other Spells (used by players, etc) ***/
@@ -191,22 +191,22 @@ enum Phase
//Timers
enum KilJaedenTimers {
- TIMER_KALEC_JOIN = 0,
-
- //Phase 2 Timer
- TIMER_SOUL_FLAY = 1,
- TIMER_LEGION_LIGHTNING = 2,
- TIMER_FIRE_BLOOM = 3,
- TIMER_SUMMON_SHILEDORB = 4,
-
- //Phase 3 Timer
- TIMER_SHADOW_SPIKE = 5,
- TIMER_FLAME_DART = 6,
- TIMER_DARKNESS = 7,
- TIMER_ORBS_EMPOWER = 8,
-
- //Phase 4 Timer
- TIMER_ARMAGEDDON = 9
+ TIMER_KALEC_JOIN = 0,
+
+ //Phase 2 Timer
+ TIMER_SOUL_FLAY = 1,
+ TIMER_LEGION_LIGHTNING = 2,
+ TIMER_FIRE_BLOOM = 3,
+ TIMER_SUMMON_SHILEDORB = 4,
+
+ //Phase 3 Timer
+ TIMER_SHADOW_SPIKE = 5,
+ TIMER_FLAME_DART = 6,
+ TIMER_DARKNESS = 7,
+ TIMER_ORBS_EMPOWER = 8,
+
+ //Phase 4 Timer
+ TIMER_ARMAGEDDON = 9
};
// Locations of the Hand of Deceiver adds
@@ -223,14 +223,14 @@ float ShieldOrbLocations[4][2]=
{1698.900, 627.870}, //middle pont of Sunwell
{12, 3.14}, // First one spawns northeast of KJ
{12, 3.14/0.7}, // Second one spawns southeast
- {12, 3.14*3.8} // Third one spawns (?)
+ {12, 3.14*3.8} // Third one spawns (?)
};
float OrbLocations[4][5] = {
- (1694.48, 674.29, 28.0502, 4.86985),
- (1745.68, 621.823, 28.0505, 2.93777),
- (1704.14, 583.591, 28.1696, 1.59003),
- (1653.12, 635.41, 28.0932, 0.0977725),
+ (1694.48, 674.29, 28.0502, 4.86985),
+ (1745.68, 621.823, 28.0505, 2.93777),
+ (1704.14, 583.591, 28.1696, 1.59003),
+ (1653.12, 635.41, 28.0932, 0.0977725),
};
struct Speech
@@ -257,131 +257,131 @@ static Speech Sacrifice[]=
class AllOrbsInGrid
{
public:
- AllOrbsInGrid() {}
- bool operator() (GameObject* go)
- {
- if(go->GetEntry() == GAMEOBJECT_ORB_OF_THE_BLUE_DRAGONFLIGHT)
- return true;
- return false;
- }
+ AllOrbsInGrid() {}
+ bool operator() (GameObject* go)
+ {
+ if(go->GetEntry() == GAMEOBJECT_ORB_OF_THE_BLUE_DRAGONFLIGHT)
+ return true;
+ return false;
+ }
};
bool GOHello_go_orb_of_the_blue_flight(Player *plr, GameObject* go)
{
- if(go->GetUInt32Value(GAMEOBJECT_FACTION) == 35){
- ScriptedInstance* pInstance = ((ScriptedInstance*)go->GetInstanceData());
- float x,y,z, dx,dy,dz;
+ if(go->GetUInt32Value(GAMEOBJECT_FACTION) == 35){
+ ScriptedInstance* pInstance = ((ScriptedInstance*)go->GetInstanceData());
+ float x,y,z, dx,dy,dz;
go->SummonCreature(CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT, plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
plr->CastSpell(plr, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, true);
go->SetUInt32Value(GAMEOBJECT_FACTION, 0);
- Unit* Kalec = ((Creature*)Unit::GetUnit(*plr, pInstance->GetData64(DATA_KALECGOS_KJ)));
- //Kalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
- go->GetPosition(x,y,z);
- for(uint8 i = 0; i < 4; ++i){
- DynamicObject* Dyn = Kalec->GetDynObject(SPELL_RING_OF_BLUE_FLAMES);
- if(Dyn){
- Dyn->GetPosition(dx,dy,dz);
- if(x == dx && dy == y && dz == z){
- Dyn->RemoveFromWorld();
- break;
- }
- }
- }
+ Unit* Kalec = ((Creature*)Unit::GetUnit(*plr, pInstance->GetData64(DATA_KALECGOS_KJ)));
+ //Kalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
+ go->GetPosition(x,y,z);
+ for(uint8 i = 0; i < 4; ++i){
+ DynamicObject* Dyn = Kalec->GetDynObject(SPELL_RING_OF_BLUE_FLAMES);
+ if(Dyn){
+ Dyn->GetPosition(dx,dy,dz);
+ if(x == dx && dy == y && dz == z){
+ Dyn->RemoveFromWorld();
+ break;
+ }
+ }
+ }
go->Refresh();
- }
+ }
return true;
}
//AI for Kalecgos
struct TRINITY_DLL_DECL boss_kalecgosKJAI : public ScriptedAI
{
- boss_kalecgosKJAI(Creature* c) : ScriptedAI(c){
- pInstance = ((ScriptedInstance*)c->GetInstanceData());
+ boss_kalecgosKJAI(Creature* c) : ScriptedAI(c){
+ pInstance = ((ScriptedInstance*)c->GetInstanceData());
}
-
+
GameObject* Orb[4];
- ScriptedInstance* pInstance;
+ ScriptedInstance* pInstance;
uint8 OrbsEmpowered;
- uint8 EmpowerCount;
+ uint8 EmpowerCount;
bool Searched;
- void InitializeAI(){
- for(uint8 i = 0; i < 4; ++i)
- Orb[i] = NULL;
- FindOrbs();
- OrbsEmpowered = 0;
- EmpowerCount = 0;
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->setActive(true);
- Searched = false;
- FindOrbs();
- }
-
+ void InitializeAI(){
+ for(uint8 i = 0; i < 4; ++i)
+ Orb[i] = NULL;
+ FindOrbs();
+ OrbsEmpowered = 0;
+ EmpowerCount = 0;
+ m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ m_creature->setActive(true);
+ Searched = false;
+ FindOrbs();
+ }
+
void Reset(){}
- void Aggro(Unit* who) {}
-
- void FindOrbs()
- {
- CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
- Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
- cell.SetNoCreate();
- std::list<GameObject*> orbList;
- AllOrbsInGrid check;
- Trinity::GameObjectListSearcher<AllOrbsInGrid> searcher(orbList, check);
- TypeContainerVisitor<Trinity::GameObjectListSearcher<AllOrbsInGrid>, GridTypeMapContainer> visitor(searcher);
- CellLock<GridReadGuard> cell_lock(cell, pair);
- cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap()));
- if(orbList.empty())
- return;
- uint8 i = 0;
- for(std::list<GameObject*>::iterator itr = orbList.begin(); itr != orbList.end(); ++itr, ++i){
- Orb[i] = GameObject::GetGameObject(*m_creature, (*itr)->GetGUID());
- }
- }
-
- void ResetOrbs(){
- m_creature->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
- for(uint8 i = 0; i < 4; ++i)
- if(Orb[i]) Orb[i]->SetUInt32Value(GAMEOBJECT_FACTION, 0);
- }
+ void Aggro(Unit* who) {}
+
+ void FindOrbs()
+ {
+ CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
+ Cell cell(pair);
+ cell.data.Part.reserved = ALL_DISTRICT;
+ cell.SetNoCreate();
+ std::list<GameObject*> orbList;
+ AllOrbsInGrid check;
+ Trinity::GameObjectListSearcher<AllOrbsInGrid> searcher(orbList, check);
+ TypeContainerVisitor<Trinity::GameObjectListSearcher<AllOrbsInGrid>, GridTypeMapContainer> visitor(searcher);
+ CellLock<GridReadGuard> cell_lock(cell, pair);
+ cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap()));
+ if(orbList.empty())
+ return;
+ uint8 i = 0;
+ for(std::list<GameObject*>::iterator itr = orbList.begin(); itr != orbList.end(); ++itr, ++i){
+ Orb[i] = GameObject::GetGameObject(*m_creature, (*itr)->GetGUID());
+ }
+ }
+
+ void ResetOrbs(){
+ m_creature->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
+ for(uint8 i = 0; i < 4; ++i)
+ if(Orb[i]) Orb[i]->SetUInt32Value(GAMEOBJECT_FACTION, 0);
+ }
void EmpowerOrb(bool all)
{
if(!Orb[OrbsEmpowered])
return;
- uint8 random = rand()%3;
- if(all){
- m_creature->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
- for(uint8 i = 0; i < 4; ++i){
- if(!Orb[i]) return;
- Orb[i]->CastSpell(m_creature, SPELL_RING_OF_BLUE_FLAMES);
- Orb[i]->SetUInt32Value(GAMEOBJECT_FACTION, 35);
- Orb[i]->setActive(true);
- Orb[i]->Refresh();
- }
- }else{
- float x,y,z, dx,dy,dz;
- Orb[random]->GetPosition(x,y,z);
- for(uint8 i = 0; i < 4; ++i){
- DynamicObject* Dyn = m_creature->GetDynObject(SPELL_RING_OF_BLUE_FLAMES);
- if(Dyn){
- Dyn->GetPosition(dx,dy,dz);
- if(x == dx && dy == y && dz == z){
- Dyn->RemoveFromWorld();
- break;
- }
- }
- }
- Orb[random]->CastSpell(m_creature, SPELL_RING_OF_BLUE_FLAMES);
+ uint8 random = rand()%3;
+ if(all){
+ m_creature->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
+ for(uint8 i = 0; i < 4; ++i){
+ if(!Orb[i]) return;
+ Orb[i]->CastSpell(m_creature, SPELL_RING_OF_BLUE_FLAMES);
+ Orb[i]->SetUInt32Value(GAMEOBJECT_FACTION, 35);
+ Orb[i]->setActive(true);
+ Orb[i]->Refresh();
+ }
+ }else{
+ float x,y,z, dx,dy,dz;
+ Orb[random]->GetPosition(x,y,z);
+ for(uint8 i = 0; i < 4; ++i){
+ DynamicObject* Dyn = m_creature->GetDynObject(SPELL_RING_OF_BLUE_FLAMES);
+ if(Dyn){
+ Dyn->GetPosition(dx,dy,dz);
+ if(x == dx && dy == y && dz == z){
+ Dyn->RemoveFromWorld();
+ break;
+ }
+ }
+ }
+ Orb[random]->CastSpell(m_creature, SPELL_RING_OF_BLUE_FLAMES);
Orb[random]->SetUInt32Value(GAMEOBJECT_FACTION, 35);
Orb[random]->setActive(true);
Orb[random]->Refresh();
++OrbsEmpowered;
- }
+ }
++EmpowerCount;
switch(EmpowerCount){
@@ -393,10 +393,10 @@ struct TRINITY_DLL_DECL boss_kalecgosKJAI : public ScriptedAI
}
void UpdateAI(const uint32 diff){
- if(!Searched){
- FindOrbs();
- Searched = true;
- }
+ if(!Searched){
+ FindOrbs();
+ Searched = true;
+ }
if(OrbsEmpowered == 4) OrbsEmpowered = 0;
}
@@ -412,7 +412,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
{
boss_kiljaedenAI(Creature* c) : Scripted_NoMovementAI(c), Summons(m_creature){
pInstance = ((ScriptedInstance*)c->GetInstanceData());
- }
+ }
ScriptedInstance* pInstance;
SummonList Summons;
@@ -420,66 +420,66 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
Unit* randomPlayer;
uint8 Phase;
- uint8 ActiveTimers;
+ uint8 ActiveTimers;
uint32 Timer[10];
- uint32 WaitTimer;
+ uint32 WaitTimer;
/* Boolean */
bool IsKalecJoined;
bool IsInDarkness;
- bool TimerIsDeactiveted[10];
- bool IsWaiting;
- bool OrbActivated;
+ bool TimerIsDeactiveted[10];
+ bool IsWaiting;
+ bool OrbActivated;
void Reset()
- {
+ {
// TODO: Fix timers
- Timer[TIMER_KALEC_JOIN] = 26000;
+ Timer[TIMER_KALEC_JOIN] = 26000;
- //Phase 2 Timer
- Timer[TIMER_SOUL_FLAY] = 20000;
- Timer[TIMER_LEGION_LIGHTNING] = 40000;
- Timer[TIMER_FIRE_BLOOM] = 30000;
- Timer[TIMER_SUMMON_SHILEDORB] = 45000;
+ //Phase 2 Timer
+ Timer[TIMER_SOUL_FLAY] = 20000;
+ Timer[TIMER_LEGION_LIGHTNING] = 40000;
+ Timer[TIMER_FIRE_BLOOM] = 30000;
+ Timer[TIMER_SUMMON_SHILEDORB] = 45000;
- //Phase 3 Timer
- Timer[TIMER_SHADOW_SPIKE] = 4000;
- Timer[TIMER_FLAME_DART] = 3000;
- Timer[TIMER_DARKNESS] = 45000;
- Timer[TIMER_ORBS_EMPOWER] = 35000;
+ //Phase 3 Timer
+ Timer[TIMER_SHADOW_SPIKE] = 4000;
+ Timer[TIMER_FLAME_DART] = 3000;
+ Timer[TIMER_DARKNESS] = 45000;
+ Timer[TIMER_ORBS_EMPOWER] = 35000;
- //Phase 4 Timer
- Timer[TIMER_ARMAGEDDON] = 2000;
+ //Phase 4 Timer
+ Timer[TIMER_ARMAGEDDON] = 2000;
- ActiveTimers = 5;
- WaitTimer = 0;
+ ActiveTimers = 5;
+ WaitTimer = 0;
Phase = PHASE_DECEIVERS;
IsKalecJoined = false;
IsInDarkness = false;
IsWaiting = false;
- OrbActivated = false;
+ OrbActivated = false;
- Kalec = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KALECGOS_KJ)));
- ChangeTimers(false, 0);
+ Kalec = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KALECGOS_KJ)));
+ ChangeTimers(false, 0);
}
- void ChangeTimers(bool status, uint32 WTimer){
- for(uint8 i = 0; i < 10;++i)
+ void ChangeTimers(bool status, uint32 WTimer){
+ for(uint8 i = 0; i < 10;++i)
TimerIsDeactiveted[i] = status;
TimerIsDeactiveted[TIMER_KALEC_JOIN] = IsKalecJoined;
-
+
if(WTimer > 0){
IsWaiting = true;
WaitTimer = WTimer;
- }
+ }
- if(OrbActivated) TimerIsDeactiveted[TIMER_ORBS_EMPOWER] = true;
- if(Timer[TIMER_SHADOW_SPIKE] == 0) TimerIsDeactiveted[TIMER_SHADOW_SPIKE] = true;
- if(Phase == PHASE_SACRIFICE) TimerIsDeactiveted[TIMER_SUMMON_SHILEDORB] = true;
- }
+ if(OrbActivated) TimerIsDeactiveted[TIMER_ORBS_EMPOWER] = true;
+ if(Timer[TIMER_SHADOW_SPIKE] == 0) TimerIsDeactiveted[TIMER_SHADOW_SPIKE] = true;
+ if(Phase == PHASE_SACRIFICE) TimerIsDeactiveted[TIMER_SUMMON_SHILEDORB] = true;
+ }
void JustSummoned(Creature* summoned)
{
@@ -487,11 +487,11 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
{
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- }else{
- summoned->SetLevel(m_creature->getLevel());
- }
- summoned->setFaction(m_creature->getFaction());
- Summons.Summon(summoned);
+ }else{
+ summoned->SetLevel(m_creature->getLevel());
+ }
+ summoned->setFaction(m_creature->getFaction());
+ Summons.Summon(summoned);
}
void JustDied(Unit* killer)
@@ -514,8 +514,8 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
void EnterEvadeMode()
{
Scripted_NoMovementAI::EnterEvadeMode();
- Summons.DespawnAll();
-
+ Summons.DespawnAll();
+
// Reset the controller
if(pInstance){
Creature* Control = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILJAEDEN_CONTROLLER)));
@@ -534,19 +534,19 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
switch(rand()%2){
case 0: DoScriptText(SAY_KJ_REFLECTION1, m_creature); break;
case 1: DoScriptText(SAY_KJ_REFLECTION2, m_creature); break;
- }
- DoCast(m_creature, SPELL_SINISTER_REFLECTION, true);
- for(uint8 i = 0; i < 4; i++){
- float x,y,z;
- Unit* target;
- for(uint8 z = 0; z < 6; ++z){
- target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
- if (!target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) break;
- }
- target->GetPosition(x,y,z);
- Creature* SinisterReflection = m_creature->SummonCreature(CREATURE_SINISTER_REFLECTION, x,y,z,0, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ }
+ DoCast(m_creature, SPELL_SINISTER_REFLECTION, true);
+ for(uint8 i = 0; i < 4; i++){
+ float x,y,z;
+ Unit* target;
+ for(uint8 z = 0; z < 6; ++z){
+ target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (!target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) break;
+ }
+ target->GetPosition(x,y,z);
+ Creature* SinisterReflection = m_creature->SummonCreature(CREATURE_SINISTER_REFLECTION, x,y,z,0, TEMPSUMMON_CORPSE_DESPAWN, 0);
SinisterReflection->AI()->AttackStart(target);
- }
+ }
}
void UpdateAI(const uint32 diff)
@@ -554,160 +554,160 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
if(!UpdateVictim() || Phase < PHASE_NORMAL)
return;
- if(IsWaiting){
- if(WaitTimer < diff){
- IsWaiting = false;
- ChangeTimers(false, 0);
- }
- else WaitTimer -= diff;
- }
-
- for(uint8 t = 0; t < ActiveTimers; ++t){
- if(Timer[t] < diff && !TimerIsDeactiveted[t]){
- switch(t){
- case TIMER_KALEC_JOIN:
- if(Kalec){
- DoScriptText(SAY_KALECGOS_JOIN, Kalec);
- IsKalecJoined = true;
- TimerIsDeactiveted[TIMER_KALEC_JOIN] = true;
- }
- break;
- case TIMER_SOUL_FLAY:
- if(!m_creature->IsNonMeleeSpellCasted(false)){
- m_creature->CastSpell(m_creature->getVictim(), SPELL_SOUL_FLAY, false);
- m_creature->getVictim()->CastSpell(m_creature->getVictim(), SPELL_SOUL_FLAY_SLOW, true);
- Timer[TIMER_SOUL_FLAY] = 3500;
- }
- break;
- case TIMER_LEGION_LIGHTNING:
- if(!m_creature->IsNonMeleeSpellCasted(false)){
- m_creature->RemoveAurasDueToSpell(SPELL_SOUL_FLAY);
- for(uint8 z = 0; z < 6; ++z){
- randomPlayer = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
- if (!randomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) break;
- }
- if(randomPlayer)DoCast(randomPlayer, SPELL_LEGION_LIGHTNING, false);
- else error_log("try to cast SPELL_LEGION_LIGHTNING on invalid target");
- Timer[TIMER_LEGION_LIGHTNING] = (Phase == PHASE_SACRIFICE) ? 18000 : 30000; // 18 seconds in PHASE_SACRIFICE
- Timer[TIMER_SOUL_FLAY] = 2500;
- }
- break;
- case TIMER_FIRE_BLOOM:
- if(!m_creature->IsNonMeleeSpellCasted(false)){
- m_creature->RemoveAurasDueToSpell(SPELL_SOUL_FLAY);
- DoCastAOE(SPELL_FIRE_BLOOM, false);
- Timer[TIMER_FIRE_BLOOM] = (Phase == PHASE_SACRIFICE) ? 25000 : 40000; // 25 seconds in PHASE_SACRIFICE
- Timer[TIMER_SOUL_FLAY] = 1000;
- }
- break;
- case TIMER_SUMMON_SHILEDORB:
- for(uint8 i = 1; i < Phase; ++i){
- float sx, sy;
- sx = ShieldOrbLocations[0][0] + sin(ShieldOrbLocations[i][0]);
- sy = ShieldOrbLocations[0][1] + sin(ShieldOrbLocations[i][1]);
- m_creature->SummonCreature(CREATURE_SHIELD_ORB, sx, sy, SHIELD_ORB_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
- }
- Timer[TIMER_SUMMON_SHILEDORB] = 30000+rand()%30*1000; // 30-60seconds cooldown
- Timer[TIMER_SOUL_FLAY] = 2000;
- break;
- case TIMER_SHADOW_SPIKE: //Phase 3
- if(!m_creature->IsNonMeleeSpellCasted(false)){
- DoCastAOE(SPELL_SHADOW_SPIKE, false);
- Timer[TIMER_SHADOW_SPIKE] = 0;
- TimerIsDeactiveted[TIMER_SHADOW_SPIKE] = true;
- ChangeTimers(true, 30000);
- }
- break;
- case TIMER_FLAME_DART: //Phase 3
- DoCastAOE(SPELL_FLAME_DART, false);
- Timer[TIMER_FLAME_DART] = 3000; //TODO Timer
- break;
- case TIMER_DARKNESS: //Phase 3
- if(!m_creature->IsNonMeleeSpellCasted(false)){
- // Begins to channel for 8 seconds, then deals 50'000 damage to all raid members.
- if(!IsInDarkness){
- DoScriptText(EMOTE_KJ_DARKNESS, m_creature);
- DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS, false);
- ChangeTimers(true, 9000);
+ if(IsWaiting){
+ if(WaitTimer < diff){
+ IsWaiting = false;
+ ChangeTimers(false, 0);
+ }
+ else WaitTimer -= diff;
+ }
+
+ for(uint8 t = 0; t < ActiveTimers; ++t){
+ if(Timer[t] < diff && !TimerIsDeactiveted[t]){
+ switch(t){
+ case TIMER_KALEC_JOIN:
+ if(Kalec){
+ DoScriptText(SAY_KALECGOS_JOIN, Kalec);
+ IsKalecJoined = true;
+ TimerIsDeactiveted[TIMER_KALEC_JOIN] = true;
+ }
+ break;
+ case TIMER_SOUL_FLAY:
+ if(!m_creature->IsNonMeleeSpellCasted(false)){
+ m_creature->CastSpell(m_creature->getVictim(), SPELL_SOUL_FLAY, false);
+ m_creature->getVictim()->CastSpell(m_creature->getVictim(), SPELL_SOUL_FLAY_SLOW, true);
+ Timer[TIMER_SOUL_FLAY] = 3500;
+ }
+ break;
+ case TIMER_LEGION_LIGHTNING:
+ if(!m_creature->IsNonMeleeSpellCasted(false)){
+ m_creature->RemoveAurasDueToSpell(SPELL_SOUL_FLAY);
+ for(uint8 z = 0; z < 6; ++z){
+ randomPlayer = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (!randomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) break;
+ }
+ if(randomPlayer)DoCast(randomPlayer, SPELL_LEGION_LIGHTNING, false);
+ else error_log("try to cast SPELL_LEGION_LIGHTNING on invalid target");
+ Timer[TIMER_LEGION_LIGHTNING] = (Phase == PHASE_SACRIFICE) ? 18000 : 30000; // 18 seconds in PHASE_SACRIFICE
+ Timer[TIMER_SOUL_FLAY] = 2500;
+ }
+ break;
+ case TIMER_FIRE_BLOOM:
+ if(!m_creature->IsNonMeleeSpellCasted(false)){
+ m_creature->RemoveAurasDueToSpell(SPELL_SOUL_FLAY);
+ DoCastAOE(SPELL_FIRE_BLOOM, false);
+ Timer[TIMER_FIRE_BLOOM] = (Phase == PHASE_SACRIFICE) ? 25000 : 40000; // 25 seconds in PHASE_SACRIFICE
+ Timer[TIMER_SOUL_FLAY] = 1000;
+ }
+ break;
+ case TIMER_SUMMON_SHILEDORB:
+ for(uint8 i = 1; i < Phase; ++i){
+ float sx, sy;
+ sx = ShieldOrbLocations[0][0] + sin(ShieldOrbLocations[i][0]);
+ sy = ShieldOrbLocations[0][1] + sin(ShieldOrbLocations[i][1]);
+ m_creature->SummonCreature(CREATURE_SHIELD_ORB, sx, sy, SHIELD_ORB_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
+ }
+ Timer[TIMER_SUMMON_SHILEDORB] = 30000+rand()%30*1000; // 30-60seconds cooldown
+ Timer[TIMER_SOUL_FLAY] = 2000;
+ break;
+ case TIMER_SHADOW_SPIKE: //Phase 3
+ if(!m_creature->IsNonMeleeSpellCasted(false)){
+ DoCastAOE(SPELL_SHADOW_SPIKE, false);
+ Timer[TIMER_SHADOW_SPIKE] = 0;
+ TimerIsDeactiveted[TIMER_SHADOW_SPIKE] = true;
+ ChangeTimers(true, 30000);
+ }
+ break;
+ case TIMER_FLAME_DART: //Phase 3
+ DoCastAOE(SPELL_FLAME_DART, false);
+ Timer[TIMER_FLAME_DART] = 3000; //TODO Timer
+ break;
+ case TIMER_DARKNESS: //Phase 3
+ if(!m_creature->IsNonMeleeSpellCasted(false)){
+ // Begins to channel for 8 seconds, then deals 50'000 damage to all raid members.
+ if(!IsInDarkness){
+ DoScriptText(EMOTE_KJ_DARKNESS, m_creature);
+ DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS, false);
+ ChangeTimers(true, 9000);
Timer[TIMER_DARKNESS] = 8750;
- TimerIsDeactiveted[TIMER_DARKNESS] = false;
- if(Phase == PHASE_SACRIFICE) TimerIsDeactiveted[TIMER_ARMAGEDDON] = false;
- IsInDarkness = true;
- }else{
- Timer[TIMER_DARKNESS] = (Phase == PHASE_SACRIFICE) ? 20000 + rand()%15000 : 40000 + rand()%30000;
- IsInDarkness = false;
- DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS_DAMAGE);
- switch(rand()%3){
- case 0: DoScriptText(SAY_KJ_DARKNESS1, m_creature); break;
- case 1: DoScriptText(SAY_KJ_DARKNESS2, m_creature); break;
- case 2: DoScriptText(SAY_KJ_DARKNESS3, m_creature); break;
- }
- }
- Timer[TIMER_SOUL_FLAY] = 9000;
- }
- break;
- case TIMER_ORBS_EMPOWER: //Phase 3
- if(Phase == PHASE_SACRIFICE){
- if(Kalec)((boss_kalecgosKJAI*)Kalec->AI())->EmpowerOrb(true);
- }else if(Kalec)((boss_kalecgosKJAI*)Kalec->AI())->EmpowerOrb(false);
- Timer[TIMER_ORBS_EMPOWER]= (Phase == PHASE_SACRIFICE) ? 45000 : 35000;
- OrbActivated = true;
- TimerIsDeactiveted[TIMER_ORBS_EMPOWER] = true;
- break;
- case TIMER_ARMAGEDDON: //Phase 4
- Unit* target;
- for(uint8 z = 0; z < 6; ++z){
- target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
- if (!target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) break;
- }
- if(target){
- float x, y, z;
- target->GetPosition(x, y, z);
- m_creature->SummonCreature(CREATURE_ARMAGEDDON_TARGET, x,y,z,0, TEMPSUMMON_TIMED_DESPAWN,15000);
- }
- Timer[TIMER_ARMAGEDDON] = 2000; // No, I'm not kidding
- break;
- }
- break;
- }
- }
+ TimerIsDeactiveted[TIMER_DARKNESS] = false;
+ if(Phase == PHASE_SACRIFICE) TimerIsDeactiveted[TIMER_ARMAGEDDON] = false;
+ IsInDarkness = true;
+ }else{
+ Timer[TIMER_DARKNESS] = (Phase == PHASE_SACRIFICE) ? 20000 + rand()%15000 : 40000 + rand()%30000;
+ IsInDarkness = false;
+ DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS_DAMAGE);
+ switch(rand()%3){
+ case 0: DoScriptText(SAY_KJ_DARKNESS1, m_creature); break;
+ case 1: DoScriptText(SAY_KJ_DARKNESS2, m_creature); break;
+ case 2: DoScriptText(SAY_KJ_DARKNESS3, m_creature); break;
+ }
+ }
+ Timer[TIMER_SOUL_FLAY] = 9000;
+ }
+ break;
+ case TIMER_ORBS_EMPOWER: //Phase 3
+ if(Phase == PHASE_SACRIFICE){
+ if(Kalec)((boss_kalecgosKJAI*)Kalec->AI())->EmpowerOrb(true);
+ }else if(Kalec)((boss_kalecgosKJAI*)Kalec->AI())->EmpowerOrb(false);
+ Timer[TIMER_ORBS_EMPOWER]= (Phase == PHASE_SACRIFICE) ? 45000 : 35000;
+ OrbActivated = true;
+ TimerIsDeactiveted[TIMER_ORBS_EMPOWER] = true;
+ break;
+ case TIMER_ARMAGEDDON: //Phase 4
+ Unit* target;
+ for(uint8 z = 0; z < 6; ++z){
+ target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (!target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) break;
+ }
+ if(target){
+ float x, y, z;
+ target->GetPosition(x, y, z);
+ m_creature->SummonCreature(CREATURE_ARMAGEDDON_TARGET, x,y,z,0, TEMPSUMMON_TIMED_DESPAWN,15000);
+ }
+ Timer[TIMER_ARMAGEDDON] = 2000; // No, I'm not kidding
+ break;
+ }
+ break;
+ }
+ }
//Time runs over!
- for(uint8 i = 0; i < ActiveTimers; ++i)
- if(!TimerIsDeactiveted[i]){
- Timer[i] -= diff;
- if(((int32)Timer[i]) < 0) Timer[i] = 0;
- }
-
- //Phase 3
+ for(uint8 i = 0; i < ActiveTimers; ++i)
+ if(!TimerIsDeactiveted[i]){
+ Timer[i] -= diff;
+ if(((int32)Timer[i]) < 0) Timer[i] = 0;
+ }
+
+ //Phase 3
if(Phase <= PHASE_NORMAL){
if(Phase == PHASE_NORMAL && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 85)){
CastSinisterReflection();
DoScriptText(SAY_KJ_PHASE3, m_creature);
Phase = PHASE_DARKNESS;
- OrbActivated = false;
- ActiveTimers = 9;
+ OrbActivated = false;
+ ActiveTimers = 9;
}
else return;
- }
+ }
- //Phase 4
+ //Phase 4
if(Phase <= PHASE_DARKNESS){
if(Phase == PHASE_DARKNESS && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 55)){
DoScriptText(SAY_KJ_PHASE4, m_creature);
Phase = PHASE_ARMAGEDDON;
- OrbActivated = false;
- ActiveTimers = 10;
+ OrbActivated = false;
+ ActiveTimers = 10;
}
else return;
}
-
+
//Phase 5 specific spells all we can
if(Phase <= PHASE_ARMAGEDDON){
if(Phase == PHASE_ARMAGEDDON && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)){
Phase = PHASE_SACRIFICE;
- Creature* Anveena = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ANVEENA)));
- if (Anveena)Anveena->CastSpell(m_creature, SPELL_SACRIFICE_OF_ANVEENA, false);
- OrbActivated = false;
+ Creature* Anveena = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ANVEENA)));
+ if (Anveena)Anveena->CastSpell(m_creature, SPELL_SACRIFICE_OF_ANVEENA, false);
+ OrbActivated = false;
ChangeTimers(true, 10000);// He shouldn't cast spells for ~10 seconds after Anveena's sacrifice. This will be done within Anveena's script
}
else return;
@@ -727,53 +727,53 @@ struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementA
mob_kiljaeden_controllerAI(Creature* c) : Scripted_NoMovementAI(c), Summons(m_creature){
pInstance = ((ScriptedInstance*)c->GetInstanceData());
}
-
+
ScriptedInstance* pInstance;
- Creature* KalecKJ;
- SummonList Summons;
+ Creature* KalecKJ;
+ SummonList Summons;
- bool SummonedDeceivers;
- bool KiljaedenDeath;
+ bool SummonedDeceivers;
+ bool KiljaedenDeath;
uint32 RandomSayTimer;
- uint32 Phase;
+ uint32 Phase;
uint8 DeceiverDeathCount;
- void InitializeAI(){
- KalecKJ = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KALECGOS_KJ));
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->addUnitState(UNIT_STAT_STUNNED);
- }
-
- void Reset(){
+ void InitializeAI(){
+ KalecKJ = Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KALECGOS_KJ));
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ m_creature->addUnitState(UNIT_STAT_STUNNED);
+ }
+
+ void Reset(){
Phase = PHASE_DECEIVERS;
- if(KalecKJ)((boss_kalecgosKJAI*)KalecKJ->AI())->ResetOrbs();
+ if(KalecKJ)((boss_kalecgosKJAI*)KalecKJ->AI())->ResetOrbs();
DeceiverDeathCount = 0;
SummonedDeceivers = false;
KiljaedenDeath = false;
RandomSayTimer = 30000;
- Summons.DespawnAll();
+ Summons.DespawnAll();
}
- void JustSummoned(Creature* summoned){
- switch(summoned->GetEntry()){
- case CREATURE_HAND_OF_THE_DECEIVER:
- summoned->CastSpell(summoned, SPELL_SHADOW_CHANNELING, false);
- break;
+ void JustSummoned(Creature* summoned){
+ switch(summoned->GetEntry()){
+ case CREATURE_HAND_OF_THE_DECEIVER:
+ summoned->CastSpell(summoned, SPELL_SHADOW_CHANNELING, false);
+ break;
case CREATURE_ANVEENA:
- summoned->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
- summoned->CastSpell(summoned, SPELL_ANVEENA_PRISON, true);
- summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- break;
- case CREATURE_KILJAEDEN:
- summoned->CastSpell(summoned, SPELL_REBIRTH, false);
- ((boss_kiljaedenAI*)summoned->AI())->Phase=PHASE_NORMAL;
- summoned->AddThreat(m_creature->getVictim(), 1.0f);
- break;
- }
- Summons.Summon(summoned);
- }
+ summoned->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
+ summoned->CastSpell(summoned, SPELL_ANVEENA_PRISON, true);
+ summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ break;
+ case CREATURE_KILJAEDEN:
+ summoned->CastSpell(summoned, SPELL_REBIRTH, false);
+ ((boss_kiljaedenAI*)summoned->AI())->Phase=PHASE_NORMAL;
+ summoned->AddThreat(m_creature->getVictim(), 1.0f);
+ break;
+ }
+ Summons.Summon(summoned);
+ }
void Aggro(Unit* who) {}
@@ -787,14 +787,14 @@ struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementA
case 3: DoScriptText(SAY_KJ_OFFCOMBAT4, m_creature); break;
case 4: DoScriptText(SAY_KJ_OFFCOMBAT5, m_creature); break;
}
- RandomSayTimer = 30000;
+ RandomSayTimer = 30000;
}else RandomSayTimer -= diff;
if(!SummonedDeceivers){
for(uint8 i = 0; i < 3; ++i)
m_creature->SummonCreature(CREATURE_HAND_OF_THE_DECEIVER, DeceiverLocations[i][0], DeceiverLocations[i][1], FLOOR_Z, DeceiverLocations[i][2], TEMPSUMMON_DEAD_DESPAWN, 0);
-
- DoSpawnCreature(CREATURE_ANVEENA, 0, 0, 40, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
+
+ DoSpawnCreature(CREATURE_ANVEENA, 0, 0, 40, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
DoCast(m_creature, SPELL_ANVEENA_ENERGY_DRAIN);
SummonedDeceivers = true;
}
@@ -802,7 +802,7 @@ struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementA
if(DeceiverDeathCount > 2 && Phase == PHASE_DECEIVERS){
m_creature->RemoveAurasDueToSpell(SPELL_ANVEENA_ENERGY_DRAIN) ;
Phase = PHASE_NORMAL;
- DoSpawnCreature(CREATURE_KILJAEDEN, 0, 0,0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
+ DoSpawnCreature(CREATURE_KILJAEDEN, 0, 0,0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
}
}
};
@@ -819,25 +819,25 @@ struct TRINITY_DLL_DECL mob_hand_of_the_deceiverAI : public ScriptedAI
pInstance = ((ScriptedInstance*)c->GetInstanceData());
}
ScriptedInstance* pInstance;
-
+
uint32 ShadowBoltVolleyTimer;
uint32 FelfirePortalTimer;
-
+
void Reset(){
// TODO: Timers!
ShadowBoltVolleyTimer = 8000 + rand()%6000; // So they don't all cast it in the same moment.
FelfirePortalTimer = 20000;
- if(pInstance)pInstance->SetData(DATA_KILJAEDEN_EVENT, NOT_STARTED);
+ if(pInstance)pInstance->SetData(DATA_KILJAEDEN_EVENT, NOT_STARTED);
}
void JustSummoned(Creature* summoned){
summoned->setFaction(m_creature->getFaction());
- summoned->SetLevel(m_creature->getLevel());
+ summoned->SetLevel(m_creature->getLevel());
}
void Aggro(Unit* who){
if(pInstance){
- pInstance->SetData(DATA_KILJAEDEN_EVENT, IN_PROGRESS);
+ pInstance->SetData(DATA_KILJAEDEN_EVENT, IN_PROGRESS);
Creature* Control = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILJAEDEN_CONTROLLER)));
if(Control)
Control->AddThreat(who, 1.0f);
@@ -848,12 +848,12 @@ struct TRINITY_DLL_DECL mob_hand_of_the_deceiverAI : public ScriptedAI
void JustDied(Unit* killer){
if(!pInstance)
return;
-
+
Creature* Control = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILJAEDEN_CONTROLLER)));
if(Control)
((mob_kiljaeden_controllerAI*)Control->AI())->DeceiverDeathCount++;
}
-
+
void UpdateAI(const uint32 diff){
if(!InCombat)
DoCast(m_creature, SPELL_SHADOW_CHANNELING);
@@ -900,33 +900,33 @@ CreatureAI* GetAI_mob_hand_of_the_deceiver(Creature *_Creature)
struct TRINITY_DLL_DECL mob_felfire_portalAI : public Scripted_NoMovementAI
{
mob_felfire_portalAI(Creature* c) : Scripted_NoMovementAI(c) {}
-
+
uint32 SpawnFiendTimer;
- void InitializeAI(){
- SpawnFiendTimer = 5000;
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- }
-
+ void InitializeAI(){
+ SpawnFiendTimer = 5000;
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ }
+
// TODO: Timers
- void Reset() {
+ void Reset() {
- }
+ }
void Aggro(Unit* who) {}
void JustSummoned(Creature* summoned)
{
summoned->setFaction(m_creature->getFaction());
- summoned->SetLevel(m_creature->getLevel());
+ summoned->SetLevel(m_creature->getLevel());
}
void UpdateAI(const uint32 diff)
{
- if(!UpdateVictim())
+ if(!UpdateVictim())
return;
-
+
if(SpawnFiendTimer < diff)
{
Creature* Fiend = DoSpawnCreature(CREATURE_VOLATILE_FELFIRE_FIEND, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000);
@@ -946,9 +946,9 @@ CreatureAI* GetAI_mob_felfire_portal(Creature *_Creature)
struct TRINITY_DLL_DECL mob_volatile_felfire_fiendAI : public ScriptedAI
{
mob_volatile_felfire_fiendAI(Creature* c) : ScriptedAI(c) {}
-
+
uint32 ExplodeTimer;
-
+
bool LockedTarget;
void Reset()
@@ -967,16 +967,16 @@ struct TRINITY_DLL_DECL mob_volatile_felfire_fiendAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
- if(!UpdateVictim())
+ if(!UpdateVictim())
return;
if(!LockedTarget){
m_creature->AddThreat(m_creature->getVictim(), 10000000.0f);
LockedTarget = true;
}
-
+
if(ExplodeTimer){
- if(ExplodeTimer < diff)
+ if(ExplodeTimer < diff)
ExplodeTimer = 0;
else ExplodeTimer -= diff;
}
@@ -999,40 +999,40 @@ struct TRINITY_DLL_DECL mob_armageddonAI : public Scripted_NoMovementAI
mob_armageddonAI(Creature* c) : Scripted_NoMovementAI(c) {}
uint8 Spell;
- uint32 Timer;
+ uint32 Timer;
void Reset(){
Spell = 0;
- Timer = 0;
+ Timer = 0;
}
void Aggro(Unit* who){}
void UpdateAI(const uint32 diff)
{
- if(Timer < diff){
- switch(Spell){
- case 0:
- DoCast(m_creature, SPELL_ARMAGEDDON_VISUAL, true);
- ++Spell;
- break;
- case 1:
- DoCast(m_creature, SPELL_ARMAGEDDON_VISUAL2, true);
- Timer = 9000;
- ++Spell;
- break;
- case 2:
- DoCast(m_creature, SPELL_ARMAGEDDON_TRIGGER, true);
- ++Spell;
- Timer = 5000;
- break;
- case 3:
- m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- m_creature->RemoveCorpse();
- break;
+ if(Timer < diff){
+ switch(Spell){
+ case 0:
+ DoCast(m_creature, SPELL_ARMAGEDDON_VISUAL, true);
+ ++Spell;
+ break;
+ case 1:
+ DoCast(m_creature, SPELL_ARMAGEDDON_VISUAL2, true);
+ Timer = 9000;
+ ++Spell;
+ break;
+ case 2:
+ DoCast(m_creature, SPELL_ARMAGEDDON_TRIGGER, true);
+ ++Spell;
+ Timer = 5000;
+ break;
+ case 3:
+ m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ m_creature->RemoveCorpse();
+ break;
}
- }else Timer -=diff;
- }
+ }else Timer -=diff;
+ }
};
CreatureAI* GetAI_mob_armageddon(Creature *_Creature)
@@ -1043,220 +1043,220 @@ CreatureAI* GetAI_mob_armageddon(Creature *_Creature)
//AI for Shield Orbs
struct TRINITY_DLL_DECL mob_shield_orbAI : public ScriptedAI
{
- mob_shield_orbAI(Creature* c) : ScriptedAI(c) {
- pInstance = ((ScriptedInstance*)c->GetInstanceData());
- }
-
- bool PointReached;
- bool Clockwise;
- uint32 Timer;
- uint32 CheckTimer;
- ScriptedInstance* pInstance;
- float x, y, r, c, mx, my;
-
- void InitializeAI(){
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
- PointReached = true;
- Timer = 500+ rand()%500;
- CheckTimer = 1000;
- r = 17;
- c = 0;
- mx = ShieldOrbLocations[0][0];
- my = ShieldOrbLocations[0][1];
- if(rand()%2 == 0)Clockwise = true;
- else Clockwise = false;
- }
-
- void Reset(){
- }
-
- void Aggro(Unit* who){}
-
- void UpdateAI(const uint32 diff){
- if(PointReached){
- if(Clockwise){
- y = my - r * sin(c);
- x = mx - r * cos(c);
- }else{
- y = my + r * sin(c);
- x = mx + r * cos(c);
- }
- PointReached = false;
- CheckTimer = 1000;
- m_creature->GetMotionMaster()->MovePoint(1,x, y, SHIELD_ORB_Z);
- c += 3.1415926535/32;
- if(c > 2*3.1415926535) c = 0;
- }else{
- if (CheckTimer < diff){
- DoTeleportTo(x,y,SHIELD_ORB_Z);
- PointReached = true;
- }else CheckTimer -= diff;
-
- }
-
- if (Timer < diff){
- Unit* random = (Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID)));
+ mob_shield_orbAI(Creature* c) : ScriptedAI(c) {
+ pInstance = ((ScriptedInstance*)c->GetInstanceData());
+ }
+
+ bool PointReached;
+ bool Clockwise;
+ uint32 Timer;
+ uint32 CheckTimer;
+ ScriptedInstance* pInstance;
+ float x, y, r, c, mx, my;
+
+ void InitializeAI(){
+ m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
+ PointReached = true;
+ Timer = 500+ rand()%500;
+ CheckTimer = 1000;
+ r = 17;
+ c = 0;
+ mx = ShieldOrbLocations[0][0];
+ my = ShieldOrbLocations[0][1];
+ if(rand()%2 == 0)Clockwise = true;
+ else Clockwise = false;
+ }
+
+ void Reset(){
+ }
+
+ void Aggro(Unit* who){}
+
+ void UpdateAI(const uint32 diff){
+ if(PointReached){
+ if(Clockwise){
+ y = my - r * sin(c);
+ x = mx - r * cos(c);
+ }else{
+ y = my + r * sin(c);
+ x = mx + r * cos(c);
+ }
+ PointReached = false;
+ CheckTimer = 1000;
+ m_creature->GetMotionMaster()->MovePoint(1,x, y, SHIELD_ORB_Z);
+ c += 3.1415926535/32;
+ if(c > 2*3.1415926535) c = 0;
+ }else{
+ if (CheckTimer < diff){
+ DoTeleportTo(x,y,SHIELD_ORB_Z);
+ PointReached = true;
+ }else CheckTimer -= diff;
+
+ }
+
+ if (Timer < diff){
+ Unit* random = (Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID)));
if (random)DoCast(random, SPELL_SHADOW_BOLT, false);
- Timer = 500+ rand()%500;
- }else Timer -= diff;
- }
+ Timer = 500+ rand()%500;
+ }else Timer -= diff;
+ }
- void MovementInform(uint32 type, uint32 id){
- if(type != POINT_MOTION_TYPE)
- return;
+ void MovementInform(uint32 type, uint32 id){
+ if(type != POINT_MOTION_TYPE)
+ return;
PointReached = true;
- }
+ }
};
CreatureAI* GetAI_mob_shield_orb(Creature *_Creature)
{
- return new mob_shield_orbAI (_Creature);
+ return new mob_shield_orbAI (_Creature);
}
//AI for Sinister Reflection
struct TRINITY_DLL_DECL mob_sinster_reflectionAI : public ScriptedAI
{
- mob_sinster_reflectionAI(Creature* c) : ScriptedAI(c) {}
+ mob_sinster_reflectionAI(Creature* c) : ScriptedAI(c) {}
uint8 Class;
- uint32 Timer[3];
+ uint32 Timer[3];
- void Reset(){
+ void Reset(){
Timer[0] = 0;
- Timer[1] = 0;
- Timer[2] = 0;
- Class = 0;
- }
-
- void Aggro(Unit* who){}
-
- void UpdateAI(const uint32 diff){
-
- if(Class == 0){
- Class = m_creature->getVictim()->getClass();
- switch(Class){
- case CLASS_DRUID:
- break;
- case CLASS_HUNTER:
- break;
- case CLASS_MAGE:
- break;
- case CLASS_WARLOCK:
- break;
- case CLASS_WARRIOR:
- m_creature->SetCanDualWield(true);
- break;
- case CLASS_PALADIN:
- break;
- case CLASS_PRIEST:
- break;
- case CLASS_SHAMAN:
- m_creature->SetCanDualWield(true);
- break;
- case CLASS_ROGUE:
- m_creature->SetCanDualWield(true);
- break;
- }
- }
-
- switch(Class){
+ Timer[1] = 0;
+ Timer[2] = 0;
+ Class = 0;
+ }
+
+ void Aggro(Unit* who){}
+
+ void UpdateAI(const uint32 diff){
+
+ if(Class == 0){
+ Class = m_creature->getVictim()->getClass();
+ switch(Class){
+ case CLASS_DRUID:
+ break;
+ case CLASS_HUNTER:
+ break;
+ case CLASS_MAGE:
+ break;
+ case CLASS_WARLOCK:
+ break;
+ case CLASS_WARRIOR:
+ m_creature->SetCanDualWield(true);
+ break;
+ case CLASS_PALADIN:
+ break;
+ case CLASS_PRIEST:
+ break;
+ case CLASS_SHAMAN:
+ m_creature->SetCanDualWield(true);
+ break;
+ case CLASS_ROGUE:
+ m_creature->SetCanDualWield(true);
+ break;
+ }
+ }
+
+ switch(Class){
case CLASS_DRUID:
- if(Timer[1] < diff){
+ if(Timer[1] < diff){
DoCast(m_creature->getVictim(), SPELL_SR_MOONFIRE, false);
Timer[1] = 3000;
- }
- DoMeleeAttackIfReady();
- break;
- case CLASS_HUNTER:
- if(Timer[1] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_MULTI_SHOT, false);
- Timer[1] = 9000;
- }
- if(Timer[2] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_SHOOT, false);
- Timer[2] = 5000;
- }
- if(m_creature->IsWithinMeleeRange(m_creature->getVictim(), 6)){
- if(Timer[3] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_MULTI_SHOT, false);
- Timer[3] = 7000;
- }
- DoMeleeAttackIfReady();
- }
- break;
- case CLASS_MAGE:
- if(Timer[1] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_FIREBALL, false);
- Timer[1] = 3000;
- }
- DoMeleeAttackIfReady();
- break;
- case CLASS_WARLOCK:
- if(Timer[1] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_SHADOW_BOLT, false);
- Timer[1] = 4000;
- }
- if(Timer[2] < diff){
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_SR_CURSE_OF_AGONY, true);
- Timer[2] = 3000;
- }
- DoMeleeAttackIfReady();
- break;
- case CLASS_WARRIOR:
- if(Timer[1] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_WHIRLWIND, false);
- Timer[1] = 10000;
- }
- DoMeleeAttackIfReady();
- break;
- case CLASS_PALADIN:
- if(Timer[1] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_HAMMER_OF_JUSTICE, false);
- Timer[1] = 7000;
- }
- if(Timer[2] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_HOLY_SHOCK, false);
- Timer[2] = 3000;
- }
- DoMeleeAttackIfReady();
- break;
- case CLASS_PRIEST:
- if(Timer[1] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_HOLY_SMITE, false);
- Timer[1] = 5000;
- }
- if(Timer[2] < diff){
- DoCast(m_creature, SPELL_SR_RENEW, false);
- Timer[2] = 7000;
- }
- DoMeleeAttackIfReady();
- break;
- case CLASS_SHAMAN:
- if(Timer[1] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_EARTH_SHOCK, false);
- Timer[1] = 5000;
- }
- DoMeleeAttackIfReady();
- break;
- case CLASS_ROGUE:
- if(Timer[1] < diff){
- DoCast(m_creature->getVictim(), SPELL_SR_HEMORRHAGE, true);
- Timer[1] = 5000;
- }
- DoMeleeAttackIfReady();
- break;
- }
- debug_log("Sinister-Timer");
- for(uint8 i = 0; i < 3; ++i)
- Timer[i] -= diff;
- }
+ }
+ DoMeleeAttackIfReady();
+ break;
+ case CLASS_HUNTER:
+ if(Timer[1] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_MULTI_SHOT, false);
+ Timer[1] = 9000;
+ }
+ if(Timer[2] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_SHOOT, false);
+ Timer[2] = 5000;
+ }
+ if(m_creature->IsWithinMeleeRange(m_creature->getVictim(), 6)){
+ if(Timer[3] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_MULTI_SHOT, false);
+ Timer[3] = 7000;
+ }
+ DoMeleeAttackIfReady();
+ }
+ break;
+ case CLASS_MAGE:
+ if(Timer[1] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_FIREBALL, false);
+ Timer[1] = 3000;
+ }
+ DoMeleeAttackIfReady();
+ break;
+ case CLASS_WARLOCK:
+ if(Timer[1] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_SHADOW_BOLT, false);
+ Timer[1] = 4000;
+ }
+ if(Timer[2] < diff){
+ DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_SR_CURSE_OF_AGONY, true);
+ Timer[2] = 3000;
+ }
+ DoMeleeAttackIfReady();
+ break;
+ case CLASS_WARRIOR:
+ if(Timer[1] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_WHIRLWIND, false);
+ Timer[1] = 10000;
+ }
+ DoMeleeAttackIfReady();
+ break;
+ case CLASS_PALADIN:
+ if(Timer[1] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_HAMMER_OF_JUSTICE, false);
+ Timer[1] = 7000;
+ }
+ if(Timer[2] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_HOLY_SHOCK, false);
+ Timer[2] = 3000;
+ }
+ DoMeleeAttackIfReady();
+ break;
+ case CLASS_PRIEST:
+ if(Timer[1] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_HOLY_SMITE, false);
+ Timer[1] = 5000;
+ }
+ if(Timer[2] < diff){
+ DoCast(m_creature, SPELL_SR_RENEW, false);
+ Timer[2] = 7000;
+ }
+ DoMeleeAttackIfReady();
+ break;
+ case CLASS_SHAMAN:
+ if(Timer[1] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_EARTH_SHOCK, false);
+ Timer[1] = 5000;
+ }
+ DoMeleeAttackIfReady();
+ break;
+ case CLASS_ROGUE:
+ if(Timer[1] < diff){
+ DoCast(m_creature->getVictim(), SPELL_SR_HEMORRHAGE, true);
+ Timer[1] = 5000;
+ }
+ DoMeleeAttackIfReady();
+ break;
+ }
+ debug_log("Sinister-Timer");
+ for(uint8 i = 0; i < 3; ++i)
+ Timer[i] -= diff;
+ }
};
CreatureAI* GetAI_mob_sinster_reflection(Creature *_Creature)
{
- return new mob_sinster_reflectionAI (_Creature);
+ return new mob_sinster_reflectionAI (_Creature);
}
void AddSC_boss_kiljaeden()
@@ -1308,8 +1308,8 @@ void AddSC_boss_kiljaeden()
newscript->Name = "mob_shield_orb";
newscript->RegisterSelf();
- newscript = new Script;
- newscript->GetAI = &GetAI_mob_sinster_reflection;
- newscript->Name = "mob_sinster_reflection";
- newscript->RegisterSelf();
+ newscript = new Script;
+ newscript->GetAI = &GetAI_mob_sinster_reflection;
+ newscript->Name = "mob_sinster_reflection";
+ newscript->RegisterSelf();
};
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_muru.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_muru.cpp
index 38f9f929b50..6000ee474e0 100644
--- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_muru.cpp
+++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_muru.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Boss_Muru
SD%Complete: 80
-SDComment: all sounds, black hole effect triggers to often (46228)
+SDComment: all sounds, black hole effect triggers to often (46228)
*/
#include "precompiled.h"
@@ -26,592 +26,592 @@ SDComment: all sounds, black hole effect triggers to often (46228)
// Muru & Entropius's spells
enum Spells
{
- SPELL_ENRAGE = 26662,
-
- // Muru's spells
- SPELL_NEGATIVE_ENERGY = 46009, //(this trigger 46008)
- SPELL_DARKNESS = 45999,
- SPELL_OPEN_ALL_PORTALS = 46177,
- SPELL_OPEN_PORTAL = 45977,
- SPELL_OPEN_PORTAL_2 = 45976,
- SPELL_SUMMON_BERSERKER = 46037,
- SPELL_SUMNON_FURY_MAGE = 46038,
- SPELL_SUMMON_VOID_SENTINEL = 45988,
- SPELL_SUMMON_ENTROPIUS = 46217,
-
- // Entropius's spells
- SPELL_DARKNESS_E = 46269,
- SPELL_BLACKHOLE = 46282,
- SPELL_NEGATIVE_ENERGY_E = 46284,
- SPELL_ENTROPIUS_SPAWN = 46223,
-
- // Shadowsword Berserker's spells
- SPELL_FLURRY = 46160,
- SPELL_DUAL_WIELD = 29651,
-
- // Shadowsword Fury Mage's spells
- SPELL_FEL_FIREBALL = 46101,
- SPELL_SPELL_FURY = 46102,
-
- // Void Sentinel's spells
- SPELL_SHADOW_PULSE = 46087,
- SPELL_VOID_BLAST = 46161,
-
- // Void Spawn's spells
- SPELL_SHADOW_BOLT_VOLLEY = 46082,
-
- //Dark Fiend Spells
- SPELL_DARKFIEND_AOE = 45944,
- SPELL_DARKFIEND_VISUAL = 45936,
- SPELL_DARKFIEND_SKIN = 45934,
-
- //Black Hole Spells
- SPELL_BLACKHOLE_SPAWN = 46242,
- SPELL_BLACKHOLE_GROW = 46228
+ SPELL_ENRAGE = 26662,
+
+ // Muru's spells
+ SPELL_NEGATIVE_ENERGY = 46009, //(this trigger 46008)
+ SPELL_DARKNESS = 45999,
+ SPELL_OPEN_ALL_PORTALS = 46177,
+ SPELL_OPEN_PORTAL = 45977,
+ SPELL_OPEN_PORTAL_2 = 45976,
+ SPELL_SUMMON_BERSERKER = 46037,
+ SPELL_SUMNON_FURY_MAGE = 46038,
+ SPELL_SUMMON_VOID_SENTINEL = 45988,
+ SPELL_SUMMON_ENTROPIUS = 46217,
+
+ // Entropius's spells
+ SPELL_DARKNESS_E = 46269,
+ SPELL_BLACKHOLE = 46282,
+ SPELL_NEGATIVE_ENERGY_E = 46284,
+ SPELL_ENTROPIUS_SPAWN = 46223,
+
+ // Shadowsword Berserker's spells
+ SPELL_FLURRY = 46160,
+ SPELL_DUAL_WIELD = 29651,
+
+ // Shadowsword Fury Mage's spells
+ SPELL_FEL_FIREBALL = 46101,
+ SPELL_SPELL_FURY = 46102,
+
+ // Void Sentinel's spells
+ SPELL_SHADOW_PULSE = 46087,
+ SPELL_VOID_BLAST = 46161,
+
+ // Void Spawn's spells
+ SPELL_SHADOW_BOLT_VOLLEY = 46082,
+
+ //Dark Fiend Spells
+ SPELL_DARKFIEND_AOE = 45944,
+ SPELL_DARKFIEND_VISUAL = 45936,
+ SPELL_DARKFIEND_SKIN = 45934,
+
+ //Black Hole Spells
+ SPELL_BLACKHOLE_SPAWN = 46242,
+ SPELL_BLACKHOLE_GROW = 46228
};
enum Creatures
{
- CREATURE_DARKNESS = 25879,
- CREATURE_DARK_FIENDS = 25744,
- CREATURE_BERSERKER = 25798,
- CREATURE_FURY_MAGE = 25799,
- CREATURE_VOID_SENTINEL = 25772,
- CREATURE_VOID_SPAWN = 25824,
- CREATURE_BLACK_HOLE = 25855,
- BOSS_MURU = 25741,
- BOSS_ENTROPIUS = 25840
+ CREATURE_DARKNESS = 25879,
+ CREATURE_DARK_FIENDS = 25744,
+ CREATURE_BERSERKER = 25798,
+ CREATURE_FURY_MAGE = 25799,
+ CREATURE_VOID_SENTINEL = 25772,
+ CREATURE_VOID_SPAWN = 25824,
+ CREATURE_BLACK_HOLE = 25855,
+ BOSS_MURU = 25741,
+ BOSS_ENTROPIUS = 25840
};
enum BossTimers{
- TIMER_DARKNESS = 0,
- TIMER_HUMANOIDES = 1,
- TIMER_PHASE = 2,
- TIMER_SENTINEL = 3
+ TIMER_DARKNESS = 0,
+ TIMER_HUMANOIDES = 1,
+ TIMER_PHASE = 2,
+ TIMER_SENTINEL = 3
};
-float DarkFiends[8][4] =
+float DarkFiends[8][4] =
{
- {1819.9, 609.80, 69.74, 1.94},
- {1829.39, 617.89, 69.73, 2.61},
- {1801.98, 633.62, 69.74, 5.71},
- {1830.88, 629.99, 69.73, 3.52},
- {1800.38, 621.41, 69.74, 0.22},
- {1808.3 , 612.45, 69.73, 1.02},
- {1823.9 , 639.69, 69.74, 4.12},
- {1811.85, 640.46, 69.73, 4.97}
+ {1819.9, 609.80, 69.74, 1.94},
+ {1829.39, 617.89, 69.73, 2.61},
+ {1801.98, 633.62, 69.74, 5.71},
+ {1830.88, 629.99, 69.73, 3.52},
+ {1800.38, 621.41, 69.74, 0.22},
+ {1808.3 , 612.45, 69.73, 1.02},
+ {1823.9 , 639.69, 69.74, 4.12},
+ {1811.85, 640.46, 69.73, 4.97}
};
float Humanoides[6][5] =
{
- {CREATURE_FURY_MAGE, 1780.16, 666.83, 71.19, 5.21},
- {CREATURE_FURY_MAGE, 1847.93, 600.30, 71.30, 2.57},
- {CREATURE_BERSERKER, 1779.97, 660.64, 71.19, 5.28},
- {CREATURE_BERSERKER, 1786.2 , 661.01, 71.19, 4.51},
- {CREATURE_BERSERKER, 1845.17, 602.63, 71.28, 2.43},
- {CREATURE_BERSERKER, 1842.91, 599.93, 71.23, 2.44}
+ {CREATURE_FURY_MAGE, 1780.16, 666.83, 71.19, 5.21},
+ {CREATURE_FURY_MAGE, 1847.93, 600.30, 71.30, 2.57},
+ {CREATURE_BERSERKER, 1779.97, 660.64, 71.19, 5.28},
+ {CREATURE_BERSERKER, 1786.2 , 661.01, 71.19, 4.51},
+ {CREATURE_BERSERKER, 1845.17, 602.63, 71.28, 2.43},
+ {CREATURE_BERSERKER, 1842.91, 599.93, 71.23, 2.44}
};
uint32 EnrageTimer = 600000;
struct TRINITY_DLL_DECL boss_entropiusAI : public ScriptedAI
{
- boss_entropiusAI(Creature *c) : ScriptedAI(c), Summons(m_creature){
- pInstance = ((ScriptedInstance*)c->GetInstanceData());
- Combat = false;
- }
-
- ScriptedInstance* pInstance;
- SummonList Summons;
-
- bool Combat;
- uint32 BlackHoleSummonTimer;
-
- void Reset() {
- if (!Combat){
- BlackHoleSummonTimer = 15000;
- DoCastAOE(SPELL_NEGATIVE_ENERGY_E, false);
- }else{
+ boss_entropiusAI(Creature *c) : ScriptedAI(c), Summons(m_creature){
+ pInstance = ((ScriptedInstance*)c->GetInstanceData());
+ Combat = false;
+ }
+
+ ScriptedInstance* pInstance;
+ SummonList Summons;
+
+ bool Combat;
+ uint32 BlackHoleSummonTimer;
+
+ void Reset() {
+ if (!Combat){
+ BlackHoleSummonTimer = 15000;
+ DoCastAOE(SPELL_NEGATIVE_ENERGY_E, false);
+ }else{
if(pInstance)
pInstance->SetData(DATA_MURU_EVENT, NOT_STARTED);
- Summons.DespawnAll();
- }
- }
-
- void Aggro(Unit *who) {
- DoCastAOE(SPELL_NEGATIVE_ENERGY_E, true);
- DoCast(m_creature, SPELL_ENTROPIUS_SPAWN, false);
- }
-
- void JustSummoned(Creature* summoned)
- {
- switch(summoned->GetEntry()){
- case CREATURE_DARK_FIENDS:
- summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false);
- break;
- case CREATURE_DARKNESS:
- summoned->addUnitState(UNIT_STAT_STUNNED);
- float x,y,z,o;
- summoned->GetHomePosition(x,y,z,o);
- m_creature->SummonCreature(CREATURE_DARK_FIENDS, x,y,z,o, TEMPSUMMON_CORPSE_DESPAWN, 0);
- break;
- }
- summoned->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM,0, 50, true));
- Summons.Summon(summoned);
- }
-
- void KilledUnit(Unit* victim){
-
- }
-
- void JustDied(Unit* killer){
- if(pInstance)pInstance->SetData(DATA_MURU_EVENT, DONE);
- Summons.DespawnAll();
- }
-
- void UpdateAI(const uint32 diff)
- {
- if(!UpdateVictim())
- return;
-
- if(!Combat)Combat = true;
-
- if(EnrageTimer < diff && !m_creature->HasAura(SPELL_ENRAGE, 0)){
- DoCast(m_creature,SPELL_ENRAGE, false);
- }else EnrageTimer -= diff;
-
- if(BlackHoleSummonTimer < diff){
- Unit* random = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
- if(!random)return;
- DoCast(random, SPELL_DARKNESS_E, false);
- random = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
- if(!random)return;
- random->CastSpell(random, SPELL_BLACKHOLE, false);
- BlackHoleSummonTimer = 15000;
- }else BlackHoleSummonTimer -= diff;
-
- DoMeleeAttackIfReady();
- }
+ Summons.DespawnAll();
+ }
+ }
+
+ void Aggro(Unit *who) {
+ DoCastAOE(SPELL_NEGATIVE_ENERGY_E, true);
+ DoCast(m_creature, SPELL_ENTROPIUS_SPAWN, false);
+ }
+
+ void JustSummoned(Creature* summoned)
+ {
+ switch(summoned->GetEntry()){
+ case CREATURE_DARK_FIENDS:
+ summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false);
+ break;
+ case CREATURE_DARKNESS:
+ summoned->addUnitState(UNIT_STAT_STUNNED);
+ float x,y,z,o;
+ summoned->GetHomePosition(x,y,z,o);
+ m_creature->SummonCreature(CREATURE_DARK_FIENDS, x,y,z,o, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ break;
+ }
+ summoned->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM,0, 50, true));
+ Summons.Summon(summoned);
+ }
+
+ void KilledUnit(Unit* victim){
+
+ }
+
+ void JustDied(Unit* killer){
+ if(pInstance)pInstance->SetData(DATA_MURU_EVENT, DONE);
+ Summons.DespawnAll();
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(!UpdateVictim())
+ return;
+
+ if(!Combat)Combat = true;
+
+ if(EnrageTimer < diff && !m_creature->HasAura(SPELL_ENRAGE, 0)){
+ DoCast(m_creature,SPELL_ENRAGE, false);
+ }else EnrageTimer -= diff;
+
+ if(BlackHoleSummonTimer < diff){
+ Unit* random = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
+ if(!random)return;
+ DoCast(random, SPELL_DARKNESS_E, false);
+ random = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
+ if(!random)return;
+ random->CastSpell(random, SPELL_BLACKHOLE, false);
+ BlackHoleSummonTimer = 15000;
+ }else BlackHoleSummonTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
};
CreatureAI* GetAI_boss_entropius(Creature *_Creature)
{
- return new boss_entropiusAI (_Creature);
+ return new boss_entropiusAI (_Creature);
}
struct TRINITY_DLL_DECL boss_muruAI : public Scripted_NoMovementAI
{
- boss_muruAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature){
- pInstance = ((ScriptedInstance*)c->GetInstanceData());
- }
-
- ScriptedInstance* pInstance;
- SummonList Summons;
-
- uint8 Phase;
- uint32 Timer[4];
-
- bool DarkFiend;
-
- void Reset()
- {
- DarkFiend = false;
- Phase = 1;
-
- EnrageTimer = 600000;
- Timer[TIMER_DARKNESS] = 45000;
- Timer[TIMER_HUMANOIDES] = 10000;
- Timer[TIMER_PHASE] = 2000;
- Timer[TIMER_SENTINEL] = 31500;
- Summons.DespawnAll();
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetVisibility(VISIBILITY_ON);
- if(pInstance)
- pInstance->SetData(DATA_MURU_EVENT, NOT_STARTED);
- }
-
- void Aggro(Unit *who)
- {
- if(pInstance)
- pInstance->SetData(DATA_MURU_EVENT, IN_PROGRESS);
- DoCastAOE(SPELL_NEGATIVE_ENERGY,false);
- }
-
- void KilledUnit(Unit* victim){}
-
- void DamageTaken(Unit *done_by, uint32 &damage) {
- if(damage > m_creature->GetHealth() && Phase == 1){
- damage = 0;
- Phase = 2;
- m_creature->RemoveAllAuras();
- DoCast(m_creature, SPELL_OPEN_ALL_PORTALS, false);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- }
- if(Phase > 1 && Phase < 4)damage = 0;
- }
-
- void JustSummoned(Creature* summoned)
- {
- switch(summoned->GetEntry()){
- case BOSS_ENTROPIUS:
- m_creature->SetVisibility(VISIBILITY_OFF);
- break;
- case CREATURE_DARK_FIENDS:
- summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false);
- break;
- }
- summoned->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM,0, 50, true));
- Summons.Summon(summoned);
- }
-
- void UpdateAI(const uint32 diff)
- {
- if(!UpdateVictim())
- return;
-
- if(Phase == 3){
- if(Timer[TIMER_PHASE] <diff){
- switch(pInstance->GetData(DATA_MURU_EVENT)){
- case NOT_STARTED:
- Reset();
- break;
- case DONE:
- Phase = 4;
- m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- m_creature->RemoveCorpse();
- break;
- }
- Timer[TIMER_PHASE] = 3000;
- }else Timer[TIMER_PHASE] -= diff;
- return;
- }
-
- if (EnrageTimer < diff && !m_creature->HasAura(SPELL_ENRAGE, 0))
- DoCast(m_creature, SPELL_ENRAGE, false);
- else EnrageTimer -= diff;
-
- for (uint8 i = 0; i < 4; ++i){
- if(Timer[i] < diff){
- switch(i){
- case TIMER_DARKNESS:
- if(!DarkFiend){
- DoCastAOE(SPELL_DARKNESS, false);
- Timer[TIMER_DARKNESS] = 3000;
- DarkFiend = true;
- }else{
- DarkFiend = false;
- for(uint8 i = 0; i < 8; ++i)
- m_creature->SummonCreature(CREATURE_DARK_FIENDS,DarkFiends[i][0],DarkFiends[i][1],DarkFiends[i][2], DarkFiends[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
- Timer[TIMER_DARKNESS] = 42000;
- }
- break;
-
- case TIMER_HUMANOIDES:
- for(uint8 i = 0; i < 6; ++i)
- m_creature->SummonCreature(Humanoides[i][0],Humanoides[i][1],Humanoides[i][2],Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0);
- Timer[TIMER_HUMANOIDES] = 60000;
- break;
-
- case TIMER_PHASE:
- m_creature->RemoveAllAuras();
- DoCast(m_creature, SPELL_SUMMON_ENTROPIUS, false);
- Timer[TIMER_PHASE] = 3000;
- Phase = 3;
- return;
-
- case TIMER_SENTINEL:
- DoCastAOE(SPELL_OPEN_PORTAL_2, false);
- Timer[TIMER_SENTINEL] = 30000;
- break;
- }break;}
- }
-
- //Timer
- for(uint8 i = 0; i < 4; ++i){
- if(i != TIMER_PHASE)Timer[i] -= diff;
- else if(Phase == 2) Timer[i] -= diff;
- }
- }
+ boss_muruAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature){
+ pInstance = ((ScriptedInstance*)c->GetInstanceData());
+ }
+
+ ScriptedInstance* pInstance;
+ SummonList Summons;
+
+ uint8 Phase;
+ uint32 Timer[4];
+
+ bool DarkFiend;
+
+ void Reset()
+ {
+ DarkFiend = false;
+ Phase = 1;
+
+ EnrageTimer = 600000;
+ Timer[TIMER_DARKNESS] = 45000;
+ Timer[TIMER_HUMANOIDES] = 10000;
+ Timer[TIMER_PHASE] = 2000;
+ Timer[TIMER_SENTINEL] = 31500;
+ Summons.DespawnAll();
+ m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ m_creature->SetVisibility(VISIBILITY_ON);
+ if(pInstance)
+ pInstance->SetData(DATA_MURU_EVENT, NOT_STARTED);
+ }
+
+ void Aggro(Unit *who)
+ {
+ if(pInstance)
+ pInstance->SetData(DATA_MURU_EVENT, IN_PROGRESS);
+ DoCastAOE(SPELL_NEGATIVE_ENERGY,false);
+ }
+
+ void KilledUnit(Unit* victim){}
+
+ void DamageTaken(Unit *done_by, uint32 &damage) {
+ if(damage > m_creature->GetHealth() && Phase == 1){
+ damage = 0;
+ Phase = 2;
+ m_creature->RemoveAllAuras();
+ DoCast(m_creature, SPELL_OPEN_ALL_PORTALS, false);
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ }
+ if(Phase > 1 && Phase < 4)damage = 0;
+ }
+
+ void JustSummoned(Creature* summoned)
+ {
+ switch(summoned->GetEntry()){
+ case BOSS_ENTROPIUS:
+ m_creature->SetVisibility(VISIBILITY_OFF);
+ break;
+ case CREATURE_DARK_FIENDS:
+ summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false);
+ break;
+ }
+ summoned->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM,0, 50, true));
+ Summons.Summon(summoned);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(!UpdateVictim())
+ return;
+
+ if(Phase == 3){
+ if(Timer[TIMER_PHASE] <diff){
+ switch(pInstance->GetData(DATA_MURU_EVENT)){
+ case NOT_STARTED:
+ Reset();
+ break;
+ case DONE:
+ Phase = 4;
+ m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ m_creature->RemoveCorpse();
+ break;
+ }
+ Timer[TIMER_PHASE] = 3000;
+ }else Timer[TIMER_PHASE] -= diff;
+ return;
+ }
+
+ if (EnrageTimer < diff && !m_creature->HasAura(SPELL_ENRAGE, 0))
+ DoCast(m_creature, SPELL_ENRAGE, false);
+ else EnrageTimer -= diff;
+
+ for (uint8 i = 0; i < 4; ++i){
+ if(Timer[i] < diff){
+ switch(i){
+ case TIMER_DARKNESS:
+ if(!DarkFiend){
+ DoCastAOE(SPELL_DARKNESS, false);
+ Timer[TIMER_DARKNESS] = 3000;
+ DarkFiend = true;
+ }else{
+ DarkFiend = false;
+ for(uint8 i = 0; i < 8; ++i)
+ m_creature->SummonCreature(CREATURE_DARK_FIENDS,DarkFiends[i][0],DarkFiends[i][1],DarkFiends[i][2], DarkFiends[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
+ Timer[TIMER_DARKNESS] = 42000;
+ }
+ break;
+
+ case TIMER_HUMANOIDES:
+ for(uint8 i = 0; i < 6; ++i)
+ m_creature->SummonCreature(Humanoides[i][0],Humanoides[i][1],Humanoides[i][2],Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0);
+ Timer[TIMER_HUMANOIDES] = 60000;
+ break;
+
+ case TIMER_PHASE:
+ m_creature->RemoveAllAuras();
+ DoCast(m_creature, SPELL_SUMMON_ENTROPIUS, false);
+ Timer[TIMER_PHASE] = 3000;
+ Phase = 3;
+ return;
+
+ case TIMER_SENTINEL:
+ DoCastAOE(SPELL_OPEN_PORTAL_2, false);
+ Timer[TIMER_SENTINEL] = 30000;
+ break;
+ }break;}
+ }
+
+ //Timer
+ for(uint8 i = 0; i < 4; ++i){
+ if(i != TIMER_PHASE)Timer[i] -= diff;
+ else if(Phase == 2) Timer[i] -= diff;
+ }
+ }
};
CreatureAI* GetAI_boss_muru(Creature *_Creature)
{
- return new boss_muruAI (_Creature);
+ return new boss_muruAI (_Creature);
}
struct TRINITY_DLL_DECL npc_muru_portalAI : public Scripted_NoMovementAI
{
- npc_muru_portalAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature){
- pInstance = ((ScriptedInstance*)c->GetInstanceData());
- }
-
- ScriptedInstance* pInstance;
- SummonList Summons;
- Creature* Muru;
- bool SummonSentinel;
- bool InAction;
- uint32 SummonTimer;
-
- void Reset(){
- m_creature->addUnitState(UNIT_STAT_STUNNED);
- SummonTimer = 5000;
- InAction = false;
- SummonSentinel = false;
- Summons.DespawnAll();
- }
-
- void Aggro(Unit *who) {}
-
- void JustSummoned(Creature* summoned){
- Player* Target;
- Target = (Player*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID)));
- if(Target)summoned->AI()->AttackStart(Target);
- Summons.Summon(summoned);
- }
-
- void SpellHit(Unit* caster, const SpellEntry* Spell){
- float x,y,z,o;
- m_creature->GetHomePosition(x,y,z,o);
- DoTeleportTo(x,y,z);
- InAction = true;
- switch(Spell->Id){
- case SPELL_OPEN_ALL_PORTALS:
- DoCastAOE(SPELL_OPEN_PORTAL, false);
- break;
- case SPELL_OPEN_PORTAL_2:
- DoCastAOE(SPELL_OPEN_PORTAL, false);
- SummonSentinel = true;
- break;
- }
- }
-
- void UpdateAI(const uint32 diff){
- if(!SummonSentinel){
- if(InAction && pInstance->GetData(DATA_MURU_EVENT) == NOT_STARTED)Reset();
- return;
- }
- if(SummonTimer < diff){
- DoCastAOE(SPELL_SUMMON_VOID_SENTINEL, false);
- SummonTimer = 5000;
- SummonSentinel = false;
- }else SummonTimer -= diff;
- }
+ npc_muru_portalAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature){
+ pInstance = ((ScriptedInstance*)c->GetInstanceData());
+ }
+
+ ScriptedInstance* pInstance;
+ SummonList Summons;
+ Creature* Muru;
+ bool SummonSentinel;
+ bool InAction;
+ uint32 SummonTimer;
+
+ void Reset(){
+ m_creature->addUnitState(UNIT_STAT_STUNNED);
+ SummonTimer = 5000;
+ InAction = false;
+ SummonSentinel = false;
+ Summons.DespawnAll();
+ }
+
+ void Aggro(Unit *who) {}
+
+ void JustSummoned(Creature* summoned){
+ Player* Target;
+ Target = (Player*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID)));
+ if(Target)summoned->AI()->AttackStart(Target);
+ Summons.Summon(summoned);
+ }
+
+ void SpellHit(Unit* caster, const SpellEntry* Spell){
+ float x,y,z,o;
+ m_creature->GetHomePosition(x,y,z,o);
+ DoTeleportTo(x,y,z);
+ InAction = true;
+ switch(Spell->Id){
+ case SPELL_OPEN_ALL_PORTALS:
+ DoCastAOE(SPELL_OPEN_PORTAL, false);
+ break;
+ case SPELL_OPEN_PORTAL_2:
+ DoCastAOE(SPELL_OPEN_PORTAL, false);
+ SummonSentinel = true;
+ break;
+ }
+ }
+
+ void UpdateAI(const uint32 diff){
+ if(!SummonSentinel){
+ if(InAction && pInstance->GetData(DATA_MURU_EVENT) == NOT_STARTED)Reset();
+ return;
+ }
+ if(SummonTimer < diff){
+ DoCastAOE(SPELL_SUMMON_VOID_SENTINEL, false);
+ SummonTimer = 5000;
+ SummonSentinel = false;
+ }else SummonTimer -= diff;
+ }
};
CreatureAI* GetAI_npc_muru_portal(Creature *_Creature)
{
- return new npc_muru_portalAI (_Creature);
+ return new npc_muru_portalAI (_Creature);
}
struct TRINITY_DLL_DECL npc_dark_fiendAI : public ScriptedAI
{
- npc_dark_fiendAI(Creature *c) : ScriptedAI(c){
- pInstance = ((ScriptedInstance*)c->GetInstanceData());
- }
-
- ScriptedInstance* pInstance;
- bool InAction;
- uint32 WaitTimer;
-
- void Reset() {
- WaitTimer = 2000;
- InAction = false;
- m_creature->addUnitState(UNIT_STAT_STUNNED);
- };
-
- void Aggro(Unit *who) {}
-
- void SpellHit(Unit* caster, const SpellEntry* Spell){
- for(uint8 i = 0; i < 3; ++i)
- if(Spell->Effect[i] == 38){
- m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- m_creature->RemoveCorpse();
- }
- }
-
- void UpdateAI(const uint32 diff)
- {
- if(!UpdateVictim())
- return;
-
- if (WaitTimer < diff)
- if(!InAction){
- m_creature->clearUnitState(UNIT_STAT_STUNNED);
- DoCastAOE(SPELL_DARKFIEND_SKIN, false);
- AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true));
- InAction = true;
- WaitTimer = 500;
- }else{
- if(m_creature->GetDistance(m_creature->getVictim()) < 5){
- DoCastAOE(SPELL_DARKFIEND_AOE, false);
- m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- m_creature->RemoveCorpse();
- }
- WaitTimer = 500;
- }
- else WaitTimer -= diff;
- }
+ npc_dark_fiendAI(Creature *c) : ScriptedAI(c){
+ pInstance = ((ScriptedInstance*)c->GetInstanceData());
+ }
+
+ ScriptedInstance* pInstance;
+ bool InAction;
+ uint32 WaitTimer;
+
+ void Reset() {
+ WaitTimer = 2000;
+ InAction = false;
+ m_creature->addUnitState(UNIT_STAT_STUNNED);
+ };
+
+ void Aggro(Unit *who) {}
+
+ void SpellHit(Unit* caster, const SpellEntry* Spell){
+ for(uint8 i = 0; i < 3; ++i)
+ if(Spell->Effect[i] == 38){
+ m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ m_creature->RemoveCorpse();
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(!UpdateVictim())
+ return;
+
+ if (WaitTimer < diff)
+ if(!InAction){
+ m_creature->clearUnitState(UNIT_STAT_STUNNED);
+ DoCastAOE(SPELL_DARKFIEND_SKIN, false);
+ AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true));
+ InAction = true;
+ WaitTimer = 500;
+ }else{
+ if(m_creature->GetDistance(m_creature->getVictim()) < 5){
+ DoCastAOE(SPELL_DARKFIEND_AOE, false);
+ m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ m_creature->RemoveCorpse();
+ }
+ WaitTimer = 500;
+ }
+ else WaitTimer -= diff;
+ }
};
CreatureAI* GetAI_npc_dark_fiend(Creature *_Creature)
{
- return new npc_dark_fiendAI (_Creature);
+ return new npc_dark_fiendAI (_Creature);
}
struct TRINITY_DLL_DECL npc_void_sentinelAI : public ScriptedAI
{
- npc_void_sentinelAI(Creature *c) : ScriptedAI(c){
- pInstance = ((ScriptedInstance*)c->GetInstanceData());
- }
-
- ScriptedInstance* pInstance;
-
- uint32 PulseTimer;
- uint32 VoidBlastTimer;
-
-
- void Reset() {
- PulseTimer = 3000;
- VoidBlastTimer = 45000; //is this a correct timer?
- float x,y,z,o;
- m_creature->GetHomePosition(x,y,z,o);
- DoTeleportTo(x,y,71);
- };
-
- void Aggro(Unit *who) {}
-
- void JustDied(Unit* killer){
- for (uint8 i = 0; i < 8; ++i){
- m_creature->SummonCreature(CREATURE_VOID_SPAWN, m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(), rand()%6, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
- }
-
- }
- void UpdateAI(const uint32 diff)
- {
- if(!UpdateVictim())
- return;
-
- if(PulseTimer < diff){
- DoCastAOE(SPELL_SHADOW_PULSE, true);
- PulseTimer = 3000;
- }else PulseTimer -= diff;
-
- if(VoidBlastTimer < diff){
- DoCast(m_creature->getVictim(), SPELL_VOID_BLAST, false);
- VoidBlastTimer = 45000;
- }else VoidBlastTimer -= diff;
-
- DoMeleeAttackIfReady();
- }
+ npc_void_sentinelAI(Creature *c) : ScriptedAI(c){
+ pInstance = ((ScriptedInstance*)c->GetInstanceData());
+ }
+
+ ScriptedInstance* pInstance;
+
+ uint32 PulseTimer;
+ uint32 VoidBlastTimer;
+
+
+ void Reset() {
+ PulseTimer = 3000;
+ VoidBlastTimer = 45000; //is this a correct timer?
+ float x,y,z,o;
+ m_creature->GetHomePosition(x,y,z,o);
+ DoTeleportTo(x,y,71);
+ };
+
+ void Aggro(Unit *who) {}
+
+ void JustDied(Unit* killer){
+ for (uint8 i = 0; i < 8; ++i){
+ m_creature->SummonCreature(CREATURE_VOID_SPAWN, m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(), rand()%6, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
+ }
+
+ }
+ void UpdateAI(const uint32 diff)
+ {
+ if(!UpdateVictim())
+ return;
+
+ if(PulseTimer < diff){
+ DoCastAOE(SPELL_SHADOW_PULSE, true);
+ PulseTimer = 3000;
+ }else PulseTimer -= diff;
+
+ if(VoidBlastTimer < diff){
+ DoCast(m_creature->getVictim(), SPELL_VOID_BLAST, false);
+ VoidBlastTimer = 45000;
+ }else VoidBlastTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
};
CreatureAI* GetAI_npc_void_sentinel(Creature *_Creature)
{
- return new npc_void_sentinelAI (_Creature);
+ return new npc_void_sentinelAI (_Creature);
}
struct TRINITY_DLL_DECL npc_blackholeAI : public ScriptedAI
{
- npc_blackholeAI(Creature *c) : ScriptedAI(c){
- pInstance = ((ScriptedInstance*)c->GetInstanceData());
- }
-
- ScriptedInstance* pInstance;
-
- uint32 DespawnTimer;
- uint32 SpellTimer;
- uint8 Phase;
- uint8 NeedForAHack;
-
- void Reset(){
- DespawnTimer = 15000;
- SpellTimer = 5000;
- Phase = 0;
- m_creature->addUnitState(UNIT_STAT_STUNNED);
- DoCastAOE(SPELL_BLACKHOLE_SPAWN, true);
- }
-
- void Aggro(Unit *who) {}
-
- void UpdateAI(const uint32 diff)
- {
- if(SpellTimer < diff){
- Unit* Victim = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
- switch(NeedForAHack){
- case 0:
- m_creature->clearUnitState(UNIT_STAT_STUNNED);
- DoCastAOE(SPELL_BLACKHOLE_GROW, false);
- if(Victim)AttackStart(Victim);
- SpellTimer = 700;
- NeedForAHack = 2;
- break;
- case 1:
- m_creature->AddAura(SPELL_BLACKHOLE_GROW, m_creature);
- NeedForAHack = 2;
- SpellTimer = 600;
- break;
- case 2:
- SpellTimer = 400;
- NeedForAHack = 3;
- m_creature->RemoveAura(SPELL_BLACKHOLE_GROW, 1);
- break;
- case 3:
- SpellTimer = 400+rand()%500;
- NeedForAHack = 1;
- Unit* Temp = m_creature->getVictim();
- if(!Temp) return;
- if(Temp->GetPositionZ() > 73 && Victim)
- AttackStart(Victim);
- }
- }else SpellTimer -= diff;
-
- if (DespawnTimer < diff){
- m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- m_creature->RemoveCorpse();
- }else DespawnTimer -= diff;
- }
+ npc_blackholeAI(Creature *c) : ScriptedAI(c){
+ pInstance = ((ScriptedInstance*)c->GetInstanceData());
+ }
+
+ ScriptedInstance* pInstance;
+
+ uint32 DespawnTimer;
+ uint32 SpellTimer;
+ uint8 Phase;
+ uint8 NeedForAHack;
+
+ void Reset(){
+ DespawnTimer = 15000;
+ SpellTimer = 5000;
+ Phase = 0;
+ m_creature->addUnitState(UNIT_STAT_STUNNED);
+ DoCastAOE(SPELL_BLACKHOLE_SPAWN, true);
+ }
+
+ void Aggro(Unit *who) {}
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(SpellTimer < diff){
+ Unit* Victim = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
+ switch(NeedForAHack){
+ case 0:
+ m_creature->clearUnitState(UNIT_STAT_STUNNED);
+ DoCastAOE(SPELL_BLACKHOLE_GROW, false);
+ if(Victim)AttackStart(Victim);
+ SpellTimer = 700;
+ NeedForAHack = 2;
+ break;
+ case 1:
+ m_creature->AddAura(SPELL_BLACKHOLE_GROW, m_creature);
+ NeedForAHack = 2;
+ SpellTimer = 600;
+ break;
+ case 2:
+ SpellTimer = 400;
+ NeedForAHack = 3;
+ m_creature->RemoveAura(SPELL_BLACKHOLE_GROW, 1);
+ break;
+ case 3:
+ SpellTimer = 400+rand()%500;
+ NeedForAHack = 1;
+ Unit* Temp = m_creature->getVictim();
+ if(!Temp) return;
+ if(Temp->GetPositionZ() > 73 && Victim)
+ AttackStart(Victim);
+ }
+ }else SpellTimer -= diff;
+
+ if (DespawnTimer < diff){
+ m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ m_creature->RemoveCorpse();
+ }else DespawnTimer -= diff;
+ }
};
CreatureAI* GetAI_npc_blackhole(Creature *_Creature)
{
- return new npc_blackholeAI (_Creature);
+ return new npc_blackholeAI (_Creature);
}
void AddSC_boss_muru()
{
- Script *newscript;
- newscript = new Script;
- newscript->Name="boss_muru";
- newscript->GetAI = &GetAI_boss_muru;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="boss_entropius";
- newscript->GetAI = &GetAI_boss_entropius;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="npc_muru_portal";
- newscript->GetAI = &GetAI_npc_muru_portal;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="npc_dark_fiend";
- newscript->GetAI = &GetAI_npc_dark_fiend;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="npc_void_sentinel";
- newscript->GetAI = &GetAI_npc_void_sentinel;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="npc_blackhole";
- newscript->GetAI = &GetAI_npc_blackhole;
- newscript->RegisterSelf();
+ Script *newscript;
+ newscript = new Script;
+ newscript->Name="boss_muru";
+ newscript->GetAI = &GetAI_boss_muru;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="boss_entropius";
+ newscript->GetAI = &GetAI_boss_entropius;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_muru_portal";
+ newscript->GetAI = &GetAI_npc_muru_portal;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_dark_fiend";
+ newscript->GetAI = &GetAI_npc_dark_fiend;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_void_sentinel";
+ newscript->GetAI = &GetAI_npc_void_sentinel;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_blackhole";
+ newscript->GetAI = &GetAI_npc_blackhole;
+ newscript->RegisterSelf();
} \ No newline at end of file
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h b/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h
index 12e578d1591..95fca242175 100644
--- a/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h
+++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h
@@ -38,6 +38,6 @@
#define DATA_GATE_5 26
/*** Misc ***/
-#define DATA_PLAYER_GUID 27
+#define DATA_PLAYER_GUID 27
#endif
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp
index 74235f4151c..283f5e5954a 100644
--- a/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp
+++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp
@@ -4,7 +4,7 @@
/* ScriptData
SDName: Instance_Sunwell_Plateau
-SD%Complete: 20
+SD%Complete: 20
SDComment: VERIFY SCRIPT, rename Gates
SDCategory: Sunwell_Plateau
EndScriptData */
@@ -15,8 +15,8 @@ EndScriptData */
#define ENCOUNTERS 6
enum GoState{
-CLOSE = 1,
-OPEN = 0
+CLOSE = 1,
+OPEN = 0
};
/* Sunwell Plateau:
@@ -108,8 +108,8 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
if (!players.isEmpty())
{
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- {
- Player* plr = itr->getSource();
+ {
+ Player* plr = itr->getSource();
if (plr && !plr->HasAura(45839,0))
return plr;
}
@@ -198,11 +198,11 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
case DATA_KILJAEDEN: return KilJaeden; break;
case DATA_KILJAEDEN_CONTROLLER: return KilJaedenController; break;
case DATA_ANVEENA: return Anveena; break;
- case DATA_KALECGOS_KJ: return KalecgosKJ; break;
- case DATA_PLAYER_GUID:
- Player* Target = GetPlayerInMap();
- return Target->GetGUID();
- break;
+ case DATA_KALECGOS_KJ: return KalecgosKJ; break;
+ case DATA_PLAYER_GUID:
+ Player* Target = GetPlayerInMap();
+ return Target->GetGUID();
+ break;
}
return 0;
@@ -214,26 +214,26 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
{
case DATA_KALECGOS_EVENT: Encounters[0] = data; break;
case DATA_BRUTALLUS_EVENT: Encounters[1] = data; break;
- case DATA_FELMYST_EVENT:
- if(data == DONE)
- HandleGameObject(FireBarrier, 1);
+ case DATA_FELMYST_EVENT:
+ if(data == DONE)
+ HandleGameObject(FireBarrier, 1);
Encounters[2] = data; break;
case DATA_EREDAR_TWINS_EVENT: Encounters[3] = data; break;
- case DATA_MURU_EVENT:
- switch(data){
- case DONE:
- HandleGameObject(Gate[4], OPEN);
- HandleGameObject(Gate[3], OPEN);
- break;
- case IN_PROGRESS:
- HandleGameObject(Gate[4], CLOSE);
- HandleGameObject(Gate[3], CLOSE);
- break;
- case NOT_STARTED:
- HandleGameObject(Gate[4], CLOSE);
- HandleGameObject(Gate[3], OPEN);
- break;
- }
+ case DATA_MURU_EVENT:
+ switch(data){
+ case DONE:
+ HandleGameObject(Gate[4], OPEN);
+ HandleGameObject(Gate[3], OPEN);
+ break;
+ case IN_PROGRESS:
+ HandleGameObject(Gate[4], CLOSE);
+ HandleGameObject(Gate[3], CLOSE);
+ break;
+ case NOT_STARTED:
+ HandleGameObject(Gate[4], CLOSE);
+ HandleGameObject(Gate[3], OPEN);
+ break;
+ }
Encounters[4] = data; break;
case DATA_KILJAEDEN_EVENT: Encounters[5] = data; break;
}