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
This commit is contained in:
Gultask
2023-03-29 00:28:15 -03:00
committed by GitHub
parent 03495b7737
commit d87a9dc58f
2 changed files with 16 additions and 15 deletions

View File

@@ -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');

View File

@@ -21,10 +21,11 @@
enum HydromancerThespia enum HydromancerThespia
{ {
SAY_SUMMON = 0, SAY_SUMMON = 0, // Unused or Unknown Use
SAY_AGGRO = 1, SAY_AGGRO = 1,
SAY_SLAY = 2, SAY_SLAY = 2,
SAY_DEAD = 3, SAY_DEAD = 3,
SAY_SPELL = 4,
SPELL_LIGHTNING_CLOUD = 25033, SPELL_LIGHTNING_CLOUD = 25033,
SPELL_LUNG_BURST = 31481, SPELL_LUNG_BURST = 31481,
@@ -55,9 +56,9 @@ struct boss_hydromancer_thespia : public BossAI
{ {
Talk(SAY_AGGRO); Talk(SAY_AGGRO);
_JustEngagedWith(); _JustEngagedWith();
events.ScheduleEvent(EVENT_SPELL_LIGHTNING, 15000); events.ScheduleEvent(EVENT_SPELL_LIGHTNING, 9800);
events.ScheduleEvent(EVENT_SPELL_LUNG, 7000); events.ScheduleEvent(EVENT_SPELL_LUNG, 13300);
events.ScheduleEvent(EVENT_SPELL_ENVELOPING, 9000); events.ScheduleEvent(EVENT_SPELL_ENVELOPING, 14500);
} }
void UpdateAI(uint32 diff) override void UpdateAI(uint32 diff) override
@@ -69,21 +70,17 @@ struct boss_hydromancer_thespia : public BossAI
switch (events.ExecuteEvent()) switch (events.ExecuteEvent())
{ {
case EVENT_SPELL_LIGHTNING: case EVENT_SPELL_LIGHTNING:
for (uint8 i = 0; i < DUNGEON_MODE(1, 2); ++i) Talk(SAY_SPELL);
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) DoCastRandomTarget(SPELL_LIGHTNING_CLOUD);
me->CastSpell(target, SPELL_LIGHTNING_CLOUD, false); events.RepeatEvent(urand(12100, 14500));
events.RepeatEvent(urand(15000, 25000));
break; break;
case EVENT_SPELL_LUNG: case EVENT_SPELL_LUNG:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) DoCastRandomTarget(SPELL_LUNG_BURST);
DoCast(target, SPELL_LUNG_BURST); events.RepeatEvent(urand(21800, 25400));
events.RepeatEvent(urand(7000, 12000));
break; break;
case EVENT_SPELL_ENVELOPING: case EVENT_SPELL_ENVELOPING:
for (uint8 i = 0; i < DUNGEON_MODE(1, 2); ++i) DoCastRandomTarget(SPELL_ENVELOPING_WINDS);
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) events.RepeatEvent(urand(30000, 40000));
me->CastSpell(target, SPELL_ENVELOPING_WINDS, false);
events.RepeatEvent(urand(10000, 15000));
break; break;
} }