*Updated Onyxia script - original patch by Moandor
*Fix the crash in dark_portal script - by nofantasy *Updated TideWalker script - now use proper spell for summons and for other abilites --HG-- branch : trunk
This commit is contained in:
@@ -22,8 +22,7 @@
|
|||||||
#define C_TIME_KEEPER 17918
|
#define C_TIME_KEEPER 17918
|
||||||
#define C_RKEEP 21104
|
#define C_RKEEP 21104
|
||||||
#define C_RLORD 17839
|
#define C_RLORD 17839
|
||||||
//#define RIFT_BOSS urand(0,1) ? C_RKEEP : C_RLORD
|
#define RIFT_BOSS (rand()%2 ? C_RKEEP : C_RLORD)
|
||||||
#define RIFT_BOSS C_RKEEP
|
|
||||||
#define C_DEJA 17879
|
#define C_DEJA 17879
|
||||||
#define C_TEMPO 17880
|
#define C_TEMPO 17880
|
||||||
#define C_AEONUS 17881
|
#define C_AEONUS 17881
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
/* ScriptData
|
/* ScriptData
|
||||||
SDName: Boss_Fathomlord_Karathress
|
SDName: Boss_Fathomlord_Karathress
|
||||||
SD%Complete: 70%
|
SD%Complete: 70
|
||||||
SDComment: Cyclone workaround
|
SDComment: Cyclone workaround
|
||||||
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
|
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
|
||||||
EndScriptData */
|
EndScriptData */
|
||||||
|
|||||||
+69
-15
@@ -17,7 +17,7 @@
|
|||||||
/* ScriptData
|
/* ScriptData
|
||||||
SDName: Boss_Morogrim_Tidewalker
|
SDName: Boss_Morogrim_Tidewalker
|
||||||
SD%Complete: 90
|
SD%Complete: 90
|
||||||
SDComment: Water globules don't explode properly
|
SDComment: Water globules don't explode properly, remove hacks
|
||||||
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
|
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
|
||||||
EndScriptData */
|
EndScriptData */
|
||||||
|
|
||||||
@@ -55,6 +55,29 @@ EndScriptData */
|
|||||||
#define WATERY_GRAVE_Y4 -690.96
|
#define WATERY_GRAVE_Y4 -690.96
|
||||||
#define WATERY_GRAVE_Z4 -14.44
|
#define WATERY_GRAVE_Z4 -14.44
|
||||||
|
|
||||||
|
#define SPELL_WATERY_GRAVE_1 38023
|
||||||
|
#define SPELL_WATERY_GRAVE_2 38024
|
||||||
|
#define SPELL_WATERY_GRAVE_3 38025
|
||||||
|
#define SPELL_WATERY_GRAVE_4 37850
|
||||||
|
|
||||||
|
#define SPELL_SUMMON_WATER_GLOBULE_1 37854
|
||||||
|
#define SPELL_SUMMON_WATER_GLOBULE_2 37858
|
||||||
|
#define SPELL_SUMMON_WATER_GLOBULE_3 37860
|
||||||
|
#define SPELL_SUMMON_WATER_GLOBULE_4 37861
|
||||||
|
|
||||||
|
#define SPELL_SUMMON_MURLOC_A6 39813
|
||||||
|
#define SPELL_SUMMON_MURLOC_A7 39814
|
||||||
|
#define SPELL_SUMMON_MURLOC_A8 39815
|
||||||
|
#define SPELL_SUMMON_MURLOC_A9 39816
|
||||||
|
#define SPELL_SUMMON_MURLOC_A10 39817
|
||||||
|
|
||||||
|
#define SPELL_SUMMON_MURLOC_B6 39818
|
||||||
|
#define SPELL_SUMMON_MURLOC_B7 39819
|
||||||
|
#define SPELL_SUMMON_MURLOC_B8 39820
|
||||||
|
#define SPELL_SUMMON_MURLOC_B9 39821
|
||||||
|
#define SPELL_SUMMON_MURLOC_B10 39822
|
||||||
|
|
||||||
|
//Creatures
|
||||||
#define WATER_GLOBULE 21913
|
#define WATER_GLOBULE 21913
|
||||||
#define TIDEWALKER_LURKER 21920
|
#define TIDEWALKER_LURKER 21920
|
||||||
|
|
||||||
@@ -119,7 +142,18 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
|
|
||||||
void Aggro(Unit *who) { StartEvent(); }
|
void Aggro(Unit *who) { StartEvent(); }
|
||||||
|
|
||||||
void ApplyWateryGrave(Unit *player, uint8 pos)
|
void ApplyWateryGrave(Unit *player, uint8 target)
|
||||||
|
{
|
||||||
|
switch(target)
|
||||||
|
{
|
||||||
|
case 0: DoCast(player, SPELL_WATERY_GRAVE_1); break;
|
||||||
|
case 1: DoCast(player, SPELL_WATERY_GRAVE_2); break;
|
||||||
|
case 2: DoCast(player, SPELL_WATERY_GRAVE_3); break;
|
||||||
|
case 3: DoCast(player, SPELL_WATERY_GRAVE_4); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*void ApplyWateryGrave(Unit *player, uint8 pos)
|
||||||
{
|
{
|
||||||
float x, y, z;
|
float x, y, z;
|
||||||
|
|
||||||
@@ -149,9 +183,9 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
|
|
||||||
DoTeleportPlayer(player, x, y, z+1, player->GetOrientation());
|
DoTeleportPlayer(player, x, y, z+1, player->GetOrientation());
|
||||||
DoCast(player, SPELL_WATERY_GRAVE);
|
DoCast(player, SPELL_WATERY_GRAVE);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void SummonMurloc(float x, float y, float z)
|
/*void SummonMurloc(float x, float y, float z)
|
||||||
{
|
{
|
||||||
Creature *Summoned;
|
Creature *Summoned;
|
||||||
|
|
||||||
@@ -163,9 +197,9 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
if (target)
|
if (target)
|
||||||
Summoned->AI()->AttackStart(target);
|
Summoned->AI()->AttackStart(target);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void SummonWaterGlobule(float x, float y, float z)
|
/*void SummonWaterGlobule(float x, float y, float z)
|
||||||
{
|
{
|
||||||
Creature *Globule;
|
Creature *Globule;
|
||||||
|
|
||||||
@@ -177,7 +211,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
if (target)
|
if (target)
|
||||||
Globule->AI()->AttackStart(target);
|
Globule->AI()->AttackStart(target);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
@@ -202,7 +236,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//north
|
/*//north
|
||||||
SummonMurloc(486.10, -723.64, -7.14);
|
SummonMurloc(486.10, -723.64, -7.14);
|
||||||
SummonMurloc(482.58, -723.78, -7.14);
|
SummonMurloc(482.58, -723.78, -7.14);
|
||||||
SummonMurloc(479.38, -723.91, -7.14);
|
SummonMurloc(479.38, -723.91, -7.14);
|
||||||
@@ -216,8 +250,22 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
SummonMurloc(303.91, -725.64, -13.06);
|
SummonMurloc(303.91, -725.64, -13.06);
|
||||||
SummonMurloc(300.23, -726, -11.89);
|
SummonMurloc(300.23, -726, -11.89);
|
||||||
SummonMurloc(296.82, -726.33, -10.82);
|
SummonMurloc(296.82, -726.33, -10.82);
|
||||||
SummonMurloc(293.64, -726.64, -9.81);
|
SummonMurloc(293.64, -726.64, -9.81);*/
|
||||||
|
|
||||||
|
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
|
{
|
||||||
|
DoCast(target, SPELL_SUMMON_MURLOC_A6);
|
||||||
|
DoCast(target, SPELL_SUMMON_MURLOC_A7);
|
||||||
|
DoCast(target, SPELL_SUMMON_MURLOC_A8);
|
||||||
|
DoCast(target, SPELL_SUMMON_MURLOC_A9);
|
||||||
|
DoCast(target, SPELL_SUMMON_MURLOC_A10);
|
||||||
|
|
||||||
|
DoCast(target, SPELL_SUMMON_MURLOC_B6);
|
||||||
|
DoCast(target, SPELL_SUMMON_MURLOC_B7);
|
||||||
|
DoCast(target, SPELL_SUMMON_MURLOC_B8);
|
||||||
|
DoCast(target, SPELL_SUMMON_MURLOC_B9);
|
||||||
|
DoCast(target, SPELL_SUMMON_MURLOC_B10);
|
||||||
|
}
|
||||||
DoScriptText(EMOTE_EARTHQUAKE, m_creature);
|
DoScriptText(EMOTE_EARTHQUAKE, m_creature);
|
||||||
|
|
||||||
Earthquake = false;
|
Earthquake = false;
|
||||||
@@ -265,13 +313,18 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
//WateryGlobules_Timer
|
//WateryGlobules_Timer
|
||||||
if (WateryGlobules_Timer < diff)
|
if (WateryGlobules_Timer < diff)
|
||||||
{
|
{
|
||||||
SummonWaterGlobule(WATERY_GRAVE_X1, WATERY_GRAVE_Y1, WATERY_GRAVE_Z1);
|
/*SummonWaterGlobule(WATERY_GRAVE_X1, WATERY_GRAVE_Y1, WATERY_GRAVE_Z1);
|
||||||
SummonWaterGlobule(WATERY_GRAVE_X2, WATERY_GRAVE_Y2, WATERY_GRAVE_Z2);
|
SummonWaterGlobule(WATERY_GRAVE_X2, WATERY_GRAVE_Y2, WATERY_GRAVE_Z2);
|
||||||
SummonWaterGlobule(WATERY_GRAVE_X3, WATERY_GRAVE_Y3, WATERY_GRAVE_Z3);
|
SummonWaterGlobule(WATERY_GRAVE_X3, WATERY_GRAVE_Y3, WATERY_GRAVE_Z3);
|
||||||
SummonWaterGlobule(WATERY_GRAVE_X4, WATERY_GRAVE_Y4, WATERY_GRAVE_Z4);
|
SummonWaterGlobule(WATERY_GRAVE_X4, WATERY_GRAVE_Y4, WATERY_GRAVE_Z4);*/
|
||||||
|
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
|
{
|
||||||
|
DoCast(target, SPELL_SUMMON_WATER_GLOBULE_1);
|
||||||
|
DoCast(target, SPELL_SUMMON_WATER_GLOBULE_2);
|
||||||
|
DoCast(target, SPELL_SUMMON_WATER_GLOBULE_3);
|
||||||
|
DoCast(target, SPELL_SUMMON_WATER_GLOBULE_4);
|
||||||
|
}
|
||||||
DoScriptText(EMOTE_WATERY_GLOBULES, m_creature);
|
DoScriptText(EMOTE_WATERY_GLOBULES, m_creature);
|
||||||
|
|
||||||
WateryGlobules_Timer = 25000;
|
WateryGlobules_Timer = 25000;
|
||||||
}else WateryGlobules_Timer -= diff;
|
}else WateryGlobules_Timer -= diff;
|
||||||
}
|
}
|
||||||
@@ -281,6 +334,8 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Water Globule AI
|
//Water Globule AI
|
||||||
|
#define SPELL_GLOBULE_EXPLOSION 37852
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI
|
struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_water_globuleAI(Creature *c) : ScriptedAI(c) {Reset();}
|
mob_water_globuleAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||||
@@ -321,8 +376,7 @@ struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5))
|
if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5))
|
||||||
{
|
{
|
||||||
uint32 damage = 4000+rand()%2000;
|
DoCast(m_creature->getVictim(), SPELL_GLOBULE_EXPLOSION);
|
||||||
m_creature->DealDamage(m_creature->getVictim(), damage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FROST, NULL, false);
|
|
||||||
|
|
||||||
//despawn
|
//despawn
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
/* ScriptData
|
/* ScriptData
|
||||||
SDName: Boss_Onyxia
|
SDName: Boss_Onyxia
|
||||||
SD%Complete: 50
|
SD%Complete: 90
|
||||||
SDComment: Phase 2 has many errors. Recommend Rewrite of entire script.
|
SDComment: Spell Heated Ground is wrong, flying animation, visual for area effect
|
||||||
SDCategory: Onyxia's Lair
|
SDCategory: Onyxia's Lair
|
||||||
EndScriptData */
|
EndScriptData */
|
||||||
|
|
||||||
@@ -40,19 +40,18 @@ EndScriptData */
|
|||||||
#define SPELL_FIREBALL 18392
|
#define SPELL_FIREBALL 18392
|
||||||
|
|
||||||
#define SPELL_BELLOWINGROAR 18431
|
#define SPELL_BELLOWINGROAR 18431
|
||||||
#define SPELL_HEATED_GROUND 22191
|
#define SPELL_HEATED_GROUND 22191 //Wrong Spell
|
||||||
|
|
||||||
#define SPELL_SUMMONWHELP 17646
|
#define SPELL_SUMMONWHELP 17646
|
||||||
|
|
||||||
static float MovementLocations[7][3]=
|
#define CREATURE_WHELP 11262
|
||||||
|
|
||||||
|
static float MovementLocations[4][3]=
|
||||||
{
|
{
|
||||||
{-65.8444, -213.809, -60.2985},
|
{-64.0523, -213.0619, -68.2985},
|
||||||
{22.87639, -217.152, -60.0548},
|
{12.4636, -220.01490, -68.0548},
|
||||||
{-33.5561, -182.682, -60.9457},
|
{-38.8391, -182.3220, -68.9457},
|
||||||
{-31.4963, -250.123, -60.1278},
|
{-37.0390, -244.8760, -68.1278}
|
||||||
{-2.78999, -181.431, -60.8962},
|
|
||||||
{-54.9415, -232.242, -60.5555},
|
|
||||||
{10.56655, -241.478, -60.9426},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static float SpawnLocations[4][3]=
|
static float SpawnLocations[4][3]=
|
||||||
@@ -63,8 +62,6 @@ static float SpawnLocations[4][3]=
|
|||||||
{17.372, -190.840, -85.2810},
|
{17.372, -190.840, -85.2810},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CREATURE_WHELP 11262
|
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_onyxiaAI(Creature* c) : ScriptedAI(c) {Reset();}
|
boss_onyxiaAI(Creature* c) : ScriptedAI(c) {Reset();}
|
||||||
@@ -79,6 +76,10 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
|||||||
uint32 SummonWhelpsTimer;
|
uint32 SummonWhelpsTimer;
|
||||||
uint32 BellowingRoarTimer;
|
uint32 BellowingRoarTimer;
|
||||||
uint32 WingBuffetTimer;
|
uint32 WingBuffetTimer;
|
||||||
|
uint32 KnockAwayTimer;
|
||||||
|
uint32 FireballTimer;
|
||||||
|
|
||||||
|
bool InitialSpawn;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
@@ -87,11 +88,15 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
|||||||
FlameBreathTimer = 20000;
|
FlameBreathTimer = 20000;
|
||||||
TailSweepTimer = 2000;
|
TailSweepTimer = 2000;
|
||||||
CleaveTimer = 15000;
|
CleaveTimer = 15000;
|
||||||
MovementTimer = 5000;
|
MovementTimer = 3000;
|
||||||
EngulfingFlamesTimer = 15000;
|
EngulfingFlamesTimer = 15000;
|
||||||
SummonWhelpsTimer = 45000;
|
SummonWhelpsTimer = 45000;
|
||||||
BellowingRoarTimer = 30000;
|
BellowingRoarTimer = 30000;
|
||||||
WingBuffetTimer = 17000;
|
WingBuffetTimer = 17000;
|
||||||
|
KnockAwayTimer = 15000;
|
||||||
|
FireballTimer = 18000;
|
||||||
|
|
||||||
|
InitialSpawn = true;
|
||||||
|
|
||||||
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||||
m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
||||||
@@ -103,6 +108,10 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
|||||||
DoZoneInCombat();
|
DoZoneInCombat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JustDied(Unit* Killer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit *victim)
|
void KilledUnit(Unit *victim)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_KILL, m_creature);
|
DoScriptText(SAY_KILL, m_creature);
|
||||||
@@ -117,7 +126,8 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Phase = 2;
|
Phase = 2;
|
||||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
|
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT);
|
||||||
|
m_creature->SetHover(true);
|
||||||
m_creature->GetMotionMaster()->Clear(false);
|
m_creature->GetMotionMaster()->Clear(false);
|
||||||
m_creature->GetMotionMaster()->MoveIdle();
|
m_creature->GetMotionMaster()->MoveIdle();
|
||||||
DoScriptText(SAY_PHASE_2_TRANS, m_creature);
|
DoScriptText(SAY_PHASE_2_TRANS, m_creature);
|
||||||
@@ -126,8 +136,12 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
|||||||
if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) && (Phase == 2))
|
if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) && (Phase == 2))
|
||||||
{
|
{
|
||||||
Phase = 3;
|
Phase = 3;
|
||||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
|
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT);
|
||||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
||||||
|
m_creature->SetHover(false);
|
||||||
|
m_creature->GetMotionMaster()->MovePoint(0, -10.6155, -219.357, -87.7344);
|
||||||
|
DoStartMovement(m_creature->getVictim());
|
||||||
|
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||||
DoScriptText(SAY_PHASE_3_TRANS, m_creature);
|
DoScriptText(SAY_PHASE_3_TRANS, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +165,7 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
|||||||
if(CleaveTimer < diff)
|
if(CleaveTimer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_CLEAVE);
|
DoCast(m_creature->getVictim(), SPELL_CLEAVE);
|
||||||
CleaveTimer = 7000;
|
CleaveTimer = 10000;
|
||||||
}else CleaveTimer -= diff;
|
}else CleaveTimer -= diff;
|
||||||
|
|
||||||
if(WingBuffetTimer < diff)
|
if(WingBuffetTimer < diff)
|
||||||
@@ -160,60 +174,123 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
|||||||
WingBuffetTimer = 7000 + ((rand()%8)*1000);
|
WingBuffetTimer = 7000 + ((rand()%8)*1000);
|
||||||
}else WingBuffetTimer -= diff;
|
}else WingBuffetTimer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
if(KnockAwayTimer < diff)
|
||||||
}
|
{
|
||||||
|
if(rand() <= 30)
|
||||||
if(Phase == 2)
|
{
|
||||||
{
|
DoCast(m_creature->getVictim(), SPELL_KNOCK_AWAY);
|
||||||
if(!m_creature->isHover())
|
|
||||||
{
|
|
||||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
|
||||||
m_creature->SetHover(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!m_creature->GetMotionMaster()->empty() && (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE))
|
|
||||||
m_creature->GetMotionMaster()->Clear(false);
|
|
||||||
|
|
||||||
if(MovementTimer < diff)
|
|
||||||
{
|
|
||||||
uint32 random = rand()%8;
|
|
||||||
if(random < 7)
|
|
||||||
m_creature->GetMotionMaster()->MovePoint(0, MovementLocations[random][0], MovementLocations[random][1], MovementLocations[random][2]);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DoScriptText(EMOTE_BREATH, m_creature);
|
|
||||||
DoCast(m_creature->getVictim(), SPELL_DEEPBREATH);
|
|
||||||
}
|
|
||||||
MovementTimer = 25000;
|
|
||||||
}else MovementTimer -= diff;
|
|
||||||
|
|
||||||
if(EngulfingFlamesTimer < diff)
|
|
||||||
{
|
|
||||||
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_ENGULFINGFLAMES);
|
|
||||||
EngulfingFlamesTimer = 8000;
|
|
||||||
}else EngulfingFlamesTimer -= diff;
|
|
||||||
|
|
||||||
if(SummonWhelpsTimer < diff)
|
|
||||||
{
|
|
||||||
uint32 max = rand()%20;
|
|
||||||
for(uint8 i = 0; i < max; ++i)
|
|
||||||
{
|
|
||||||
uint8 random = rand()%4;
|
|
||||||
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
|
||||||
if(Whelp)
|
|
||||||
Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
|
||||||
}
|
|
||||||
SummonWhelpsTimer = 30000;
|
|
||||||
}else SummonWhelpsTimer -= diff;
|
|
||||||
}
|
}
|
||||||
|
KnockAwayTimer = 15000;
|
||||||
|
}else KnockAwayTimer -= diff;
|
||||||
|
|
||||||
if(Phase == 3)
|
if(Phase == 3)
|
||||||
{
|
{
|
||||||
if(BellowingRoarTimer < diff)
|
if(BellowingRoarTimer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR);
|
DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR);
|
||||||
|
|
||||||
BellowingRoarTimer = 30000;
|
BellowingRoarTimer = 30000;
|
||||||
}else BellowingRoarTimer -= diff;
|
}else BellowingRoarTimer -= diff;
|
||||||
|
|
||||||
|
if(SummonWhelpsTimer < diff)
|
||||||
|
{
|
||||||
|
SummonWhelps(Phase);
|
||||||
|
|
||||||
|
SummonWhelpsTimer = 45000;
|
||||||
|
}else SummonWhelpsTimer -= diff;
|
||||||
|
}
|
||||||
|
|
||||||
|
DoMeleeAttackIfReady();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Phase == 2)
|
||||||
|
{
|
||||||
|
if(InitialSpawn)
|
||||||
|
{
|
||||||
|
InitialSpawn = false;
|
||||||
|
|
||||||
|
for(uint32 i = 0; i < 10; ++i)
|
||||||
|
{
|
||||||
|
uint32 random = rand()%4;
|
||||||
|
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||||
|
if(Whelp)
|
||||||
|
Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(EngulfingFlamesTimer < diff)
|
||||||
|
{
|
||||||
|
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_ENGULFINGFLAMES);
|
||||||
|
m_creature->HandleEmoteCommand(ANIM_FLY);
|
||||||
|
|
||||||
|
EngulfingFlamesTimer = 10000;
|
||||||
|
}
|
||||||
|
else EngulfingFlamesTimer -= diff;
|
||||||
|
|
||||||
|
if(FireballTimer < diff)
|
||||||
|
{
|
||||||
|
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_FIREBALL);
|
||||||
|
|
||||||
|
FireballTimer = 18000;
|
||||||
|
}
|
||||||
|
else FireballTimer -= diff;
|
||||||
|
|
||||||
|
if(MovementTimer < diff)
|
||||||
|
{
|
||||||
|
if(rand()%100 < 30)
|
||||||
|
{
|
||||||
|
DoScriptText(EMOTE_BREATH, m_creature);
|
||||||
|
DoCast(m_creature->getVictim(), SPELL_DEEPBREATH);
|
||||||
|
}
|
||||||
|
else ChangePosition();
|
||||||
|
|
||||||
|
MovementTimer = 25000;
|
||||||
|
}else MovementTimer -= diff;
|
||||||
|
|
||||||
|
if(SummonWhelpsTimer < diff)
|
||||||
|
{
|
||||||
|
SummonWhelps(Phase);
|
||||||
|
|
||||||
|
SummonWhelpsTimer = 45000;
|
||||||
|
}
|
||||||
|
else SummonWhelpsTimer -= diff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChangePosition()
|
||||||
|
{
|
||||||
|
uint32 random = rand() % 4;
|
||||||
|
if(random<4){
|
||||||
|
m_creature->GetMotionMaster()->MovePoint(0, MovementLocations[random][0], MovementLocations[random][1], MovementLocations[random][2]);}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SummonWhelps(uint32 Phase)
|
||||||
|
{
|
||||||
|
if(Phase == 2)
|
||||||
|
{
|
||||||
|
uint32 max = rand()%10;
|
||||||
|
for(uint32 i = 0; i < max; ++i)
|
||||||
|
{
|
||||||
|
uint32 random = rand()%3;
|
||||||
|
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||||
|
if(Whelp)
|
||||||
|
Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Phase == 3)
|
||||||
|
{
|
||||||
|
uint32 max = rand() % 10 +1;
|
||||||
|
if(max < 5)
|
||||||
|
{
|
||||||
|
for(uint32 i = 0; i < max; ++i)
|
||||||
|
{
|
||||||
|
uint32 random = rand()%4;
|
||||||
|
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||||
|
if(Whelp)
|
||||||
|
Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -228,6 +305,6 @@ void AddSC_boss_onyxia()
|
|||||||
Script *newscript;
|
Script *newscript;
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name="boss_onyxia";
|
newscript->Name="boss_onyxia";
|
||||||
newscript->GetAI = GetAI_boss_onyxiaAI;
|
newscript->GetAI = &GetAI_boss_onyxiaAI;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user