fix(DB/SAI): migrate 'Deadliest Trap' quest to manual-spawn groups (#25554)
Co-authored-by: r00ty-tc <r00ty-tc@users.noreply.github.com>
This commit is contained in:
parent
f5d4185112
commit
f9833c0dd4
2 changed files with 58 additions and 0 deletions
|
|
@ -0,0 +1,56 @@
|
|||
--
|
||||
-- Fix quest "The Deadliest Trap Ever Laid" (11097 Scryer / 11101 Aldor):
|
||||
-- the AC-specific SCRIPTED_SPAWN (state=0 on AI_INIT -> despawn self)
|
||||
-- pattern loops forever under the ported dynamic spawn system because
|
||||
-- each respawn creates a new creature whose AI_INIT fires the despawn
|
||||
-- again. Migrate to MANUAL_SPAWN spawn groups and SPAWN_SPAWNGROUP /
|
||||
-- DESPAWN_SPAWNGROUP, which is what the spawn system port was built for.
|
||||
--
|
||||
|
||||
-- Four manual-spawn groups: two per quest (defenders, skybreakers)
|
||||
DELETE FROM `spawn_group_template` WHERE `groupId` IN (100, 101, 102, 103);
|
||||
INSERT INTO `spawn_group_template` (`groupId`, `groupName`, `groupFlags`) VALUES
|
||||
(100, 'Sanctum of the Stars - Defenders', 0x04),
|
||||
(101, 'Sanctum of the Stars - Skybreakers', 0x04),
|
||||
(102, 'Altar of Sha''tar - Defenders', 0x04),
|
||||
(103, 'Altar of Sha''tar - Skybreakers', 0x04);
|
||||
|
||||
-- Assign existing creature spawns to their groups
|
||||
DELETE FROM `spawn_group` WHERE `groupId` = 100;
|
||||
INSERT INTO `spawn_group` (`groupId`, `spawnType`, `spawnId`) SELECT 100, 0, `guid` FROM `creature` WHERE `id1` = 23435;
|
||||
DELETE FROM `spawn_group` WHERE `groupId` = 101;
|
||||
INSERT INTO `spawn_group` (`groupId`, `spawnType`, `spawnId`) SELECT 101, 0, `guid` FROM `creature` WHERE `id1` = 23440;
|
||||
DELETE FROM `spawn_group` WHERE `groupId` = 102;
|
||||
INSERT INTO `spawn_group` (`groupId`, `spawnType`, `spawnId`) SELECT 102, 0, `guid` FROM `creature` WHERE `id1` = 23453;
|
||||
DELETE FROM `spawn_group` WHERE `groupId` = 103;
|
||||
INSERT INTO `spawn_group` (`groupId`, `spawnType`, `spawnId`) SELECT 103, 0, `guid` FROM `creature` WHERE `id1` = 23441;
|
||||
|
||||
-- Skybreakers respawn mid-event (wave mechanic)
|
||||
UPDATE `creature` SET `spawntimesecs` = 5 WHERE `id1` IN (23440, 23441);
|
||||
|
||||
-- Drop the creatures' AI_INIT self-despawn events (dormancy now handled by MANUAL_SPAWN)
|
||||
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `event_type` = 37 AND `action_type` = 226 AND `entryorguid` IN (23435, 23440, 23441, 23453);
|
||||
|
||||
-- Commander Hobb: On Just Died cleanup -> DESPAWN_SPAWNGROUP
|
||||
UPDATE `smart_scripts` SET `action_type` = 132, `action_param1` = 100, `action_param2` = 0, `action_param3` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Hobb - On Just Died - Despawn Defenders Group' WHERE `entryorguid` = 23434 AND `source_type` = 0 AND `id` = 7;
|
||||
UPDATE `smart_scripts` SET `action_type` = 132, `action_param1` = 101, `action_param2` = 0, `action_param3` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Hobb - On Just Died - Despawn Skybreakers Group' WHERE `entryorguid` = 23434 AND `source_type` = 0 AND `id` = 8;
|
||||
|
||||
-- Commander Arcus (Aldor): same cleanup
|
||||
UPDATE `smart_scripts` SET `action_type` = 132, `action_param1` = 102, `action_param2` = 0, `action_param3` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Arcus - On Just Died - Despawn Defenders Group' WHERE `entryorguid` = 23452 AND `source_type` = 0 AND `id` = 7;
|
||||
UPDATE `smart_scripts` SET `action_type` = 132, `action_param1` = 103, `action_param2` = 0, `action_param3` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Arcus - On Just Died - Despawn Skybreakers Group' WHERE `entryorguid` = 23452 AND `source_type` = 0 AND `id` = 8;
|
||||
|
||||
-- Hobb start actionlist: SPAWN_SPAWNGROUP
|
||||
UPDATE `smart_scripts` SET `action_type` = 131, `action_param1` = 100, `action_param2` = 0, `action_param3` = 0, `action_param4` = 0, `action_param5` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Hobb - Actionlist - Spawn Sanctum Defenders Group' WHERE `entryorguid` = 2343400 AND `source_type` = 9 AND `id` = 3;
|
||||
UPDATE `smart_scripts` SET `action_type` = 131, `action_param1` = 101, `action_param2` = 0, `action_param3` = 0, `action_param4` = 0, `action_param5` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Hobb - Actionlist - Spawn Dragonmaw Skybreakers Group' WHERE `entryorguid` = 2343400 AND `source_type` = 9 AND `id` = 10;
|
||||
|
||||
-- Hobb complete actionlist: DESPAWN_SPAWNGROUP
|
||||
UPDATE `smart_scripts` SET `action_type` = 132, `action_param1` = 100, `action_param2` = 0, `action_param3` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Hobb - Actionlist - Despawn Defenders Group' WHERE `entryorguid` = 2343402 AND `source_type` = 9 AND `id` = 0;
|
||||
UPDATE `smart_scripts` SET `action_type` = 132, `action_param1` = 101, `action_param2` = 0, `action_param3` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Hobb - Actionlist - Despawn Skybreakers Group' WHERE `entryorguid` = 2343402 AND `source_type` = 9 AND `id` = 1;
|
||||
|
||||
-- Arcus start actionlist
|
||||
UPDATE `smart_scripts` SET `action_type` = 131, `action_param1` = 102, `action_param2` = 0, `action_param3` = 0, `action_param4` = 0, `action_param5` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Arcus - Actionlist - Spawn Altar Defenders Group' WHERE `entryorguid` = 2345200 AND `source_type` = 9 AND `id` = 5;
|
||||
UPDATE `smart_scripts` SET `action_type` = 131, `action_param1` = 103, `action_param2` = 0, `action_param3` = 0, `action_param4` = 0, `action_param5` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Arcus - Actionlist - Spawn Dragonmaw Skybreakers Group' WHERE `entryorguid` = 2345200 AND `source_type` = 9 AND `id` = 9;
|
||||
|
||||
-- Arcus complete actionlist
|
||||
UPDATE `smart_scripts` SET `action_type` = 132, `action_param1` = 102, `action_param2` = 0, `action_param3` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Arcus - Actionlist - Despawn Defenders Group' WHERE `entryorguid` = 2345202 AND `source_type` = 9 AND `id` = 0;
|
||||
UPDATE `smart_scripts` SET `action_type` = 132, `action_param1` = 103, `action_param2` = 0, `action_param3` = 0, `target_type` = 1, `target_param1` = 0, `target_param3` = 0, `comment` = 'Commander Arcus - Actionlist - Despawn Skybreakers Group' WHERE `entryorguid` = 2345202 AND `source_type` = 9 AND `id` = 1;
|
||||
|
|
@ -2054,6 +2054,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
|||
case SMART_ACTION_WORLD_SCRIPT:
|
||||
case SMART_ACTION_SET_GOSSIP_MENU:
|
||||
case SMART_ACTION_SUMMON_GAMEOBJECT_GROUP:
|
||||
case SMART_ACTION_SPAWN_SPAWNGROUP:
|
||||
case SMART_ACTION_DESPAWN_SPAWNGROUP:
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("sql.sql", "SmartAIMgr: Not handled action_type({}), event_type({}), Entry {} SourceType {} Event {}, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue