From d87a9dc58f8a7e7127a9f784bf8429ee547d2d72 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Wed, 29 Mar 2023 00:28:15 -0300 Subject: [PATCH] fix(Scripts/Steamvault): Correct Timers for Thespia and add missing line (#15640) * Update boss_hydromancer_thespia.cpp * Create thespia.sql * Update boss_hydromancer_thespia.cpp * Lightning cloud is random as well * DoCast --- data/sql/updates/pending_db_world/thespia.sql | 4 +++ .../SteamVault/boss_hydromancer_thespia.cpp | 27 +++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 data/sql/updates/pending_db_world/thespia.sql diff --git a/data/sql/updates/pending_db_world/thespia.sql b/data/sql/updates/pending_db_world/thespia.sql new file mode 100644 index 000000000..0768898bc --- /dev/null +++ b/data/sql/updates/pending_db_world/thespia.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_text` WHERE `CreatureID`=17797 AND `GroupID`=4 AND `ID`=0; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(17797, 4, 0, 'Enjoy the storm warm bloods!', 14, 0, 100, 0, 0, 0, 19456, 0, 'thespia SAY_SPELL'); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp index 3ff8a02f2..a27e68485 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp @@ -21,10 +21,11 @@ enum HydromancerThespia { - SAY_SUMMON = 0, + SAY_SUMMON = 0, // Unused or Unknown Use SAY_AGGRO = 1, SAY_SLAY = 2, SAY_DEAD = 3, + SAY_SPELL = 4, SPELL_LIGHTNING_CLOUD = 25033, SPELL_LUNG_BURST = 31481, @@ -55,9 +56,9 @@ struct boss_hydromancer_thespia : public BossAI { Talk(SAY_AGGRO); _JustEngagedWith(); - events.ScheduleEvent(EVENT_SPELL_LIGHTNING, 15000); - events.ScheduleEvent(EVENT_SPELL_LUNG, 7000); - events.ScheduleEvent(EVENT_SPELL_ENVELOPING, 9000); + events.ScheduleEvent(EVENT_SPELL_LIGHTNING, 9800); + events.ScheduleEvent(EVENT_SPELL_LUNG, 13300); + events.ScheduleEvent(EVENT_SPELL_ENVELOPING, 14500); } void UpdateAI(uint32 diff) override @@ -69,21 +70,17 @@ struct boss_hydromancer_thespia : public BossAI switch (events.ExecuteEvent()) { case EVENT_SPELL_LIGHTNING: - for (uint8 i = 0; i < DUNGEON_MODE(1, 2); ++i) - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) - me->CastSpell(target, SPELL_LIGHTNING_CLOUD, false); - events.RepeatEvent(urand(15000, 25000)); + Talk(SAY_SPELL); + DoCastRandomTarget(SPELL_LIGHTNING_CLOUD); + events.RepeatEvent(urand(12100, 14500)); break; case EVENT_SPELL_LUNG: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) - DoCast(target, SPELL_LUNG_BURST); - events.RepeatEvent(urand(7000, 12000)); + DoCastRandomTarget(SPELL_LUNG_BURST); + events.RepeatEvent(urand(21800, 25400)); break; case EVENT_SPELL_ENVELOPING: - for (uint8 i = 0; i < DUNGEON_MODE(1, 2); ++i) - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) - me->CastSpell(target, SPELL_ENVELOPING_WINDS, false); - events.RepeatEvent(urand(10000, 15000)); + DoCastRandomTarget(SPELL_ENVELOPING_WINDS); + events.RepeatEvent(urand(30000, 40000)); break; }