From c3948567e2a559e541f5adb32638b56c2fae3dd0 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 23 Apr 2023 09:06:08 -0300 Subject: [PATCH] fix(Scripts/ShatteredHalls): Update Grand Warlock Netherkurse (#16063) init --- .../rev_1682223226213485600.sql | 28 +++++++ .../ShatteredHalls/boss_nethekurse.cpp | 83 ++++++++----------- 2 files changed, 61 insertions(+), 50 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1682223226213485600.sql diff --git a/data/sql/updates/pending_db_world/rev_1682223226213485600.sql b/data/sql/updates/pending_db_world/rev_1682223226213485600.sql new file mode 100644 index 000000000..bbb08bfba --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1682223226213485600.sql @@ -0,0 +1,28 @@ +DELETE FROM `creature_text` WHERE `CreatureID` = 17083; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +-- Shadow Sear +(17083, 0, 0, 'It hurt!', 14, 0, 100, 18, 0, 0, 14136, 0, 'Fel Orc Convert - Hit by Shadow Sear'), +(17083, 0, 1, 'Augh! No more hurt!', 14, 0, 100, 18, 0, 0, 14137, 0, 'Fel Orc Convert - Hit by Shadow Sear'), +(17083, 0, 2, 'This not good tickle!', 14, 0, 100, 18, 0, 0, 14138, 0, 'Fel Orc Convert - Hit by Shadow Sear'), +(17083, 0, 3, 'Skin on fire!', 14, 0, 100, 18, 0, 0, 14139, 0, 'Fel Orc Convert - Hit by Shadow Sear'), +-- Death Coil +(17083, 1, 0, 'It hurt!', 14, 1, 100, 18, 0, 0, 14140, 0, 'Fel Orc Convert - Hit by Death Coil'), +(17083, 1, 1, 'Aahhh!', 14, 1, 100, 18, 0, 0, 14141, 0, 'Fel Orc Convert - Hit by Death Coil'), +(17083, 1, 2, 'No more scary!', 14, 1, 100, 18, 0, 0, 14142, 0, 'Fel Orc Convert - Hit by Death Coil'), +(17083, 1, 3, 'Mommy!', 14, 1, 100, 18, 0, 0, 14143, 0, 'Fel Orc Convert - Hit by Death Coil'), +(17083, 1, 4, 'No more!', 14, 1, 100, 18, 0, 0, 14144, 0, 'Fel Orc Convert - Hit by Death Coil'), +-- Consumption / Shadow Fissure +(17083, 2, 0, 'Pain!', 14, 1, 100, 18, 0, 1343, 14149, 0, 'Fel Orc Convert - Hit by Shadow Fissure'), +(17083, 2, 1, 'It hurts!', 14, 1, 100, 18, 0, 1343, 14150, 0, 'Fel Orc Convert - Hit by Shadow Fissure'), +(17083, 2, 2, 'Graaagggh!!', 14, 1, 100, 18, 0, 1343, 14151, 0, 'Fel Orc Convert - Hit by Shadow Fissure'), +(17083, 2, 3, 'No more!!', 14, 1, 100, 18, 0, 1343, 14152, 0, 'Fel Orc Convert - Hit by Shadow Fissure'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 17083 AND `id` IN (6, 7, 8)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(17083, 0, 6, 0, 8, 0, 25, 0, 30735, 0, 21000, 21000, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fel Orc Convert - On Hit by \'Shadow Sear\' - Say Line 0'), +(17083, 0, 7, 0, 8, 0, 25, 0, 30741, 0, 20000, 20000, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fel Orc Convert - On Hit by \'Death Coil\' - Say Line 1'), +(17083, 0, 8, 0, 8, 0, 25, 0, 32251, 0, 20000, 20000, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fel Orc Convert - On Hit by \'Consumption\' - Say Line 2'); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 3) AND (`SourceEntry` = 30741); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 3, 30741, 0, 0, 31, 0, 3, 17083, 0, 0, 0, 0, '', 'Death Coil (30741) can only target Fel Orc Convert (17083)'); diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp index 8284319a0..f41f81900 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -22,37 +22,40 @@ enum eGrandWarlockNethekurse { - SAY_INTRO = 0, - SAY_PEON_ATTACKED = 1, - SAY_PEON_DIES = 2, - SAY_TAUNT = 3, - SAY_AGGRO = 4, - SAY_SLAY = 5, - SAY_DIE = 6, + SAY_INTRO = 0, + SAY_PEON_ATTACKED = 1, + SAY_PEON_DIES = 2, + SAY_TAUNT = 3, + SAY_AGGRO = 4, + SAY_SLAY = 5, + SAY_DIE = 6, - SPELL_DEATH_COIL_N = 30741, - SPELL_DEATH_COIL_H = 30500, - SPELL_DARK_SPIN = 30502, - SPELL_SHADOW_FISSURE = 30496, - SPELL_SHADOW_CLEAVE_N = 30495, - SPELL_SHADOW_SLAM_H = 35953, - SPELL_SHADOW_SEAR = 30735, + SPELL_DEATH_COIL_N = 30500, + SPELL_DEATH_COIL_H = 35954, + SPELL_DARK_SPIN = 30502, + SPELL_SHADOW_FISSURE = 30496, + SPELL_SHADOW_CLEAVE_N = 30495, + SPELL_SHADOW_SLAM_H = 35953, - SETDATA_DATA = 1, - SETDATA_PEON_AGGRO = 1, - SETDATA_PEON_DEATH = 2, + // Spells used exclusively in RP + SPELL_SHADOW_SEAR = 30735, + SPELL_DEATH_COIL = 30741, - EVENT_STAGE_NONE = 0, - EVENT_STAGE_INTRO = 1, - EVENT_STAGE_TAUNT = 2, - EVENT_STAGE_MAIN = 3, + EVENT_INTRO = 1, + EVENT_SPELL_DEATH_COIL = 2, + EVENT_SPELL_SHADOW_FISSURE = 3, + EVENT_SPELL_CLEAVE = 4, + EVENT_CHECK_HEALTH = 5, + EVENT_START_ATTACK = 6, - EVENT_INTRO = 1, - EVENT_SPELL_DEATH_COIL = 2, - EVENT_SPELL_SHADOW_FISSURE = 3, - EVENT_SPELL_CLEAVE = 4, - EVENT_CHECK_HEALTH = 5, - EVENT_START_ATTACK = 6 + EVENT_STAGE_NONE = 0, + EVENT_STAGE_INTRO = 1, + EVENT_STAGE_TAUNT = 2, + EVENT_STAGE_MAIN = 3, + + SETDATA_DATA = 1, + SETDATA_PEON_AGGRO = 1, + SETDATA_PEON_DEATH = 2 }; // ######################################################## @@ -71,23 +74,11 @@ public: EventMap events2; void Reset() override { - me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); EventStage = EVENT_STAGE_NONE; - PeonEngagedCount = 0; - PeonKilledCount = 0; _Reset(); - SummonMinions(); events2.Reset(); } - void SummonMinions() - { - me->SummonCreature(NPC_FEL_ORC_CONVERT, 172.556f, 258.227f, -13.191f, 1.41189f); - me->SummonCreature(NPC_FEL_ORC_CONVERT, 165.181f, 261.511f, -13.1926f, 0.942743f); - me->SummonCreature(NPC_FEL_ORC_CONVERT, 182.482f, 258.635f, -13.1788f, 1.70929f); - me->SummonCreature(NPC_FEL_ORC_CONVERT, 189.616f, 259.866f, -13.1966f, 1.95748f); - } - void JustDied(Unit* /*killer*/) override { Talk(SAY_DIE); @@ -132,13 +123,6 @@ public: } } - void JustSummoned(Creature* summon) override - { - summons.Summon(summon); - summon->SetReactState(REACT_DEFENSIVE); - summon->SetRegeneratingHealth(false); - } - void MoveInLineOfSight(Unit* who) override { if (me->IsWithinDistInMap(who, 30.0f)) @@ -194,7 +178,6 @@ public: { Talk(SAY_AGGRO); EventStage = EVENT_STAGE_MAIN; - me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); if (Unit* target = me->SelectNearestPlayer(50.0f)) AttackStart(target); @@ -246,9 +229,9 @@ public: } private: - uint32 PeonEngagedCount; - uint32 PeonKilledCount; - uint32 EventStage; + uint8 PeonEngagedCount = 0; + uint8 PeonKilledCount = 0; + uint8 EventStage; }; CreatureAI* GetAI(Creature* creature) const override