diff --git a/sql/custom/world/2026_11_12_31_world_classic_vmangos_summon_despawn_types.sql b/sql/custom/world/2026_11_12_31_world_classic_vmangos_summon_despawn_types.sql new file mode 100644 index 0000000000..bbcbf5ba8a --- /dev/null +++ b/sql/custom/world/2026_11_12_31_world_classic_vmangos_summon_despawn_types.sql @@ -0,0 +1,247 @@ +-- Summon despawn types from the VMaNGOS script conversion (follow-up to One Shot. One Kill., 2026_11_12_30). +-- The converter that turned VMaNGOS scripts (EventAI, quest_start/quest_end/generic/creature_movement/gossip scripts) into +-- SmartAI summons (SMART_ACTION_SUMMON_CREATURE, 12) did not copy the despawn type (VMaNGOS dataint4). It wrote type 3 +-- (TEMPSUMMON_TIMED_DESPAWN: gone after the time even in the middle of a fight) when the script had a despawn time, and 8 (manual) +-- when it had none. VMaNGOS mostly uses type 1: the time only counts while the creature is out of combat. So escort ambushers, +-- quest event waves and called guards vanished mid-fight, and event bosses that must die to finish a quest could vanish first. +-- Each converted row names its VMaNGOS script (comment "VMaNGOS "). It was matched against the public VMaNGOS world +-- database (brotalnia/database world_full_14_june_2021) plus every vmangos/core world migration after it, by script id, summoned +-- creature and summon position, and the despawn time was checked to be the same on both sides. VMaNGOS and TrinityCore number +-- these types the same way (1 timed or dead, 2 timed or corpse, 4 timed out of combat, 5 corpse, 7 dead). +-- Changed: 214 rows. Each UPDATE only touches a row that still summons the same creature with the old converted type. +-- Not changed here: +-- * 93 rows that VMaNGOS summons with type 4 or 2 and no time, attacking the summoner's target (flight master Enraged +-- Gryphons and Wyverns, a few guards). With no attack on summon those types would despawn them at once; the converted rows +-- have no attack and the creatures despawn by their own SmartAI out of combat. Needs the attack carried over first. +-- * 35 rows of the Counterattack event (generic_scripts 402110), manual despawn in VMaNGOS, ended by its map event. +-- * 8 rows of One Shot. One Kill. (2026_11_12_30) and 5 rows with no VMaNGOS match. +-- Safe to run again. + +-- 201 rows: VMaNGOS despawn type 1 (TEMPSUMMON_TIMED_OR_DEAD_DESPAWN), converted as 3 +UPDATE `smart_scripts` SET `action_param2` = 1 WHERE `action_type` = 12 AND `action_param2` = 3 AND (`entryorguid`,`source_type`,`id`,`action_param1`) IN ( +(1719,0,1,5043), +(1719,0,2,5043), +(1719,0,3,5043), +(1719,0,4,5043), +(1719,0,5,5043), +(1719,0,6,5043), +(1719,0,7,5043), +(1772,0,1,1983), +(1773,0,0,1983), +(2226,0,0,9521), +(2226,0,1,9521), +(2305,0,2,7360), +(2305,0,3,7360), +(2389,0,0,9521), +(2389,0,1,9521), +(3274,0,2,3395), +(3275,0,2,3395), +(3397,0,1,3395), +(3838,0,0,9527), +(3838,0,1,9527), +(3841,0,0,9527), +(3841,0,1,9527), +(4267,0,0,9527), +(4267,0,1,9527), +(4319,0,0,9527), +(4319,0,1,9527), +(4407,0,0,9527), +(4407,0,1,9527), +(4551,0,0,9521), +(4551,0,1,9521), +(4829,0,0,6729), +(5917,0,0,583), +(6706,0,0,9527), +(6706,0,1,9527), +(6846,0,1,6866), +(6846,0,2,6866), +(6846,0,3,6866), +(6909,0,0,6911), +(6909,0,1,6911), +(6909,0,2,6911), +(6909,0,3,6911), +(6909,0,4,6911), +(6909,0,5,6911), +(7800,0,5,7915), +(7800,0,6,7915), +(7849,0,8,6233), +(7849,0,9,6233), +(8019,0,0,9527), +(8019,0,1,9527), +(8530,0,0,11064), +(8531,0,0,11064), +(8532,0,0,11064), +(10376,0,0,10375), +(10420,0,2,10424), +(10420,0,3,10424), +(10424,0,5,11043), +(10424,0,6,11043), +(10425,0,3,11043), +(10425,0,4,11043), +(10897,0,0,9527), +(10897,0,1,9527), +(11138,0,0,9527), +(11138,0,1,9527), +(11489,0,0,14566), +(12577,0,0,9527), +(12577,0,1,9527), +(12578,0,0,9527), +(12578,0,1,9527), +(12636,0,0,9521), +(12636,0,1,9521), +(15177,0,0,9527), +(15177,0,1,9527), +(16044,0,0,16080), +(16044,0,2,16080), +(16045,0,0,16097), +(16045,0,2,16097), +(16046,0,0,16102), +(16046,0,1,16101), +(16046,0,3,16102), +(16046,0,4,16101), +(16047,0,0,16118), +(16047,0,2,16118), +(16048,0,0,16042), +(16048,0,2,16042), +(950000010,9,0,1433), +(950000015,9,2,5666), +(950000020,9,3,2060), +(950000024,9,4,2275), +(950000042,9,2,6013), +(950000042,9,3,6013), +(950000054,9,2,2919), +(950000057,9,1,3289), +(950000072,9,9,3569), +(950000072,9,10,3569), +(950000072,9,11,3569), +(950000075,9,3,3582), +(950000079,9,0,3843), +(950000080,9,5,4509), +(950000096,9,2,4068), +(950000123,9,2,5088), +(950000177,9,2,7364), +(950000177,9,6,7365), +(950000177,9,7,7365), +(950000177,9,8,7365), +(950000177,9,9,7365), +(950000177,9,11,7401), +(950000177,9,12,7401), +(950000177,9,13,7401), +(950000177,9,14,7401), +(950000177,9,15,7401), +(950000177,9,16,7401), +(950000177,9,17,7401), +(950000177,9,18,7401), +(950000177,9,19,7401), +(950000177,9,21,7409), +(950000182,9,0,7750), +(950000199,9,20,12205), +(950000199,9,21,12204), +(950000199,9,22,12204), +(950000199,9,23,12204), +(950000202,9,1,8480), +(950000214,9,1,8891), +(950000214,9,2,8891), +(950000214,9,3,8890), +(950000214,9,4,8912), +(950000214,9,5,8891), +(950000214,9,6,8891), +(950000214,9,7,8890), +(950000214,9,8,8912), +(950000226,9,0,10581), +(950000228,9,4,10720), +(950000228,9,5,10720), +(950000228,9,6,10720), +(950000262,9,0,14364), +(950000262,9,1,14364), +(950000262,9,2,14364), +(950000262,9,3,14364), +(950000262,9,4,14364), +(950000262,9,5,14364), +(950000262,9,6,14364), +(950000262,9,7,14364), +(950000271,9,0,14435), +(950000273,9,9,15080), +(950000273,9,10,15080), +(950000273,9,11,15080), +(950000273,9,12,15080), +(950000273,9,16,15069), +(950000273,9,23,15073), +(950000283,9,2,16093), +(950000283,9,3,16093), +(950000283,9,4,16093), +(950000284,9,2,16093), +(950000284,9,3,16093), +(950000284,9,4,16093), +(950000350,9,0,7750), +(950000392,9,0,9461), +(950000452,9,0,14435), +(950000917,9,1,775), +(950000917,9,2,775), +(950000964,9,2,4059), +(950000964,9,3,4059), +(950000964,9,4,4059), +(950000964,9,5,4059), +(950000964,9,6,4059), +(950000964,9,7,4059), +(950000964,9,8,4059), +(950001100,9,1,8338), +(950001107,9,1,1755), +(950001184,9,0,4627), +(950001184,9,1,4627), +(950001184,9,2,4627), +(950001184,9,3,4627), +(950001319,9,3,12128), +(950001319,9,4,12128), +(950001319,9,5,1840), +(950001319,9,16,12128), +(950001319,9,17,12128), +(950001319,9,18,12128), +(950001345,9,0,5895), +(950001349,9,1,7803), +(950001349,9,2,7803), +(950001349,9,3,7803), +(950001350,9,1,7805), +(950001350,9,2,7805), +(950001350,9,3,5617), +(950001351,9,1,7808), +(950001351,9,2,7808), +(950001351,9,3,7808), +(950001352,9,1,7809), +(950001352,9,2,7809), +(950001352,9,3,7809), +(950001353,9,1,7848), +(950001353,9,2,7848), +(950001353,9,3,7848), +(950001354,9,1,5260), +(950001354,9,2,5260), +(950001354,9,3,5260), +(950001355,9,1,5255), +(950001355,9,2,5253), +(950001355,9,3,5254), +(950001355,9,4,5258)); + +-- 5 rows: VMaNGOS despawn type 2 (TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN), converted as 3 +UPDATE `smart_scripts` SET `action_param2` = 2 WHERE `action_type` = 12 AND `action_param2` = 3 AND (`entryorguid`,`source_type`,`id`,`action_param1`) IN ( +(11289,0,0,11288), +(11289,0,1,11288), +(11289,0,2,11288), +(950000126,9,3,5723), +(950001157,9,5,12126)); + +-- 3 rows: VMaNGOS despawn type 4 (TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT), converted as 3 +UPDATE `smart_scripts` SET `action_param2` = 4 WHERE `action_type` = 12 AND `action_param2` = 3 AND (`entryorguid`,`source_type`,`id`,`action_param1`) IN ( +(950001315,9,0,604), +(950001315,9,1,604), +(950001315,9,2,604)); + +-- 1 rows: VMaNGOS despawn type 5 (TEMPSUMMON_CORPSE_DESPAWN), converted as 8 +UPDATE `smart_scripts` SET `action_param2` = 5 WHERE `action_type` = 12 AND `action_param2` = 8 AND (`entryorguid`,`source_type`,`id`,`action_param1`) IN ( +(950001233,9,1,5736)); + +-- 4 rows: VMaNGOS despawn type 7 (TEMPSUMMON_DEAD_DESPAWN), converted as 8 +UPDATE `smart_scripts` SET `action_param2` = 7 WHERE `action_type` = 12 AND `action_param2` = 8 AND (`entryorguid`,`source_type`,`id`,`action_param1`) IN ( +(4543,0,0,14693), +(950000254,9,0,12339), +(950000708,9,0,583), +(950000709,9,0,583));