diff options
Diffstat (limited to 'src')
11 files changed, 456 insertions, 662 deletions
diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp index 8a7c75c00bb..3caf80680b8 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Hydromancer_Thespia SD%Complete: 80 -SDComment: Normal/heroic mode: to be tested. Needs additional adjustments (when instance script is adjusted) +SDComment: Needs additional adjustments (when instance script is adjusted) SDCategory: Coilfang Resevoir, The Steamvault EndScriptData */ @@ -29,23 +29,13 @@ EndContentData */ #include "precompiled.h" #include "def_steam_vault.h" -#define SAY_SUMMON "Surge forth my pets!" -#define SOUND_SUMMON 10360 - -#define SAY_AGGRO_1 "The depths will consume you!" -#define SOUND_AGGRO_1 10361 -#define SAY_AGGRO_2 "Meet your doom, surface dwellers!" -#define SOUND_AGGRO_2 10362 -#define SAY_AGGRO_3 "You will drown in blood!" -#define SOUND_AGGRO_3 10363 - -#define SAY_SLAY_1 "To the depths of oblivion with you!" -#define SOUND_SLAY_1 10364 -#define SAY_SLAY_2 "For my lady and master!" -#define SOUND_SLAY_2 10365 - -#define SAY_DEAD "Our matron will be.. the end of.. you.." -#define SOUND_DEAD 10366 +#define SAY_SUMMON -1545000 +#define SAY_AGGRO_1 -1545001 +#define SAY_AGGRO_2 -1545002 +#define SAY_AGGRO_3 -1545003 +#define SAY_SLAY_1 -1545004 +#define SAY_SLAY_2 -1545005 +#define SAY_DEAD -1545006 #define SPELL_LIGHTNING_CLOUD 25033 #define SPELL_LUNG_BURST 31481 @@ -56,6 +46,7 @@ struct TRINITY_DLL_DECL boss_thespiaAI : public ScriptedAI boss_thespiaAI(Creature *c) : ScriptedAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); + HeroicMode = m_creature->GetMap()->IsHeroic(); Reset(); } @@ -68,35 +59,28 @@ struct TRINITY_DLL_DECL boss_thespiaAI : public ScriptedAI void Reset() { - HeroicMode = m_creature->GetMap()->IsHeroic(); - LightningCloud_Timer = 28000; LungBurst_Timer = 7000; EnvelopingWinds_Timer = 9000; - if( pInstance ) pInstance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED); + if (pInstance) + pInstance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED); } void JustDied(Unit* Killer) { - DoYell(SAY_DEAD, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_DEAD); + DoScriptText(SAY_DEAD, m_creature); - if( pInstance ) pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE); + if (pInstance) + pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE); } void KilledUnit(Unit* victim) { switch(rand()%2) { - case 0: - DoYell(SAY_SLAY_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY_1); - break; - case 1: - DoYell(SAY_SLAY_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY_2); - break; + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; } } @@ -104,21 +88,13 @@ struct TRINITY_DLL_DECL boss_thespiaAI : public ScriptedAI { switch(rand()%3) { - case 0: - DoYell(SAY_AGGRO_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); - break; - case 1: - DoYell(SAY_AGGRO_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); - break; - case 2: - DoYell(SAY_AGGRO_3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); - break; + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; } - if( pInstance ) pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS); + if (pInstance) + pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS); } void UpdateAI(const uint32 diff) @@ -127,33 +103,33 @@ struct TRINITY_DLL_DECL boss_thespiaAI : public ScriptedAI return; //LightningCloud_Timer - if( LightningCloud_Timer < diff ) + if (LightningCloud_Timer < diff) { //cast twice in Heroic mode - if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_LIGHTNING_CLOUD); - if( HeroicMode ) - if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (HeroicMode) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_LIGHTNING_CLOUD); LightningCloud_Timer = 28000; }else LightningCloud_Timer -=diff; //LungBurst_Timer - if( LungBurst_Timer < diff ) + if (LungBurst_Timer < diff) { - if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_LUNG_BURST); LungBurst_Timer = 10000+rand()%5000; }else LungBurst_Timer -=diff; //EnvelopingWinds_Timer - if( EnvelopingWinds_Timer < diff ) + if (EnvelopingWinds_Timer < diff) { //cast twice in Heroic mode - if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_ENVELOPING_WINDS); - if( HeroicMode ) - if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (HeroicMode) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_ENVELOPING_WINDS); EnvelopingWinds_Timer = 10000+rand()%5000; }else EnvelopingWinds_Timer -=diff; @@ -185,11 +161,9 @@ struct TRINITY_DLL_DECL mob_coilfang_waterelementalAI : public ScriptedAI if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - if( WaterBoltVolley_Timer < diff ) + if (WaterBoltVolley_Timer < diff) { - if( HeroicMode ) DoCast(m_creature,H_SPELL_WATER_BOLT_VOLLEY); - else DoCast(m_creature,SPELL_WATER_BOLT_VOLLEY); - + DoCast(m_creature, HeroicMode ? H_SPELL_WATER_BOLT_VOLLEY : SPELL_WATER_BOLT_VOLLEY); WaterBoltVolley_Timer = 10000+rand()%5000; }else WaterBoltVolley_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp index 091e0694b1b..d769b44d9cf 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -29,27 +29,15 @@ EndContentData */ #include "precompiled.h" #include "def_steam_vault.h" -#define SAY_MECHANICS "I'm bringin' the pain!" -#define SOUND_MECHANICS 10367 - -#define SAY_AGGRO_1 "You're in for a world of hurt!" -#define SOUND_AGGRO_1 10368 -#define SAY_AGGRO_2 "Eat hot metal, scumbag!" -#define SOUND_AGGRO_2 10369 -#define SAY_AGGRO_3 "I'll come over there!" -#define SOUND_AGGRO_3 10370 -#define SAY_AGGRO_4 "I'm bringin' the pain!" -#define SOUND_AGGRO_4 10371 - -#define SAY_SLAY_1 "You just got served, punk!" -#define SOUND_SLAY_1 10372 -#define SAY_SLAY_2 "I own you!" -#define SOUND_SLAY_2 10373 -#define SAY_SLAY_3 "Have fun dyin', cupcake!" -#define SOUND_SLAY_3 10374 - -#define SAY_DEATH "Mommy!" -#define SOUND_DEATH 10375 +#define SAY_MECHANICS -1545007 +#define SAY_AGGRO_1 -1545008 +#define SAY_AGGRO_2 -1545009 +#define SAY_AGGRO_3 -1545010 +#define SAY_AGGRO_4 -1545011 +#define SAY_SLAY_1 -1545012 +#define SAY_SLAY_2 -1545013 +#define SAY_SLAY_3 -1545014 +#define SAY_DEATH -1545015 #define SPELL_SUPER_SHRINK_RAY 31485 #define SPELL_SAW_BLADE 31486 @@ -63,10 +51,12 @@ struct TRINITY_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI boss_mekgineer_steamriggerAI(Creature *c) : ScriptedAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); + HeroicMode = m_creature->GetMap()->IsHeroic(); Reset(); } ScriptedInstance *pInstance; + bool HeroicMode; uint32 Shrink_Timer; uint32 Saw_Blade_Timer; @@ -85,33 +75,25 @@ struct TRINITY_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI Summon50 = false; Summon25 = false; - if( pInstance ) pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED); + if (pInstance) + pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED); } void JustDied(Unit* Killer) { - DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_DEATH); + DoScriptText(SAY_DEATH, m_creature); - if( pInstance ) pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE); + if (pInstance) + pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE); } void KilledUnit(Unit* victim) { switch(rand()%3) { - case 0: - DoYell(SAY_SLAY_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY_1); - break; - case 1: - DoYell(SAY_SLAY_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY_2); - break; - case 2: - DoYell(SAY_SLAY_3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY_3); - break; + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; } } @@ -119,36 +101,27 @@ struct TRINITY_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI { switch(rand()%3) { - case 0: - DoYell(SAY_AGGRO_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); - break; - case 1: - DoYell(SAY_AGGRO_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); - break; - case 2: - DoYell(SAY_AGGRO_3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); - break; + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; } - if( pInstance ) pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS); + if (pInstance) + pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS); } //no known summon spells exist void SummonMechanichs() { - DoYell(SAY_MECHANICS, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_MECHANICS); + DoScriptText(SAY_MECHANICS, m_creature); DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,5,5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,-5,5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,-5,-5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); - if( rand()%2 ) + if (rand()%2) DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,5,-7,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); - if( rand()%2 ) + if (rand()%2) DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,7,-5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); } @@ -157,43 +130,54 @@ struct TRINITY_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - if( Shrink_Timer < diff ) + if (Shrink_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_SUPER_SHRINK_RAY); Shrink_Timer = 20000; }else Shrink_Timer -= diff; - if( Saw_Blade_Timer < diff ) + if (Saw_Blade_Timer < diff) { - if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1) ) DoCast(target,SPELL_SAW_BLADE); - else DoCast(m_creature->getVictim(),SPELL_SAW_BLADE); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target,SPELL_SAW_BLADE); + else + DoCast(m_creature->getVictim(),SPELL_SAW_BLADE); + Saw_Blade_Timer = 15000; } else Saw_Blade_Timer -= diff; - if( Electrified_Net_Timer < diff ) + if (Electrified_Net_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_ELECTRIFIED_NET); Electrified_Net_Timer = 10000; } else Electrified_Net_Timer -= diff; - if( !Summon75 ) - if( (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 75 ) + if (!Summon75) { - SummonMechanichs(); - Summon75 = true; + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 75) + { + SummonMechanichs(); + Summon75 = true; + } } - if( !Summon50 ) - if( (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50 ) + + if (!Summon50) { - SummonMechanichs(); - Summon50 = true; + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + SummonMechanichs(); + Summon50 = true; + } } - if( !Summon25 ) - if( (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25 ) + + if (!Summon25) { - SummonMechanichs(); - Summon25 = true; + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) + { + SummonMechanichs(); + Summon25 = true; + } } DoMeleeAttackIfReady(); @@ -217,17 +201,17 @@ struct TRINITY_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI mob_steamrigger_mechanicAI(Creature *c) : ScriptedAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); + HeroicMode = m_creature->GetMap()->IsHeroic(); Reset(); } ScriptedInstance* pInstance; + bool HeroicMode; uint32 Repair_Timer; - bool HeroicMode; void Reset() { - HeroicMode = m_creature->GetMap()->IsHeroic(); Repair_Timer = 2000; } @@ -241,22 +225,21 @@ struct TRINITY_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if( Repair_Timer < diff ) + if (Repair_Timer < diff) { - if( pInstance && pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER) && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS) + if (pInstance && pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER) && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS) { - if( Unit* pMekgineer = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER)) ) + if (Unit* pMekgineer = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER))) { - if( m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE) ) + if (m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE)) { //are we already channeling? Doesn't work very well, find better check? - if( !m_creature->GetUInt32Value(UNIT_CHANNEL_SPELL) ) + if (!m_creature->GetUInt32Value(UNIT_CHANNEL_SPELL)) { //m_creature->GetMotionMaster()->MovementExpired(); //m_creature->GetMotionMaster()->MoveIdle(); - if( HeroicMode ) DoCast(m_creature,H_SPELL_REPAIR,true); - else DoCast(m_creature,SPELL_REPAIR,true); + DoCast(m_creature,HeroicMode ? H_SPELL_REPAIR : SPELL_REPAIR, true); } Repair_Timer = 5000; } @@ -269,7 +252,7 @@ struct TRINITY_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI }else Repair_Timer = 5000; }else Repair_Timer -= diff; - if( !m_creature->SelectHostilTarget() || !m_creature->getVictim() ) + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; DoMeleeAttackIfReady(); diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp index 7c3de1e80d5..e5b31c75456 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp @@ -24,26 +24,14 @@ EndScriptData */ #include "precompiled.h" #include "def_steam_vault.h" -#define SAY_INTRO "You deem yourselves worthy simply because you bested my guards? Our work here will not be compromised!" -#define SOUND_INTRO 10390 - -#define SAY_REGEN "This is not nearly over..." -#define SOUND_REGEN 10391 - -#define SAY_AGGRO1 "Your head will roll!" -#define SOUND_AGGRO1 10392 -#define SAY_AGGRO2 "I despise all of your kind!" -#define SOUND_AGGRO2 10393 -#define SAY_AGGRO3 "Ba'ahntha sol'dorei!" -#define SOUND_AGGRO3 10394 - -#define SAY_SLAY1 "Scram, surface filth!" -#define SOUND_SLAY1 10395 -#define SAY_SLAY2 "Ah ha ha ha ha ha ha!" -#define SOUND_SLAY2 10396 - -#define SAY_DEATH "For her Excellency... for... Vashj!" -#define SOUND_DEATH 10397 +#define SAY_INTRO -1545016 +#define SAY_REGEN -1545017 +#define SAY_AGGRO1 -1545018 +#define SAY_AGGRO2 -1545019 +#define SAY_AGGRO3 -1545020 +#define SAY_SLAY1 -1545021 +#define SAY_SLAY2 -1545022 +#define SAY_DEATH -1545023 #define SPELL_SPELL_REFLECTION 31534 #define SPELL_IMPALE 39061 @@ -68,11 +56,13 @@ struct TRINITY_DLL_DECL mob_naga_distillerAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //hack, due to really weird spell behaviour :( - if( pInstance ) - if( pInstance->GetData(TYPE_DISTILLER) == IN_PROGRESS ) + if (pInstance) { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if (pInstance->GetData(TYPE_DISTILLER) == IN_PROGRESS) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } } } @@ -82,14 +72,18 @@ struct TRINITY_DLL_DECL mob_naga_distillerAI : public ScriptedAI { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DoCast(m_creature,SPELL_WARLORDS_RAGE_NAGA,true); - if( pInstance ) pInstance->SetData(TYPE_DISTILLER,IN_PROGRESS); + + if (pInstance) + pInstance->SetData(TYPE_DISTILLER,IN_PROGRESS); } void DamageTaken(Unit *done_by, uint32 &damage) { - if( m_creature->GetHealth() <= damage ) - if( pInstance ) pInstance->SetData(TYPE_DISTILLER,DONE); + if (m_creature->GetHealth() <= damage) + if (pInstance) + pInstance->SetData(TYPE_DISTILLER,DONE); } }; @@ -115,42 +109,29 @@ struct TRINITY_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI Rage_Timer = 45000; CanRage = false; - if( pInstance ) pInstance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED); + if (pInstance) + pInstance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED); } void Aggro(Unit *who) { switch(rand()%3) { - case 0: - DoYell(SAY_AGGRO1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO1); - break; - case 1: - DoYell(SAY_AGGRO2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO2); - break; - case 2: - DoYell(SAY_AGGRO3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO3); - break; + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; } - if( pInstance ) pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS); + if (pInstance) + pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS); } void KilledUnit(Unit* victim) { switch(rand()%2) { - case 0: - DoYell(SAY_SLAY1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(victim, SOUND_SLAY1); - break; - case 1: - DoYell(SAY_SLAY2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(victim, SOUND_SLAY2); - break; + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; } } @@ -177,18 +158,18 @@ struct TRINITY_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI void SpellHit(Unit *caster, const SpellEntry *spell) { //hack :( - if( spell->Id == SPELL_WARLORDS_RAGE_PROC ) - if( pInstance ) - if( pInstance->GetData(TYPE_DISTILLER) == DONE ) + if (spell->Id == SPELL_WARLORDS_RAGE_PROC) + if (pInstance) + if (pInstance->GetData(TYPE_DISTILLER) == DONE) m_creature->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC); } void JustDied(Unit* Killer) { - DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_DEATH); + DoScriptText(SAY_DEATH, m_creature); - if( pInstance ) pInstance->SetData(TYPE_WARLORD_KALITHRESH, DONE); + if (pInstance) + pInstance->SetData(TYPE_WARLORD_KALITHRESH, DONE); } void UpdateAI(const uint32 diff) @@ -196,13 +177,12 @@ struct TRINITY_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) return; - if( Rage_Timer < diff ) + if (Rage_Timer < diff) { Creature* distiller = SelectCreatureInGrid(17954, 100); - if( distiller ) + if (distiller) { - DoYell(SAY_REGEN, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_REGEN); + DoScriptText(SAY_REGEN, m_creature); DoCast(m_creature,SPELL_WARLORDS_RAGE); ((mob_naga_distillerAI*)distiller->AI())->StartRageGen(m_creature); } @@ -210,16 +190,16 @@ struct TRINITY_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI }else Rage_Timer -= diff; //Reflection_Timer - if( Reflection_Timer < diff ) + if (Reflection_Timer < diff) { DoCast(m_creature, SPELL_SPELL_REFLECTION); Reflection_Timer = 20000+rand()%5000; }else Reflection_Timer -= diff; //Impale_Timer - if( Impale_Timer < diff ) + if (Impale_Timer < diff) { - if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_IMPALE); Impale_Timer = 7500+rand()%5000; diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp index f89adfe08eb..2237a85077a 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -23,14 +23,14 @@ EndScriptData */ #include "precompiled.h" +#define SAY_AGGRO -1542008 + #define SPELL_SLIME_SPRAY 30913 #define SPELL_POISON_CLOUD 30916 #define SPELL_POISON_BOLT 30917 #define SPELL_POISON 30914 -#define SAY_AGGRO "Come intruders...." - struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI { boss_broggokAI(Creature *c) : ScriptedAI(c) {Reset();} @@ -48,7 +48,7 @@ struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI void Aggro(Unit *who) { - DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL); + DoScriptText(SAY_AGGRO, m_creature); } void UpdateAI(const uint32 diff) diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index 597ed369c62..3f49a53cb73 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -28,26 +28,16 @@ EndContentData */ #include "precompiled.h" -#define SAY_WAKE "Who dares interrupt... What is this? What have you done? You ruin everything!" -#define SOUND_WAKE 10164 +#define SAY_WAKE -1542000 -#define SAY_ADD_AGGRO_1 "You mustn't let him loose!" -#define SOUND_ADD_AGGRO_1 10166 -#define SAY_ADD_AGGRO_2 "Ignorant whelps!" -#define SOUND_ADD_AGGRO_2 10167 -#define SAY_ADD_AGGRO_3 "You fools! He'll kill us all!" -#define SOUND_ADD_AGGRO_3 10168 +#define SAY_ADD_AGGRO_1 -1542001 +#define SAY_ADD_AGGRO_2 -1542002 +#define SAY_ADD_AGGRO_3 -1542003 -#define SAY_KILL_1 "Just as you deserve!" -#define SOUND_KILL_1 10169 -#define SAY_KILL_2 "Your friends will soon be joining you." -#define SOUND_KILL_2 10170 - -#define SAY_NOVA "Closer... Come closer.. and burn!" -#define SOUND_NOVA 10165 - -#define SAY_DIE "Good luck... you'll need it.." -#define SOUND_DIE 10171 +#define SAY_KILL_1 -1542004 +#define SAY_KILL_2 -1542005 +#define SAY_NOVA -1542006 +#define SAY_DIE -1542007 #define SPELL_CORRUPTION 30938 @@ -88,8 +78,7 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI void Aggro(Unit *who) { - DoYell(SAY_WAKE, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_WAKE); + DoScriptText(SAY_WAKE, m_creature); } void KilledUnit(Unit* victim) @@ -99,31 +88,24 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI switch(rand()%2) { - case 0: - DoYell(SAY_KILL_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_KILL_1); - break; - case 1: - DoYell(SAY_KILL_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_KILL_2); - break; + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; } } void JustDied(Unit* Killer) { - DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_DIE); + DoScriptText(SAY_DIE, m_creature); } void UpdateAI(const uint32 diff) { - if( !m_creature->SelectHostilTarget() || !m_creature->getVictim() ) + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - if( Firenova ) + if (Firenova) { - if( Firenova_Timer < diff ) + if (Firenova_Timer < diff) { DoCast(m_creature,HeroicMode ? H_SPELL_FIRE_NOVA : SPELL_FIRE_NOVA); Firenova = false; @@ -133,27 +115,26 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI return; } - if( ShadowVolley_Timer < diff ) + if (ShadowVolley_Timer < diff) { DoCast(m_creature,HeroicMode ? H_SPELL_SHADOW_BOLT_VOLLEY : SPELL_SHADOW_BOLT_VOLLEY); ShadowVolley_Timer = 5000+rand()%8000; }else ShadowVolley_Timer -=diff; - if( Corruption_Timer < diff ) + if (Corruption_Timer < diff) { DoCast(m_creature,SPELL_CORRUPTION); Corruption_Timer = 30000+rand()%20000; }else Corruption_Timer -=diff; - if( BurningNova_Timer < diff ) + if (BurningNova_Timer < diff) { - if( m_creature->IsNonMeleeSpellCasted(false) ) + if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(true); - DoYell(SAY_NOVA, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_NOVA); + DoScriptText(SAY_NOVA, m_creature); - if( HeroicMode ) + if (HeroicMode) DoCast(m_creature,SPELL_VORTEX); DoCast(m_creature,SPELL_BURNING_NOVA); @@ -212,17 +193,17 @@ struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if( !m_creature->SelectHostilTarget() || !m_creature->getVictim() ) + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - if( MarkOfShadow_Timer < diff ) + if (MarkOfShadow_Timer < diff) { - if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0) ) + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(target,SPELL_MARK_OF_SHADOW); MarkOfShadow_Timer = 15000+rand()%5000; }else MarkOfShadow_Timer -=diff; - if( ShadowBolt_Timer < diff ) + if (ShadowBolt_Timer < diff) { DoCast(m_creature->getVictim(),HeroicMode ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); ShadowBolt_Timer = 5000+rand()%1000; diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 74bb2ed66e7..c1e6057104e 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -23,26 +23,18 @@ EndScriptData */ #include "precompiled.h" +#define SAY_AGGRO_1 -1542009 +#define SAY_AGGRO_2 -1542010 +#define SAY_AGGRO_3 -1542011 +#define SAY_KILL_1 -1542012 +#define SAY_KILL_2 -1542013 +#define SAY_DIE -1542014 + #define SPELL_ACID_SPRAY 38153 // heroic 38973 ??? 38153 #define SPELL_EXPLODING_BREAKER 30925 #define SPELL_KNOCKDOWN 20276 #define SPELL_DOMINATION 25772 // ??? -#define SAY_KILL_1 "Let's see what I can make of you." -#define SOUND_KILL_1 10289 -#define SAY_KILL_2 "It is pointless to resist." -#define SOUND_KILL_2 10290 - -#define SAY_AGGRO_1 "My work must not be interrupted." -#define SOUND_AGGRO_1 10286 -#define SAY_AGGRO_2 "Perhaps I can find a use for you." -#define SOUND_AGGRO_2 10287 -#define SAY_AGGRO_3 "Anger... Hate... These are tools I can use." -#define SOUND_AGGRO_3 10288 - -#define SAY_DIE "Stay away from... me." -#define SOUND_DIE 10291 - struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI { boss_the_makerAI(Creature *c) : ScriptedAI(c) {Reset();} @@ -64,43 +56,24 @@ struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI { switch(rand()%3) { - case 0: - DoYell(SAY_AGGRO_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); - break; - case 1: - DoYell(SAY_AGGRO_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); - break; - case 2: - DoYell(SAY_AGGRO_3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); - break; + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; } } void KilledUnit(Unit* victim) { - if (rand()%5) - return; - switch(rand()%2) { - case 0: - DoYell(SAY_KILL_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_KILL_1); - break; - case 1: - DoYell(SAY_KILL_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_KILL_2); - break; + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; } } void JustDied(Unit* Killer) { - DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_DIE); + DoScriptText(SAY_DIE, m_creature); } void UpdateAI(const uint32 diff) @@ -108,18 +81,16 @@ struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - if(AcidSpray_Timer < diff) + if (AcidSpray_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_ACID_SPRAY); AcidSpray_Timer = 16000+rand()%8000; }else AcidSpray_Timer -=diff; - if(ExplodingBreaker_Timer < diff) + if (ExplodingBreaker_Timer < diff) { - Unit* target; - target = SelectUnit(SELECT_TARGET_RANDOM,0); - - DoCast(target,SPELL_EXPLODING_BREAKER); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_EXPLODING_BREAKER); ExplodingBreaker_Timer = 4000+rand()%8000; }else ExplodingBreaker_Timer -=diff; @@ -135,7 +106,7 @@ struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI }else domination_timer -=diff; */ - if(Knockdown_Timer < diff) + if (Knockdown_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_KNOCKDOWN); Knockdown_Timer = 4000+rand()%8000; diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 58bb0eabf7f..676fbddf48c 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -17,12 +17,21 @@ /* ScriptData SDName: Boss_Omar_The_Unscarred SD%Complete: 90 -SDComment: Normal/Heroic support: both, to be tested. Temporary solution for orbital/shadow whip-ability. Needs more core support before making it more proper. +SDComment: Temporary solution for orbital/shadow whip-ability. Needs more core support before making it more proper. SDCategory: Hellfire Citadel, Hellfire Ramparts EndScriptData */ #include "precompiled.h" +#define SAY_AGGRO_1 -1543009 +#define SAY_AGGRO_2 -1543010 +#define SAY_AGGRO_3 -1543011 +#define SAY_SUMMON -1543012 +#define SAY_CURSE -1543013 +#define SAY_KILL_1 -1543014 +#define SAY_DIE -1543015 +#define SAY_WIPE -1543016 + #define SPELL_ORBITAL_STRIKE 30637 #define SPELL_SHADOW_WHIP 30638 #define SPELL_TREACHEROUS_AURA 30695 @@ -32,31 +41,15 @@ EndScriptData */ #define H_SPELL_SHADOW_BOLT 39297 #define SPELL_SUMMON_FIENDISH_HOUND 30707 -#define SAY_AGGRO_1 "You dare stand against me?!" -#define SOUND_AGGRO_1 10280 -#define SAY_AGGRO_2 "I will not be defeated!" -#define SOUND_AGGRO_2 10279 -#define SAY_AGGRO_3 "Your insolence will be your death." -#define SOUND_AGGRO_3 10281 - -#define SAY_SUMMON "Achor-she-ki! Feast my pet! Eat your fill!" -#define SOUND_SUMMON 10277 - -#define SAY_CURSE "A-Kreesh!" -#define SOUND_CURSE 10278 - -#define SAY_KILL_1 "Die, weakling!" -#define SOUND_KILL_1 10282 - -#define SAY_DIE "It is... not over." -#define SOUND_DIE 10284 - -#define SAY_WIPE "I am victorious!" -#define SOUND_WIPE 10283 - struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI { - boss_omor_the_unscarredAI(Creature *c) : Scripted_NoMovementAI(c) {Reset();} + boss_omor_the_unscarredAI(Creature *c) : Scripted_NoMovementAI(c) + { + HeroicMode = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + bool HeroicMode; uint32 OrbitalStrike_Timer; uint32 ShadowWhip_Timer; @@ -67,14 +60,10 @@ struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI uint32 SummonedCount; uint64 playerGUID; bool CanPullBack; - bool HeroicMode; void Reset() { - HeroicMode = m_creature->GetMap()->IsHeroic(); - - DoYell(SAY_WIPE,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_WIPE); + DoScriptText(SAY_WIPE, m_creature); OrbitalStrike_Timer = 25000; ShadowWhip_Timer = 2000; @@ -91,18 +80,9 @@ struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI { switch(rand()%3) { - case 0: - DoYell(SAY_AGGRO_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); - break; - case 1: - DoYell(SAY_AGGRO_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); - break; - case 2: - DoYell(SAY_AGGRO_3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); - break; + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; } } @@ -111,16 +91,14 @@ struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI if (rand()%2) return; - DoYell(SAY_KILL_1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_KILL_1); + DoScriptText(SAY_KILL_1, m_creature); } void JustSummoned(Creature* summoned) { - DoYell(SAY_SUMMON,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SUMMON); + DoScriptText(SAY_SUMMON, m_creature); - if( Unit* random = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit* random = SelectUnit(SELECT_TARGET_RANDOM,0)) summoned->AI()->AttackStart(random); ++SummonedCount; @@ -128,8 +106,7 @@ struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI void JustDied(Unit* Killer) { - DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_DIE); + DoScriptText(SAY_DIE, m_creature); } void UpdateAI(const uint32 diff) @@ -138,9 +115,9 @@ struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI return; //only two may be wrong, perhaps increase timer and spawn periodically instead. - if( SummonedCount < 2 ) + if (SummonedCount < 2) { - if( Summon_Timer < diff ) + if (Summon_Timer < diff) { m_creature->InterruptNonMeleeSpells(false); DoCast(m_creature,SPELL_SUMMON_FIENDISH_HOUND); @@ -148,14 +125,14 @@ struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI }else Summon_Timer -= diff; } - if( CanPullBack ) + if (CanPullBack) { - if( ShadowWhip_Timer < diff ) + if (ShadowWhip_Timer < diff) { - if( Unit* temp = Unit::GetUnit(*m_creature,playerGUID) ) + if (Unit* temp = Unit::GetUnit(*m_creature,playerGUID)) { //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) - if( temp->HasUnitMovementFlag(MOVEMENTFLAG_FALLING) ) + if (temp->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)) { m_creature->InterruptNonMeleeSpells(false); DoCast(temp,SPELL_SHADOW_WHIP); @@ -166,56 +143,52 @@ struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI CanPullBack = false; }else ShadowWhip_Timer -= diff; } - else if( OrbitalStrike_Timer < diff ) + else if (OrbitalStrike_Timer < diff) { Unit* temp = NULL; - if( m_creature->IsWithinCombatDist(m_creature->getVictim(), ATTACK_DISTANCE) ) + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) temp = m_creature->getVictim(); else temp = SelectUnit(SELECT_TARGET_RANDOM,0); - if( temp && temp->GetTypeId() == TYPEID_PLAYER ) + if (temp && temp->GetTypeId() == TYPEID_PLAYER) { DoCast(temp,SPELL_ORBITAL_STRIKE); OrbitalStrike_Timer = 14000+rand()%2000; playerGUID = temp->GetGUID(); - if( playerGUID ) + + if (playerGUID) CanPullBack = true; } }else OrbitalStrike_Timer -= diff; - if( (m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20 ) + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20) { - if( DemonicShield_Timer < diff ) + if (DemonicShield_Timer < diff) { DoCast(m_creature,SPELL_DEMONIC_SHIELD); DemonicShield_Timer = 15000; }else DemonicShield_Timer -= diff; } - if( Aura_Timer < diff ) + if (Aura_Timer < diff) { - DoYell(SAY_CURSE,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_CURSE); + DoScriptText(SAY_CURSE, m_creature); - if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) { - if( HeroicMode ) DoCast(target,H_SPELL_BANE_OF_TREACHERY); - else DoCast(target,SPELL_TREACHEROUS_AURA); - + DoCast(target,HeroicMode ? H_SPELL_BANE_OF_TREACHERY : SPELL_TREACHEROUS_AURA); Aura_Timer = 8000+rand()%8000; } }else Aura_Timer -= diff; - if( Shadowbolt_Timer < diff ) + if (Shadowbolt_Timer < diff) { - if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) { - if( target ) + if (target) target = m_creature->getVictim(); - if( HeroicMode ) DoCast(target,H_SPELL_SHADOW_BOLT); - else DoCast(target,SPELL_SHADOW_BOLT); - + DoCast(target,HeroicMode ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); Shadowbolt_Timer = 4000+rand()%2500; } }else Shadowbolt_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index e1115a397de..09e118cc68f 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -17,33 +17,21 @@ /* ScriptData SDName: Boss_Watchkeeper_Gargolmar SD%Complete: 80 -SDComment: Normal/Heroic support: both, to be tested. Missing adds to heal him. Surge should be used on target furthest away, not random. +SDComment: Missing adds to heal him. Surge should be used on target furthest away, not random. SDCategory: Hellfire Citadel, Hellfire Ramparts EndScriptData */ #include "precompiled.h" -#define SAY_HEAL "Heal me! QUICKLY!" -#define SOUND_HEAL 10329 - -#define SAY_SURGE "Back off, pup!" -#define SOUND_SURGE 10330 - -#define SAY_TAUNT "Do you smell that? Fresh meat has somehow breached our citadel. Be wary of any intruders." - -#define SAY_AGGRO_1 "What have we here...?" -#define SOUND_AGGRO_1 10331 -#define SAY_AGGRO_2 "Heh... this may hurt a little." -#define SOUND_AGGRO_2 10332 -#define SAY_AGGRO_3 "I'm gonna enjoy this." -#define SOUND_AGGRO_3 10333 - -#define SAY_KILL_1 "Say farewell!" -#define SOUND_KILL_1 10334 -#define SAY_KILL_2 "Much too easy..." -#define SOUND_KILL_2 10335 - -#define SOUND_DIE 10336 +#define SAY_TAUNT -1543000 +#define SAY_HEAL -1543001 +#define SAY_SURGE -1543002 +#define SAY_AGGRO_1 -1543003 +#define SAY_AGGRO_2 -1543004 +#define SAY_AGGRO_3 -1543005 +#define SAY_KILL_1 -1543006 +#define SAY_KILL_2 -1543007 +#define SAY_DIE -1543008 #define SPELL_MORTAL_WOUND 30641 #define H_SPELL_MORTAL_WOUND 36814 @@ -52,7 +40,13 @@ EndScriptData */ struct TRINITY_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI { - boss_watchkeeper_gargolmarAI(Creature *c) : ScriptedAI(c) {Reset();} + boss_watchkeeper_gargolmarAI(Creature *c) : ScriptedAI(c) + { + HeroicMode = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + bool HeroicMode; uint32 Surge_Timer; uint32 MortalWound_Timer; @@ -60,12 +54,9 @@ struct TRINITY_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI bool HasTaunted; bool YelledForHeal; - bool HeroicMode; void Reset() { - HeroicMode = m_creature->GetMap()->IsHeroic(); - Surge_Timer = 5000; MortalWound_Timer = 4000; Retaliation_Timer = 0; @@ -78,37 +69,28 @@ struct TRINITY_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI { switch(rand()%3) { - case 0: - DoYell(SAY_AGGRO_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); - break; - case 1: - DoYell(SAY_AGGRO_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); - break; - case 2: - DoYell(SAY_AGGRO_3, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); - break; + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; } } void MoveInLineOfSight(Unit* who) { - if( !m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessablePlaceFor(m_creature) ) + if (!m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessablePlaceFor(m_creature) ) { if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) return; float attackRadius = m_creature->GetAttackDistance(who); - if(m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) { who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); AttackStart(who); } else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f)) { - DoYell(SAY_TAUNT, LANG_UNIVERSAL, NULL); + DoScriptText(SAY_TAUNT, m_creature); HasTaunted = true; } } @@ -118,20 +100,14 @@ struct TRINITY_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI { switch(rand()%2) { - case 0: - DoYell(SAY_KILL_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_KILL_1); - break; - case 1: - DoYell(SAY_KILL_2, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_KILL_2); - break; + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; } } void JustDied(Unit* Killer) { - DoPlaySoundToSet(m_creature,SOUND_DIE); + DoScriptText(SAY_DIE, m_creature); } void UpdateAI(const uint32 diff) @@ -139,40 +115,38 @@ struct TRINITY_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - if( MortalWound_Timer < diff ) + if (MortalWound_Timer < diff) { - if( HeroicMode ) DoCast(m_creature->getVictim(),H_SPELL_MORTAL_WOUND); - else DoCast(m_creature->getVictim(),SPELL_MORTAL_WOUND); - + DoCast(m_creature->getVictim(),HeroicMode ? H_SPELL_MORTAL_WOUND : SPELL_MORTAL_WOUND); MortalWound_Timer = 5000+rand()%8000; }else MortalWound_Timer -= diff; - if( Surge_Timer < diff ) + if (Surge_Timer < diff) { - DoYell(SAY_SURGE, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_SURGE); + DoScriptText(SAY_SURGE, m_creature); - if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_SURGE); Surge_Timer = 5000+rand()%8000; }else Surge_Timer -= diff; - if((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20) + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20) { - if( Retaliation_Timer < diff ) + if (Retaliation_Timer < diff) { DoCast(m_creature,SPELL_RETALIATION); Retaliation_Timer = 30000; }else Retaliation_Timer -= diff; } - if( !YelledForHeal ) - if((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 40) + if (!YelledForHeal) { - DoYell(SAY_HEAL, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature,SOUND_HEAL); - YelledForHeal = true; + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 40) + { + DoScriptText(SAY_HEAL, m_creature); + YelledForHeal = true; + } } DoMeleeAttackIfReady(); diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 458dafa2511..1424435354a 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -24,6 +24,32 @@ EndScriptData */ #include "precompiled.h" #include "def_magtheridons_lair.h" +struct Yell +{ + int32 id; +}; + +static Yell RandomTaunt[]= +{ + {-1544000}, + {-1544001}, + {-1544002}, + {-1544003}, + {-1544004}, + {-1544005}, +}; + +#define SAY_FREED -1544006 +#define SAY_AGGRO -1544007 +#define SAY_BANISH -1544008 +#define SAY_CHAMBER_DESTROY -1544009 +#define SAY_PLAYER_KILLED -1544010 +#define SAY_DEATH -1544011 + +#define EMOTE_BERSERK -1544012 +#define EMOTE_BLASTNOVA -1544013 +#define EMOTE_BEGIN -1544014 + #define MOB_MAGTHERIDON 17257 #define MOB_ROOM 17516 #define MOB_CHANNELLER 17256 @@ -57,29 +83,9 @@ EndScriptData */ #define SPELL_FIRE_BLAST 37110 -//Dialog -#define SAY_AGGRO "Thank you for releasing me. Now...die!" -#define SOUND_AGGRO 10254 -#define SAY_BANISH "Not again...NOT AGAIN!" -#define SOUND_BANISH 10256 -#define SAY_FREED "I...am...UNLEASHED!!!" -#define SOUND_FREED 10253 -#define SAY_CHAMBER_DESTROY "I will not be taken so easily. Let the walls of this prison tremble...and FALL!!!" -#define SOUND_CHAMBER_DESTROY 10257 -#define SAY_PLAYER_KILLED "Did you think me weak? Soft? Who is the weak one now?!" -#define SOUND_PLAYER_KILLED 10255 -#define SAY_DEATH "The Legion...will consume you...all...." -#define SOUND_DEATH 10258 -#define EMOTE_BERSERK "becomes enraged!" -#define EMOTE_BLASTNOVA "begins to cast Blast Nova!" -#define EMOTE_BEGIN "%s's bonds begin to weaken!" - // count of clickers needed to interrupt blast nova #define CLICKERS_COUNT 5 -// Unkown sounds -uint32 RandomSound[] = {10247, 10248, 10249, 10250, 10251, 10252}; - typedef std::map<uint64, uint64> CubeMap; struct TRINITY_DLL_DECL mob_abyssalAI : public ScriptedAI @@ -196,6 +202,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI uint32 BlastNova_Timer; uint32 Blaze_Timer; uint32 Debris_Timer; + uint32 RandChat_Timer; bool Phase3; bool NeedCheckCube; @@ -214,6 +221,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI Blaze_Timer = 10000+rand()%20000; BlastNova_Timer = 60000; Cleave_Timer = 15000; + RandChat_Timer = 90000; Phase3 = false; @@ -261,8 +269,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI // if 5 clickers from other cubes apply shadow cage if(ClickerNum >= CLICKERS_COUNT && !m_creature->HasAura(SPELL_SHADOW_CAGE, 0)) { - DoYell(SAY_BANISH, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_BANISH); + DoScriptText(SAY_BANISH, m_creature); m_creature->CastSpell(m_creature, SPELL_SHADOW_CAGE, true); } else if(ClickerNum < CLICKERS_COUNT && m_creature->HasAura(SPELL_SHADOW_CAGE, 0)) @@ -273,8 +280,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI void KilledUnit(Unit* victim) { - DoYell(SAY_PLAYER_KILLED, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_PLAYER_KILLED); + DoScriptText(SAY_PLAYER_KILLED, m_creature); } void JustDied(Unit* Killer) @@ -282,8 +288,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI if(pInstance) pInstance->SetData(DATA_MAGTHERIDON_EVENT, DONE); - DoYell(SAY_DEATH,LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_DEATH); + DoScriptText(SAY_DEATH, m_creature); } void MoveInLineOfSight(Unit*) {} @@ -303,12 +308,20 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_C); - DoYell(SAY_FREED, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_FREED); + DoScriptText(SAY_FREED, m_creature); } void UpdateAI(const uint32 diff) { + if (!InCombat) + { + if (RandChat_Timer < diff) + { + DoScriptText(RandomTaunt[rand()%6].id, m_creature); + RandChat_Timer = 90000; + }else RandChat_Timer -= diff; + } + if(!m_creature->SelectHostilTarget() && !m_creature->getVictim()) return; @@ -317,7 +330,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI if(Berserk_Timer < diff) { m_creature->CastSpell(m_creature, SPELL_BERSERK, true); - DoTextEmote(EMOTE_BERSERK, NULL); + DoScriptText(EMOTE_BERSERK, m_creature); Berserk_Timer = 60000; }else Berserk_Timer -= diff; @@ -332,7 +345,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI // to avoid earthquake interruption if(!m_creature->hasUnitState(UNIT_STAT_STUNNED)) { - DoTextEmote(EMOTE_BLASTNOVA, NULL); + DoScriptText(EMOTE_BLASTNOVA, m_creature); DoCast(m_creature, SPELL_BLASTNOVA); BlastNova_Timer = 60000; } @@ -370,8 +383,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI && !m_creature->hasUnitState(UNIT_STAT_STUNNED)) // shadow cage and earthquake { Phase3 = true; - DoYell(SAY_CHAMBER_DESTROY, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_CHAMBER_DESTROY); + DoScriptText(SAY_CHAMBER_DESTROY, m_creature); m_creature->CastSpell(m_creature, SPELL_CAMERA_SHAKE, true); m_creature->CastSpell(m_creature, SPELL_DEBRIS_KNOCKDOWN, true); diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index d530a875804..87216d56163 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Grand_Warlock_Nethekurse SD%Complete: 75 -SDComment: encounter not fully complete. missing part where boss kill minions. +SDComment: encounter not fully completed. missing part where boss kill minions. SDCategory: Hellfire Citadel, Shattered Halls EndScriptData */ @@ -32,49 +32,34 @@ EndContentData */ struct Say { - const char* text; - uint32 sound; + int32 id; }; -#define SAY_INTRO "You wish to fight us all at once? This should be amusing!" -#define SOUND_INTRO 10262 - static Say PeonAttacked[]= { - {"You can have that one. I no longer need him.", 10263}, - {"Yes, beat him mercilessly. His skull is a thick as an ogres.", 10264}, - {"Don't waste your time on that one. He's weak!", 10265}, - {"You want him? Very well, take him!", 10266}, + {-1540001}, + {-1540002}, + {-1540003}, + {-1540004}, }; static Say PeonDies[]= { - {"One pitiful wretch down. Go on, take another one.", 10267}, - {"Ahh, what a waste... Next!", 10268}, - {"I was going to kill him anyway!", 10269}, - {"Thank you for saving me the trouble! Now it's my turn to have some fun...", 10270}, + {-1540005}, + {-1540006}, + {-1540007}, + {-1540008}, }; -#define SAY_TAUNT_1 "Beg for your pittyfull life!" -#define SOUND_TAUNT_1 10259 -#define SAY_TAUNT_2 "Run covad, ruun!" -#define SOUND_TAUNT_2 10260 -#define SAY_TAUNT_3 "Your pain amuses me." -#define SOUND_TAUNT_3 10261 - -#define SAY_AGGRO_1 "I'm already bored." -#define SOUND_AGGRO_1 10271 -#define SAY_AGGRO_2 "Come on! ... Show me a real fight." -#define SOUND_AGGRO_2 10272 -#define SAY_AGGRO_3 "I had more fun torturing the peons." -#define SOUND_AGGRO_3 10273 - -#define SAY_SLAY_1 "You Loose." -#define SOUND_SLAY_1 10274 -#define SAY_SLAY_2 "Ohh! Just die." -#define SOUND_SLAY_2 10275 - -#define SAY_DIE "What a ... a shame." -#define SOUND_DIE 10276 +#define SAY_INTRO -1540000 +#define SAY_TAUNT_1 -1540009 +#define SAY_TAUNT_2 -1540010 +#define SAY_TAUNT_3 -1540011 +#define SAY_AGGRO_1 -1540012 +#define SAY_AGGRO_2 -1540013 +#define SAY_AGGRO_3 -1540014 +#define SAY_SLAY_1 -1540015 +#define SAY_SLAY_2 -1540016 +#define SAY_DIE -1540017 #define SPELL_DEATH_COIL 30500 #define SPELL_DARK_SPIN 30502 // core bug spell attack caster :D @@ -93,12 +78,13 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI boss_grand_warlock_nethekurseAI(Creature *c) : ScriptedAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); + HeroicMode = m_creature->GetMap()->IsHeroic(); Reset(); } ScriptedInstance* pInstance; - bool HeroicMode; + bool IntroOnce; bool IsIntroEvent; bool IsMainEvent; @@ -118,7 +104,6 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - HeroicMode = m_creature->GetMap()->IsHeroic(); IsIntroEvent = false; IntroOnce = false; IsMainEvent = false; @@ -137,24 +122,22 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI void DoYellForPeonAggro() { - if( PeonEngagedCount >= 4 ) + if (PeonEngagedCount >= 4) return; - DoYell(PeonAttacked[PeonEngagedCount].text, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, PeonAttacked[PeonEngagedCount].sound); + DoScriptText(PeonAttacked[PeonEngagedCount].id, m_creature); ++PeonEngagedCount; } void DoYellForPeonDeath() { - if( PeonKilledCount >= 4 ) + if (PeonKilledCount >= 4) return; - DoYell(PeonDies[PeonKilledCount].text, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, PeonDies[PeonKilledCount].sound); + DoScriptText(PeonDies[PeonKilledCount].id, m_creature); ++PeonKilledCount; - if( PeonKilledCount == 4 ) + if (PeonKilledCount == 4) { IsIntroEvent = false; IsMainEvent = true; @@ -166,18 +149,9 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI { switch(rand()%3) { - case 0: - DoPlaySoundToSet(m_creature,SOUND_TAUNT_1); - DoYell(SAY_TAUNT_1,LANG_UNIVERSAL,NULL); - break; - case 1: - DoPlaySoundToSet(m_creature,SOUND_TAUNT_2); - DoYell(SAY_TAUNT_2,LANG_UNIVERSAL,NULL); - break; - case 2: - DoPlaySoundToSet(m_creature,SOUND_TAUNT_3); - DoYell(SAY_TAUNT_3,LANG_UNIVERSAL,NULL); - break; + case 0: DoScriptText(SAY_TAUNT_1, m_creature); break; + case 1: DoScriptText(SAY_TAUNT_2, m_creature); break; + case 2: DoScriptText(SAY_TAUNT_3, m_creature); break; } //TODO: kill the peons first @@ -190,7 +164,7 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI void AttackStart(Unit* who) { - if ( IsIntroEvent || !IsMainEvent ) + if (IsIntroEvent || !IsMainEvent) return; if (m_creature->Attack(who, true)) @@ -212,27 +186,26 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI void MoveInLineOfSight(Unit *who) { - if( !m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessablePlaceFor(m_creature) ) + if (!m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessablePlaceFor(m_creature) ) { - if( !IntroOnce && m_creature->IsWithinDistInMap(who, 75) ) + if (!IntroOnce && m_creature->IsWithinDistInMap(who, 75)) { - DoYell(SAY_INTRO, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_INTRO); + DoScriptText(SAY_INTRO, m_creature); IntroOnce = true; IsIntroEvent = true; - if( pInstance ) + if (pInstance) pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); } - if(!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE ) + if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE ) return; - if( IsIntroEvent || !IsMainEvent ) + if (IsIntroEvent || !IsMainEvent) return; float attackRadius = m_creature->GetAttackDistance(who); - if( m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who) ) + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who) ) { who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); AttackStart(who); @@ -244,18 +217,9 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI { switch(rand()%3) { - case 0: - DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); - DoYell(SAY_AGGRO_1,LANG_UNIVERSAL,NULL); - break; - case 1: - DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); - DoYell(SAY_AGGRO_2,LANG_UNIVERSAL,NULL); - break; - case 2: - DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); - DoYell(SAY_AGGRO_3,LANG_UNIVERSAL,NULL); - break; + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; } } @@ -270,65 +234,58 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI { switch(rand()%2) { - case 0: - DoPlaySoundToSet(m_creature,SOUND_SLAY_1); - DoYell(SAY_SLAY_1,LANG_UNIVERSAL,NULL); - break; - case 1: - DoPlaySoundToSet(m_creature,SOUND_SLAY_2); - DoYell(SAY_SLAY_2,LANG_UNIVERSAL,NULL); - break; + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; } } void JustDied(Unit* Killer) { - DoPlaySoundToSet(m_creature,SOUND_DIE); - DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); + DoScriptText(SAY_DIE, m_creature); - if( !pInstance ) + if (!pInstance) return; pInstance->SetData(TYPE_NETHEKURSE,DONE); - if( pInstance->GetData64(DATA_NETHEKURSE_DOOR) ) + if (pInstance->GetData64(DATA_NETHEKURSE_DOOR)) { - if( GameObject *Door = GameObject::GetGameObject(*m_creature,pInstance->GetData64(DATA_NETHEKURSE_DOOR)) ) + if (GameObject *Door = GameObject::GetGameObject(*m_creature,pInstance->GetData64(DATA_NETHEKURSE_DOOR))) Door->SetGoState(0); } } void UpdateAI(const uint32 diff) { - if( IsIntroEvent ) + if (IsIntroEvent) { - if( !pInstance ) + if (!pInstance) return; - if( pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS ) + if (pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS) { - if( IntroEvent_Timer < diff ) + if (IntroEvent_Timer < diff) { DoTauntPeons(); }else IntroEvent_Timer -= diff; } } - if( !m_creature->SelectHostilTarget() || !m_creature->getVictim() ) + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) return; - if( !IsMainEvent ) + if (!IsMainEvent) return; - if( Phase ) + if (Phase) { - if( !SpinOnce ) + if (!SpinOnce) { DoCast(m_creature->getVictim(),SPELL_DARK_SPIN); SpinOnce = true; } - if( Cleave_Timer < diff ) + if (Cleave_Timer < diff) { DoCast(m_creature->getVictim(),(HeroicMode ? H_SPELL_SHADOW_SLAM : SPELL_SHADOW_CLEAVE)); Cleave_Timer = 6000+rand()%2500; @@ -336,21 +293,21 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI } else { - if( ShadowFissure_Timer < diff ) + if (ShadowFissure_Timer < diff) { - if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_SHADOW_FISSURE); ShadowFissure_Timer = 7500+rand()%7500; }else ShadowFissure_Timer -= diff; - if( DeathCoil_Timer < diff ) + if (DeathCoil_Timer < diff) { - if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_DEATH_COIL); DeathCoil_Timer = 15000+rand()%5000; }else DeathCoil_Timer -= diff; - if( (m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20 ) + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20) Phase = true; DoMeleeAttackIfReady(); @@ -382,16 +339,16 @@ struct TRINITY_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI void Aggro(Unit* who) { - if( pInstance ) + if (pInstance) { - if( pInstance->GetData64(DATA_NETHEKURSE) ) + if (pInstance->GetData64(DATA_NETHEKURSE)) { Creature *pKurse = (Creature*)Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_NETHEKURSE)); - if( pKurse ) + if (pKurse) ((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonAggro(); } - if( pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS ) + if (pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS ) return; else pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); } @@ -399,12 +356,12 @@ struct TRINITY_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI void JustDied(Unit* Killer) { - if( pInstance ) + if (pInstance) { - if( pInstance->GetData64(DATA_NETHEKURSE) ) + if (pInstance->GetData64(DATA_NETHEKURSE)) { Creature *pKurse = (Creature*)Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_NETHEKURSE)); - if( pKurse ) + if (pKurse) ((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonDeath(); } } @@ -412,10 +369,10 @@ struct TRINITY_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if( !m_creature->SelectHostilTarget() || !m_creature->getVictim() ) + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - if( Hemorrhage_Timer < diff ) + if (Hemorrhage_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_HEMORRHAGE); Hemorrhage_Timer = 15000; @@ -447,7 +404,7 @@ struct TRINITY_DLL_DECL mob_lesser_shadow_fissureAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if( !Start ) + if (!Start) { //triggered spell of consumption does not properly show it's SpellVisual, hack it a bit m_creature->CastSpell(m_creature,SPELL_TEMPORARY_VISUAL,true); @@ -455,7 +412,7 @@ struct TRINITY_DLL_DECL mob_lesser_shadow_fissureAI : public ScriptedAI Start = true; } - if( Stop_Timer < diff) + if (Stop_Timer < diff) { m_creature->setDeathState(JUST_DIED); m_creature->SetHealth(0); diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 7907bf0207a..092e82df0ed 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -34,63 +34,59 @@ EndContentData */ struct Yell { - const char* text; - uint32 sound; + int32 id; uint32 creature; }; static Yell GoCombat[]= { - {"Smash!", 10306, ENTRY_LEFT_HEAD}, - {"If you nice me let you live.", 10308, ENTRY_LEFT_HEAD}, - {"Me hungry!", 10309, ENTRY_LEFT_HEAD}, + {-1540018, ENTRY_LEFT_HEAD}, + {-1540019, ENTRY_LEFT_HEAD}, + {-1540020, ENTRY_LEFT_HEAD}, }; static Yell GoCombatDelay[]= { - {"Why don't you let me do the talking?", 10317, ENTRY_RIGHT_HEAD}, - {"No, we will NOT let you live!", 10318, ENTRY_RIGHT_HEAD}, - {"You always hungry. That why we so fat!", 10319, ENTRY_RIGHT_HEAD}, + {-1540021, ENTRY_RIGHT_HEAD}, + {-1540022, ENTRY_RIGHT_HEAD}, + {-1540023, ENTRY_RIGHT_HEAD}, }; static Yell Threat[]= { - {"You stay here. Me go kill someone else!", 10303, ENTRY_LEFT_HEAD}, - {"What are you doing!", 10315, ENTRY_RIGHT_HEAD}, - {"Me kill someone else...", 10302, ENTRY_LEFT_HEAD}, - {"Me not like this one...",10300, ENTRY_LEFT_HEAD}, + {-1540024, ENTRY_LEFT_HEAD}, + {-1540025, ENTRY_RIGHT_HEAD}, + {-1540026, ENTRY_LEFT_HEAD}, + {-1540027, ENTRY_LEFT_HEAD}, }; static Yell ThreatDelay1[]= { - {"That's not funny!", 10314, ENTRY_RIGHT_HEAD}, - {"Me get bored...", 10305, ENTRY_LEFT_HEAD}, - {"I'm not done yet, idiot!", 10313, ENTRY_RIGHT_HEAD}, - {"Hey you numbskull!", 10312, ENTRY_RIGHT_HEAD}, + {-1540028, ENTRY_RIGHT_HEAD}, + {-1540029, ENTRY_LEFT_HEAD}, + {-1540030, ENTRY_RIGHT_HEAD}, + {-1540031, ENTRY_RIGHT_HEAD}, }; static Yell ThreatDelay2[]= { - {"Ha ha ha.", 10304, ENTRY_LEFT_HEAD}, - {"Whhy! He almost dead!", 10316, ENTRY_RIGHT_HEAD}, - {"H'ey...", 10307, ENTRY_LEFT_HEAD}, - {"We kill his friend!", 10301, ENTRY_LEFT_HEAD}, + {-1540032, ENTRY_LEFT_HEAD}, + {-1540033, ENTRY_RIGHT_HEAD}, + {-1540034, ENTRY_LEFT_HEAD}, + {-1540035, ENTRY_LEFT_HEAD}, }; static Yell Killing[]= { - {"This one die easy!", 10310, ENTRY_LEFT_HEAD}, - {"I'm tired. You kill next one!", 10320, ENTRY_RIGHT_HEAD}, + {-1540036, ENTRY_LEFT_HEAD}, + {-1540037, ENTRY_RIGHT_HEAD}, }; static Yell KillingDelay[]= { - {"That's because I do all the hard work!", 10321, ENTRY_RIGHT_HEAD}, - {"SD2 script error, should not see this.", 0, ENTRY_LEFT_HEAD}, + {-1540038, ENTRY_RIGHT_HEAD}, + {-1000000, ENTRY_LEFT_HEAD}, }; -#define EMOTE_ENRAGE "enrages" - -#define YELL_DIE_L "This all...your fault!" -#define SOUND_DIE_L 10311 -#define YELL_DIE_R "I...hate...you..." -#define SOUND_DIE_R 10322 +#define YELL_DIE_L -1540039 +#define YELL_DIE_R -1540040 +#define EMOTE_ENRAGE -1540041 #define SPELL_BLAST_WAVE 30600 #define SPELL_FEAR 30584 @@ -117,13 +113,12 @@ struct TRINITY_DLL_DECL mob_omrogg_headsAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if( !DeathYell ) + if (!DeathYell) return; - if( Death_Timer < diff ) + if (Death_Timer < diff) { - DoYell(YELL_DIE_R,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature, SOUND_DIE_R); + DoScriptText(YELL_DIE_R, m_creature); DeathYell = false; }else Death_Timer -= diff; } @@ -139,6 +134,7 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI } ScriptedInstance* pInstance; + bool HeroicMode; uint64 LeftHead; uint64 RightHead; @@ -146,7 +142,6 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI int ithreat; int ikilling; - bool HeroicMode; bool AggroYell; bool ThreatYell; bool ThreatYell2; @@ -181,26 +176,25 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI ThunderClap_Timer = 15000; ResetThreat_Timer = 30000; - if( pInstance ) + if (pInstance) pInstance->SetData(TYPE_OMROGG, NOT_STARTED); //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid. } void DoYellForThreat() { - if( LeftHead && RightHead ) + if (LeftHead && RightHead) { Unit *Left = Unit::GetUnit(*m_creature,LeftHead); Unit *Right = Unit::GetUnit(*m_creature,RightHead); - if( !Left && !Right ) + if (!Left && !Right) return; ithreat = rand()%4; Unit *source = (Left->GetEntry() == Threat[ithreat].creature ? Left : Right); - source->MonsterYell(Threat[ithreat].text, LANG_UNIVERSAL, 0); - DoPlaySoundToSet(source, Threat[ithreat].sound); + DoScriptText(Threat[ithreat].id, source); Delay_Timer = 3500; ThreatYell = true; @@ -212,26 +206,26 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI DoSpawnCreature(ENTRY_LEFT_HEAD,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1800000); DoSpawnCreature(ENTRY_RIGHT_HEAD,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1800000); - if( Unit *Left = Unit::GetUnit(*m_creature,LeftHead) ) + if (Unit *Left = Unit::GetUnit(*m_creature,LeftHead)) { iaggro = rand()%3; - Left->MonsterYell(GoCombat[iaggro].text, LANG_UNIVERSAL, 0); - DoPlaySoundToSet(Left, GoCombat[iaggro].sound); + DoScriptText(GoCombat[iaggro].id, Left); Delay_Timer = 3500; AggroYell = true; } - if( pInstance ) + + if (pInstance) pInstance->SetData(TYPE_OMROGG, IN_PROGRESS); } void JustSummoned(Creature *summoned) { - if( summoned->GetEntry() == ENTRY_LEFT_HEAD ) + if (summoned->GetEntry() == ENTRY_LEFT_HEAD) LeftHead = summoned->GetGUID(); - if( summoned->GetEntry() == ENTRY_RIGHT_HEAD ) + if (summoned->GetEntry() == ENTRY_RIGHT_HEAD) RightHead = summoned->GetGUID(); //summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -241,12 +235,12 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI void KilledUnit(Unit* victim) { - if( LeftHead && RightHead ) + if (LeftHead && RightHead) { Unit *Left = Unit::GetUnit(*m_creature,LeftHead); Unit *Right = Unit::GetUnit(*m_creature,RightHead); - if( !Left && !Right ) + if (!Left && !Right) return; ikilling = rand()%2; @@ -256,14 +250,12 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI switch(ikilling) { case 0: - source->MonsterYell(Killing[ikilling].text, LANG_UNIVERSAL, 0); - DoPlaySoundToSet(source, Killing[ikilling].sound); + DoScriptText(Killing[ikilling].id, source); Delay_Timer = 3500; KillingYell = true; break; case 1: - source->MonsterYell(Killing[ikilling].text, LANG_UNIVERSAL, 0); - DoPlaySoundToSet(source, Killing[ikilling].sound); + DoScriptText(Killing[ikilling].id, source); KillingYell = false; break; } @@ -272,98 +264,95 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI void JustDied(Unit* Killer) { - if( LeftHead && RightHead ) + if (LeftHead && RightHead) { Unit *Left = Unit::GetUnit(*m_creature,LeftHead); Unit *Right = Unit::GetUnit(*m_creature,RightHead); - if( !Left && !Right ) + if (!Left && !Right) return; - Left->MonsterYell(YELL_DIE_L, LANG_UNIVERSAL, 0); - DoPlaySoundToSet(Left,SOUND_DIE_L); + DoScriptText(YELL_DIE_L, Left); ((mob_omrogg_headsAI*)((Creature*)Right)->AI())->DoDeathYell(); } - if( pInstance ) + + if (pInstance) pInstance->SetData(TYPE_OMROGG, DONE); } void UpdateAI(const uint32 diff) { - if( Delay_Timer < diff ) + if (Delay_Timer < diff) { Delay_Timer = 3500; - if( !LeftHead && !RightHead ) + if (!LeftHead && !RightHead) return; Unit *Left = Unit::GetUnit(*m_creature,LeftHead); Unit *Right = Unit::GetUnit(*m_creature,RightHead); - if( !Left && !Right ) + if (!Left && !Right) return; - if( AggroYell ) + if (AggroYell) { - Right->MonsterYell(GoCombatDelay[iaggro].text, LANG_UNIVERSAL, 0); - DoPlaySoundToSet(Right, GoCombatDelay[iaggro].sound); + DoScriptText(GoCombatDelay[iaggro].id, Right); AggroYell = false; } - if( ThreatYell2 ) + if (ThreatYell2) { Unit *source = (Left->GetEntry() == ThreatDelay2[ithreat].creature ? Left : Right); - source->MonsterYell(ThreatDelay2[ithreat].text, LANG_UNIVERSAL, 0); - DoPlaySoundToSet(source, ThreatDelay2[ithreat].sound); + DoScriptText(ThreatDelay2[ithreat].id, source); ThreatYell2 = false; } - if( ThreatYell ) + if (ThreatYell) { Unit *source = (Left->GetEntry() == ThreatDelay1[ithreat].creature ? Left : Right); - source->MonsterYell(ThreatDelay1[ithreat].text, LANG_UNIVERSAL, 0); - DoPlaySoundToSet(source, ThreatDelay1[ithreat].sound); + DoScriptText(ThreatDelay1[ithreat].id, source); ThreatYell = false; ThreatYell2 = true; } - if( KillingYell ) + if (KillingYell) { Unit *source = (Left->GetEntry() == KillingDelay[ikilling].creature ? Left : Right); - source->MonsterYell(KillingDelay[ikilling].text, LANG_UNIVERSAL, 0); - DoPlaySoundToSet(source, KillingDelay[ikilling].sound); + DoScriptText(KillingDelay[ikilling].id, source); KillingYell = false; } }else Delay_Timer -= diff; - if( !m_creature->SelectHostilTarget() || !m_creature->getVictim() ) + if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) return; - if( BlastCount && BlastWave_Timer <= diff ) + if (BlastCount && BlastWave_Timer <= diff) { DoCast(m_creature,SPELL_BLAST_WAVE); BlastWave_Timer = 5000; ++BlastCount; - if( BlastCount == 3 ) + + if (BlastCount == 3) BlastCount = 0; }else BlastWave_Timer -= diff; - if( BurningMaul_Timer < diff ) + if (BurningMaul_Timer < diff) { - DoTextEmote(EMOTE_ENRAGE,NULL); + DoScriptText(EMOTE_ENRAGE, m_creature); DoCast(m_creature,HeroicMode ? H_SPELL_BURNING_MAUL : SPELL_BURNING_MAUL); BurningMaul_Timer = 40000; BlastWave_Timer = 16000; BlastCount = 1; }else BurningMaul_Timer -= diff; - if( ResetThreat_Timer < diff ) + if (ResetThreat_Timer < diff) { - if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0) ) + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) { DoYellForThreat(); DoResetThreat(); @@ -372,13 +361,13 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI ResetThreat_Timer = 35000+rand()%10000; }else ResetThreat_Timer -= diff; - if( Fear_Timer < diff ) + if (Fear_Timer < diff) { DoCast(m_creature,SPELL_FEAR); Fear_Timer = 15000+rand()%25000; }else Fear_Timer -= diff; - if( ThunderClap_Timer < diff ) + if (ThunderClap_Timer < diff) { DoCast(m_creature,SPELL_THUNDERCLAP); ThunderClap_Timer = 25000+rand()%15000; |