From 3dcc9a22a51b37bce6a889aa2bcd81ece8943d54 Mon Sep 17 00:00:00 2001 From: killerwife Date: Mon, 16 Oct 2023 09:21:23 +0200 Subject: [PATCH] WIP --- sql/scriptdev2/scriptdev2.sql | 53 -- sql/scriptdev2/spell.sql | 1 + .../tempest_keep/the_eye/boss_astromancer.cpp | 42 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 554 +++++------------- .../tempest_keep/the_eye/boss_void_reaver.cpp | 34 +- 5 files changed, 178 insertions(+), 506 deletions(-) diff --git a/sql/scriptdev2/scriptdev2.sql b/sql/scriptdev2/scriptdev2.sql index 57b9a19c51..26ea42bc58 100644 --- a/sql/scriptdev2/scriptdev2.sql +++ b/sql/scriptdev2/scriptdev2.sql @@ -4046,59 +4046,6 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadc ('-1548056','%s takes a deep breath!','0','3','0','0','20774','lurker below EMOTE_DEEP_BREATH'); -- -1 550 000 THE EYE -INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadcast_text_id,comment) VALUES -('-1550000','Alert! You are marked for extermination.','11213','1','0','0','20906','voidreaver SAY_AGGRO'), -('-1550001','Extermination successful.','11215','1','0','0','20908','voidreaver SAY_SLAY1'), -('-1550002','Invasive lifeform no longer functional.','11216','1','0','0','20909','voidreaver SAY_SLAY2'), -('-1550003','Threat neutralized.','11217','1','0','0','20910','voidreaver SAY_SLAY3'), -('-1550004','Systems... shutting... d-o-w-n...','11214','1','0','0','20907','voidreaver SAY_DEATH'), -('-1550005','Alternative measure commencing...','11218','1','0','0','20911','voidreaver SAY_POUNDING1'), -('-1550006','Calculating force parameters...','11219','1','0','0','20912','voidreaver SAY_POUNDING2'), - -('-1550007','Tal anu''men no sin''dorei!','11134','1','0','0','20849','solarian SAY_AGGRO'), -('-1550008','You are hopelessly outmatched!','11139','1','0','0','20854','solarian SAY_SUMMON1'), -('-1550009','I will crush your delusions of grandeur!','11140','1','0','0','20855','solarian SAY_SUMMON2'), -('-1550010','Your soul belongs to the abyss!','11136','1','0','0','20851','solarian SAY_KILL1'), -('-1550011','By the blood of the Highborne!','11137','1','0','0','20852','solarian SAY_KILL2'), -('-1550012','For the Sunwell!','11138','1','0','0','20853','solarian SAY_KILL3'), -('-1550013','The warmth of the sun... awaits.','11135','1','0','0','20850','solarian SAY_DEATH'), -('-1550014','Enough of this! Now I call upon the fury of the cosmos itself.','0','1','0','0','20372','solarian SAY_VOIDA'), -('-1550015','I become ONE... with the VOID!','0','1','0','0','20373','solarian SAY_VOIDB'), - -('-1550016','Energy. Power. My people are addicted to it... a dependence made manifest after the Sunwell was destroyed. Welcome to the future. A pity you are too late to stop it. No one can stop me now! Selama ashal''anore!','11256','1','0','0','20195','kaelthas SAY_INTRO note: was changed sometime after TBC - broadcast text id 20195'), -('-1550017','Capernian will see to it that your stay here is a short one.','11257','1','0','0','19004','kaelthas SAY_INTRO_CAPERNIAN'), -('-1550018','Well done, you have proven worthy to test your skills against my master engineer, Telonicus.','11258','1','0','0','19005','kaelthas SAY_INTRO_TELONICUS'), -('-1550019','Let us see how your nerves hold up against the Darkener, Thaladred! ','11259','1','0','0','19006','kaelthas SAY_INTRO_THALADRED'), -('-1550020','You have persevered against some of my best advisors... but none can withstand the might of the Blood Hammer. Behold, Lord Sanguinar!','11260','1','0','0','19003','kaelthas SAY_INTRO_SANGUINAR'), -('-1550021','As you see, I have many weapons in my arsenal....','11261','1','0','0','19053','kaelthas SAY_PHASE2_WEAPON'), -('-1550022','Perhaps I underestimated you. It would be unfair to make you fight all four advisors at once, but... fair treatment was never shown to my people. I''m just returning the favor.','11262','1','0','0','19060','kaelthas SAY_PHASE3_ADVANCE'), -('-1550023','Alas, sometimes one must take matters into one''s own hands. Balamore shanal!','11263','1','0','0','19195','kaelthas SAY_PHASE4_INTRO2'), -('-1550024','I have not come this far to be stopped! The future I have planned will not be jeopardized! Now you will taste true power!!','11273','1','0','0','20208','kaelthas SAY_PHASE5_NUTS'), -('-1550025','You will not prevail!','11270','1','0','0','20204','kaelthas SAY_SLAY1'), -('-1550026','You gambled. And lost.','11271','1','0','0','20205','kaelthas SAY_SLAY2'), -('-1550027','This was child''s play.','11272','1','0','0','20206','kaelthas SAY_SLAY3'), -('-1550028','Obey me!','11268','1','0','0','20202','kaelthas SAY_MINDCONTROL1'), -('-1550029','Bow to my will.','11269','1','0','0','18259','kaelthas SAY_MINDCONTROL2'), -('-1550030','Let us see how you fare when your world is turned upside down.','11264','1','0','0','20198','kaelthas SAY_GRAVITYLAPSE1'), -('-1550031','Having trouble staying grounded?','11265','1','0','0','20199','kaelthas SAY_GRAVITYLAPSE2'), -('-1550032','Anar''anel belore!','11267','1','0','0','20201','kaelthas SAY_SUMMON_PHOENIX1'), -('-1550033','By the power of the sun!','11266','1','0','0','20200','kaelthas SAY_SUMMON_PHOENIX2'), -('-1550034','For... Quel''...Thalas!','11274','1','0','0','20207','kaelthas SAY_DEATH'), - -('-1550035','Prepare yourselves!','11203','1','0','0','20905','thaladred SAY_THALADRED_AGGRO'), -('-1550036','Forgive me, my prince! I have... failed.','11204','1','0','0','20904','thaladred SAY_THALADRED_DEATH'), -('-1550037','%s sets eyes on $n!','0','2','0','0','11074','thaladred EMOTE_THALADRED_GAZE'), - -('-1550038','Blood for blood!','11152','1','0','0','20859','sanguinar SAY_SANGUINAR_AGGRO'), -('-1550039','NO! I... will... not...','11153','1','0','0','20858','sanguinar SAY_SANGUINAR_DEATH'), - -('-1550040','The sin''dorei reign supreme!','11117','1','0','0','20847','capernian SAY_CAPERNIAN_AGGRO'), -('-1550041','This is not over!','11118','1','0','0','20848','capernian SAY_CAPERNIAN_DEATH'), - -('-1550042','Anar''alah belore!','11157','1','0','0','20860','telonicus SAY_TELONICUS_AGGRO'), -('-1550043','More perils... await...','11158','1','0','0','20861','telonicus SAY_TELONICUS_DEATH'), - -('-1550044','%s begins to cast Pyroblast!','0','3','0','0','20775','kaelthas EMOTE_PYROBLAST'); -- -1 552 000 THE ARCATRAZ diff --git a/sql/scriptdev2/spell.sql b/sql/scriptdev2/spell.sql index d7c06d5621..2ffd5f5fc4 100644 --- a/sql/scriptdev2/spell.sql +++ b/sql/scriptdev2/spell.sql @@ -403,6 +403,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (39810,'spell_sparrowhawk_net'), (34190,'spell_void_reaver_arcane_orb'), (41034,'spell_spell_absorption'), +(36709,'spell_kael_phase_two'), (35861,'spell_nether_vapor_summon'), (35862,'spell_nether_vapor_summon'), (35863,'spell_nether_vapor_summon'), diff --git a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index ea29ad056f..5fbf107201 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -28,15 +28,15 @@ EndScriptData */ enum { - SAY_AGGRO = -1550007, - SAY_SUMMON1 = -1550008, - SAY_SUMMON2 = -1550009, - SAY_KILL1 = -1550010, - SAY_KILL2 = -1550011, - SAY_KILL3 = -1550012, - SAY_DEATH = -1550013, - SAY_VOIDA = -1550014, - SAY_VOIDB = -1550015, + SAY_AGGRO = 20849, + SAY_SUMMON1 = 20854, + SAY_SUMMON2 = 20855, + SAY_KILL1 = 20851, + SAY_KILL2 = 20852, + SAY_KILL3 = 20853, + SAY_DEATH = 20850, + SAY_VOIDA = 20372, + SAY_VOIDB = 20373, SPELL_ARCANE_MISSILES = 33031, SPELL_WRATH_OF_THE_ASTROMANCER = 42783, @@ -131,6 +131,7 @@ struct boss_high_astromancer_solarianAI : public CombatAI AddCustomAction(SOLARIAN_SPLIT_AGENTS, true, [&]() { HandleSplitAgents(); }); AddCustomAction(SOLARIAN_SPLIT_PRIESTS, true, [&]() { HandleSplitPriests(); }); m_uiDefaultArmor = m_creature->GetArmor(); + AddOnKillText(SAY_KILL1, SAY_KILL2, SAY_KILL3); } ScriptedInstance* m_instance; @@ -157,22 +158,9 @@ struct boss_high_astromancer_solarianAI : public CombatAI SetCombatMovement(true); } - void KilledUnit(Unit* victim) override - { - if (victim->GetTypeId() != TYPEID_PLAYER) - return; - - switch (urand(0, 2)) - { - case 0: DoScriptText(SAY_KILL1, m_creature); break; - case 1: DoScriptText(SAY_KILL2, m_creature); break; - case 2: DoScriptText(SAY_KILL3, m_creature); break; - } - } - void JustDied(Unit* /*killer*/) override { - DoScriptText(SAY_DEATH, m_creature); + DoBroadcastText(SAY_DEATH, m_creature); if (m_instance) m_instance->SetData(TYPE_SOLARIAN, DONE); @@ -180,7 +168,7 @@ struct boss_high_astromancer_solarianAI : public CombatAI void Aggro(Unit* /*who*/) override { - DoScriptText(SAY_AGGRO, m_creature); + DoBroadcastText(SAY_AGGRO, m_creature); if (m_instance) m_instance->SetData(TYPE_SOLARIAN, IN_PROGRESS); @@ -223,7 +211,7 @@ struct boss_high_astromancer_solarianAI : public CombatAI void HandlePhase2Delay() { - DoScriptText(SAY_VOIDB, m_creature); + DoBroadcastText(SAY_VOIDB, m_creature); SetCombatScriptStatus(false); SetCombatMovement(true); @@ -248,7 +236,7 @@ struct boss_high_astromancer_solarianAI : public CombatAI m_creature->SetVisibility(VISIBILITY_OFF); - DoScriptText(urand(0, 1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); ResetTimer(SOLARIAN_SPLIT_AGENTS, 5000); } @@ -295,7 +283,7 @@ struct boss_high_astromancer_solarianAI : public CombatAI { if (DoCastSpellIfCan(nullptr, SPELL_SOLARIAN_TRANSFORM) == CAST_OK) { - DoScriptText(SAY_VOIDA, m_creature); + DoBroadcastText(SAY_VOIDA, m_creature); ResetTimer(SOLARIAN_PHASE_2_DELAY, 2000); m_creature->SetArmor(WV_ARMOR); diff --git a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index d3c1554be8..80a1d6d513 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -33,43 +33,43 @@ enum { // ***** Event yells ******** // kael'thas Speech - SAY_INTRO = -1550016, - SAY_INTRO_CAPERNIAN = -1550017, - SAY_INTRO_TELONICUS = -1550018, - SAY_INTRO_THALADRED = -1550019, - SAY_INTRO_SANGUINAR = -1550020, - SAY_PHASE2_WEAPON = -1550021, - SAY_PHASE3_ADVANCE = -1550022, - SAY_PHASE4_INTRO2 = -1550023, - SAY_PHASE5_NUTS = -1550024, - SAY_SLAY1 = -1550025, - SAY_SLAY2 = -1550026, - SAY_SLAY3 = -1550027, - SAY_MINDCONTROL1 = -1550028, - SAY_MINDCONTROL2 = -1550029, - SAY_GRAVITYLAPSE1 = -1550030, - SAY_GRAVITYLAPSE2 = -1550031, - SAY_SUMMON_PHOENIX1 = -1550032, - SAY_SUMMON_PHOENIX2 = -1550033, - SAY_DEATH = -1550034, - EMOTE_PYROBLAST = -1550044, + SAY_INTRO = 20195, // differs in wotlk+ + SAY_INTRO_CAPERNIAN = 19004, + SAY_INTRO_TELONICUS = 19005, + SAY_INTRO_THALADRED = 19006, + SAY_INTRO_SANGUINAR = 19003, + SAY_PHASE2_WEAPON = 19053, + SAY_PHASE3_ADVANCE = 19060, + SAY_PHASE4_INTRO2 = 19195, + SAY_PHASE5_NUTS = 20208, + SAY_SLAY1 = 20204, + SAY_SLAY2 = 20205, + SAY_SLAY3 = 20206, + SAY_MINDCONTROL1 = 20202, + SAY_MINDCONTROL2 = 18259, + SAY_GRAVITYLAPSE1 = 20198, + SAY_GRAVITYLAPSE2 = 20199, + SAY_SUMMON_PHOENIX1 = 20201, + SAY_SUMMON_PHOENIX2 = 20200, + SAY_DEATH = 20207, + EMOTE_PYROBLAST = 20775, // Thaladred the Darkener speech - SAY_THALADRED_AGGRO = -1550035, - SAY_THALADRED_DEATH = -1550036, - EMOTE_THALADRED_GAZE = -1550037, + SAY_THALADRED_AGGRO = 20905, + SAY_THALADRED_DEATH = 20904, + EMOTE_THALADRED_GAZE = 11074, // Lord Sanguinar speech - SAY_SANGUINAR_AGGRO = -1550038, - SAY_SANGUINAR_DEATH = -1550039, + SAY_SANGUINAR_AGGRO = 20859, + SAY_SANGUINAR_DEATH = 20858, // Grand Astromancer Capernian speech - SAY_CAPERNIAN_AGGRO = -1550040, - SAY_CAPERNIAN_DEATH = -1550041, + SAY_CAPERNIAN_AGGRO = 20847, + SAY_CAPERNIAN_DEATH = 20848, // Master Engineer Telonicus speech - SAY_TELONICUS_AGGRO = -1550042, - SAY_TELONICUS_DEATH = -1550043, + SAY_TELONICUS_AGGRO = 20860, + SAY_TELONICUS_DEATH = 20861, // ***** Kaelthas spells ******** // Phase 2 spells @@ -145,6 +145,9 @@ enum SPELL_PSYCHIC_BLOW = 36966, SPELL_SILENCE = 30225, SPELL_REND = 36965, + SPELL_TRIGGER_CREATURE_SPECIAL = 40373, // guesswork, modelled after buru - using spell based on fact gaze executes during spell list tick + + SPELL_SET_THALADRED_REZZED = 2006402, // Lord Sanguinar spells SPELL_THRASH = 8876, @@ -196,14 +199,14 @@ enum MAX_MIND_CONTROL = 3, }; -static const uint32 m_auiSpellSummonWeapon[MAX_WEAPONS] = +static const uint32 m_spellSummonWeapon[MAX_WEAPONS] = { SPELL_SUMMON_WEAPONA, SPELL_SUMMON_WEAPONB, SPELL_SUMMON_WEAPONC, SPELL_SUMMON_WEAPOND, SPELL_SUMMON_WEAPONE, SPELL_SUMMON_WEAPONF, SPELL_SUMMON_WEAPONG }; // teleport spells for gravity lapse event -static const uint32 m_auiSpellGravityLapseTeleport[] = +static const uint32 m_spellGravityLapseTeleport[] = { 35966, 35967, 35968, 35969, 35970, 35971, 35972, 35973, 35974, 35975, 35976, 35977, 35978, 35979, 35980, 35981, 35982, 35983, 35984, 35985, 35986, 35987, 35988, 35989, 35990 @@ -255,11 +258,11 @@ enum KaelThasActions KAEL_ACTION_MAX, }; -struct boss_kaelthasAI : public ScriptedAI +struct boss_kaelthasAI : public CombatAI { - boss_kaelthasAI(Creature* creature) : ScriptedAI(creature), m_instance(static_cast(creature->GetInstanceData())) + boss_kaelthasAI(Creature* creature) : CombatAI(creature, KAEL_ACTION_MAX), m_instance(static_cast(creature->GetInstanceData())) { - Reset(); + AddOnKillText(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3); } ScriptedInstance* m_instance; @@ -297,7 +300,7 @@ struct boss_kaelthasAI : public ScriptedAI GuidVector m_worldTriggersSecondStage; GuidVector m_netherVapor; - GuidList m_lSummonedGuidList; + GuidList m_summonedGuidList; GuidVector m_weapons; uint32 m_weaponAttackTimer; @@ -384,6 +387,8 @@ struct boss_kaelthasAI : public ScriptedAI add->Respawn(); } + + void GetAIInformation(ChatHandler& reader) override { reader.PSendSysMessage("Kael'thas is currently in phase %u", uint32(m_uiPhase)); @@ -399,7 +404,7 @@ struct boss_kaelthasAI : public ScriptedAI void DoDespawnSummons() { - for (GuidList::const_iterator itr = m_lSummonedGuidList.begin(); itr != m_lSummonedGuidList.end(); ++itr) + for (GuidList::const_iterator itr = m_summonedGuidList.begin(); itr != m_summonedGuidList.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) { @@ -410,7 +415,7 @@ struct boss_kaelthasAI : public ScriptedAI } m_netherVapor.clear(); - m_lSummonedGuidList.clear(); + m_summonedGuidList.clear(); } // Custom Move in LoS function @@ -421,7 +426,7 @@ struct boss_kaelthasAI : public ScriptedAI { if (who->IsPlayer() && static_cast(who)->IsGameMaster()) return; - DoScriptText(SAY_INTRO, m_creature); + DoBroadcastText(SAY_INTRO, m_creature); m_creature->CastSpell(nullptr, SPELL_REMOVE_WEAPONS, TRIGGERED_OLD_TRIGGERED); m_uiPhase = PHASE_1_ADVISOR; @@ -437,19 +442,9 @@ struct boss_kaelthasAI : public ScriptedAI } } - void KilledUnit(Unit* /*unit*/) override - { - switch (urand(0, 2)) - { - case 0: DoScriptText(SAY_SLAY1, m_creature); break; - case 1: DoScriptText(SAY_SLAY2, m_creature); break; - case 2: DoScriptText(SAY_SLAY3, m_creature); break; - } - } - void JustDied(Unit* /*killer*/) override { - DoScriptText(SAY_DEATH, m_creature); + DoBroadcastText(SAY_DEATH, m_creature); m_creature->CastSpell(nullptr, SPELL_REMOVE_WEAPONS, TRIGGERED_OLD_TRIGGERED); if (m_instance) @@ -459,12 +454,15 @@ struct boss_kaelthasAI : public ScriptedAI ResetSize(); } - void JustReachedHome() override + void EnterEvadeMode() override { m_creature->CastSpell(nullptr, SPELL_REMOVE_WEAPONS, TRIGGERED_OLD_TRIGGERED); if (m_instance) m_instance->SetData(TYPE_KAELTHAS, FAIL); + + m_creature->SetRespawnDelay(30, true); + m_creature->ForcedDespawn(); } void JustSummoned(Creature* summoned) override @@ -491,7 +489,7 @@ struct boss_kaelthasAI : public ScriptedAI } } - m_lSummonedGuidList.push_back(summoned->GetObjectGuid()); + m_summonedGuidList.push_back(summoned->GetObjectGuid()); } void SpellHit(Unit* /*caster*/, const SpellEntry* spellInfo) override @@ -499,7 +497,7 @@ struct boss_kaelthasAI : public ScriptedAI // Handle summon weapons event if (spellInfo->Id == SPELL_SUMMON_WEAPONS) { - for (unsigned int i : m_auiSpellSummonWeapon) + for (unsigned int i : m_spellSummonWeapon) DoCastSpellIfCan(m_creature, i, CAST_TRIGGERED); m_uiPhase = PHASE_2_WEAPON; @@ -517,11 +515,11 @@ struct boss_kaelthasAI : public ScriptedAI void SpellHitTarget(Unit* target, const SpellEntry* spellInfo) override { // Handle gravity lapse teleport - each player hit has his own teleport spell - if (spellInfo->Id == SPELL_GRAVITY_LAPSE && target->GetTypeId() == TYPEID_PLAYER) + if (spellInfo->Id == SPELL_GRAVITY_LAPSE && target->IsPlayer()) { - DoCastSpellIfCan(target, m_auiSpellGravityLapseTeleport[m_uiGravityIndex], CAST_TRIGGERED); - target->CastSpell(target, SPELL_GRAVITY_LAPSE_KNOCKBACK, TRIGGERED_OLD_TRIGGERED); - target->CastSpell(target, SPELL_GRAVITY_LAPSE_AURA, TRIGGERED_OLD_TRIGGERED); + DoCastSpellIfCan(target, m_spellGravityLapseTeleport[m_uiGravityIndex], CAST_TRIGGERED); + target->CastSpell(nullptr, SPELL_GRAVITY_LAPSE_KNOCKBACK, TRIGGERED_OLD_TRIGGERED); + target->CastSpell(nullptr, SPELL_GRAVITY_LAPSE_AURA, TRIGGERED_OLD_TRIGGERED); ++m_uiGravityIndex; } @@ -545,7 +543,7 @@ struct boss_kaelthasAI : public ScriptedAI case POINT_ID_CENTER: { // ToDo: also start channeling to the giant crystals nearby - DoScriptText(SAY_PHASE5_NUTS, m_creature); + DoBroadcastText(SAY_PHASE5_NUTS, m_creature); m_creature->SetFacingTo(3.176499f); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNINTERACTIBLE); m_phaseTransitionTimer = 2000; @@ -653,7 +651,7 @@ struct boss_kaelthasAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_PHOENIX_ANIMATION) == CAST_OK) { - DoScriptText(urand(0, 1) ? SAY_SUMMON_PHOENIX1 : SAY_SUMMON_PHOENIX2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_SUMMON_PHOENIX1 : SAY_SUMMON_PHOENIX2, m_creature); m_uiPhoenixTimer = 60000; m_actionReadyStatus[i] = false; return; @@ -704,7 +702,7 @@ struct boss_kaelthasAI : public ScriptedAI break; DoCastSpellIfCan(nullptr, SPELL_MIND_CONTROL); - DoScriptText(urand(0, 1) ? SAY_MINDCONTROL1 : SAY_MINDCONTROL2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_MINDCONTROL1 : SAY_MINDCONTROL2, m_creature); m_uiMindControlTimer = 30000; m_actionReadyStatus[i] = false; return; @@ -727,7 +725,7 @@ struct boss_kaelthasAI : public ScriptedAI { if (DoCastSpellIfCan(nullptr, SPELL_PYROBLAST) == CAST_OK) { - DoScriptText(EMOTE_PYROBLAST, m_creature); + DoBroadcastText(EMOTE_PYROBLAST, m_creature); if (m_pyroblastCounter < 2) m_pyroblastCounter++; else @@ -743,7 +741,7 @@ struct boss_kaelthasAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_SHOCK_BARRIER); if (DoCastSpellIfCan(m_creature, SPELL_GRAVITY_LAPSE) == CAST_OK) { - DoScriptText(urand(0, 1) ? SAY_GRAVITYLAPSE1 : SAY_GRAVITYLAPSE2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_GRAVITYLAPSE1 : SAY_GRAVITYLAPSE2, m_creature); m_creature->CastSpell(m_creature, SPELL_BANISH, TRIGGERED_OLD_TRIGGERED); SetMeleeEnabled(false); m_creature->SetTarget(nullptr); @@ -837,7 +835,7 @@ struct boss_kaelthasAI : public ScriptedAI switch (m_uiPhaseSubphase) { case 0: - DoScriptText(SAY_INTRO_THALADRED, m_creature); + DoBroadcastText(SAY_INTRO_THALADRED, m_creature); #ifdef FAST_TIMERS m_uiPhaseTimer = 1000; #else @@ -854,7 +852,7 @@ struct boss_kaelthasAI : public ScriptedAI m_uiPhaseTimer = 0; break; case 2: - DoScriptText(SAY_INTRO_SANGUINAR, m_creature); + DoBroadcastText(SAY_INTRO_SANGUINAR, m_creature); #ifdef FAST_TIMERS m_uiPhaseTimer = 1000; #else @@ -871,7 +869,7 @@ struct boss_kaelthasAI : public ScriptedAI m_uiPhaseTimer = 0; break; case 4: - DoScriptText(SAY_INTRO_CAPERNIAN, m_creature); + DoBroadcastText(SAY_INTRO_CAPERNIAN, m_creature); #ifdef FAST_TIMERS m_uiPhaseTimer = 1000; #else @@ -888,7 +886,7 @@ struct boss_kaelthasAI : public ScriptedAI m_uiPhaseTimer = 0; break; case 6: - DoScriptText(SAY_INTRO_TELONICUS, m_creature); + DoBroadcastText(SAY_INTRO_TELONICUS, m_creature); #ifdef FAST_TIMERS m_uiPhaseTimer = 1000; #else @@ -906,7 +904,7 @@ struct boss_kaelthasAI : public ScriptedAI break; case 8: if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_WEAPONS) == CAST_OK) - DoScriptText(SAY_PHASE2_WEAPON, m_creature); + DoBroadcastText(SAY_PHASE2_WEAPON, m_creature); m_uiPhaseTimer = 0; break; } @@ -943,7 +941,7 @@ struct boss_kaelthasAI : public ScriptedAI if (m_uiPhaseTimer <= uiDiff) // Start text and set delay for rezzurect { - DoScriptText(SAY_PHASE3_ADVANCE, m_creature); + DoBroadcastText(SAY_PHASE3_ADVANCE, m_creature); m_uiPhase = PHASE_3_ADVISOR_ALL; m_uiPhaseSubphase = 0; #ifdef FAST_TIMERS @@ -984,7 +982,7 @@ struct boss_kaelthasAI : public ScriptedAI } case 1: { - DoScriptText(SAY_PHASE4_INTRO2, m_creature); + DoBroadcastText(SAY_PHASE4_INTRO2, m_creature); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNINTERACTIBLE); DoResetThreat(); SetCombatScriptStatus(false); @@ -1015,10 +1013,7 @@ struct boss_kaelthasAI : public ScriptedAI SetCombatMovement(true); SetMeleeEnabled(true); m_uiGravityExpireTimer = 0; - for (ObjectGuid guid : m_netherVapor) - if (Creature* vapor = m_creature->GetMap()->GetCreature(guid)) - vapor->ForcedDespawn(); - m_netherVapor.clear(); + DespawnGuids(m_netherVapor); // make sure these dont occur in the rest of the phase m_actionReadyStatus[KAEL_ACTION_SHOCK_BARRIER] = false; @@ -1341,92 +1336,86 @@ struct boss_kaelthasAI : public ScriptedAI } }; -bool EffectDummyCreature_kael_phase_2(Unit* caster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* creatureTarget, ObjectGuid /*originalCasterGuid*/) +// 36709 - Kael Phase Two +struct KaelPhaseTwo : public SpellScript { - // always check spellid and effectindex - if (uiSpellId == SPELL_KAEL_PHASE_2 && uiEffIndex == EFFECT_INDEX_0) + void OnEffectExecute(Spell* spell, SpellEffectIndex /*effIdx*/) const override { - if (boss_kaelthasAI* pKaelAI = dynamic_cast(creatureTarget->AI())) - pKaelAI->AdvisorDefeated(caster->GetEntry()); - - // always return true when we are handling this spell and effect - return true; + Unit* caster = spell->GetCaster(); + Unit* target = spell->GetUnitTarget(); + if (boss_kaelthasAI* kaelAI = dynamic_cast(target->AI())) + kaelAI->AdvisorDefeated(caster->GetEntry()); } - - return false; -} +}; /*###### ## advisor_base_ai ######*/ -struct advisor_base_ai : public ScriptedAI +enum AdvisorActions { - advisor_base_ai(Creature* creature) : ScriptedAI(creature), m_instance(static_cast(creature->GetInstanceData())) + ADVISOR_ACTION_MAX, + ADVISOR_START_ATTACK = 30, +}; + +struct advisor_base_ai : public CombatAI +{ + advisor_base_ai(Creature* creature, uint32 combatActions) : CombatAI(creature, combatActions), m_instance(static_cast(creature->GetInstanceData())) { - Reset(); + AddCustomAction(ADVISOR_START_ATTACK, true, [&]() { HandleStartAttack(); }, TIMER_COMBAT_COMBAT); + SetDeathPrevention(true); } ScriptedInstance* m_instance; - bool m_bFakeDeath; - bool m_bCanFakeDeath; - - uint32 m_attackTimer; + bool m_resurrected; void Reset() override { - m_bCanFakeDeath = true; - m_bFakeDeath = false; + CombatAI::Reset(); + m_resurrected = false; m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNINTERACTIBLE); - m_attackTimer = 0; - SetCombatMovement(true); SetCombatScriptStatus(false); - ResetTimers(); + m_creature->SetSpellList(m_creature->GetEntry() * 100 + 1); } - virtual void ResetTimers() + void HandleStartAttack() { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNINTERACTIBLE); + SetCombatScriptStatus(false); + SetMeleeEnabled(true); + SetCombatMovement(true); + SetCombatScriptStatus(false); + SetReactState(REACT_AGGRESSIVE); + DoResetThreat(); + DoStartMovement(m_creature->GetVictim()); + SetDeathPrevention(false); + m_resurrected = true; } + virtual void HandleSpellSwitch() = 0; + void JustReachedHome() override { // Reset Kael if needed if (m_instance) { - if (Creature* pKael = m_instance->GetSingleCreatureFromStorage(NPC_KAELTHAS)) - pKael->AI()->EnterEvadeMode(); + if (Creature* kael = m_instance->GetSingleCreatureFromStorage(NPC_KAELTHAS)) + kael->AI()->EnterEvadeMode(); m_instance->SetData(TYPE_KAELTHAS, FAIL); } } - void DamageTaken(Unit* /*dealer*/, uint32& damage, DamageEffectType /*damagetype*/, SpellEntry const* /*spellInfo*/) override + void JustPreventedDeath(Unit* killer) override { - // Allow fake death only in the first phase - if (!m_bCanFakeDeath) - return; - - if (damage < m_creature->GetHealth()) - return; - - // Make sure it won't die by accident - if (m_bFakeDeath) - { - damage = std::min(damage, m_creature->GetHealth() - 1); - return; - } - - damage = std::min(damage, m_creature->GetHealth() - 1); - m_bFakeDeath = true; - m_creature->InterruptNonMeleeSpells(true); m_creature->StopMoving(); m_creature->ClearComboPointHolders(); @@ -1435,17 +1424,17 @@ struct advisor_base_ai : public ScriptedAI m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNINTERACTIBLE); m_creature->ClearAllReactives(); - m_creature->MeleeAttackStop(m_creature->GetVictim()); + SetMeleeEnabled(false); SetCombatMovement(false); SetCombatScriptStatus(true); - DoCastSpellIfCan(m_creature, SPELL_PERMANENT_FEIGN_DEATH); + m_creature->CastSpell(nullptr, SPELL_PERMANENT_FEIGN_DEATH, TRIGGERED_NONE); if (m_instance) { if (Creature* kael = m_instance->GetSingleCreatureFromStorage(NPC_KAELTHAS)) - if (boss_kaelthasAI* pKaelAI = dynamic_cast(kael->AI())) - pKaelAI->AdvisorDefeated(m_creature->GetEntry()); + if (boss_kaelthasAI* kaelAI = dynamic_cast(kael->AI())) + kaelAI->AdvisorDefeated(m_creature->GetEntry()); } } @@ -1456,33 +1445,7 @@ struct advisor_base_ai : public ScriptedAI { m_creature->RemoveAurasDueToSpell(SPELL_PERMANENT_FEIGN_DEATH); m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_bCanFakeDeath = false; - m_attackTimer = 2000; - } - } - - void UpdateAI(const uint32 uiDiff) override - { - if (m_attackTimer) - { - if (m_attackTimer <= uiDiff) - { - m_attackTimer = 0; - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNINTERACTIBLE); - m_bFakeDeath = false; - SetCombatScriptStatus(false); - m_creature->MeleeAttackStart(m_creature->GetVictim()); - SetCombatMovement(true); - SetCombatScriptStatus(false); - SetReactState(REACT_AGGRESSIVE); - ResetTimers(); - DoResetThreat(); - DoStartMovement(m_creature->GetVictim()); - } - else - m_attackTimer -= uiDiff; - - return; + ResetTimer(ADVISOR_START_ATTACK, 2000); } } }; @@ -1493,88 +1456,38 @@ struct advisor_base_ai : public ScriptedAI struct boss_thaladred_the_darkenerAI : public advisor_base_ai { - boss_thaladred_the_darkenerAI(Creature* creature) : advisor_base_ai(creature) { Reset(); } - - uint32 m_uiGazeTimer; - uint32 m_uiRendTimer; - uint32 m_uiSilenceTimer; - uint32 m_uiPsychicBlowTimer; - - void Reset() override - { - m_uiGazeTimer = 0; - m_uiRendTimer = urand(4000, 8000); - m_uiSilenceTimer = 5000; - m_uiPsychicBlowTimer = 25000; - - advisor_base_ai::Reset(); - } + boss_thaladred_the_darkenerAI(Creature* creature) : advisor_base_ai(creature, ADVISOR_ACTION_MAX) { Reset(); } void Aggro(Unit* /*who*/) override { - DoScriptText(SAY_THALADRED_AGGRO, m_creature); + DoBroadcastText(SAY_THALADRED_AGGRO, m_creature); } - void JustDied(Unit* /*pKiller*/) override + void JustDied(Unit* /*killer*/) override { - DoScriptText(SAY_THALADRED_DEATH, m_creature); + DoBroadcastText(SAY_THALADRED_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) override + void SpellHit(Unit* /*caster*/, const SpellEntry* spellInfo) override { - advisor_base_ai::UpdateAI(uiDiff); - - if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) - return; - - // Don't use abilities during fake death - if (m_bFakeDeath) - return; - - if (m_uiGazeTimer <= uiDiff) + if (spellInfo->Id == SPELL_TRIGGER_CREATURE_SPECIAL) { SelectAttackingTargetParams parameters; parameters.range.minRange = 0.f; parameters.range.maxRange = 200.f; if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, nullptr, SELECT_FLAG_PLAYER | SELECT_FLAG_RANGE_RANGE, parameters)) { + // seems to be part of spell list loop DoResetThreat(); m_creature->AddThreat(target, 1000000.f); - DoScriptText(EMOTE_THALADRED_GAZE, m_creature, target); + DoBroadcastText(EMOTE_THALADRED_GAZE, m_creature, target); } - m_uiGazeTimer = 10000; } - else - m_uiGazeTimer -= uiDiff; - - if (m_uiRendTimer <= uiDiff) - { - if (DoCastSpellIfCan(m_creature->GetVictim(), SPELL_REND) == CAST_OK) - m_uiRendTimer = urand(7000, 12000); - } - else - m_uiRendTimer -= uiDiff; - - if (m_uiSilenceTimer <= uiDiff) - { - if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_NEAREST_BY, 0, nullptr, SELECT_FLAG_IN_MELEE_RANGE)) - { - if (DoCastSpellIfCan(m_creature, SPELL_SILENCE) == CAST_OK) - m_uiSilenceTimer = urand(7000, 13000); - } - } - else - m_uiSilenceTimer -= uiDiff; - - if (m_uiPsychicBlowTimer <= uiDiff) - { - if (DoCastSpellIfCan(m_creature->GetVictim(), SPELL_PSYCHIC_BLOW) == CAST_OK) - m_uiPsychicBlowTimer = urand(20000, 25000); - } - else - m_uiPsychicBlowTimer -= uiDiff; + } - DoMeleeAttackIfReady(); + void HandleSpellSwitch() override + { + m_creature->SetSpellList(SPELL_SET_THALADRED_REZZED); } }; @@ -1584,75 +1497,30 @@ struct boss_thaladred_the_darkenerAI : public advisor_base_ai struct boss_lord_sanguinarAI : public advisor_base_ai { - boss_lord_sanguinarAI(Creature* creature) : advisor_base_ai(creature) - { - m_paramsBellowingRoar.range.minRange = 0; - m_paramsBellowingRoar.range.maxRange = 35; - Reset(); + boss_lord_sanguinarAI(Creature* creature) : advisor_base_ai(creature, ADVISOR_ACTION_MAX) + { } - uint32 m_uiFearTimer; - bool m_fearActive; - SelectAttackingTargetParams m_paramsBellowingRoar; - void Reset() override { - m_uiFearTimer = 10000; - m_fearActive = false; - - DoCastSpellIfCan(m_creature, SPELL_THRASH, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); - advisor_base_ai::Reset(); + + DoCastSpellIfCan(nullptr, SPELL_THRASH, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } void Aggro(Unit* /*who*/) override { - DoScriptText(SAY_SANGUINAR_AGGRO, m_creature); + DoBroadcastText(SAY_SANGUINAR_AGGRO, m_creature); } - void JustDied(Unit* /*pKiller*/) override + void JustDied(Unit* /*killer*/) override { - DoScriptText(SAY_SANGUINAR_DEATH, m_creature); + DoBroadcastText(SAY_SANGUINAR_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) override + void HandleSpellSwitch() override { - advisor_base_ai::UpdateAI(uiDiff); - - if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) - return; - - // Don't use abilities during fake death - if (m_bFakeDeath) - return; - - if (!m_fearActive) - { - if (m_uiFearTimer <= uiDiff) - { - m_uiFearTimer = 0; - m_fearActive = true; - } - else - m_uiFearTimer -= uiDiff; - } - - if (m_creature->IsNonMeleeSpellCasted(false) || !CanExecuteCombatAction()) - return; - - if (m_fearActive) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_NEAREST_BY, 0, nullptr, SELECT_FLAG_PLAYER | SELECT_FLAG_RANGE_AOE_RANGE, m_paramsBellowingRoar)) - { - if (DoCastSpellIfCan(m_creature, SPELL_BELLOWING_ROAR) == CAST_OK) - { - m_uiFearTimer = 30000; - m_fearActive = false; - } - } - } - - DoMeleeAttackIfReady(); + AddInitialCooldowns(); } }; @@ -1662,100 +1530,24 @@ struct boss_lord_sanguinarAI : public advisor_base_ai struct boss_grand_astromancer_capernianAI : public advisor_base_ai { - boss_grand_astromancer_capernianAI(Creature* creature) : advisor_base_ai(creature) { Reset(); } - - uint32 m_uiFireballTimer; - uint32 m_uiConflagrationTimer; - uint32 m_uiArcaneExplosionTimer; - - void Reset() override + boss_grand_astromancer_capernianAI(Creature* creature) : advisor_base_ai(creature, ADVISOR_ACTION_MAX) { - m_attackDistance = 30.0f; - - advisor_base_ai::Reset(); - } - - void ResetTimers() override - { - m_uiFireballTimer = 0; - m_uiConflagrationTimer = 20000; - m_uiArcaneExplosionTimer = 5000; + SetRangedMode(true, 30.f, TYPE_FULL_CASTER); } void Aggro(Unit* /*who*/) override { - DoScriptText(SAY_CAPERNIAN_AGGRO, m_creature); + DoBroadcastText(SAY_CAPERNIAN_AGGRO, m_creature); } - void JustDied(Unit* /*pKiller*/) override + void JustDied(Unit* /*killer*/) override { - DoScriptText(SAY_CAPERNIAN_DEATH, m_creature); + DoBroadcastText(SAY_CAPERNIAN_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) override + void HandleSpellSwitch() override { - advisor_base_ai::UpdateAI(uiDiff); - - if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) - return; - - // Don't use abilities during fake death - if (m_bFakeDeath) - return; - - if (m_uiConflagrationTimer <= uiDiff) - { - m_uiConflagrationTimer = 0; - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_CONFLAGRATION, SELECT_FLAG_PLAYER)) - { - if (DoCastSpellIfCan(target, SPELL_CONFLAGRATION) == CAST_OK) - { - m_uiConflagrationTimer = urand(16000, 18000); - return; - } - } - } - else - m_uiConflagrationTimer -= uiDiff; - - if (m_uiArcaneExplosionTimer <= uiDiff) - { - m_uiArcaneExplosionTimer = 0; - if (m_creature->SelectAttackingTarget(ATTACKING_TARGET_NEAREST_BY, 0, nullptr, SELECT_FLAG_IN_MELEE_RANGE)) - { - if (DoCastSpellIfCan(m_creature, SPELL_ARCANE_BURST) == CAST_OK) - { - m_uiArcaneExplosionTimer = urand(4000, 6000); - return; - } - } - } - else - m_uiArcaneExplosionTimer -= uiDiff; - - if (m_uiFireballTimer <= uiDiff) - { - m_uiFireballTimer = 0; - if (!m_creature->IsSpellReady(SPELL_CAPERNIAN_FIREBALL)) - { - m_attackDistance = 0.0f; - m_creature->GetMotionMaster()->MoveChase(m_creature->GetVictim(), m_attackDistance, m_attackAngle, m_moveFurther); - } - else if (DoCastSpellIfCan(m_creature->GetVictim(), SPELL_CAPERNIAN_FIREBALL) == CAST_OK) - { - m_uiFireballTimer = 2000; - if (m_attackDistance == 0.0f) - { - m_attackDistance = 30.0f; - m_creature->GetMotionMaster()->MoveChase(m_creature->GetVictim(), m_attackDistance, m_attackAngle, m_moveFurther); - } - return; - } - } - else - m_uiFireballTimer -= uiDiff; - - // Do NOT deal any melee damage. + AddInitialCooldowns(); } }; @@ -1763,75 +1555,28 @@ struct boss_grand_astromancer_capernianAI : public advisor_base_ai ## boss_master_engineer_telonicus ######*/ -/* -Telonicus is supposed to be a hybrid caster -chases in melee only if approached -when ranged, either uses shoot ability when out of range of bomb, or bomb exclusively -*/ - struct boss_master_engineer_telonicusAI : public advisor_base_ai { - boss_master_engineer_telonicusAI(Creature* creature) : advisor_base_ai(creature) + boss_master_engineer_telonicusAI(Creature* creature) : advisor_base_ai(creature, ADVISOR_ACTION_MAX) { m_creature->SetModifierValue(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, 1.f); // sniff evidence seems to point out that telonicus isnt subject to 50% offhand dmg modifier // TODO: Maybe true for all mobs? - Reset(); - } - - uint32 m_uiBombTimer; - uint32 m_uiRemoteToyTimer; - - void Reset() override - { - m_uiBombTimer = 4000; - m_uiRemoteToyTimer = 5000; - - advisor_base_ai::Reset(); + SetRangedMode(true, 25.f, TYPE_PROXIMITY); } void Aggro(Unit* /*who*/) override { - DoScriptText(SAY_TELONICUS_AGGRO, m_creature); + DoBroadcastText(SAY_TELONICUS_AGGRO, m_creature); } - void JustDied(Unit* /*pKiller*/) override + void JustDied(Unit* /*killer*/) override { - DoScriptText(SAY_TELONICUS_DEATH, m_creature); + DoBroadcastText(SAY_TELONICUS_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) override + void HandleSpellSwitch() override { - advisor_base_ai::UpdateAI(uiDiff); - - if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) - return; - - // Don't use abilities during fake death - if (m_bFakeDeath) - return; - - if (m_uiBombTimer <= uiDiff) - { - m_uiBombTimer = 0; - if (DoCastSpellIfCan(m_creature->GetVictim(), SPELL_BOMB) == CAST_OK) - m_uiBombTimer = urand(4000, 5000); - } - else - m_uiBombTimer -= uiDiff; - - if (m_uiRemoteToyTimer <= uiDiff) - { - m_uiRemoteToyTimer = 0; - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_REMOTE_TOY, SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_AURA)) - { - if (DoCastSpellIfCan(target, SPELL_REMOTE_TOY) == CAST_OK) - m_uiRemoteToyTimer = urand(10000, 15000); - } - } - else - m_uiRemoteToyTimer -= uiDiff; - - DoMeleeAttackIfReady(); + AddInitialCooldowns(); } }; @@ -1856,8 +1601,6 @@ struct npc_nether_vaporAI : public ScriptedAI }); } - void Reset() override {} - void JustRespawned() override { ScriptedAI::JustRespawned(); @@ -1867,6 +1610,7 @@ struct npc_nether_vaporAI : public ScriptedAI } }; +// 45960 - Nether Vapor Lightning struct NetherVaporLightning : public AuraScript { void OnPeriodicDummy(Aura* aura) const override @@ -1880,6 +1624,7 @@ struct NetherVaporLightning : public AuraScript } }; +// 35861 - Summon Nether Vapor struct NetherVaporSummon : public SpellScript { void OnDestTarget(Spell* spell) const override @@ -1888,6 +1633,7 @@ struct NetherVaporSummon : public SpellScript } }; +// 35865 - Summon Nether Vapor struct NetherVaporSummonParent : public SpellScript { void OnEffectExecute(Spell* spell, SpellEffectIndex /*effIdx*/) const override @@ -1899,6 +1645,7 @@ struct NetherVaporSummonParent : public SpellScript } }; +// 39497 - Remove Enchanted Weapons struct RemoveWeapons : public SpellScript { void OnEffectExecute(Spell* spell, SpellEffectIndex /*effIdx*/) const override @@ -1917,6 +1664,7 @@ struct RemoveWeapons : public SpellScript } }; +// 34480, 44226, 49887 - Gravity Lapse struct GravityLapseKnockup : public AuraScript { void OnPeriodicTickEnd(Aura* aura) const override @@ -1945,7 +1693,6 @@ void AddSC_boss_kaelthas() Script* pNewScript = new Script; pNewScript->Name = "boss_kaelthas"; pNewScript->GetAI = &GetNewAIInstance; - pNewScript->pEffectDummyNPC = &EffectDummyCreature_kael_phase_2; pNewScript->RegisterSelf(); pNewScript = new Script; @@ -1973,6 +1720,7 @@ void AddSC_boss_kaelthas() pNewScript->GetAI = &GetNewAIInstance; pNewScript->RegisterSelf(); + RegisterSpellScript("spell_kael_phase_two"); RegisterSpellScript("spell_nether_vapor_lightning"); RegisterSpellScript("spell_nether_vapor_summon"); RegisterSpellScript("spell_nether_vapor_summon_parent"); diff --git a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 6f6bc4119d..231fa371c7 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -27,13 +27,13 @@ EndScriptData */ enum { - SAY_AGGRO = -1550000, - SAY_SLAY1 = -1550001, - SAY_SLAY2 = -1550002, - SAY_SLAY3 = -1550003, - SAY_DEATH = -1550004, - SAY_POUNDING1 = -1550005, - SAY_POUNDING2 = -1550006, + SAY_AGGRO = 20906, + SAY_SLAY1 = 20908, + SAY_SLAY2 = 20909, + SAY_SLAY3 = 20910, + SAY_DEATH = 20907, + SAY_POUNDING1 = 20911, + SAY_POUNDING2 = 20912, SPELL_POUNDING = 34162, SPELL_ARCANE_ORB_MISSILE = 34172, @@ -65,26 +65,14 @@ struct boss_void_reaverAI : public CombatAI { return m_creature->GetDistance2d(432.59f, 371.93f) > 105.0f; }); + AddOnKillText(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3); } ScriptedInstance* m_instance; - void KilledUnit(Unit* victim) override - { - if (victim->GetTypeId() != TYPEID_PLAYER) - return; - - switch (urand(0, 2)) - { - case 0: DoScriptText(SAY_SLAY1, m_creature); break; - case 1: DoScriptText(SAY_SLAY2, m_creature); break; - case 2: DoScriptText(SAY_SLAY3, m_creature); break; - } - } - void JustDied(Unit* /*killer*/) override { - DoScriptText(SAY_DEATH, m_creature); + DoBroadcastText(SAY_DEATH, m_creature); if (m_instance) m_instance->SetData(TYPE_VOIDREAVER, DONE); @@ -92,7 +80,7 @@ struct boss_void_reaverAI : public CombatAI void Aggro(Unit* /*who*/) override { - DoScriptText(SAY_AGGRO, m_creature); + DoBroadcastText(SAY_AGGRO, m_creature); if (m_instance) m_instance->SetData(TYPE_VOIDREAVER, IN_PROGRESS); @@ -118,7 +106,7 @@ struct boss_void_reaverAI : public CombatAI { if (DoCastSpellIfCan(m_creature, SPELL_POUNDING) == CAST_OK) { - DoScriptText(urand(0, 1) ? SAY_POUNDING1 : SAY_POUNDING2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_POUNDING1 : SAY_POUNDING2, m_creature); ResetCombatAction(action, 14000); } break;