From acef50f406daa2aec8f33aedeca3ec2233a0e329 Mon Sep 17 00:00:00 2001 From: killerwife Date: Fri, 4 Aug 2023 14:53:53 +0200 Subject: [PATCH] Arca: Migrate all texts to bct and minor modernization https://github.com/cmangos/issues/issues/3444 --- sql/scriptdev2/scriptdev2.sql | 62 -------- .../tempest_keep/arcatraz/arcatraz.cpp | 28 ++-- .../tempest_keep/arcatraz/arcatrazScripts.cpp | 134 ++++++++---------- .../tempest_keep/arcatraz/boss_dalliah.cpp | 95 ++++++------- .../arcatraz/boss_harbinger_skyriss.cpp | 75 ++++------ .../arcatraz/boss_soccothrates.cpp | 116 ++++++++------- 6 files changed, 200 insertions(+), 310 deletions(-) diff --git a/sql/scriptdev2/scriptdev2.sql b/sql/scriptdev2/scriptdev2.sql index e75897b7c5..e324d47cbe 100644 --- a/sql/scriptdev2/scriptdev2.sql +++ b/sql/scriptdev2/scriptdev2.sql @@ -4178,68 +4178,6 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadc ('-1550044','%s begins to cast Pyroblast!','0','3','0','0','20775','kaelthas EMOTE_PYROBLAST'); -- -1 552 000 THE ARCATRAZ -INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadcast_text_id,comment) VALUES -('-1552000','It is a small matter to control the mind of the weak... for I bear allegiance to powers untouched by time, unmoved by fate. No force on this world or beyond harbors the strength to bend our knee... not even the mighty Legion! ','11122','1','0','0','19112','skyriss SAY_INTRO'), -('-1552001','Bear witness to the agent of your demise!','11123','1','0','0','19113','skyriss SAY_AGGRO'), -('-1552002','Your fate is written.','11124','1','0','0','19813','skyriss SAY_KILL_1'), -('-1552003','The chaos I have sown here is but a taste....','11125','1','0','0','19814','skyriss SAY_KILL_2'), -('-1552004','You will do my bidding, weakling.','11127','1','0','0','19816','skyriss SAY_MIND_1'), -('-1552005','Your will is no longer your own.','11128','1','0','0','19817','skyriss SAY_MIND_2'), -('-1552006','Flee in terror.','11129','1','0','0','19818','skyriss SAY_FEAR_1'), -('-1552007','I will show you horrors undreamed of.','11130','1','0','0','19819','skyriss SAY_FEAR_2'), -('-1552008','We span the universe, as countless as the stars!','11131','1','0','0','19821','skyriss SAY_IMAGE'), -('-1552009','I am merely one of... infinite multitudes.','11126','1','0','0','19815','skyriss SAY_DEATH'), - -('-1552010','Where in Bonzo''s Brass Buttons am I? And who are-- yaaghh, that''s one mother of a headache!','11171','1','0','6','19108','millhouse SAY_INTRO_1'), -('-1552011','"Lowly"? I don''t care who you are, friend: no one refers to the mighty Millhouse Manastorm as "lowly"!','11172','1','0','5','19116','millhouse SAY_INTRO_2'), -('-1552012','I just need to get some things ready first. You guys go ahead and get started. I need to summon up some water....','11173','1','0','0','19117','millhouse SAY_WATER'), -('-1552013','Fantastic! Next, some protective spells. Yeah, now we''re cookin''!','11174','1','0','0','19119','millhouse SAY_BUFFS'), -('-1552014','And of course I''ll need some mana. You guys are gonna love this; just wait....','11175','1','0','0','19120','millhouse SAY_DRINK'), -('-1552015','Aaalllriiiight!! Who ordered up an extra large can of whoop-ass?','11176','1','0','0','19121','millhouse SAY_READY'), -('-1552016','I didn''t even break a sweat on that one!','11177','1','0','0','19824','millhouse SAY_KILL_1'), -('-1552017','You guys feel free to jump in anytime.','11178','1','0','0','19825','millhouse SAY_KILL_2'), -('-1552018','I''m gonna light you up, sweet cheeks!','11179','1','0','0','19826','millhouse SAY_PYRO'), -('-1552019','Ice, ice baby.','11180','1','0','0','19827','millhouse SAY_ICEBLOCK'), -('-1552020','Heal me! For the love of all that''s holy, heal me! I''m dying!!','11181','1','0','0','19828','millhouse SAY_LOWHP'), -('-1552021','You''ll be hearing from my lawyer!','11182','1','0','0','19829','millhouse SAY_DEATH'), -('-1552022','Who''s bad? Who''s bad? That''s right: we bad!','11183','1','0','4','19146','millhouse SAY_COMPLETE'), - -('-1552023','I knew the prince would be angry, but I... I have not been myself. I had to let them out! The great one speaks to me, you see. Wait--outsiders. Kael''thas did not send you! Good... I''ll just tell the prince you released the prisoners!','11222','1','0','0','19103','mellichar YELL_INTRO1'), -('-1552024','The naaru kept some of the most dangerous beings in existence here in these cells. Let me introduce you to another....','11223','1','0','0','19104','mellichar YELL_INTRO2'), -('-1552025','Yes, yes... another! Your will is mine!','11224','1','0','0','19106','mellichar YELL_RELEASE1'), -('-1552026','Behold, yet another terrifying creature of incomprehensible power!','11225','1','0','0','19107','mellichar YELL_RELEASE2A'), -('-1552027','What is this? A lowly gnome? I will do better, oh great one.','11226','1','0','0','19109','mellichar YELL_RELEASE2B'), -('-1552028','Anarchy! Bedlam! Oh, you are so wise! Yes, I see it now, of course!','11227','1','0','0','19110','mellichar YELL_RELEASE3'), -('-1552029','One final cell remains. Yes, O great one, right away!','11228','1','0','0','19111','mellichar YELL_RELEASE4'), -('-1552030','Welcome, O great one. I am your humble servant.','11229','1','0','0','19114','mellichar YELL_WELCOME'), - -('-1552031','It is unwise to anger me!','11086','1','0','0','19978','dalliah SAY_AGGRO'), -('-1552032','That is much better.','11091','1','0','0','19984','dalliah SAY_HEAL_1'), -('-1552033','Ahh... just what I needed.','11092','1','0','0','19985','dalliah SAY_HEAL_2'), -('-1552034','Completely ineffective. Just like someone else I know.','11087','1','0','0','19980','dalliah SAY_KILL_1'), -('-1552035','You chose the wrong opponent.','11088','1','0','0','19981','dalliah SAY_KILL_2'), -('-1552036','I''ll cut you to pieces!','11090','1','0','0','19983','dalliah SAY_WHIRLWIND_1'), -('-1552037','Reap the whirlwind!','11089','1','0','0','19982','dalliah SAY_WHIRLWIND_2'), -('-1552038','Now I''m really angry.','11093','1','0','0','19986','dalliah SAY_DEATH'), - -('-1552039','Have you come to kill Dalliah? Can I watch?','11237','1','0','1','19968','soccothrates SAY_DALLIAH_AGGRO_1'), -('-1552040','This may be the end for you, Dalliah. What a shame that would be.','11245','1','0','1','19975','soccothrates SAY_DALLIAH_TAUNT_1'), -('-1552041','Having problems, Dalliah? How nice.','11244','1','0','1','19974','soccothrates SAY_DALLIAH_TAUNT_2'), -('-1552042','I suggest a new strategy: you draw their attacks while I gather reinforcements.','11246','1','0','1','19976','soccothrates SAY_DALLIAH_TAUNT_3'), -('-1552043','Finally! Well done!','11247','1','0','66','19977','soccothrates SAY_DALLIAH_DEAD'), -('-1552044','On guard!','11241','1','0','0','19971','soccothrates SAY_CHARGE_1'), -('-1552045','Defend yourself, for all the good it will do....','11242','1','0','0','19972','soccothrates SAY_CHARGE_2'), -('-1552046','Knew this was... the only way out.','11243','1','0','0','19973','soccothrates SAY_DEATH'), -('-1552047','Yes, that was quite satisfying.','11239','1','0','0','19969','soccothrates SAY_KILL'), -('-1552048','At last, a target for my frustrations!','11238','1','0','0','19967','soccothrates SAY_AGGRO'), - -('-1552049','Did you call on me?','11236','1','0','397','20051','soccothrates SAY_INTRO_1'), -('-1552050','Why would I call on you?','0','1','0','396','20055','dalliah SAY_INTRO_2'), -('-1552051','To do your heavy lifting, most likely.','0','1','0','396','20052','soccothrates SAY_INTRO_3'), -('-1552052','When I need someone to prance around like an overstuffed peacock, I''ll call on you.','0','1','0','396','20056','dalliah SAY_INTRO_4'), -('-1552053','Then I''ll commit myself to ignoring you.','0','1','0','396','20053','soccothrates SAY_INTRO_5'), -('-1552054','What would you know about commitment, sheet-sah?','0','1','0','396','20057','dalliah SAY_INTRO_6'), -('-1552055','You''re the one who should be-- Wait, we have company...','0','1','0','396','20054','soccothrates SAY_INTRO_7'); -- -1 553 000 THE BOTANICA INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadcast_text_id,comment) VALUES diff --git a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index 35f9bbf9ad..1bc4be9f22 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -33,20 +33,20 @@ EndScriptData */ enum { - SAY_SOCCOTHRATES_AGGRO = -1552039, - SAY_SOCCOTHRATES_DEATH = -1552043, - - YELL_MELLICHAR_INTRO1 = -1552023, - YELL_MELLICHAR_INTRO2 = -1552024, - YELL_MELLICHAR_RELEASE1 = -1552025, - YELL_MELLICHAR_RELEASE2 = -1552026, - YELL_MELLICHAR_RELEASE3 = -1552027, - YELL_MELLICHAR_RELEASE4 = -1552028, - YELL_MELLICHAR_RELEASE5 = -1552029, - YELL_MELLICAR_WELCOME = -1552030, - SAY_SKYRISS_INTRO = -1552000, - SAY_SKYRISS_AGGRO = -1552001, - SAY_MILLHOUSE_COMPLETE = -1552022, + SAY_SOCCOTHRATES_AGGRO = 19968, + SAY_SOCCOTHRATES_DEATH = 19977, + + YELL_MELLICHAR_INTRO1 = 19103, + YELL_MELLICHAR_INTRO2 = 19104, + YELL_MELLICHAR_RELEASE1 = 19106, + YELL_MELLICHAR_RELEASE2 = 19107, + YELL_MELLICHAR_RELEASE3 = 19109, + YELL_MELLICHAR_RELEASE4 = 19110, + YELL_MELLICHAR_RELEASE5 = 19111, + YELL_MELLICAR_WELCOME = 19114, + SAY_SKYRISS_INTRO = 19112, + SAY_SKYRISS_AGGRO = 19113, + SAY_MILLHOUSE_COMPLETE = 19146, // Spells used by Mellichar during the dialogue SPELL_TARGET_BETA = 36854, diff --git a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/arcatrazScripts.cpp b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/arcatrazScripts.cpp index 65a604b32f..032db283b5 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/arcatrazScripts.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/arcatrazScripts.cpp @@ -29,6 +29,7 @@ EndContentData */ #include "AI/ScriptDevAI/include/sc_common.h" #include "arcatraz.h" +#include "AI/ScriptDevAI/base/CombatAI.h" /*##### # npc_millhouse_manastorm @@ -36,18 +37,18 @@ EndContentData */ enum { - SAY_INTRO_1 = -1552010, - SAY_INTRO_2 = -1552011, - SAY_WATER = -1552012, - SAY_BUFFS = -1552013, - SAY_DRINK = -1552014, - SAY_READY = -1552015, - SAY_KILL_1 = -1552016, - SAY_KILL_2 = -1552017, - SAY_PYRO = -1552018, - SAY_ICEBLOCK = -1552019, - SAY_LOWHP = -1552020, - SAY_DEATH = -1552021, + SAY_INTRO_1 = 19108, + SAY_INTRO_2 = 19116, + SAY_WATER = 19117, + SAY_BUFFS = 19119, + SAY_DRINK = 19120, + SAY_READY = 19121, + SAY_KILL_1 = 19824, + SAY_KILL_2 = 19825, + SAY_PYRO = 19826, + SAY_ICEBLOCK = 19827, + SAY_LOWHP = 19828, + SAY_DEATH = 19829, SPELL_CONJURE_WATER = 36879, SPELL_ARCANE_INTELLECT = 36880, @@ -82,19 +83,20 @@ static const DialogueEntry aIntroDialogue[] = static const float fRoomCenterCoords[3] = {445.8804f, -158.7055f, 43.06898f}; -struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper +struct npc_millhouse_manastormAI : public CombatAI, private DialogueHelper { - npc_millhouse_manastormAI(Creature* pCreature) : ScriptedAI(pCreature), - DialogueHelper(aIntroDialogue) + npc_millhouse_manastormAI(Creature* creature) : CombatAI(creature, 0), + DialogueHelper(aIntroDialogue), + m_instance(static_cast(creature->GetInstanceData())) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - InitializeDialogueHelper(m_pInstance); - Reset(); + m_instance = (ScriptedInstance*)creature->GetInstanceData(); + InitializeDialogueHelper(m_instance); m_attackDistance = 25.0f; StartNextDialogueText(NPC_MILLHOUSE); + AddOnKillText(SAY_KILL_1, SAY_KILL_2); } - ScriptedInstance* m_pInstance; + ScriptedInstance* m_instance; bool m_bHasLowHp; uint32 m_uiPyroblastTimer; @@ -106,6 +108,7 @@ struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper void Reset() override { + CombatAI::Reset(); m_bHasLowHp = false; m_uiPyroblastTimer = urand(6000, 9000); m_uiFireballTimer = urand(2500, 4000); @@ -115,18 +118,9 @@ struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper m_uiArcaneMissileTimer = urand(5000, 8000); } - void KilledUnit(Unit* /*pVictim*/) override - { - DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); - } - - void JustDied(Unit* /*pVictim*/) override + void JustDied(Unit* /*victim*/) override { DoScriptText(SAY_DEATH, m_creature); - - /*for questId 10886 (heroic mode only) - if (m_instance && m_instance->GetData(TYPE_HARBINGERSKYRISS) != DONE) - ->FailQuest();*/ } void EnterEvadeMode() override @@ -144,13 +138,13 @@ struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper Reset(); } - void JustDidDialogueStep(int32 iEntry) override + void JustDidDialogueStep(int32 textEntry) override { - switch (iEntry) + switch (textEntry) { case TYPE_WARDEN_2: - if (m_pInstance) - m_pInstance->SetData(TYPE_WARDEN_2, DONE); + if (m_instance) + m_instance->SetData(TYPE_WARDEN_2, DONE); break; case SAY_WATER: DoCastSpellIfCan(m_creature, SPELL_CONJURE_WATER); @@ -242,11 +236,6 @@ struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper } }; -UnitAI* GetAI_npc_millhouse_manastorm(Creature* pCreature) -{ - return new npc_millhouse_manastormAI(pCreature); -} - /*##### # npc_warden_mellichar #####*/ @@ -257,34 +246,34 @@ enum SPELL_SIMPLE_TELEPORT = 12980, }; -struct npc_warden_mellicharAI : public ScriptedAI +struct npc_warden_mellicharAI : public CombatAI { - npc_warden_mellicharAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_warden_mellicharAI(Creature* creature) : CombatAI(creature, 0), + m_instance(static_cast(creature->GetInstanceData())) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); SetCombatMovement(false); - Reset(); } - ScriptedInstance* m_pInstance; + ScriptedInstance* m_instance; uint32 m_uiIntroTimer; ObjectGuid m_targetPlayerGuid; void Reset() override { + CombatAI::Reset(); m_uiIntroTimer = 5000; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC); } - void AttackStart(Unit* /*pWho*/) override {} + void AttackStart(Unit* /*who*/) override {} - void Aggro(Unit* pWho) override + void Aggro(Unit* who) override { m_creature->InterruptNonMeleeSpells(false); - m_creature->SetFacingToObject(pWho); - m_targetPlayerGuid = pWho->GetObjectGuid(); + m_creature->SetFacingToObject(who); + m_targetPlayerGuid = who->GetObjectGuid(); DoCastSpellIfCan(m_creature, SPELL_BUBBLE_VISUAL); @@ -292,30 +281,30 @@ struct npc_warden_mellicharAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER); SetReactState(REACT_PASSIVE); - if (m_pInstance) - m_pInstance->SetData(TYPE_HARBINGERSKYRISS, IN_PROGRESS); + if (m_instance) + m_instance->SetData(TYPE_HARBINGERSKYRISS, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) override + void JustSummoned(Creature* summoned) override { - pSummoned->CastSpell(pSummoned, SPELL_SIMPLE_TELEPORT, TRIGGERED_NONE); + summoned->CastSpell(summoned, SPELL_SIMPLE_TELEPORT, TRIGGERED_NONE); - if (pSummoned->GetEntry() != NPC_MILLHOUSE && pSummoned->GetEntry() != NPC_SKYRISS) + if (summoned->GetEntry() != NPC_MILLHOUSE && summoned->GetEntry() != NPC_SKYRISS) { if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_targetPlayerGuid)) - pSummoned->AI()->AttackStart(pTarget); + summoned->AI()->AttackStart(pTarget); } } - void JustDied(Unit* /*pKiller*/) override + void JustDied(Unit* /*killer*/) override { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER); - if (m_pInstance) + if (m_instance) { - if (Creature* pSkyriss = m_pInstance->GetSingleCreatureFromStorage(NPC_SKYRISS)) + if (Creature* skyriss = m_instance->GetSingleCreatureFromStorage(NPC_SKYRISS)) { - if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_targetPlayerGuid)) - pSkyriss->AI()->AttackStart(pTarget); + if (Unit* target = m_creature->GetMap()->GetUnit(m_targetPlayerGuid)) + skyriss->AI()->AttackStart(target); } } } @@ -336,11 +325,6 @@ struct npc_warden_mellicharAI : public ScriptedAI } }; -UnitAI* GetAI_npc_warden_mellichar(Creature* pCreature) -{ - return new npc_warden_mellicharAI(pCreature); -} - /*###### ## npc_arcatraz_defender ######*/ @@ -353,20 +337,19 @@ enum SPELL_PROTEAN_SUBDUAL_H = 40449, }; -struct npc_arcatraz_defenderAI : public ScriptedAI +struct npc_arcatraz_defenderAI : public CombatAI { - npc_arcatraz_defenderAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_arcatraz_defenderAI(Creature* creature) : CombatAI(creature, 0), m_isRegularMode(creature->GetMap()->IsRegularDifficulty()) { - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); } - bool m_bIsRegularMode; + bool m_isRegularMode; uint32 m_uiFlamingWeaponTimer; uint32 m_uiProteanSubdualTimer; void Reset() override { + CombatAI::Reset(); m_uiFlamingWeaponTimer = urand(3000, 6000); m_uiProteanSubdualTimer = 2000; } @@ -378,7 +361,7 @@ struct npc_arcatraz_defenderAI : public ScriptedAI if (m_uiFlamingWeaponTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->GetVictim(), m_bIsRegularMode ? SPELL_FLAMING_WEAPON : SPELL_FLAMING_WEAPON_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature->GetVictim(), m_isRegularMode ? SPELL_FLAMING_WEAPON : SPELL_FLAMING_WEAPON_H) == CAST_OK) m_uiFlamingWeaponTimer = urand(3000, 6000); } else @@ -389,7 +372,7 @@ struct npc_arcatraz_defenderAI : public ScriptedAI { if (m_uiProteanSubdualTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->GetVictim(), m_bIsRegularMode ? SPELL_PROTEAN_SUBDUAL : SPELL_PROTEAN_SUBDUAL_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature->GetVictim(), m_isRegularMode ? SPELL_PROTEAN_SUBDUAL : SPELL_PROTEAN_SUBDUAL_H) == CAST_OK) m_uiProteanSubdualTimer = urand(2000, 3000); } else @@ -400,25 +383,20 @@ struct npc_arcatraz_defenderAI : public ScriptedAI } }; -UnitAI* GetAI_npc_arcatraz_defender(Creature* pCreature) -{ - return new npc_arcatraz_defenderAI(pCreature); -} - void AddSC_arcatraz() { Script* pNewScript = new Script; pNewScript->Name = "npc_millhouse_manastorm"; - pNewScript->GetAI = &GetAI_npc_millhouse_manastorm; + pNewScript->GetAI = &GetNewAIInstance; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "npc_warden_mellichar"; - pNewScript->GetAI = &GetAI_npc_warden_mellichar; + pNewScript->GetAI = &GetNewAIInstance; pNewScript->RegisterSelf(); pNewScript = new Script; pNewScript->Name = "npc_arcatraz_defender"; - pNewScript->GetAI = &GetAI_npc_arcatraz_defender; + pNewScript->GetAI = &GetNewAIInstance; pNewScript->RegisterSelf(); } diff --git a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp index e29d755acd..b89e8c3825 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_dalliah.cpp @@ -23,20 +23,21 @@ EndScriptData */ #include "AI/ScriptDevAI/include/sc_common.h" #include "arcatraz.h" +#include "AI/ScriptDevAI/base/CombatAI.h" enum { - SAY_AGGRO = -1552031, - SAY_SOCCOTHRATES_TAUNT_1 = -1552040, - SAY_SOCCOTHRATES_TAUNT_2 = -1552041, - SAY_SOCCOTHRATES_TAUNT_3 = -1552042, - SAY_HEAL_1 = -1552032, - SAY_HEAL_2 = -1552033, - SAY_KILL_1 = -1552034, - SAY_KILL_2 = -1552035, - SAY_WHIRLWIND_1 = -1552036, - SAY_WHIRLWIND_2 = -1552037, - SAY_DEATH = -1552038, + SAY_AGGRO = 19978, + SAY_SOCCOTHRATES_TAUNT_1 = 19975, + SAY_SOCCOTHRATES_TAUNT_2 = 19974, + SAY_SOCCOTHRATES_TAUNT_3 = 19976, + SAY_HEAL_1 = 19984, + SAY_HEAL_2 = 19985, + SAY_KILL_1 = 19980, + SAY_KILL_2 = 19981, + SAY_WHIRLWIND_1 = 19983, + SAY_WHIRLWIND_2 = 19982, + SAY_DEATH = 19986, SPELL_DOUBLE_ATTACK = 19818, SPELL_GIFT_DOOMSAYER = 36173, @@ -47,17 +48,16 @@ enum SPELL_SHADOW_WAVE = 39016, // heroic spell only }; -struct boss_dalliahAI : public ScriptedAI +struct boss_dalliahAI : public CombatAI { - boss_dalliahAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_dalliahAI(Creature* creature) : CombatAI(creature, 0), + m_instance(static_cast(creature->GetInstanceData())), m_isRegularMode(creature->GetMap()->IsRegularDifficulty()) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); + AddOnKillText(SAY_KILL_1, SAY_KILL_2); } - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + ScriptedInstance* m_instance; + bool m_isRegularMode; uint32 m_uiGiftDoomsayerTimer; uint32 m_uiHealTimer; @@ -68,6 +68,7 @@ struct boss_dalliahAI : public ScriptedAI void Reset() override { + CombatAI::Reset(); m_uiGiftDoomsayerTimer = urand(4000, 7000); m_uiHealTimer = 0; m_uiWhirlwindTimer = 15000; @@ -78,25 +79,20 @@ struct boss_dalliahAI : public ScriptedAI DoCastSpellIfCan(m_creature, SPELL_DOUBLE_ATTACK, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } - void Aggro(Unit* /*pWho*/) override + void Aggro(Unit* /*who*/) override { - DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_DALLIAH, IN_PROGRESS); - } + DoBroadcastText(SAY_AGGRO, m_creature); - void KilledUnit(Unit* /*pVictim*/) override - { - DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + if (m_instance) + m_instance->SetData(TYPE_DALLIAH, IN_PROGRESS); } - void JustDied(Unit* /*pWho*/) override + void JustDied(Unit* /*who*/) override { - DoScriptText(SAY_DEATH, m_creature); + DoBroadcastText(SAY_DEATH, m_creature); - if (m_pInstance) - m_pInstance->SetData(TYPE_DALLIAH, DONE); + if (m_instance) + m_instance->SetData(TYPE_DALLIAH, DONE); } void EnterEvadeMode() override @@ -109,21 +105,21 @@ struct boss_dalliahAI : public ScriptedAI if (m_creature->IsAlive()) m_creature->GetMotionMaster()->MovePoint(1, aDalliahStartPos[0], aDalliahStartPos[1], aDalliahStartPos[2]); - if (m_pInstance) - m_pInstance->SetData(TYPE_DALLIAH, FAIL); + if (m_instance) + m_instance->SetData(TYPE_DALLIAH, FAIL); m_creature->SetLootRecipient(nullptr); Reset(); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + void MovementInform(uint32 moveType, uint32 pointId) override { - if (uiMoveType != POINT_MOTION_TYPE) + if (moveType != POINT_MOTION_TYPE) return; // Adjust orientation - if (uiPointId) + if (pointId) m_creature->SetFacingTo(aDalliahStartPos[3]); } @@ -134,7 +130,7 @@ struct boss_dalliahAI : public ScriptedAI if (m_uiGiftDoomsayerTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->GetVictim(), m_bIsRegularMode ? SPELL_GIFT_DOOMSAYER : SPELL_GIFT_DOOMSAYER_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature->GetVictim(), m_isRegularMode ? SPELL_GIFT_DOOMSAYER : SPELL_GIFT_DOOMSAYER_H) == CAST_OK) m_uiGiftDoomsayerTimer = urand(14000, 19000); } else @@ -144,7 +140,7 @@ struct boss_dalliahAI : public ScriptedAI { if (DoCastSpellIfCan(m_creature, SPELL_WHIRLWIND) == CAST_OK) { - DoScriptText(urand(0, 1) ? SAY_WHIRLWIND_1 : SAY_WHIRLWIND_2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_WHIRLWIND_1 : SAY_WHIRLWIND_2, m_creature); m_uiWhirlwindTimer = urand(25000, 30000); m_uiHealTimer = 6000; } @@ -156,9 +152,9 @@ struct boss_dalliahAI : public ScriptedAI { if (m_uiHealTimer <= uiDiff) { - if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_HEAL : SPELL_HEAL_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature, m_isRegularMode ? SPELL_HEAL : SPELL_HEAL_H) == CAST_OK) { - DoScriptText(urand(0, 1) ? SAY_HEAL_1 : SAY_HEAL_2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_HEAL_1 : SAY_HEAL_2, m_creature); m_uiHealTimer = 0; } } @@ -166,7 +162,7 @@ struct boss_dalliahAI : public ScriptedAI m_uiHealTimer -= uiDiff; } - if (!m_bIsRegularMode) + if (!m_isRegularMode) { if (m_uiShadowWaveTimer < uiDiff) { @@ -183,15 +179,15 @@ struct boss_dalliahAI : public ScriptedAI if (!m_bHasTaunted && m_creature->GetHealthPercent() < 25.0f) { // Taunt if Soccothares isn't dead yet - if (m_pInstance && m_pInstance->GetData(TYPE_SOCCOTHRATES) != DONE) + if (m_instance && m_instance->GetData(TYPE_SOCCOTHRATES) != DONE) { - if (Creature* pSoccothares = m_pInstance->GetSingleCreatureFromStorage(NPC_SOCCOTHRATES)) + if (Creature* pSoccothares = m_instance->GetSingleCreatureFromStorage(NPC_SOCCOTHRATES)) { switch (urand(0, 2)) { - case 0: DoScriptText(SAY_SOCCOTHRATES_TAUNT_1, pSoccothares); break; - case 1: DoScriptText(SAY_SOCCOTHRATES_TAUNT_2, pSoccothares); break; - case 2: DoScriptText(SAY_SOCCOTHRATES_TAUNT_3, pSoccothares); break; + case 0: DoBroadcastText(SAY_SOCCOTHRATES_TAUNT_1, pSoccothares); break; + case 1: DoBroadcastText(SAY_SOCCOTHRATES_TAUNT_2, pSoccothares); break; + case 2: DoBroadcastText(SAY_SOCCOTHRATES_TAUNT_3, pSoccothares); break; } } } @@ -203,15 +199,10 @@ struct boss_dalliahAI : public ScriptedAI } }; -UnitAI* GetAI_boss_dalliah(Creature* pCreature) -{ - return new boss_dalliahAI(pCreature); -} - void AddSC_boss_dalliah() { Script* pNewScript = new Script; pNewScript->Name = "boss_dalliah"; - pNewScript->GetAI = &GetAI_boss_dalliah; + pNewScript->GetAI = &GetNewAIInstance; pNewScript->RegisterSelf(); } diff --git a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index 9edfbe9db4..f18957cc03 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -23,17 +23,18 @@ EndScriptData */ #include "AI/ScriptDevAI/include/sc_common.h" #include "arcatraz.h" +#include "AI/ScriptDevAI/base/CombatAI.h" enum { - SAY_KILL_1 = -1552002, - SAY_KILL_2 = -1552003, - SAY_MIND_1 = -1552004, - SAY_MIND_2 = -1552005, - SAY_FEAR_1 = -1552006, - SAY_FEAR_2 = -1552007, - SAY_IMAGE = -1552008, - SAY_DEATH = -1552009, + SAY_KILL_1 = 19813, + SAY_KILL_2 = 19814, + SAY_MIND_1 = 19816, + SAY_MIND_2 = 19817, + SAY_FEAR_1 = 19818, + SAY_FEAR_2 = 19819, + SAY_IMAGE = 19821, + SAY_DEATH = 19815, SPELL_FEAR = 39415, SPELL_MIND_REND = 36924, @@ -48,17 +49,16 @@ enum SPELL_BLINK_VISUAL = 36937, }; -struct boss_harbinger_skyrissAI : public ScriptedAI +struct boss_harbinger_skyrissAI : public CombatAI { - boss_harbinger_skyrissAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_harbinger_skyrissAI(Creature* creature) : CombatAI(creature, 0), + m_instance(static_cast(creature->GetInstanceData())), m_isRegularMode(creature->GetMap()->IsRegularDifficulty()) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); + AddOnKillText(SAY_KILL_1, SAY_KILL_2); } - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + ScriptedInstance* m_instance; + bool m_isRegularMode; uint8 m_uiSplitPhase; uint32 m_uiMindRendTimer; @@ -68,6 +68,7 @@ struct boss_harbinger_skyrissAI : public ScriptedAI void Reset() override { + CombatAI::Reset(); m_uiSplitPhase = 1; m_uiMindRendTimer = 3000; m_uiFearTimer = 15000; @@ -75,33 +76,24 @@ struct boss_harbinger_skyrissAI : public ScriptedAI m_uiManaBurnTimer = 25000; } - void JustDied(Unit* /*pKiller*/) override + void JustDied(Unit* /*killer*/) override { - DoScriptText(SAY_DEATH, m_creature); + DoBroadcastText(SAY_DEATH, m_creature); - if (m_pInstance) - m_pInstance->SetData(TYPE_HARBINGERSKYRISS, DONE); + if (m_instance) + m_instance->SetData(TYPE_HARBINGERSKYRISS, DONE); } void JustReachedHome() override { - if (m_pInstance) - m_pInstance->SetData(TYPE_HARBINGERSKYRISS, FAIL); + if (m_instance) + m_instance->SetData(TYPE_HARBINGERSKYRISS, FAIL); } - void KilledUnit(Unit* pVictim) override - { - // won't yell killing pet/other unit - if (pVictim->GetTypeId() != TYPEID_PLAYER) - return; - - DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); - } - - void JustSummoned(Creature* pSummoned) override + void JustSummoned(Creature* summoned) override { if (m_creature->GetVictim()) - pSummoned->AI()->AttackStart(m_creature->GetVictim()); + summoned->AI()->AttackStart(m_creature->GetVictim()); } void UpdateAI(const uint32 uiDiff) override @@ -113,7 +105,7 @@ struct boss_harbinger_skyrissAI : public ScriptedAI if (m_creature->GetHealthPercent() < 100 - 33 * m_uiSplitPhase && m_creature->GetHealthPercent() > 5.0f) { DoCastSpellIfCan(m_creature, m_uiSplitPhase == 1 ? SPELL_66_ILLUSION : SPELL_33_ILLUSION, CAST_INTERRUPT_PREVIOUS); - DoScriptText(SAY_IMAGE, m_creature); + DoBroadcastText(SAY_IMAGE, m_creature); ++m_uiSplitPhase; } @@ -123,7 +115,7 @@ struct boss_harbinger_skyrissAI : public ScriptedAI if (!pTarget) pTarget = m_creature->GetVictim(); - if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_MIND_REND : SPELL_MIND_REND_H) == CAST_OK) + if (DoCastSpellIfCan(pTarget, m_isRegularMode ? SPELL_MIND_REND : SPELL_MIND_REND_H) == CAST_OK) m_uiMindRendTimer = 8000; } else @@ -137,7 +129,7 @@ struct boss_harbinger_skyrissAI : public ScriptedAI if (DoCastSpellIfCan(pTarget, SPELL_FEAR) == CAST_OK) { - DoScriptText(urand(0, 1) ? SAY_FEAR_1 : SAY_FEAR_2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_FEAR_1 : SAY_FEAR_2, m_creature); m_uiFearTimer = 25000; } } @@ -148,9 +140,9 @@ struct boss_harbinger_skyrissAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, uint32(0), SELECT_FLAG_PLAYER)) { - if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_DOMINATION : SPELL_DOMINATION_H) == CAST_OK) + if (DoCastSpellIfCan(pTarget, m_isRegularMode ? SPELL_DOMINATION : SPELL_DOMINATION_H) == CAST_OK) { - DoScriptText(urand(0, 1) ? SAY_MIND_1 : SAY_MIND_2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_MIND_1 : SAY_MIND_2, m_creature); m_uiDominationTimer = urand(16000, 32000); } } @@ -158,7 +150,7 @@ struct boss_harbinger_skyrissAI : public ScriptedAI else m_uiDominationTimer -= uiDiff; - if (!m_bIsRegularMode) + if (!m_isRegularMode) { if (m_uiManaBurnTimer < uiDiff) { @@ -177,15 +169,10 @@ struct boss_harbinger_skyrissAI : public ScriptedAI } }; -UnitAI* GetAI_boss_harbinger_skyriss(Creature* pCreature) -{ - return new boss_harbinger_skyrissAI(pCreature); -} - void AddSC_boss_harbinger_skyriss() { Script* pNewScript = new Script; pNewScript->Name = "boss_harbinger_skyriss"; - pNewScript->GetAI = &GetAI_boss_harbinger_skyriss; + pNewScript->GetAI = &GetNewAIInstance; pNewScript->RegisterSelf(); } diff --git a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp index 56c856ad27..0b4546f3ef 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/arcatraz/boss_soccothrates.cpp @@ -24,28 +24,29 @@ EndScriptData */ #include "AI/ScriptDevAI/include/sc_common.h" #include "arcatraz.h" #include "Spells/Scripts/SpellScript.h" +#include "AI/ScriptDevAI/base/CombatAI.h" enum { // Intro yells - SAY_SOCCOTHRATES_INTRO_1 = -1552049, - SAY_DALLIAH_INTRO_2 = -1552050, - SAY_SOCCOTHRATES_INTRO_3 = -1552051, - SAY_DALLIAH_INTRO_4 = -1552052, - SAY_SOCCOTHRATES_INTRO_5 = -1552053, - SAY_DALLIAH_INTRO_6 = -1552054, - SAY_SOCCOTHRATES_INTRO_7 = -1552055, - - SAY_AGGRO = -1552048, - SAY_KILL = -1552047, - SAY_DEATH = -1552046, - SAY_CHARGE_1 = -1552044, - SAY_CHARGE_2 = -1552045, + SAY_SOCCOTHRATES_INTRO_1 = 20051, + SAY_DALLIAH_INTRO_2 = 20055, + SAY_SOCCOTHRATES_INTRO_3 = 20052, + SAY_DALLIAH_INTRO_4 = 20056, + SAY_SOCCOTHRATES_INTRO_5 = 20053, + SAY_DALLIAH_INTRO_6 = 20057, + SAY_SOCCOTHRATES_INTRO_7 = 20054, + + SAY_AGGRO = 19967, + SAY_KILL = 19969, + SAY_DEATH = 19973, + SAY_CHARGE_1 = 19971, + SAY_CHARGE_2 = 19972, SPELL_IMMOLATION = 36051, SPELL_IMMOLATION_H = 39007, SPELL_KNOCK_AWAY = 36512, - SPELL_FELFIRE_LINE_UP = 35770, // dummy spell - moves prespawned NPCs into a line + SPELL_FELFIRE_LINE_UP = 35770, // dummy spellInfo - moves prespawned NPCs into a line SPELL_FELFIRE = 35769, SPELL_CHARGE_TARGETING = 36038, // summons 21030 on target SPELL_CHARGE = 35754, // script target on 21030; also dummy effect area effect target on 20978 - makes the target cast 35769 @@ -67,20 +68,19 @@ static const DialogueEntry aIntroDialogue[] = {0, 0, 0}, }; -struct boss_soccothratesAI : public ScriptedAI, private DialogueHelper +struct boss_soccothratesAI : public CombatAI, private DialogueHelper { - boss_soccothratesAI(Creature* pCreature) : ScriptedAI(pCreature), - DialogueHelper(aIntroDialogue) + boss_soccothratesAI(Creature* creature) : CombatAI(creature, 0), + DialogueHelper(aIntroDialogue), + m_instance(static_cast(creature->GetInstanceData())), m_isRegularMode(creature->GetMap()->IsRegularDifficulty()) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - InitializeDialogueHelper(m_pInstance); - m_bHasYelledIntro = false; - Reset(); + AddOnKillText(SAY_KILL); + InitializeDialogueHelper(m_instance); + m_hasYelledIntro = false; } - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + ScriptedInstance* m_instance; + bool m_isRegularMode; uint32 m_uiKnockAwayTimer; uint32 m_uiFelfireShockTimer; @@ -90,24 +90,25 @@ struct boss_soccothratesAI : public ScriptedAI, private DialogueHelper float m_x, m_y, m_z; // last charge target location uint8 m_lineUpCounter; - bool m_bHasYelledIntro; + bool m_hasYelledIntro; void Reset() override { + CombatAI::Reset(); m_uiFelfireShockTimer = urand(10000, 13000); m_uiKnockAwayTimer = urand(22000, 25000); m_uiFelfireLineupTimer = 0; m_uiChargeTimer = 0; - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_IMMOLATION : SPELL_IMMOLATION_H); + DoCastSpellIfCan(m_creature, m_isRegularMode ? SPELL_IMMOLATION : SPELL_IMMOLATION_H); } - void Aggro(Unit* /*pWho*/) override + void Aggro(Unit* /*who*/) override { - DoScriptText(SAY_AGGRO, m_creature); + DoBroadcastText(SAY_AGGRO, m_creature); GuidVector felfireVector; // at aggro felfire mobs always teleport to respawn location - m_pInstance->GetCreatureGuidVectorFromStorage(NPC_WRATH_SCRYER_FELFIRE, felfireVector); + m_instance->GetCreatureGuidVectorFromStorage(NPC_WRATH_SCRYER_FELFIRE, felfireVector); for (ObjectGuid& guid : felfireVector) { if (Creature* creature = m_creature->GetMap()->GetCreature(guid)) @@ -118,32 +119,27 @@ struct boss_soccothratesAI : public ScriptedAI, private DialogueHelper } } - if (m_pInstance) - m_pInstance->SetData(TYPE_SOCCOTHRATES, IN_PROGRESS); + if (m_instance) + m_instance->SetData(TYPE_SOCCOTHRATES, IN_PROGRESS); } - void MoveInLineOfSight(Unit* pWho) override + void MoveInLineOfSight(Unit* who) override { - if (!m_bHasYelledIntro && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 75.0f) && m_creature->IsWithinLOSInMap(pWho)) + if (!m_hasYelledIntro && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 75.0f) && m_creature->IsWithinLOSInMap(who)) { StartNextDialogueText(SAY_SOCCOTHRATES_INTRO_1); - m_bHasYelledIntro = true; + m_hasYelledIntro = true; } - ScriptedAI::MoveInLineOfSight(pWho); - } - - void KilledUnit(Unit* /*pVictim*/) override - { - DoScriptText(SAY_KILL, m_creature); + ScriptedAI::MoveInLineOfSight(who); } - void JustDied(Unit* /*pWho*/) override + void JustDied(Unit* /*who*/) override { - DoScriptText(SAY_DEATH, m_creature); + DoBroadcastText(SAY_DEATH, m_creature); - if (m_pInstance) - m_pInstance->SetData(TYPE_SOCCOTHRATES, DONE); + if (m_instance) + m_instance->SetData(TYPE_SOCCOTHRATES, DONE); } void EnterEvadeMode() override @@ -156,21 +152,21 @@ struct boss_soccothratesAI : public ScriptedAI, private DialogueHelper if (m_creature->IsAlive()) m_creature->GetMotionMaster()->MovePoint(1, aSoccotharesStartPos[0], aSoccotharesStartPos[1], aSoccotharesStartPos[2]); - if (m_pInstance) - m_pInstance->SetData(TYPE_SOCCOTHRATES, FAIL); + if (m_instance) + m_instance->SetData(TYPE_SOCCOTHRATES, FAIL); m_creature->SetLootRecipient(nullptr); Reset(); } - void MovementInform(uint32 uiMoveType, uint32 uiPointId) override + void MovementInform(uint32 moveType, uint32 pointId) override { - if (uiMoveType != POINT_MOTION_TYPE) + if (moveType != POINT_MOTION_TYPE) return; // Adjust orientation - if (uiPointId) + if (pointId) m_creature->SetFacingTo(aSoccotharesStartPos[3]); } @@ -183,9 +179,9 @@ struct boss_soccothratesAI : public ScriptedAI, private DialogueHelper } } - void SpellHitTarget(Unit* target, const SpellEntry* spell) override + void SpellHitTarget(Unit* target, const SpellEntry* spellInfo) override { - if (spell->Id == SPELL_FELFIRE_LINE_UP) + if (spellInfo->Id == SPELL_FELFIRE_LINE_UP) { // need to get even points between caster and target to reposition felfire evenly float sX = m_creature->GetPositionX(), sY = m_creature->GetPositionY(); // source coords @@ -195,21 +191,21 @@ struct boss_soccothratesAI : public ScriptedAI, private DialogueHelper target->NearTeleportTo(fX, fY, m_creature->GetPositionZ(), m_creature->GetOrientation()); m_lineUpCounter++; } - else if (spell->Id == SPELL_CHARGE && target->GetEntry() == NPC_WRATH_SCRYER_CHARGE_TARGET) + else if (spellInfo->Id == SPELL_CHARGE && target->GetEntry() == NPC_WRATH_SCRYER_CHARGE_TARGET) SetCombatMovement(true); } - void JustDidDialogueStep(int32 iEntry) override + void JustDidDialogueStep(int32 textEntry) override { // Move each of them to their places - if (iEntry == SAY_SOCCOTHRATES_INTRO_7) + if (textEntry == SAY_SOCCOTHRATES_INTRO_7) { m_creature->GetMotionMaster()->MovePoint(1, aSoccotharesStartPos[0], aSoccotharesStartPos[1], aSoccotharesStartPos[2]); - if (m_pInstance) + if (m_instance) { - if (Creature* pDalliah = m_pInstance->GetSingleCreatureFromStorage(NPC_DALLIAH)) - pDalliah->GetMotionMaster()->MovePoint(1, aDalliahStartPos[0], aDalliahStartPos[1], aDalliahStartPos[2]); + if (Creature* dalliah = m_instance->GetSingleCreatureFromStorage(NPC_DALLIAH)) + dalliah->GetMotionMaster()->MovePoint(1, aDalliahStartPos[0], aDalliahStartPos[1], aDalliahStartPos[2]); } } } @@ -223,7 +219,7 @@ struct boss_soccothratesAI : public ScriptedAI, private DialogueHelper if (m_uiFelfireShockTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature->GetVictim(), m_bIsRegularMode ? SPELL_FELFIRE_SHOCK : SPELL_FELFIRE_SHOCK_H) == CAST_OK) + if (DoCastSpellIfCan(m_creature->GetVictim(), m_isRegularMode ? SPELL_FELFIRE_SHOCK : SPELL_FELFIRE_SHOCK_H) == CAST_OK) m_uiFelfireShockTimer = urand(35000, 45000); } else @@ -251,7 +247,7 @@ struct boss_soccothratesAI : public ScriptedAI, private DialogueHelper { // ToDo: the Wrath-Scryer's Felfire npcs should be summoned at this point and aligned to the chosen target! m_creature->CastSpell(m_creature, SPELL_FELFIRE_LINE_UP, TRIGGERED_OLD_TRIGGERED); - DoScriptText(urand(0, 1) ? SAY_CHARGE_1 : SAY_CHARGE_2, m_creature, pTarget); + DoBroadcastText(urand(0, 1) ? SAY_CHARGE_1 : SAY_CHARGE_2, m_creature, pTarget); m_uiChargeTimer = 2500; m_uiFelfireLineupTimer = 0; @@ -269,7 +265,7 @@ struct boss_soccothratesAI : public ScriptedAI, private DialogueHelper { m_creature->RemoveAurasDueToSpell(SPELL_KNOCK_AWAY); SetCombatMovement(false); // prevents interrupting charge - // Note: this spell will also light up the Wrath-Scryer's Felfire npcs + // Note: this spellInfo will also light up the Wrath-Scryer's Felfire npcs if (DoCastSpellIfCan(m_creature, SPELL_CHARGE) == CAST_OK) m_uiChargeTimer = 0; }