From 2ff095bc8f5ff15780b2a04ecd248be6c24d2c24 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 8 Jan 2026 13:24:50 -0300 Subject: [PATCH] fix(Scripts/Icecrown): Don't despawn Tirion's Gambit NPCs prematurely (#24337) --- .../rev_1767727435855791200.sql | 8 ++++++++ .../scripts/Northrend/zone_icecrown.cpp | 20 +++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1767727435855791200.sql diff --git a/data/sql/updates/pending_db_world/rev_1767727435855791200.sql b/data/sql/updates/pending_db_world/rev_1767727435855791200.sql new file mode 100644 index 000000000..7a0c1cd85 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1767727435855791200.sql @@ -0,0 +1,8 @@ +-- +UPDATE `creature_summon_groups` SET `summonType` = 6, `summonTime` = 60000 WHERE `summonerId` = 32239 AND `summonerType` = 0 AND `groupId` = 1; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 32312); +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`, `event_param6`, `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 +(32312, 0, 0, 0, 0, 0, 100, 0, 3000, 4000, 10000, 10000, 0, 0, 11, 58843, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - In Combat - Cast \'Plague Strike\''), +(32312, 0, 1, 0, 0, 0, 100, 0, 7000, 8000, 10000, 10000, 0, 0, 11, 59011, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - In Combat - Cast \'Icy Touch\''), +(32312, 0, 2, 0, 1, 0, 100, 512, 3600, 3600, 3600, 3600, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 32239, 20, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - Out of Combat - Set Data 1 1'); diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 06cbe9225..9afba1804 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -681,23 +681,28 @@ public: struct npc_tirions_gambit_tirionAI : npc_escortAI { - npc_tirions_gambit_tirionAI(Creature* creature) : npc_escortAI(creature), summons(me) + npc_tirions_gambit_tirionAI(Creature* creature) : npc_escortAI(creature), summons(me), _eventOver(false) { } EventMap events; SummonList summons; + bool _eventOver; void Reset() override { me->setActive(false); me->SetStandState(UNIT_STAND_STATE_STAND); + _eventOver = false; } void SetData(uint32 type, uint32 data) override { - if (type == 1 && data == 1) + if (type == 1 && data == 1 && !_eventOver) + { events.ScheduleEvent(EVENT_SCENE_0 + 30, 10s); + _eventOver = true; + } } void DoAction(int32 param) override @@ -747,7 +752,7 @@ public: switch (pointId) { case 6: - me->SummonCreature(NPC_INVOKER_BASALEPH, 6130.26f, 2764.83f, 573.92f, 5.19f, TEMPSUMMON_TIMED_DESPAWN, 10 * MINUTE * IN_MILLISECONDS); + me->SummonCreature(NPC_INVOKER_BASALEPH, 6130.26f, 2764.83f, 573.92f, 5.19f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); Talk(1); break; case 15: @@ -812,9 +817,9 @@ public: Talk(2); DoSummonAction(NPC_DISGUISED_CRUSADER, ACTION_SUMMON_ORIENTATION, 200); - me->SummonCreature(NPC_CHOSEN_ZEALOT, 6160.74f, 2695.90f, 573.92f, 2.04f, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS); - me->SummonCreature(NPC_CHOSEN_ZEALOT, 6164.98f, 2697.90f, 573.92f, 2.04f, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS); - me->SummonCreature(NPC_CHOSEN_ZEALOT, 6161.26f, 2700.05f, 573.92f, 2.04f, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS); + me->SummonCreature(NPC_CHOSEN_ZEALOT, 6160.74f, 2695.90f, 573.92f, 2.04f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); + me->SummonCreature(NPC_CHOSEN_ZEALOT, 6164.98f, 2697.90f, 573.92f, 2.04f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); + me->SummonCreature(NPC_CHOSEN_ZEALOT, 6161.26f, 2700.05f, 573.92f, 2.04f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); DoSummonAction(NPC_CHOSEN_ZEALOT, ACTION_SUMMON_MOVE_STRAIGHT, 27); events.ScheduleEvent(EVENT_SCENE_0, 30s); @@ -835,7 +840,7 @@ public: break; case EVENT_SCENE_0+3: Talk(3); - if (Creature* cr = me->SummonCreature(NPC_TIRION_LICH_KING, 6161.26f, 2700.05f, 573.92f, 2.04f, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS)) + if (Creature* cr = me->SummonCreature(NPC_TIRION_LICH_KING, 6161.26f, 2700.05f, 573.92f, 2.04f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000)) cr->GetMotionMaster()->MovePoint(2, 6131.93f, 2756.84f, 573.92f); events.ScheduleEvent(EVENT_SCENE_0 + 4, 4s); break; @@ -976,7 +981,6 @@ public: if (target) (*itr)->AI()->AttackStart(target); } - break; } case EVENT_SCENE_0+30: