diff options
author | Blaymoira <none@none> | 2008-12-19 21:45:22 +0100 |
---|---|---|
committer | Blaymoira <none@none> | 2008-12-19 21:45:22 +0100 |
commit | cebaa3a703f36efeedc5fd786b6eacb7a93585c2 (patch) | |
tree | a6a3294aa05bc0e790cdecf69005b146563826fe /src | |
parent | 97b2c725df72c9d18fddbcdf79acf750546d1051 (diff) |
*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
Diffstat (limited to 'src')
4 files changed, 230 insertions, 100 deletions
diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h index cb7e98d9df1..876200a138c 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h @@ -22,8 +22,7 @@ #define C_TIME_KEEPER 17918 #define C_RKEEP 21104 #define C_RLORD 17839 -//#define RIFT_BOSS urand(0,1) ? C_RKEEP : C_RLORD -#define RIFT_BOSS C_RKEEP +#define RIFT_BOSS (rand()%2 ? C_RKEEP : C_RLORD) #define C_DEJA 17879 #define C_TEMPO 17880 #define C_AEONUS 17881 diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp index 42a707ff930..7eb823a1179 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Boss_Fathomlord_Karathress -SD%Complete: 70% +SD%Complete: 70 SDComment: Cyclone workaround SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp index c5828c3977d..f5630155af0 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Morogrim_Tidewalker 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 EndScriptData */ @@ -55,6 +55,29 @@ EndScriptData */ #define WATERY_GRAVE_Y4 -690.96 #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 TIDEWALKER_LURKER 21920 @@ -119,7 +142,18 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI 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; @@ -149,9 +183,9 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI DoTeleportPlayer(player, x, y, z+1, player->GetOrientation()); DoCast(player, SPELL_WATERY_GRAVE); - } + }*/ - void SummonMurloc(float x, float y, float z) + /*void SummonMurloc(float x, float y, float z) { Creature *Summoned; @@ -163,9 +197,9 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI if (target) Summoned->AI()->AttackStart(target); } - } + }*/ - void SummonWaterGlobule(float x, float y, float z) + /*void SummonWaterGlobule(float x, float y, float z) { Creature *Globule; @@ -177,7 +211,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI if (target) Globule->AI()->AttackStart(target); } - } + }*/ 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; } - //north + /*//north SummonMurloc(486.10, -723.64, -7.14); SummonMurloc(482.58, -723.78, -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(300.23, -726, -11.89); 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); Earthquake = false; @@ -265,13 +313,18 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI //WateryGlobules_Timer 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_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); - WateryGlobules_Timer = 25000; }else WateryGlobules_Timer -= diff; } @@ -281,6 +334,8 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI }; //Water Globule AI +#define SPELL_GLOBULE_EXPLOSION 37852 + struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI { 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)) { - uint32 damage = 4000+rand()%2000; - m_creature->DealDamage(m_creature->getVictim(), damage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FROST, NULL, false); + DoCast(m_creature->getVictim(), SPELL_GLOBULE_EXPLOSION); //despawn m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); diff --git a/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp b/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp index 3b4895f29b1..0539f12b10b 100644 --- a/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp +++ b/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp @@ -6,18 +6,18 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* ScriptData SDName: Boss_Onyxia -SD%Complete: 50 -SDComment: Phase 2 has many errors. Recommend Rewrite of entire script. +SD%Complete: 90 +SDComment: Spell Heated Ground is wrong, flying animation, visual for area effect SDCategory: Onyxia's Lair EndScriptData */ @@ -40,19 +40,18 @@ EndScriptData */ #define SPELL_FIREBALL 18392 #define SPELL_BELLOWINGROAR 18431 -#define SPELL_HEATED_GROUND 22191 +#define SPELL_HEATED_GROUND 22191 //Wrong Spell #define SPELL_SUMMONWHELP 17646 -static float MovementLocations[7][3]= +#define CREATURE_WHELP 11262 + +static float MovementLocations[4][3]= { - {-65.8444, -213.809, -60.2985}, - {22.87639, -217.152, -60.0548}, - {-33.5561, -182.682, -60.9457}, - {-31.4963, -250.123, -60.1278}, - {-2.78999, -181.431, -60.8962}, - {-54.9415, -232.242, -60.5555}, - {10.56655, -241.478, -60.9426}, + {-64.0523, -213.0619, -68.2985}, + {12.4636, -220.01490, -68.0548}, + {-38.8391, -182.3220, -68.9457}, + {-37.0390, -244.8760, -68.1278} }; static float SpawnLocations[4][3]= @@ -63,8 +62,6 @@ static float SpawnLocations[4][3]= {17.372, -190.840, -85.2810}, }; -#define CREATURE_WHELP 11262 - struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI { boss_onyxiaAI(Creature* c) : ScriptedAI(c) {Reset();} @@ -79,6 +76,10 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI uint32 SummonWhelpsTimer; uint32 BellowingRoarTimer; uint32 WingBuffetTimer; + uint32 KnockAwayTimer; + uint32 FireballTimer; + + bool InitialSpawn; void Reset() { @@ -87,22 +88,30 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI FlameBreathTimer = 20000; TailSweepTimer = 2000; CleaveTimer = 15000; - MovementTimer = 5000; + MovementTimer = 3000; EngulfingFlamesTimer = 15000; SummonWhelpsTimer = 45000; BellowingRoarTimer = 30000; WingBuffetTimer = 17000; + KnockAwayTimer = 15000; + FireballTimer = 18000; + + InitialSpawn = 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(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); + m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } - void Aggro(Unit* who) + void Aggro(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); - DoZoneInCombat(); + DoZoneInCombat(); } + void JustDied(Unit* Killer) + { + } + void KilledUnit(Unit *victim) { DoScriptText(SAY_KILL, m_creature); @@ -113,25 +122,30 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI if(!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 60) && (Phase == 1)) + if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 60) && (Phase == 1)) { - Phase = 2; - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); - m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING); + Phase = 2; + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); + m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT); + m_creature->SetHover(true); m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveIdle(); - DoScriptText(SAY_PHASE_2_TRANS, m_creature); - } + DoScriptText(SAY_PHASE_2_TRANS, m_creature); + } - if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) && (Phase == 2)) + if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) && (Phase == 2)) { - Phase = 3; - m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING); + Phase = 3; + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT); 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); - } + } - if(Phase == 1 || Phase == 3) + if(Phase == 1 || Phase == 3) { if(FlameBreathTimer < diff) { @@ -151,7 +165,7 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI if(CleaveTimer < diff) { DoCast(m_creature->getVictim(), SPELL_CLEAVE); - CleaveTimer = 7000; + CleaveTimer = 10000; }else CleaveTimer -= diff; if(WingBuffetTimer < diff) @@ -160,62 +174,125 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI WingBuffetTimer = 7000 + ((rand()%8)*1000); }else WingBuffetTimer -= diff; - DoMeleeAttackIfReady(); - } + if(KnockAwayTimer < diff) + { + if(rand() <= 30) + { + DoCast(m_creature->getVictim(), SPELL_KNOCK_AWAY); + } + KnockAwayTimer = 15000; + }else KnockAwayTimer -= diff; - if(Phase == 2) - { - if(!m_creature->isHover()) - { - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); - m_creature->SetHover(true); - } + if(Phase == 3) + { + if(BellowingRoarTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR); + + BellowingRoarTimer = 30000; + }else BellowingRoarTimer -= diff; - if(!m_creature->GetMotionMaster()->empty() && (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE)) - m_creature->GetMotionMaster()->Clear(false); + if(SummonWhelpsTimer < diff) + { + SummonWhelps(Phase); - if(MovementTimer < diff) + 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) { - uint32 random = rand()%8; - if(random < 7) - m_creature->GetMotionMaster()->MovePoint(0, MovementLocations[random][0], MovementLocations[random][1], MovementLocations[random][2]); - else - { + if(rand()%100 < 30) + { DoScriptText(EMOTE_BREATH, m_creature); - DoCast(m_creature->getVictim(), SPELL_DEEPBREATH); - } + DoCast(m_creature->getVictim(), SPELL_DEEPBREATH); + } + else ChangePosition(); + 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; - } - - if(Phase == 3) - { - if(BellowingRoarTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR); - BellowingRoarTimer = 30000; - }else BellowingRoarTimer -= 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)); + } + } + } + } }; CreatureAI* GetAI_boss_onyxiaAI(Creature *_Creature) @@ -228,6 +305,6 @@ void AddSC_boss_onyxia() Script *newscript; newscript = new Script; newscript->Name="boss_onyxia"; - newscript->GetAI = GetAI_boss_onyxiaAI; - newscript->RegisterSelf(); -} + newscript->GetAI = &GetAI_boss_onyxiaAI; + newscript->RegisterSelf(); +}
\ No newline at end of file |