From 38a33e7ef00ac93c6c4e8ee80db83c8685e1334c Mon Sep 17 00:00:00 2001 From: IntelligentQuantum Date: Tue, 15 Feb 2022 20:32:39 +0330 Subject: [PATCH] feat(Core/SmartScripts): Warn when an unused parameter is set in the database (#10124) --- .../rev_1641967537263276315.sql | 1048 +++++++++++++++++ .../game/AI/SmartScripts/SmartScript.cpp | 35 +- .../game/AI/SmartScripts/SmartScriptMgr.cpp | 459 +++++++- .../game/AI/SmartScripts/SmartScriptMgr.h | 92 +- 4 files changed, 1538 insertions(+), 96 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1641967537263276315.sql diff --git a/data/sql/updates/pending_db_world/rev_1641967537263276315.sql b/data/sql/updates/pending_db_world/rev_1641967537263276315.sql new file mode 100644 index 000000000..ce60403ae --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1641967537263276315.sql @@ -0,0 +1,1048 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1641967537263276315'); + +-- Fix DB Errors +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=18842200 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `action_param5`=0 WHERE `entryorguid` IN(17635300, 17635100, 17635000, 17634900, 17634600) AND `source_type`=9 AND `id`=2; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=3849300 AND `source_type`=9 AND `id`IN(6,5,4,3,2,1); +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=3784600 AND `source_type`=9 AND `id` IN(7,6,3,2); +UPDATE `smart_scripts` SET `action_param5`=0 WHERE `entryorguid`=3122200 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `action_param5`=0 WHERE `entryorguid`=3113506 AND `source_type`=9 AND `id` IN(4,3,0); +UPDATE `smart_scripts` SET `action_param5`=0 WHERE `entryorguid`=3122200 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=2972400 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=2816101 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=2719901 AND `source_type`=9 AND `id`=7; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=2483500 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=2471100 AND `source_type`=9 AND `id` IN(6,5,4,3,2,1,0) ; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=2361600 AND `source_type`=9 AND `id`=0; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=2361600 AND `source_type`=9 AND `id`=0; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=2297900 AND `source_type`=9 AND `id`=3; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=2245802 AND `source_type`=9 AND `id` IN(21,17,16,15,14,12,11,10,5,4,3,2); +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=2245801 AND `source_type`=9 AND `id` IN(7,6,5,4); +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=2245800 AND `source_type`=9 AND `id` IN(3,2,1,0); +UPDATE `smart_scripts` SET `action_param6`=0 WHERE `entryorguid`=2297900 AND `source_type`=9 AND `id`=6; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=2163300 AND `source_type`=9 AND `id` IN(3,2); +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=1967105 AND `source_type`=9 AND `id`=5; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=1641500 AND `source_type`=9 AND `id`=0; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=1640700 AND `source_type`=9 AND `id`=0; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=1235200 AND `source_type`=9 AND `id`=4; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=1233900 AND `source_type`=9 AND `id` IN(14,13,12,11,10,9,8,7,6,5,4,3); +UPDATE `smart_scripts` SET `action_param6`=0 WHERE `entryorguid`=1233900 AND `source_type`=9 AND `id` IN(2,1); +UPDATE `smart_scripts` SET `action_param5`=0 WHERE `entryorguid`=17635200 AND `source_type`=9 AND `id`=2; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=2471000 AND `source_type`=9 AND `id` IN(5,6,4,3,2,1); +UPDATE `smart_scripts` SET `action_param6`=0 WHERE `entryorguid`=2242200 AND `source_type`=9 AND `id`=6; +UPDATE `smart_scripts` SET `action_param6`=0 WHERE `entryorguid`=785300 AND `source_type`=9 AND `id`=0; +UPDATE `smart_scripts` SET `action_param6`=0 WHERE `entryorguid`=779000 AND `source_type`=9 AND `id`=2; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=496200 AND `source_type`=9 AND `id`=8; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=450701 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=369201 AND `source_type`=9 AND `id`=2; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=338900 AND `source_type`=9 AND `id`=27; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=338900 AND `source_type`=9 AND `id`=27; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=338900 AND `source_type`=9 AND `id`=26; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=338900 AND `source_type`=9 AND `id`=26; +UPDATE `smart_scripts` SET `action_param6`=0 WHERE `entryorguid`=412 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=412 AND `source_type`=0 AND `id` IN(6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31,34,35,36,37,38,39,40,41,42,43); +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=12277 AND `source_type`=0 AND `id` IN(1,4,5,6,8,12); +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=12277 AND `source_type`=0 AND `id` IN(1,5,6,8); +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id` IN(13,14,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61); +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id` IN(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18); +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=29261 AND `source_type`=0 AND `id` IN(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=30313 AND `source_type`=0 AND `id` IN(35,37,39,41); +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=30313 AND `source_type`=0 AND `id` IN(35,37,39,41); +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33686 AND `source_type`=0 AND `id` IN(4,5,6,7,8,9); +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id` IN(2,3,4,5,6,7); +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id` IN(2,3,4,5,6,7); +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-200011 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-200011 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=-142408 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=-142407 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-137508 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-137507 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-136526 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-136525 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-136271 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-136271 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-136271 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-129391 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-129391 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-129390 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-129390 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=-105872 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=-105871 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=-105870 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=-105869 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=-102341 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=-102333 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=-102330 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=-102329 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=-102328 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=-102327 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=-102326 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=-76742 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=-75734 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=-75106 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=-75105 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=-75104 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=-74082 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=-74081 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-61966 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-61966 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-61966 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-12173 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-12168 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-12166 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-12164 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-7376 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-7376 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-7375 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-7375 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-7374 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-7374 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-7373 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-7373 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-7372 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-7372 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-6527 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-6527 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-6526 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-6526 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-6525 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-6525 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-6524 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-6524 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-6523 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-6523 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-3348 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-3348 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-3347 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-3347 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-3346 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-3346 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-3345 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=-3345 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=95 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=95 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=253 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=499 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=639 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=671 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=677 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=677 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=694 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=699 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=888 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=1001 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1057 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1057 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=1203 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=1204 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1243 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1243 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1243 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1243 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1373 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1373 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1373 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1373 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=1373 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=1373 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `target_param4`=0 WHERE `entryorguid`=1373 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=1436 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1449 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1449 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1449 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1449 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1449 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1449 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1449 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1449 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1449 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1449 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1511 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1514 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1516 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1729 AND `source_type`=1 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1729 AND `source_type`=1 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1730 AND `source_type`=1 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1891 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1891 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1894 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1894 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=1895 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=1895 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2060 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2060 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2060 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2060 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2061 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2061 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2061 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2061 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2062 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2062 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2062 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2062 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2063 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2063 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2063 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2063 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2064 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2064 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2064 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2064 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2065 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2065 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2065 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2065 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2066 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2066 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2066 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2066 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2067 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2067 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2067 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2067 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2068 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2068 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2068 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2068 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2080 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2284 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2284 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=2569 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2610 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=16; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=16; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=18; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=18; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=19; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=19; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=21; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=2713 AND `source_type`=0 AND `id`=21; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=2921 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3448 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3448 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3448 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3528 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3528 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3530 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3530 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3532 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3532 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3568 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3568 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3568 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3568 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3568 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3568 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=3568 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3568 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3568 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=3568 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3584 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3616 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3616 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=16; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=16; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=20; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=20; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=22; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=22; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=25; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=25; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=28; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=33; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=33; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3678 AND `source_type`=0 AND `id`=34; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=3821 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3849 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3850 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3937 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3937 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=3937 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=3937 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=3939 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=3939 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=3984 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4049 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=4484 AND `source_type`=0 AND `id`=18; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4498 AND `source_type`=2 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4498 AND `source_type`=2 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4498 AND `source_type`=2 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4498 AND `source_type`=2 AND `id`=4; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=4849 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4944 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=4944 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=4962 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=4969 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=5237 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=5237 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=5237 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=5346 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=5450 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=5650 AND `source_type`=2 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=5808 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6251 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6251 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6251 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=6251 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=6251 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=6251 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6251 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=6251 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6251 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=6251 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=6266 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6497 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6497 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=6669 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=7079 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=7157 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=7157 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=7787 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=7788 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=7789 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=7790 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=7853 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=7998 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=7998 AND `source_type`=0 AND `id`=25; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=7998 AND `source_type`=0 AND `id`=36; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=7998 AND `source_type`=0 AND `id`=70; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=8380 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=8380 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=8479 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=8479 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=8479 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=8479 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=8668 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=8876 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=8877 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=8996 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=8996 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=9117 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=9456 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=9456 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=9456 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=9598 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=10610 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=10610 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=10610 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=10610 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=10611 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=10803 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=10804 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=10805 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=10812 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=10937 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=11443 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=11492 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=11501 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=11832 AND `source_type`=0 AND `id`=32; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=11832 AND `source_type`=0 AND `id`=35; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=11832 AND `source_type`=0 AND `id`=36; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=11832 AND `source_type`=0 AND `id`=44; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=11878 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=11937 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=11937 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=12277 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=12277 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=12277 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=12277 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=12277 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=12298 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=12298 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=12298 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=45; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=46; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=47; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=48; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=49; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=50; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=51; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=53; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=54; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=55; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=56; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=57; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=58; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=59; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12339 AND `source_type`=0 AND `id`=60; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=12818 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=12818 AND `source_type`=0 AND `id`=17; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=12922 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=12922 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=12922 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=12922 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param6`=0 WHERE `entryorguid`=14241 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=14241 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=14241 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=14241 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=14324 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=14392 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14454 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14454 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14454 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14454 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14457 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14457 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14457 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14457 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14461 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14461 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14461 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14461 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14464 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14464 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14464 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=14464 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=14688 AND `source_type`=0 AND `id`=17; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=14721 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=14884 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=14909 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=14909 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=14909 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=14909 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=15402 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=15491 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=15491 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=15656 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=15941 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=15941 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=15941 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=15945 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=15945 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=15945 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=16046 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=16046 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=16067 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=16067 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=16067 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=16067 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=16287 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=16916 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=16916 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=16916 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=16916 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=16964 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17214 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17215 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17243 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17243 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17243 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17311 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17379 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17391 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17392 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17410 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17478 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17478 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=17478 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=17478 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17508 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17587 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17587 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=17587 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=17587 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=16; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=16; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=17; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=17; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=20; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=20; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=21; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=21; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17678 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17715 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17715 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17715 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17715 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17810 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17810 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=17853 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17918 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `action_param6`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=34; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=61; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=61; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=61; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=61; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=62; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=62; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=62; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=62; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=66; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17982 AND `source_type`=0 AND `id`=66; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=18554 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=18554 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=18554 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=18554 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18697 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18697 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18870 AND `source_type`=0 AND `id`=28; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18870 AND `source_type`=0 AND `id`=52; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=16; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=16; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=17; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=17; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=18; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=18; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=19; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=19; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=20; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=20; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=21; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=21; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=22; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=22; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=23; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=23; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=24; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=18903 AND `source_type`=0 AND `id`=24; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=18945 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=18945 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=18948 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=18950 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=18965 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=18970 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=18972 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=18986 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=19455 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=19692 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19776 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=19776 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=19881 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=16; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=19937 AND `source_type`=0 AND `id`=17; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=19963 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20058 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20058 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20058 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20058 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20058 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20218 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20236 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20438 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=20438 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20438 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20438 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20438 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20438 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20438 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20763 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20763 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20763 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=20763 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20763 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=20763 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20763 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=20763 AND `source_type`=0 AND `id`=13; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=20763 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=20845 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=20845 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=21309 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=21309 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=21322 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=21322 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=21322 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=21322 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=21409 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=21512 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=21657 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=21846 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=21846 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=21859 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=21859 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=21926 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=21926 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=21926 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=21926 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=22113 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=22113 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=22254 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=22363 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=22363 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=22441 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=22460 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=22460 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=22460 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=22460 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=22912 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=23030 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=23037 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=23219 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=23219 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=23219 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=23219 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=23219 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=23222 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=23222 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=23330 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=23486 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=23486 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=23487 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=23671 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=23995 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=24016 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=24108 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=24161 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=24162 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=24484 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=24484 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=24510 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=24510 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=24510 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=24536 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=24639 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=24657 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=24657 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=24752 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=24752 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=24752 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=24752 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=24795 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=24999 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=24999 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=24999 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=24999 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25216 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25220 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25220 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25274 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25274 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25274 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25274 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25335 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25356 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25724 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25724 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25727 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25727 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25727 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25727 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25729 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25732 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25732 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25733 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25733 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25803 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25803 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25803 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25803 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25804 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=25808 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25850 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25850 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25850 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25863 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25863 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=25863 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=25863 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25986 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25986 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25986 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25986 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=25986 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=25986 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26206 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26206 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=26206 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26231 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=26231 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26265 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=26379 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=26379 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26423 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26423 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26500 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26503 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26582 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26582 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26582 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26583 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26583 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=26583 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=26780 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=26971 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27106 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27107 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27108 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27110 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27141 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=27141 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=27199 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=27199 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=27259 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27299 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=27299 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27299 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=27299 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27300 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=27300 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27301 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=27301 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27301 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=27301 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27301 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=27301 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=27476 AND `source_type`=0 AND `id`=16; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=27727 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=27727 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=27888 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=27888 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=28308 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=28308 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=28333 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=28333 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=28391 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=28391 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=28391 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=28391 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=28557 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=28557 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param4`=0 WHERE `entryorguid`=28557 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param5`=0 WHERE `entryorguid`=28557 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=28576 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=28576 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param4`=0 WHERE `entryorguid`=28576 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=28577 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=28577 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param4`=0 WHERE `entryorguid`=28577 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=28897 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=28897 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=28902 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=28902 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=28902 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=28906 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=28906 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=28906 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=28906 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=28987 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=29144 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=29144 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=29181 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=29323 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=29323 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=29747 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=29775 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=30159 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=30340 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=30340 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=30464 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=30464 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=30475 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=30830 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=30838 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=30839 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=30840 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=30922 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=30945 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=30945 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=31048 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=31048 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=31048 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=31111 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=31157 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=31157 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=31280 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=31428 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=31428 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=31565 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=32159 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=32159 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=32159 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=32159 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=32573 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=33459 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=33462 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=33465 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=33467 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=33477 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=33480 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param3`=0 WHERE `entryorguid`=33522 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=33579 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33579 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33579 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33579 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33579 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33579 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33579 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=33579 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33624 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=33624 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33686 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33686 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33686 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33686 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33686 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=33686 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33696 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=33696 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33696 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=33696 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33696 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=33696 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33696 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=33696 AND `source_type`=0 AND `id`=10; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33696 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=33696 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=33701 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=34192 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=36551 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=36551 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=36551 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=36551 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=36551 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=36551 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=36551 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=36551 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=36669 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=36669 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=36670 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=36670 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=36886 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=36886 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=36911 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=36911 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=36911 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=36916 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=36916 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=36916 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=36916 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=36916 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=36916 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=36916 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=36916 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=37228 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=37229 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=37232 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=37232 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=37232 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=37232 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=37232 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=37232 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=37845 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=38017 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=40703 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=148498 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=177243 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=177365 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=177366 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=177367 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=177368 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=177369 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=177397 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=177398 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=177399 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=177400 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=179666 AND `source_type`=1 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=179820 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=179910 AND `source_type`=1 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=179910 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=179910 AND `source_type`=1 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=180779 AND `source_type`=1 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=180779 AND `source_type`=1 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=181699 AND `source_type`=1 AND `id`=2; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=181699 AND `source_type`=1 AND `id`=21; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=181964 AND `source_type`=1 AND `id`=3; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=181964 AND `source_type`=1 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=181964 AND `source_type`=1 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=181964 AND `source_type`=1 AND `id`=6; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=181964 AND `source_type`=1 AND `id`=7; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=185193 AND `source_type`=1 AND `id`=0; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=185195 AND `source_type`=1 AND `id`=0; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=185196 AND `source_type`=1 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-105872 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=-105870 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=8996 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=20058 AND `source_type`=0 AND `id`=8; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=185197 AND `source_type`=1 AND `id`=0; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=185198 AND `source_type`=1 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=188463 AND `source_type`=1 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=190635 AND `source_type`=1 AND `id`=0; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=190636 AND `source_type`=1 AND `id`=0; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=194569 AND `source_type`=1 AND `id`=12; +UPDATE `smart_scripts` SET `target_param3`=0 WHERE `entryorguid`=208000 AND `source_type`=9 AND `id`=4; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=328900 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `target_param2`=0 WHERE `entryorguid`=328900 AND `source_type`=9 AND `id`=1; +UPDATE `smart_scripts` SET `target_param1`=0 WHERE `entryorguid`=2471000 AND `source_type`=9 AND `id`=0; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=4543 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=1379 AND `source_type`=0 AND `id`=7; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=3984 AND `source_type`=0 AND `id`=6; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=4507 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=10812 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=10812 AND `source_type`=0 AND `id`=15; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=11016 AND `source_type`=0 AND `id`=34; +UPDATE `smart_scripts` SET `action_param1`=0 WHERE `entryorguid`=11016 AND `source_type`=0 AND `id`=37; + +UPDATE `smart_scripts` SET `event_param1`=0, `event_param2` = 0 WHERE `entryorguid`=3694 AND `source_type`=0 AND `id` IN(6,8); + +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=4855 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=5267 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=7320 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=9096 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=9096 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=9096 AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=11486 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=11486 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param3`=0 WHERE `entryorguid`=11486 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=11486 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_param4`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=23; +UPDATE `smart_scripts` SET `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=23; + +-- ??? +DELETE FROM `smart_scripts` WHERE `entryorguid`=31279 AND `source_type`=0 AND `id`=11; +DELETE FROM `smart_scripts` WHERE `entryorguid`=30945 AND `source_type`=0 AND `id`=9; +DELETE FROM `smart_scripts` WHERE `entryorguid`=20899 AND `source_type`=0 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid`=11122 AND `source_type`=0 AND `id`=5; +DELETE FROM `smart_scripts` WHERE `entryorguid`=10948 AND `source_type`=0 AND `id` IN(3, 8, 9); +DELETE FROM `smart_scripts` WHERE `entryorguid`=10937 AND `source_type`=0 AND `id` = 4; +DELETE FROM `smart_scripts` WHERE `entryorguid`=4507 AND `source_type`=0 AND `id` IN(2, 5); +DELETE FROM `smart_scripts` WHERE `entryorguid`=-77757 AND `source_type`=0 AND `id` = 1; diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 4cfea9a4c..2746e7a74 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -196,14 +196,15 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { if (IsCreature(*itr)) - sCreatureTextMgr->SendChat((*itr)->ToCreature(), uint8(e.action.talk.textGroupID), IsPlayer(GetLastInvoker()) ? GetLastInvoker() : 0); + sCreatureTextMgr->SendChat((*itr)->ToCreature(), uint8(e.action.simpleTalk.textGroupID), IsPlayer(GetLastInvoker()) ? GetLastInvoker() : 0); else if (IsPlayer(*itr) && me) { Unit* templastInvoker = GetLastInvoker(); - sCreatureTextMgr->SendChat(me, uint8(e.action.talk.textGroupID), IsPlayer(templastInvoker) ? templastInvoker : 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_NEUTRAL, false, (*itr)->ToPlayer()); + sCreatureTextMgr->SendChat(me, uint8(e.action.simpleTalk.textGroupID), IsPlayer(templastInvoker) ? templastInvoker : 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_NEUTRAL, false, (*itr)->ToPlayer()); } + LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_SIMPLE_TALK: talker: {} ({}), textGroupId: {}", - (*itr)->GetName(), (*itr)->GetGUID().ToString(), uint8(e.action.talk.textGroupID)); + (*itr)->GetName(), (*itr)->GetGUID().ToString(), uint8(e.action.simpleTalk.textGroupID)); } delete targets; @@ -777,9 +778,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { if (IsUnit(*itr)) { - (*itr)->ToUnit()->AddAura(e.action.cast.spell, (*itr)->ToUnit()); + (*itr)->ToUnit()->AddAura(e.action.addAura.spell, (*itr)->ToUnit()); LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_ADD_AURA: Adding aura {} to unit {}", - e.action.cast.spell, (*itr)->GetGUID().ToString()); + e.action.addAura.spell, (*itr)->GetGUID().ToString()); } } @@ -2166,7 +2167,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsCreature(*itr)) - (*itr)->ToUnit()->SetUInt32Value(UNIT_NPC_FLAGS, e.action.unitFlag.flag); + (*itr)->ToUnit()->SetUInt32Value(UNIT_NPC_FLAGS, e.action.flag.flag); delete targets; break; @@ -2179,7 +2180,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsCreature(*itr)) - (*itr)->ToUnit()->SetFlag(UNIT_NPC_FLAGS, e.action.unitFlag.flag); + (*itr)->ToUnit()->SetFlag(UNIT_NPC_FLAGS, e.action.flag.flag); delete targets; break; @@ -2192,7 +2193,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsCreature(*itr)) - (*itr)->ToUnit()->RemoveFlag(UNIT_NPC_FLAGS, e.action.unitFlag.flag); + (*itr)->ToUnit()->RemoveFlag(UNIT_NPC_FLAGS, e.action.flag.flag); delete targets; break; @@ -2295,7 +2296,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } case SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST: { - uint32 id = urand(e.action.randTimedActionList.entry1, e.action.randTimedActionList.entry2); + uint32 id = urand(e.action.randRangeTimedActionList.idMin, e.action.randRangeTimedActionList.idMax); if (e.GetTargetType() == SMART_TARGET_NONE) { LOG_ERROR("sql.sql", "SmartScript: Entry {} SourceType {} Event {} Action {} is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); @@ -2427,7 +2428,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) - (*itr)->ToUnit()->SetUInt32Value(UNIT_DYNAMIC_FLAGS, e.action.unitFlag.flag); + (*itr)->ToUnit()->SetUInt32Value(UNIT_DYNAMIC_FLAGS, e.action.flag.flag); delete targets; break; @@ -2440,7 +2441,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) - (*itr)->ToUnit()->SetFlag(UNIT_DYNAMIC_FLAGS, e.action.unitFlag.flag); + (*itr)->ToUnit()->SetFlag(UNIT_DYNAMIC_FLAGS, e.action.flag.flag); delete targets; break; @@ -2453,7 +2454,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) - (*itr)->ToUnit()->RemoveFlag(UNIT_DYNAMIC_FLAGS, e.action.unitFlag.flag); + (*itr)->ToUnit()->RemoveFlag(UNIT_DYNAMIC_FLAGS, e.action.flag.flag); delete targets; break; @@ -2941,7 +2942,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsUnit(*itr)) - me->AddThreat((*itr)->ToUnit(), (float)e.action.threatPCT.threatINC - (float)e.action.threatPCT.threatDEC); + me->AddThreat((*itr)->ToUnit(), (float)e.action.threat.threatINC - (float)e.action.threat.threatDEC); delete targets; break; @@ -3808,14 +3809,14 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /* } case SMART_TARGET_CLOSEST_CREATURE: { - Creature* target = GetClosestCreatureWithEntry(GetBaseObject(), e.target.closest.entry, (float)(e.target.closest.dist ? e.target.closest.dist : 100), !e.target.closest.dead); + Creature* target = GetClosestCreatureWithEntry(GetBaseObject(), e.target.unitClosest.entry, (float)(e.target.unitClosest.dist ? e.target.unitClosest.dist : 100), !e.target.unitClosest.dead); if (target) l->push_back(target); break; } case SMART_TARGET_CLOSEST_GAMEOBJECT: { - GameObject* target = GetClosestGameObjectWithEntry(GetBaseObject(), e.target.closestGameobject.entry, (float)(e.target.closestGameobject.dist ? e.target.closestGameobject.dist : 100), e.target.closestGameobject.onlySpawned); + GameObject* target = GetClosestGameObjectWithEntry(GetBaseObject(), e.target.goClosest.entry, (float)(e.target.goClosest.dist ? e.target.goClosest.dist : 100), e.target.goClosest.onlySpawned); if (target) l->push_back(target); break; @@ -3875,7 +3876,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /* for (ThreatContainer::StorageType::const_iterator i = threatList.begin(); i != threatList.end(); ++i) if (Unit* temp = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid())) // Xinef: added distance check - if (e.target.hostilRandom.maxDist == 0 || me->IsWithinCombatRange(temp, (float)e.target.hostilRandom.maxDist)) + if (e.target.threatList.maxDist == 0 || me->IsWithinCombatRange(temp, (float)e.target.threatList.maxDist)) l->push_back(temp); } break; @@ -3958,7 +3959,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /* { if (me && me->IsVehicle()) { - if (Unit* target = me->GetVehicleKit()->GetPassenger(e.target.vehicle.seat)) + if (Unit* target = me->GetVehicleKit()->GetPassenger(e.target.vehicle.seatMask)) { l->push_back(target); } diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 949ac23a6..dfffffaed 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -17,6 +17,7 @@ #include "SmartScriptMgr.h" #include "CellImpl.h" +#include "CreatureTextMgr.h" #include "DatabaseEnv.h" #include "GameEventMgr.h" #include "GridDefines.h" @@ -415,9 +416,8 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) AC_SAI_IS_BOOLEAN_VALID(e, e.target.farthest.playerOnly); AC_SAI_IS_BOOLEAN_VALID(e, e.target.farthest.isInLos); break; - case SMART_TARGET_CLOSEST_GAMEOBJECT: case SMART_TARGET_CLOSEST_CREATURE: - AC_SAI_IS_BOOLEAN_VALID(e, e.target.closest.dead); + AC_SAI_IS_BOOLEAN_VALID(e, e.target.unitClosest.dead); break; case SMART_TARGET_CLOSEST_ENEMY: AC_SAI_IS_BOOLEAN_VALID(e, e.target.closestAttackable.playerOnly); @@ -435,6 +435,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) case SMART_TARGET_LOOT_RECIPIENTS: case SMART_EVENT_SUMMONED_UNIT_DIES: case SMART_TARGET_PLAYER_RANGE: + case SMART_TARGET_CLOSEST_GAMEOBJECT: case SMART_TARGET_SELF: case SMART_TARGET_VICTIM: case SMART_TARGET_POSITION: @@ -445,9 +446,369 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) LOG_ERROR("sql.sql", "SmartAIMgr: Not handled target_type({}), Entry {} SourceType {} Event {} Action {}, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return false; } + + if (!CheckUnusedTargetParams(e)) + { + return false; + } + return true; } +bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e) +{ + size_t paramsStructSize = [&]() -> size_t + { + constexpr size_t NO_PARAMS = size_t(0); + switch (e.event.type) + { + case SMART_EVENT_UPDATE_IC: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_UPDATE_OOC: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_HEALTH_PCT: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_MANA_PCT: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_AGGRO: return NO_PARAMS; + case SMART_EVENT_KILL: return sizeof(SmartEvent::kill); + case SMART_EVENT_DEATH: return NO_PARAMS; + case SMART_EVENT_EVADE: return NO_PARAMS; + case SMART_EVENT_SPELLHIT: return sizeof(SmartEvent::spellHit); + case SMART_EVENT_RANGE: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_OOC_LOS: return sizeof(SmartEvent::los); + case SMART_EVENT_RESPAWN: return sizeof(SmartEvent::respawn); + case SMART_EVENT_TARGET_HEALTH_PCT: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_VICTIM_CASTING: return sizeof(SmartEvent::targetCasting); + case SMART_EVENT_FRIENDLY_HEALTH: return sizeof(SmartEvent::friendlyHealth); + case SMART_EVENT_FRIENDLY_IS_CC: return sizeof(SmartEvent::friendlyCC); + case SMART_EVENT_FRIENDLY_MISSING_BUFF: return sizeof(SmartEvent::missingBuff); + case SMART_EVENT_SUMMONED_UNIT: return sizeof(SmartEvent::summoned); + case SMART_EVENT_TARGET_MANA_PCT: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_ACCEPTED_QUEST: return sizeof(SmartEvent::quest); + case SMART_EVENT_REWARD_QUEST: return sizeof(SmartEvent::quest); + case SMART_EVENT_REACHED_HOME: return NO_PARAMS; + case SMART_EVENT_RECEIVE_EMOTE: return sizeof(SmartEvent::emote); + case SMART_EVENT_HAS_AURA: return sizeof(SmartEvent::aura); + case SMART_EVENT_TARGET_BUFFED: return sizeof(SmartEvent::aura); + case SMART_EVENT_RESET: return NO_PARAMS; + case SMART_EVENT_IC_LOS: return sizeof(SmartEvent::los); + case SMART_EVENT_PASSENGER_BOARDED: return sizeof(SmartEvent::minMax); + case SMART_EVENT_PASSENGER_REMOVED: return sizeof(SmartEvent::minMax); + // case SMART_EVENT_CHARMED: return sizeof(SmartEvent::charm); + case SMART_EVENT_CHARMED_TARGET: return NO_PARAMS; + case SMART_EVENT_SPELLHIT_TARGET: return sizeof(SmartEvent::spellHit); + case SMART_EVENT_DAMAGED: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_DAMAGED_TARGET: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_MOVEMENTINFORM: return sizeof(SmartEvent::movementInform); + case SMART_EVENT_SUMMON_DESPAWNED: return sizeof(SmartEvent::summoned); + case SMART_EVENT_CORPSE_REMOVED: return NO_PARAMS; + case SMART_EVENT_AI_INIT: return NO_PARAMS; + case SMART_EVENT_DATA_SET: return sizeof(SmartEvent::dataSet); + case SMART_EVENT_WAYPOINT_START: return sizeof(SmartEvent::waypoint); + case SMART_EVENT_WAYPOINT_REACHED: return sizeof(SmartEvent::waypoint); + case SMART_EVENT_TRANSPORT_ADDPLAYER: return NO_PARAMS; + case SMART_EVENT_TRANSPORT_ADDCREATURE: return sizeof(SmartEvent::transportAddCreature); + case SMART_EVENT_TRANSPORT_REMOVE_PLAYER: return NO_PARAMS; + case SMART_EVENT_TRANSPORT_RELOCATE: return sizeof(SmartEvent::transportRelocate); + case SMART_EVENT_INSTANCE_PLAYER_ENTER: return sizeof(SmartEvent::instancePlayerEnter); + case SMART_EVENT_AREATRIGGER_ONTRIGGER: return sizeof(SmartEvent::areatrigger); + case SMART_EVENT_QUEST_ACCEPTED: return NO_PARAMS; + case SMART_EVENT_QUEST_OBJ_COMPLETION: return NO_PARAMS; + case SMART_EVENT_QUEST_COMPLETION: return NO_PARAMS; + case SMART_EVENT_QUEST_REWARDED: return NO_PARAMS; + case SMART_EVENT_QUEST_FAIL: return NO_PARAMS; + case SMART_EVENT_TEXT_OVER: return sizeof(SmartEvent::textOver); + case SMART_EVENT_RECEIVE_HEAL: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_JUST_SUMMONED: return NO_PARAMS; + case SMART_EVENT_WAYPOINT_PAUSED: return sizeof(SmartEvent::waypoint); + case SMART_EVENT_WAYPOINT_RESUMED: return sizeof(SmartEvent::waypoint); + case SMART_EVENT_WAYPOINT_STOPPED: return sizeof(SmartEvent::waypoint); + case SMART_EVENT_WAYPOINT_ENDED: return sizeof(SmartEvent::waypoint); + case SMART_EVENT_TIMED_EVENT_TRIGGERED: return sizeof(SmartEvent::timedEvent); + case SMART_EVENT_UPDATE: return sizeof(SmartEvent::minMaxRepeat); + case SMART_EVENT_LINK: return NO_PARAMS; + case SMART_EVENT_GOSSIP_SELECT: return sizeof(SmartEvent::gossip); + case SMART_EVENT_JUST_CREATED: return NO_PARAMS; + case SMART_EVENT_GOSSIP_HELLO: return sizeof(SmartEvent::gossipHello); + case SMART_EVENT_FOLLOW_COMPLETED: return NO_PARAMS; + // case SMART_EVENT_EVENT_PHASE_CHANGE: return sizeof(SmartEvent::eventPhaseChange); + case SMART_EVENT_IS_BEHIND_TARGET: return sizeof(SmartEvent::behindTarget); + case SMART_EVENT_GAME_EVENT_START: return sizeof(SmartEvent::gameEvent); + case SMART_EVENT_GAME_EVENT_END: return sizeof(SmartEvent::gameEvent); + // case SMART_EVENT_GO_LOOT_STATE_CHANGED: return sizeof(SmartEvent::goLootStateChanged); + case SMART_EVENT_GO_EVENT_INFORM: return sizeof(SmartEvent::eventInform); + case SMART_EVENT_ACTION_DONE: return sizeof(SmartEvent::doAction); + case SMART_EVENT_ON_SPELLCLICK: return NO_PARAMS; + case SMART_EVENT_FRIENDLY_HEALTH_PCT: return sizeof(SmartEvent::friendlyHealthPct); + case SMART_EVENT_DISTANCE_CREATURE: return sizeof(SmartEvent::distance); + case SMART_EVENT_DISTANCE_GAMEOBJECT: return sizeof(SmartEvent::distance); + case SMART_EVENT_COUNTER_SET: return sizeof(SmartEvent::counter); + //case SMART_EVENT_SCENE_START: return sizeof(SmartEvent::raw); + //case SMART_EVENT_SCENE_TRIGGER: return sizeof(SmartEvent::raw); + //case SMART_EVENT_SCENE_CANCEL: return sizeof(SmartEvent::raw); + //case SMART_EVENT_SCENE_COMPLETE: return sizeof(SmartEvent::raw); + case SMART_EVENT_SUMMONED_UNIT_DIES: return sizeof(SmartEvent::summoned); + default: + LOG_WARN("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is using an event with no unused params specified in SmartAIMgr::CheckUnusedEventParams(), please report this.", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + return sizeof(SmartEvent::raw); + } + }(); + + static size_t rawCount = sizeof(SmartEvent::raw) / sizeof(uint32); + size_t paramsCount = paramsStructSize / sizeof(uint32); + + bool valid = true; + for (size_t index = paramsCount; index < rawCount; index++) + { + uint32 value = ((uint32*)&e.event.raw)[index]; + if (value != 0) + { + LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} has unused event_param{} with value {}, it must be 0, skipped.", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), index + 1, value); + valid = false; + } + } + + return valid; +} + +bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e) +{ + size_t paramsStructSize = [&]() -> size_t + { + constexpr size_t NO_PARAMS = size_t(0); + switch (e.action.type) + { + case SMART_ACTION_NONE: return NO_PARAMS; + case SMART_ACTION_TALK: return sizeof(SmartAction::talk); + case SMART_ACTION_SET_FACTION: return sizeof(SmartAction::faction); + case SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: return sizeof(SmartAction::morphOrMount); + case SMART_ACTION_SOUND: return sizeof(SmartAction::sound); + case SMART_ACTION_PLAY_EMOTE: return sizeof(SmartAction::emote); + case SMART_ACTION_FAIL_QUEST: return sizeof(SmartAction::quest); + case SMART_ACTION_OFFER_QUEST: return sizeof(SmartAction::questOffer); + case SMART_ACTION_SET_REACT_STATE: return sizeof(SmartAction::react); + case SMART_ACTION_ACTIVATE_GOBJECT: return NO_PARAMS; + case SMART_ACTION_RANDOM_EMOTE: return sizeof(SmartAction::randomEmote); + case SMART_ACTION_CAST: return sizeof(SmartAction::cast); + case SMART_ACTION_SUMMON_CREATURE: return sizeof(SmartAction::summonCreature); + case SMART_ACTION_THREAT_SINGLE_PCT: return sizeof(SmartAction::threatPCT); + case SMART_ACTION_THREAT_ALL_PCT: return sizeof(SmartAction::threatPCT); + case SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS: return sizeof(SmartAction::quest); + //case SMART_ACTION_RESERVED_16: return sizeof(SmartAction::raw); + case SMART_ACTION_SET_EMOTE_STATE: return sizeof(SmartAction::emote); + case SMART_ACTION_SET_UNIT_FLAG: return sizeof(SmartAction::unitFlag); + case SMART_ACTION_REMOVE_UNIT_FLAG: return sizeof(SmartAction::unitFlag); + case SMART_ACTION_AUTO_ATTACK: return sizeof(SmartAction::autoAttack); + case SMART_ACTION_ALLOW_COMBAT_MOVEMENT: return sizeof(SmartAction::combatMove); + case SMART_ACTION_SET_EVENT_PHASE: return sizeof(SmartAction::setEventPhase); + case SMART_ACTION_INC_EVENT_PHASE: return sizeof(SmartAction::incEventPhase); + // case SMART_ACTION_EVADE: return sizeof(SmartAction::evade); + // case SMART_ACTION_FLEE_FOR_ASSIST: return sizeof(SmartAction::fleeAssist); + case SMART_ACTION_CALL_GROUPEVENTHAPPENS: return sizeof(SmartAction::quest); + case SMART_ACTION_COMBAT_STOP: return NO_PARAMS; + case SMART_ACTION_REMOVEAURASFROMSPELL: return sizeof(SmartAction::removeAura); + case SMART_ACTION_FOLLOW: return sizeof(SmartAction::follow); + case SMART_ACTION_RANDOM_PHASE: return sizeof(SmartAction::randomPhase); + case SMART_ACTION_RANDOM_PHASE_RANGE: return sizeof(SmartAction::randomPhaseRange); + case SMART_ACTION_RESET_GOBJECT: return NO_PARAMS; + case SMART_ACTION_CALL_KILLEDMONSTER: return sizeof(SmartAction::killedMonster); + case SMART_ACTION_SET_INST_DATA: return sizeof(SmartAction::setInstanceData); + case SMART_ACTION_SET_INST_DATA64: return sizeof(SmartAction::setInstanceData64); + case SMART_ACTION_UPDATE_TEMPLATE: return sizeof(SmartAction::updateTemplate); + case SMART_ACTION_DIE: return NO_PARAMS; + case SMART_ACTION_SET_IN_COMBAT_WITH_ZONE: return NO_PARAMS; + case SMART_ACTION_CALL_FOR_HELP: return sizeof(SmartAction::callHelp); + case SMART_ACTION_SET_SHEATH: return sizeof(SmartAction::setSheath); + case SMART_ACTION_FORCE_DESPAWN: return sizeof(SmartAction::forceDespawn); + case SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL: return sizeof(SmartAction::invincHP); + case SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL: return sizeof(SmartAction::morphOrMount); + case SMART_ACTION_SET_INGAME_PHASE_MASK: return sizeof(SmartAction::ingamePhaseMask); + case SMART_ACTION_SET_DATA: return sizeof(SmartAction::setData); + case SMART_ACTION_ATTACK_STOP: return NO_PARAMS; + case SMART_ACTION_SET_VISIBILITY: return sizeof(SmartAction::visibility); + // case SMART_ACTION_SET_ACTIVE: return sizeof(SmartAction::active); + case SMART_ACTION_ATTACK_START: return NO_PARAMS; + case SMART_ACTION_SUMMON_GO: return sizeof(SmartAction::summonGO); + case SMART_ACTION_KILL_UNIT: return NO_PARAMS; + case SMART_ACTION_ACTIVATE_TAXI: return sizeof(SmartAction::taxi); + case SMART_ACTION_WP_START: return sizeof(SmartAction::wpStart); + case SMART_ACTION_WP_PAUSE: return sizeof(SmartAction::wpPause); + case SMART_ACTION_WP_STOP: return sizeof(SmartAction::wpStop); + case SMART_ACTION_ADD_ITEM: return sizeof(SmartAction::item); + case SMART_ACTION_REMOVE_ITEM: return sizeof(SmartAction::item); + case SMART_ACTION_INSTALL_AI_TEMPLATE: return sizeof(SmartAction::installTtemplate); + case SMART_ACTION_SET_RUN: return sizeof(SmartAction::setRun); + // case SMART_ACTION_SET_DISABLE_GRAVITY: return sizeof(SmartAction::setDisableGravity); + case SMART_ACTION_SET_SWIM: return sizeof(SmartAction::setSwim); + case SMART_ACTION_TELEPORT: return sizeof(SmartAction::teleport); + case SMART_ACTION_SET_COUNTER: return sizeof(SmartAction::setCounter); + case SMART_ACTION_STORE_TARGET_LIST: return sizeof(SmartAction::storeTargets); + case SMART_ACTION_WP_RESUME: return NO_PARAMS; + case SMART_ACTION_SET_ORIENTATION: return NO_PARAMS; + case SMART_ACTION_CREATE_TIMED_EVENT: return sizeof(SmartAction::timeEvent); + case SMART_ACTION_PLAYMOVIE: return sizeof(SmartAction::movie); + case SMART_ACTION_MOVE_TO_POS: return sizeof(SmartAction::moveToPos); + // case SMART_ACTION_ENABLE_TEMP_GOBJ: return sizeof(SmartAction::enableTempGO); + case SMART_ACTION_EQUIP: return sizeof(SmartAction::equip); + case SMART_ACTION_CLOSE_GOSSIP: return NO_PARAMS; + case SMART_ACTION_TRIGGER_TIMED_EVENT: return sizeof(SmartAction::timeEvent); + case SMART_ACTION_REMOVE_TIMED_EVENT: return sizeof(SmartAction::timeEvent); + case SMART_ACTION_ADD_AURA: return sizeof(SmartAction::addAura); + case SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT: return NO_PARAMS; + case SMART_ACTION_RESET_SCRIPT_BASE_OBJECT: return NO_PARAMS; + case SMART_ACTION_CALL_SCRIPT_RESET: return NO_PARAMS; + case SMART_ACTION_SET_RANGED_MOVEMENT: return sizeof(SmartAction::setRangedMovement); + case SMART_ACTION_CALL_TIMED_ACTIONLIST: return sizeof(SmartAction::timedActionList); + case SMART_ACTION_SET_NPC_FLAG: return sizeof(SmartAction::flag); + case SMART_ACTION_ADD_NPC_FLAG: return sizeof(SmartAction::flag); + case SMART_ACTION_REMOVE_NPC_FLAG: return sizeof(SmartAction::flag); + case SMART_ACTION_SIMPLE_TALK: return sizeof(SmartAction::simpleTalk); + // case SMART_ACTION_SELF_CAST: return sizeof(SmartAction::cast); + case SMART_ACTION_CROSS_CAST: return sizeof(SmartAction::crossCast); + case SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST: return sizeof(SmartAction::randTimedActionList); + case SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST: return sizeof(SmartAction::randRangeTimedActionList); + case SMART_ACTION_RANDOM_MOVE: return sizeof(SmartAction::moveRandom); + case SMART_ACTION_SET_UNIT_FIELD_BYTES_1: return sizeof(SmartAction::setunitByte); + case SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1: return sizeof(SmartAction::delunitByte); + case SMART_ACTION_INTERRUPT_SPELL: return sizeof(SmartAction::interruptSpellCasting); + case SMART_ACTION_SEND_GO_CUSTOM_ANIM: return sizeof(SmartAction::sendGoCustomAnim); + case SMART_ACTION_SET_DYNAMIC_FLAG: return sizeof(SmartAction::flag); + case SMART_ACTION_ADD_DYNAMIC_FLAG: return sizeof(SmartAction::flag); + case SMART_ACTION_REMOVE_DYNAMIC_FLAG: return sizeof(SmartAction::flag); + case SMART_ACTION_JUMP_TO_POS: return sizeof(SmartAction::jump); + case SMART_ACTION_SEND_GOSSIP_MENU: return sizeof(SmartAction::sendGossipMenu); + case SMART_ACTION_GO_SET_LOOT_STATE: return sizeof(SmartAction::setGoLootState); + case SMART_ACTION_SEND_TARGET_TO_TARGET: return sizeof(SmartAction::sendTargetToTarget); + case SMART_ACTION_SET_HOME_POS: return NO_PARAMS; + case SMART_ACTION_SET_HEALTH_REGEN: return sizeof(SmartAction::setHealthRegen); + case SMART_ACTION_SET_ROOT: return sizeof(SmartAction::setRoot); + case SMART_ACTION_SET_GO_FLAG: return sizeof(SmartAction::goFlag); + case SMART_ACTION_ADD_GO_FLAG: return sizeof(SmartAction::goFlag); + case SMART_ACTION_REMOVE_GO_FLAG: return sizeof(SmartAction::goFlag); + case SMART_ACTION_SUMMON_CREATURE_GROUP: return sizeof(SmartAction::creatureGroup); + case SMART_ACTION_SET_POWER: return sizeof(SmartAction::power); + case SMART_ACTION_ADD_POWER: return sizeof(SmartAction::power); + case SMART_ACTION_REMOVE_POWER: return sizeof(SmartAction::power); + case SMART_ACTION_GAME_EVENT_STOP: return sizeof(SmartAction::gameEventStop); + case SMART_ACTION_GAME_EVENT_START: return sizeof(SmartAction::gameEventStart); + case SMART_ACTION_START_CLOSEST_WAYPOINT: return sizeof(SmartAction::closestWaypointFromList); + // case SMART_ACTION_MOVE_OFFSET: return NO_PARAMS; + case SMART_ACTION_RANDOM_SOUND: return sizeof(SmartAction::randomSound); + case SMART_ACTION_SET_CORPSE_DELAY: return sizeof(SmartAction::corpseDelay); + case SMART_ACTION_DISABLE_EVADE: return sizeof(SmartAction::disableEvade); + case SMART_ACTION_GO_SET_GO_STATE: return sizeof(SmartAction::goState); + case SMART_ACTION_SET_CAN_FLY: return sizeof(SmartAction::setFly); + // case SMART_ACTION_REMOVE_AURAS_BY_TYPE: return sizeof(SmartAction::auraType); + case SMART_ACTION_SET_SIGHT_DIST: return sizeof(SmartAction::sightDistance); + case SMART_ACTION_FLEE: return sizeof(SmartAction::flee); + case SMART_ACTION_ADD_THREAT: return sizeof(SmartAction::threat); + case SMART_ACTION_LOAD_EQUIPMENT: return sizeof(SmartAction::loadEquipment); + case SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT: return sizeof(SmartAction::randomTimedEvent); + case SMART_ACTION_REMOVE_ALL_GAMEOBJECTS: return NO_PARAMS; + // case SMART_ACTION_PAUSE_MOVEMENT: return sizeof(SmartAction::pauseMovement); + //case SMART_ACTION_PLAY_ANIMKIT: return sizeof(SmartAction::raw); + //case SMART_ACTION_SCENE_PLAY: return sizeof(SmartAction::raw); + //case SMART_ACTION_SCENE_CANCEL: return sizeof(SmartAction::raw); + // case SMART_ACTION_SPAWN_SPAWNGROUP: return sizeof(SmartAction::groupSpawn); + // case SMART_ACTION_DESPAWN_SPAWNGROUP: return sizeof(SmartAction::groupSpawn); + // case SMART_ACTION_RESPAWN_BY_SPAWNID: return sizeof(SmartAction::respawnData); + // case SMART_ACTION_INVOKER_CAST: return sizeof(SmartAction::cast); + // case SMART_ACTION_PLAY_CINEMATIC: return sizeof(SmartAction::cinematic); + case SMART_ACTION_SET_MOVEMENT_SPEED: return sizeof(SmartAction::movementSpeed); + //case SMART_ACTION_PLAY_SPELL_VISUAL_KIT: return sizeof(SmartAction::raw); + // case SMART_ACTION_OVERRIDE_LIGHT: return sizeof(SmartAction::overrideLight); + // case SMART_ACTION_OVERRIDE_WEATHER: return sizeof(SmartAction::overrideWeather); + //case SMART_ACTION_SET_AI_ANIM_KIT: return sizeof(SmartAction::raw); + case SMART_ACTION_SET_HOVER: return sizeof(SmartAction::setHover); + case SMART_ACTION_SET_HEALTH_PCT: return sizeof(SmartAction::setHealthPct); + //case SMART_ACTION_CREATE_CONVERSATION: return sizeof(SmartAction::raw); + default: + LOG_WARN("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is using an action with no unused params specified in SmartAIMgr::CheckUnusedActionParams(), please report this.", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + return sizeof(SmartAction::raw); + } + }(); + + static size_t rawCount = sizeof(SmartAction::raw) / sizeof(uint32); + size_t paramsCount = paramsStructSize / sizeof(uint32); + + bool valid = true; + for (size_t index = paramsCount; index < rawCount; index++) + { + uint32 value = ((uint32*)&e.action.raw)[index]; + if (value != 0) + { + LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has unused action_param%zu with value %u, it must be 0, skipped.", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), index + 1, value); + valid = false; + } + } + + return valid; +} + +bool SmartAIMgr::CheckUnusedTargetParams(SmartScriptHolder const& e) +{ + size_t paramsStructSize = [&]() -> size_t + { + constexpr size_t NO_PARAMS = size_t(0); + switch (e.target.type) + { + case SMART_TARGET_NONE: return NO_PARAMS; + case SMART_TARGET_SELF: return NO_PARAMS; + case SMART_TARGET_VICTIM: return NO_PARAMS; + case SMART_TARGET_HOSTILE_SECOND_AGGRO: return sizeof(SmartTarget::hostilRandom); + case SMART_TARGET_HOSTILE_LAST_AGGRO: return sizeof(SmartTarget::hostilRandom); + case SMART_TARGET_HOSTILE_RANDOM: return sizeof(SmartTarget::hostilRandom); + case SMART_TARGET_HOSTILE_RANDOM_NOT_TOP: return sizeof(SmartTarget::hostilRandom); + case SMART_TARGET_ACTION_INVOKER: return NO_PARAMS; + case SMART_TARGET_POSITION: return NO_PARAMS; //uses x,y,z,o + case SMART_TARGET_CREATURE_RANGE: return sizeof(SmartTarget::unitRange); + case SMART_TARGET_CREATURE_GUID: return sizeof(SmartTarget::unitGUID); + case SMART_TARGET_CREATURE_DISTANCE: return sizeof(SmartTarget::unitDistance); + case SMART_TARGET_STORED: return sizeof(SmartTarget::stored); + case SMART_TARGET_GAMEOBJECT_RANGE: return sizeof(SmartTarget::goRange); + case SMART_TARGET_GAMEOBJECT_GUID: return sizeof(SmartTarget::goGUID); + case SMART_TARGET_GAMEOBJECT_DISTANCE: return sizeof(SmartTarget::goDistance); + case SMART_TARGET_INVOKER_PARTY: return NO_PARAMS; + case SMART_TARGET_PLAYER_RANGE: return sizeof(SmartTarget::playerRange); + case SMART_TARGET_PLAYER_DISTANCE: return sizeof(SmartTarget::playerDistance); + case SMART_TARGET_CLOSEST_CREATURE: return sizeof(SmartTarget::unitClosest); + case SMART_TARGET_CLOSEST_GAMEOBJECT: return sizeof(SmartTarget::goClosest); + case SMART_TARGET_CLOSEST_PLAYER: return sizeof(SmartTarget::playerDistance); + case SMART_TARGET_ACTION_INVOKER_VEHICLE: return NO_PARAMS; + case SMART_TARGET_OWNER_OR_SUMMONER: return sizeof(SmartTarget::owner); + case SMART_TARGET_THREAT_LIST: return sizeof(SmartTarget::threatList); + case SMART_TARGET_CLOSEST_ENEMY: return sizeof(SmartTarget::closestAttackable); + case SMART_TARGET_CLOSEST_FRIENDLY: return sizeof(SmartTarget::closestFriendly); + case SMART_TARGET_LOOT_RECIPIENTS: return NO_PARAMS; + case SMART_TARGET_FARTHEST: return sizeof(SmartTarget::farthest); + case SMART_TARGET_VEHICLE_PASSENGER: return sizeof(SmartTarget::vehicle); + // case SMART_TARGET_CLOSEST_UNSPAWNED_GAMEOBJECT: return sizeof(SmartTarget::goClosest); + default: + LOG_WARN("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is using a target with no unused params specified in SmartAIMgr::CheckUnusedTargetParams(), please report this.", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + return sizeof(SmartTarget::raw); + } + }(); + + static size_t rawCount = sizeof(SmartTarget::raw) / sizeof(uint32); + size_t paramsCount = paramsStructSize / sizeof(uint32); + + bool valid = true; + for (size_t index = paramsCount; index < rawCount; index++) + { + uint32 value = ((uint32*)&e.target.raw)[index]; + if (value != 0) + { + LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has unused target_param%zu with value %u, it must be 0, skipped.", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), index + 1, value); + valid = false; + } + } + + return valid; +} + bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) { if ((e.event.type >= SMART_EVENT_TC_END && e.event.type <= SMART_EVENT_AC_START) || e.event.type >= SMART_EVENT_AC_END) @@ -862,6 +1223,11 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) } } + if (!CheckUnusedEventParams(e)) + { + return false; + } + switch (e.GetActionType()) { case SMART_ACTION_SET_FACTION: @@ -974,7 +1340,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) if (e.action.randomEmote.emote6 && !IsEmoteValid(e, e.action.randomEmote.emote6)) return false; break; - case SMART_ACTION_ADD_AURA: case SMART_ACTION_CAST: case SMART_ACTION_INVOKER_CAST: if (!IsSpellValid(e, e.action.cast.spell)) @@ -988,6 +1353,10 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) if (!IsSpellValid(e, e.action.castCustom.spell)) return false; break; + case SMART_ACTION_ADD_AURA: + if (!IsSpellValid(e, e.action.addAura.spell)) + return false; + break; case SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS: case SMART_ACTION_CALL_GROUPEVENTHAPPENS: if (Quest const* qid = sObjectMgr->GetQuestTemplate(e.action.quest.quest)) @@ -1165,7 +1534,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) } case SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST: { - if (!IsMinMaxValid(e, e.action.randTimedActionList.entry1, e.action.randTimedActionList.entry2)) + if (!IsMinMaxValid(e, e.action.randRangeTimedActionList.idMin, e.action.randRangeTimedActionList.idMax)) return false; break; } @@ -1355,6 +1724,20 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) AC_SAI_IS_BOOLEAN_VALID(e, e.action.loadEquipment.force); break; } + case SMART_ACTION_TALK: + AC_SAI_IS_BOOLEAN_VALID(e, e.action.talk.useTalkTarget); + if (!IsTextValid(e, e.action.talk.textGroupID)) + return false; + break; + case SMART_ACTION_SIMPLE_TALK: + if (!IsTextValid(e, e.action.simpleTalk.textGroupID)) + return false; + break; + case SMART_ACTION_SET_HEALTH_REGEN: + { + AC_SAI_IS_BOOLEAN_VALID(e, e.action.setHealthRegen.regenHealth); + break; + } case SMART_ACTION_FLEE_FOR_ASSIST: case SMART_ACTION_MOVE_TO_POS: case SMART_ACTION_CALL_TIMED_ACTIONLIST: @@ -1395,10 +1778,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_SET_NPC_FLAG: case SMART_ACTION_ADD_NPC_FLAG: case SMART_ACTION_REMOVE_NPC_FLAG: - case SMART_ACTION_TALK: - AC_SAI_IS_BOOLEAN_VALID(e, e.action.talk.useTalkTarget); - [[fallthrough]]; - case SMART_ACTION_SIMPLE_TALK: case SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST: case SMART_ACTION_RANDOM_MOVE: case SMART_ACTION_SET_UNIT_FIELD_BYTES_1: @@ -1413,7 +1792,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_GO_SET_GO_STATE: case SMART_ACTION_SEND_TARGET_TO_TARGET: case SMART_ACTION_SET_HOME_POS: - case SMART_ACTION_SET_HEALTH_REGEN: case SMART_ACTION_SET_GO_FLAG: case SMART_ACTION_ADD_GO_FLAG: case SMART_ACTION_REMOVE_GO_FLAG: @@ -1452,32 +1830,55 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) return false; } + if (!CheckUnusedActionParams(e)) + return false; + return true; } -/*bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id) // unused +bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id) { - bool error = false; + if (e.GetScriptType() != SMART_SCRIPT_TYPE_CREATURE) + return true; + uint32 entry = 0; - if (e.entryOrGuid >= 0) - entry = uint32(e.entryOrGuid); - else { - entry = uint32(std::abs(e.entryOrGuid)); - CreatureData const* data = sObjectMgr->GetCreatureData(entry); - if (!data) - { - LOG_ERROR("scripts.ai.sai", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} using non-existent Creature guid {}, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry); - return false; - } - else - entry = data->id; - } - if (!entry || !sCreatureTextMgr->TextExist(entry, uint8(id))) - error = true; - if (error) + + if (e.GetEventType() == SMART_EVENT_TEXT_OVER) { - LOG_ERROR("scripts.ai.sai", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} using non-existent Text id {}, skipped.", e.entryOrGuid, e.GetScriptType(), e.source_type, e.GetActionType(), id); + entry = e.event.textOver.creatureEntry; + } + else + { + switch (e.GetTargetType()) + { + case SMART_TARGET_CREATURE_DISTANCE: + case SMART_TARGET_CREATURE_RANGE: + case SMART_TARGET_CLOSEST_CREATURE: + return true; // ignore + default: + if (e.entryOrGuid < 0) + { + ObjectGuid::LowType guid = ObjectGuid::LowType(-e.entryOrGuid); + CreatureData const* data = sObjectMgr->GetCreatureData(guid); + if (!data) + { + LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} using non-existent Creature guid {}, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), guid); + return false; + } + else + entry = data->id1; + } + else + entry = uint32(e.entryOrGuid); + break; + } + } + + if (!entry || !sCreatureTextMgr->TextExist(entry, uint8(id))) + { + LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} using non-existent Text id {}, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), id); return false; } + return true; -}*/ +} diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 9c1407249..208975359 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -310,14 +310,6 @@ struct SmartEvent uint32 repeatMax; } aura; - struct - { - uint32 spell; - uint32 count; - uint32 repeatMin; - uint32 repeatMax; - } targetAura; - struct { uint32 type; @@ -382,12 +374,6 @@ struct SmartEvent uint32 action; } gossip; - struct - { - uint32 spell; - uint32 effIndex; - } dummy; - struct { uint32 cooldownMin; @@ -670,6 +656,12 @@ struct SmartAction SAIBool useTalkTarget; } talk; + struct + { + uint32 textGroupID; + uint32 duration; + } simpleTalk; + struct { uint32 factionID; @@ -790,23 +782,9 @@ struct SmartAction struct { - uint32 flag1; - uint32 flag2; - uint32 flag3; - uint32 flag4; - uint32 flag5; - uint32 flag6; - } addUnitFlag; - - struct - { - uint32 flag1; - uint32 flag2; - uint32 flag3; - uint32 flag4; - uint32 flag5; - uint32 flag6; - } removeUnitFlag; + uint32 threatINC; + uint32 threatDEC; + } threat; struct { @@ -829,6 +807,11 @@ struct SmartAction uint32 dec; } incEventPhase; + struct + { + uint32 spell; + } addAura; + struct { uint32 spell; @@ -1048,6 +1031,11 @@ struct SmartAction uint32 type; } unitFlag; + struct + { + uint32 flag; + } flag; + struct { uint32 byte1; @@ -1060,11 +1048,6 @@ struct SmartAction uint32 type; } delunitByte; - struct - { - uint32 seat; - } enterVehicle; - struct { uint32 id; @@ -1081,6 +1064,12 @@ struct SmartAction uint32 entry6; } randTimedActionList; + struct + { + uint32 idMin; + uint32 idMax; + } randRangeTimedActionList; + struct { SAIBool withDelayed; @@ -1147,7 +1136,7 @@ struct SmartAction struct { - uint32 regenHealth; + SAIBool regenHealth; } setHealthRegen; struct @@ -1494,8 +1483,10 @@ struct SmartTarget struct { - uint32 map; - } position; + uint32 entry; + uint32 dist; + SAIBool dead; + } unitClosest; struct { @@ -1504,17 +1495,20 @@ struct SmartTarget struct { - uint32 entry; - uint32 dist; - SAIBool dead; - } closest; + uint32 seatMask; + } vehicle; + + struct + { + uint32 maxDist; + } threatList; struct { uint32 entry; uint32 dist; uint32 onlySpawned; - } closestGameobject; + } goClosest; struct { @@ -1550,11 +1544,6 @@ struct SmartTarget uint32 param3; uint32 param4; } raw; - - struct - { - uint32 seat; - } vehicle; }; }; @@ -2027,7 +2016,10 @@ private: return true; } - //bool IsTextValid(SmartScriptHolder const& e, uint32 id); + static bool IsTextValid(SmartScriptHolder const& e, uint32 id); + static bool CheckUnusedEventParams(SmartScriptHolder const& e); + static bool CheckUnusedActionParams(SmartScriptHolder const& e); + static bool CheckUnusedTargetParams(SmartScriptHolder const& e); }; #define sSmartScriptMgr SmartAIMgr::instance()