aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2023_10_30_00_world.sql693
-rw-r--r--src/server/database/Database/Implementation/WorldDatabase.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp38
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp103
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h28
5 files changed, 790 insertions, 74 deletions
diff --git a/sql/updates/world/master/2023_10_30_00_world.sql b/sql/updates/world/master/2023_10_30_00_world.sql
new file mode 100644
index 00000000000..1ec6502f89c
--- /dev/null
+++ b/sql/updates/world/master/2023_10_30_00_world.sql
@@ -0,0 +1,693 @@
+ALTER TABLE `smart_scripts` ADD COLUMN `Difficulties` VARCHAR(100) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci' AFTER `link`;
+
+UPDATE `smart_scripts` SET `event_flags`=`event_flags`&~2 WHERE `source_type`=0 AND `entryorguid` IN (598,622,634,636,639,641,642,644,645,647,657,1663,1666,1696,1706,1707,1711,1715,1716,1717,1720,1725,1729,1731,1763,3586,3636,3640,3654,3669,3670,3671,3673,3674,3840,3851,3853,3854,3857,3859,3861,3863,3864,3866,3868,3872,3873,3877,3886,3887,3914,3927,3947,4274,4279,4286,4289,4290,4291,4292,4294,4296,4297,4298,4299,4300,4301,4302,4303,4306,4416,4417,4418,4420,4428,4436,4515,4516,4517,4518,4519,4539,4540,4625,4799,4805,4805,4807,4809,4810,4811,4812,4813,4814,4815,4818,4819,4820,4821,4822,4827,4831,4842,4847,4848,4849,4851,4852,4853,4854,4855,4860,4861,4887,5048,5053,5055,5058,5226,5228,5256,5259,5267,5270,5271,5273,5277,5280,5283,5291,5648,5649,5650,5708,5709,5710,5712,5714,5716,5717,5719,5720,5721,5722,5755,5756,5761,5775,6212,6228,6229,6235,6391,6426,6427,6489,6906,6907,6908,6910,7011,7012,7022,7030,7078,7091,7175,7206,7246,7247,7268,7269,7273,7276,7290,7291,7320,7321,7327,7328,7329,7332,7335,7337,7340,7341,7342,7344,7345,7346,7347,7348,7352,7353,7354,7356,7396,7397,7605,7606,7608,7789,7800,7915,8095,8120,8127,8138,8156,8317,8336,8384,8440,8497,8580,8876,8877,8889,8901,8911,8921,8983,9017,9024,9025,9034,9035,9036,9038,9040,9041,9042,9045,9056,9096,9097,9197,9198,9199,9200,9201,9216,9217,9239,9240,9241,9257,9258,9259,9260,9261,9262,9263,9264,9265,9266,9267,9268,9269,9437,9438,9439,9441,9442,9443,9445,9583,9692,9693,9707,9708,9716,9717,9817,9818,9819,10083,10258,10261,10263,10317,10318,10319,10366,10371,10372,10374,10375,10376,10381,10382,10383,10387,10388,10389,10390,10391,10393,10394,10398,10400,10405,10406,10407,10408,10409,10411,10412,10413,10414,10416,10417,10418,10419,10420,10421,10422,10423,10424,10425,10426,10433,10442,10447,10463,10464,10469,10470,10471,10476,10477,10480,10481,10485,10486,10487,10488,10489,10491,10495,10498,10499,10500,10509,10516,10558,10601,10602,10678,10680,10681,10683,10697,10809,10811,10814,10876,10899,10991,11032,11043,11054,11058,11120,11121,11257,11318,11319,11320,11322,11323,11324,11441,11442,11444,11445,11448,11450,11453,11454,11455,11457,11458,11459,11461,11464,11465,11466,11467,11469,11470,11471,11472,11473,11475,11476,11480,11483,11484,11486,11487,11488,11489,11490,11492,11496,11501,11517,11518,11519,11520,11551,11582,11598,11600,11604,11622,11657,11658,11659,11661,11663,11664,11666,11667,11668,11675,11677,11784,11790,11791,11792,11793,11794,11837,11838,11840,12119,12121,12122,12206,12207,12216,12217,12218,12219,12220,12221,12223,12224,12236,12237,12242,12243,12258,12457,12459,12460,12461,12463,12464,12465,12467,12468,12557,12902,13036,13078,13079,13080,13081,13083,13086,13087,13098,13141,13142,13160,13180,13181,13276,13280,13285,13317,13323,13331,13332,13396,13397,13437,13439,13448,13533,13534,13535,13536,13537,13538,13539,13543,13544,13545,13549,13550,13551,13552,13553,13554,13555,13556,13557,13596,13599,13601,13959,13996,14261,14262,14263,14264,14265,14303,14308,14321,14322,14323,14325,14326,14351,14386,14396,14397,14398,14399,14400,14483,14502,14506,14861,14943,14946,15146,15229,15230,15233,15236,15240,15246,15247,15249,15250,15252,15262,15277,15311,15312,15333,15385,15386,15387,15388,15389,15390,15391,15392,15537,15538,15547,15548,15551,15630,16066,16097,16098,16171,16173,16174,16175,16176,16177,16178,16406,16407,16408,16409,16411,16414,16415,16425,16459,16460,16461,16468,16470,16471,16472,16473,16481,16482,16485,16488,16489,16491,16492,16504,16525,16526,16529,16540,16544,16545,16595,17067,17283,17672,17919,17920,17922,17928,17932,17933,17935,17936,18342,18829,19525,21159,21218,21220,21221,21224,21225,21226,21227,21228,21229,21230,21231,21232,21246,21251,21263,21298,21299,21301,21339,21863,21920,22104,22119,22120,22238,22250,22486,22844,22845,22853,22855,22869,22873,22874,22875,22876,22877,22878,22879,22880,22881,22882,22883,22884,22885,22939,22945,22954,22955,22956,22957,22959,22960,22962,22963,22964,23030,23047,23049,23172,23196,23222,23235,23236,23237,23239,23292,23293,23294,23295,23296,23297,23298,23299,23330,23337,23394,23397,23400,23402,23403,23586,23587,24530,24830,25363,25367,25368,25369,25370,25371,25373,25483,25485,25486,25506,25508,25509,25592,25593,25595,25597,25599,25798,25799,25824,25837,25851,25867,29174,29176,29177,29181,29182,29206,12129,15631,15974,15975,15976,15977,15978,15979,15980,15981,16017,16018,16020,16021,16022,16024,16025,16029,16034,16036,16037,16067,16142,16145,16146,16154,16156,16163,16164,16165,16167,16168,16193,16194,16215,16216,16236,16243,16244,16297,16375,16385,16447,16453,16505,16507,16523,16530,16573,16593,16594,16699,16983,16984,17055,17259,17270,17271,17280,17281,17309,17356,17357,17370,17371,17395,17397,17399,17400,17401,17414,17420,17427,17455,17462,17464,17465,17477,17478,17491,17540,17621,17622,17623,17624,17626,17669,17670,17671,17694,17695,17721,17722,17723,17724,17725,17726,17727,17728,17729,17730,17731,17734,17735,17771,17800,17801,17802,17803,17805,17814,17815,17816,17817,17819,17820,17826,17827,17833,17835,17839,17840,17860,17871,17885,17890,17892,17938,17940,17952,17957,17958,17959,17961,17962,17963,17964,17964,17993,17994,18092,18093,18094,18105,18155,18170,18171,18172,18206,18312,18313,18314,18315,18317,18319,18320,18322,18326,18328,18331,18343,18404,18405,18419,18420,18421,18422,18429,18493,18495,18499,18500,18501,18506,18557,18558,18559,18598,18632,18633,18634,18635,18637,18638,18640,18641,18664,18702,18794,18796,18848,18870,18894,18934,18983,18994,18995,19016,19166,19168,19203,19204,19205,19206,19208,19209,19231,19307,19428,19429,19486,19505,19507,19508,19509,19511,19512,19632,19633,19712,19713,19716,19843,19865,20059,20075,20078,20083,20350,20353,20857,20859,20864,20866,20867,20868,20869,20875,20879,20880,20881,20882,20883,20896,20897,20898,20900,20901,20902,20905,20906,20908,20909,20910,20911,20923,20988,20990,21101,21104,21126,21127,21128,21338,21346,21414,21694,21695,21696,21697,21702,21818,21904,22299,23136,23223,23956,23960,23961,24069,24071,24078,24080,24082,24084,24085,24224,24683,24684,24685,24686,24687,24688,24689,24690,24696,24697,24698,24761,24815,24849,26550,26553,26554,26621,26623,26624,26626,26635,26636,26637,26638,26639,26669,26670,26672,26694,26696,26716,26722,26727,26728,26729,26730,26734,26735,26737,26746,26782,26792,26793,26799,26800,26801,26802,26803,26805,26830,26928,26930,27633,27635,27636,27638,27639,27640,27641,27644,27645,27648,27650,27651,27653,27729,27731,27732,27734,27736,27742,27743,27744,27745,27871,27947,27949,27960,27961,27962,27963,27964,27965,27966,27969,27970,27971,27972,27979,27982,28132,28153,28163,28199,28200,28201,28231,28249,28276,28340,28341,28368,28410,28547,28578,28579,28580,28581,28582,28583,28584,28585,28826,28835,28836,28837,28838,28920,28961,28965,29128,29335,29365,29735,29768,29774,29818,29819,29820,29822,29826,29829,29832,29836,29838,29874,29931,30071,30083,30085,30111,30179,30276,30277,30278,30279,30283,30284,30285,30286,30287,30319,30329,30414,30416,30418,30419,30570,30660,30665,30695,30892,30893,30994,30892,30893,30994,31007,31008,31009,31010,31019,31021,31023,31027,31028,31057,31105,31260,32353,33235,34190,34196,34197,34198,34199,34203,36499,35143,36516,36522,36551,36561,36564,36620,36620,36666,36764,36765,36766,36767,36770,36771,36772,36773,36807,36830,36840,36841,36842,36874,36879,36892,36896,36916,37230,37582,37583,37670,37711,37712,37713,37728,37774,37779,38482,38487,47131,47134,47135,47136,47137,47140,47141,47145,47231,47232,55418,57158,57159,57160,57749,57875,57877,57890,59705,59722,59746,-251442,-251439,-251437,-251436,-251430,-251426,-251425,-213224,-201800,-201785,-201770,-201741,-120906,-120772,-91249,-91248,-91247,-90987,-90986,-90985,-83416,-83415,-83377,-83375,-83177,-52356);
+UPDATE `smart_scripts` SET `event_flags`=`event_flags`&~4 WHERE `source_type`=0 AND `entryorguid` IN (3654,3875,12129,15631,15974,15975,15976,15977,15978,15979,15980,15981,16017,16018,16020,16021,16022,16024,16025,16029,16034,16036,16037,16067,16142,16145,16146,16154,16156,16163,16164,16165,16167,16168,16193,16194,16215,16216,16236,16243,16244,16297,16375,16385,16447,16453,16505,16507,16523,16530,16573,16593,16594,16699,16983,16984,17055,17259,17270,17271,17280,17281,17309,17356,17357,17370,17371,17395,17397,17399,17400,17401,17414,17420,17427,17455,17462,17464,17465,17477,17478,17491,17540,17621,17622,17623,17624,17626,17669,17670,17671,17694,17695,17721,17722,17723,17724,17725,17726,17727,17728,17729,17730,17731,17734,17735,17771,17800,17801,17802,17803,17805,17814,17815,17816,17817,17819,17820,17826,17827,17833,17835,17839,17840,17860,17871,17885,17890,17892,17938,17940,17952,17957,17958,17959,17961,17962,17963,17964,17964,17993,17994,18092,18093,18094,18105,18155,18170,18171,18172,18206,18312,18313,18314,18315,18317,18319,18320,18322,18326,18328,18331,18343,18404,18405,18419,18420,18421,18422,18429,18493,18495,18499,18500,18501,18506,18557,18558,18559,18598,18632,18633,18634,18635,18637,18638,18640,18641,18664,18702,18794,18796,18848,18870,18894,18934,18983,18994,18995,19016,19166,19168,19203,19204,19205,19206,19208,19209,19231,19307,19428,19429,19486,19505,19507,19508,19509,19511,19512,19632,19633,19712,19713,19716,19843,19865,20059,20075,20078,20083,20350,20353,20857,20859,20864,20866,20867,20868,20869,20875,20879,20880,20881,20882,20883,20896,20897,20898,20900,20901,20902,20905,20906,20908,20909,20910,20911,20923,20988,20990,21101,21104,21126,21127,21128,21159,21338,21346,21414,21694,21695,21696,21697,21702,21818,21904,22299,23136,23956,23960,23961,24069,24071,24078,24080,24082,24084,24085,24224,24683,24684,24685,24686,24687,24688,24689,24690,24696,24697,24698,24761,24815,24849,26550,26553,26554,26621,26623,26624,26626,26635,26636,26637,26638,26639,26669,26670,26672,26694,26696,26716,26722,26727,26728,26729,26730,26734,26735,26737,26746,26782,26792,26793,26799,26800,26801,26802,26803,26805,26830,26928,26930,27633,27635,27636,27638,27639,27640,27641,27644,27645,27648,27650,27651,27653,27729,27731,27732,27734,27736,27742,27743,27744,27745,27871,27947,27949,27960,27961,27962,27963,27964,27965,27966,27969,27970,27971,27972,27979,27982,28132,28153,28163,28199,28200,28201,28231,28249,28276,28340,28341,28368,28410,28547,28578,28579,28580,28581,28582,28583,28584,28585,28826,28835,28836,28837,28838,28920,28961,28965,29128,29335,29365,29735,29768,29774,29818,29819,29820,29822,29826,29829,29832,29836,29838,29874,29931,30071,30083,30085,30111,30179,30276,30277,30278,30279,30283,30284,30285,30286,30287,30319,30329,30414,30416,30418,30419,30570,30660,30665,30695,30892,30893,30994,30892,30893,30994,31007,31008,31009,31010,31019,31021,31023,31027,31028,31057,31105,31260,32353,33235,34190,34196,34197,34198,34199,34203,36499,36516,36522,36551,36561,36564,36620,36620,36666,36764,36765,36766,36767,36770,36771,36772,36773,36807,36830,36841,36874,36879,36896,36916,37230,37582,37583,37670,37711,37712,37713,37774,37779,38482,38487,47131,47134,47135,47136,47137,47140,47141,47145,47231,47232,55418,57158,57159,57160,57749,57875,57877,57890,59705,59722,59746,-213224,-201800,-201785,-201770,-201741,-120906,-120772,-83416,-83415,-83377,-83375,-83177,-52356);
+UPDATE `smart_scripts` SET `event_flags`=`event_flags`&~8 WHERE `source_type`=0 AND `entryorguid` IN (15631,21159,36807,37230,55418,57158,57159,57160,57749,57875,57877,57890,-120906,-120772);
+UPDATE `smart_scripts` SET `event_flags`=`event_flags`&~16 WHERE `source_type`=0 AND `entryorguid` IN (15631,21159,36807,37230,55418,57158,57159,57160,57749,57875,57877,57890,-120906,-120772);
+
+UPDATE `smart_scripts` SET `event_flags`=`event_flags`&~2 WHERE `source_type`=1 AND `entryorguid` IN (177371,177372,177373,177375,177376,177377,194555,201969);
+UPDATE `smart_scripts` SET `event_flags`=`event_flags`&~4 WHERE `source_type`=1 AND `entryorguid` IN (194555,201969);
+
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=644 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=3654 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=3669 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=3670 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=3671 AND `id`=5;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=3673 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=3875 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=3914 AND `id` IN (1,2,3);
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=3927 AND `id` IN (3,4,5);
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=4274 AND `id` IN (1,2,3);
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=4625 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=7800 AND `id`=4;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=8580 AND `id` IN (1,2,5,6);
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=9034 AND `id`=4;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=9035 AND `id`=4;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=9036 AND `id`=4;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=9038 AND `id`=5;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=9040 AND `id`=5;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=10416 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=10417 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=15974 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=15974 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=15975 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=15975 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=15976 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=15976 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=15977 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=15977 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=15978 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=15978 AND `id`=4;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=15979 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=15979 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=15980 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=15980 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=15981 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=15981 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16017 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16017 AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16018 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16018 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16020 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16020 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16021 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16021 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16022 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16022 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16029 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16029 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16034 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16034 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16037 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16037 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16145 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16145 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16146 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16146 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16163 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16163 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16164 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16164 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16167 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16167 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16168 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16168 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16215 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16215 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16236 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16236 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16244 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16244 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16297 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16297 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16385 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16385 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=16523 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=16523 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16530 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16530 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16573 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16573 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=16594 AND `id` IN (5,8);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=16594 AND `id` IN (6,9);
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=16983 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=16983 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=17055 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=17055 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17270 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17270 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17309 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17309 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17371 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17371 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17395 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17395 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17400 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17414 AND `id` IN (1,2,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17414 AND `id` IN (3,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17420 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17420 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17427 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17427 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17477 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17477 AND `id` IN (3,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17622 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17622 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17669 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17669 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17670 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17670 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17694 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17694 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17721 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17721 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17722 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17722 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17724 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17724 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17726 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17726 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17729 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17729 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17730 AND `id` IN (0,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17730 AND `id` IN (2,5,7);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17771 AND `id` IN (2,4,6,8,10,12);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17771 AND `id` IN (3,5,7,9,11,13);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17801 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17801 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17803 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17803 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17815 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17815 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17820 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17820 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid`=17826 AND `id` IN (11,13);
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid`=17827 AND `id` IN (6,7);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17833 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17833 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17835 AND `id` IN (4,6,11);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17835 AND `id` IN (5,7,8,10,12);
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid`=17835 AND `id` IN (0,1,13,14);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17839 AND `id` IN (3,5,7,9);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17839 AND `id` IN (4,6,8,10);
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid`=17839 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17871 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17871 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17892 AND `id` IN (5,6,15,18,19,28,29);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17892 AND `id` IN (9,16,22);
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid`=17892 AND `id` IN (0,1,3,4,32,33);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17938 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17938 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17940 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17940 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17961 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17961 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17963 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17963 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=17964 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=17964 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18094 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18094 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18105 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18105 AND `id`=4;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18171 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18171 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18312 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18312 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18313 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18313 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18314 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18314 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18315 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18315 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18317 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18317 AND `id` IN (2,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18319 AND `id` IN (3,5,7);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18319 AND `id` IN (4,6,8);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18320 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18320 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18322 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18322 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18326 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18326 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18328 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18328 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18331 AND `id` IN (0,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18331 AND `id` IN (1,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18343 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18343 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18419 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18419 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18422 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18422 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18429 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18429 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18493 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18493 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18495 AND `id` IN (0,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18495 AND `id` IN (1,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18499 AND `id` IN (2,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18499 AND `id` IN (3,5,7);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18500 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18500 AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18501 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18501 AND `id` IN (3,5,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18506 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18506 AND `id`=4;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18557 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18557 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18558 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18558 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18559 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18559 AND `id` IN (1,3,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18632 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18632 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18633 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18633 AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18634 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18634 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18635 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18635 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18637 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18637 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18638 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18638 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18640 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18640 AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18641 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18641 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18702 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18702 AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18794 AND `id` IN (3,5,7,11);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18794 AND `id` IN (4,6,8,12,14);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18796 AND `id` IN (2,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18848 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18934 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18934 AND `id` IN (2,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18994 AND `id` IN (1,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18994 AND `id` IN (2,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid`=18994 AND `id` IN (6,7,8);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=18995 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=18995 AND `id` IN (2,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid`=18995 AND `id` IN (0,7,8);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19016 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19016 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19166 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19166 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19168 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19168 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19203 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19203 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19204 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19204 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19205 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19205 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19206 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19206 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19208 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19208 AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19209 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19209 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19231 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19231 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19307 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19428 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19428 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19429 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19429 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19486 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19486 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19505 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19505 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19507 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19507 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19508 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19508 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19633 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19633 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19712 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19712 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19713 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19713 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=19716 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=19716 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20059 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20059 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20083 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20083 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20857 AND `id` IN (0,1,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20857 AND `id` IN (3,4,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20859 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20859 AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20864 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20864 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20866 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20866 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20867 AND `id` IN (0,2,4,6,8);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20867 AND `id` IN (1,3,5,7,9);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20868 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20868 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20869 AND `id`=5;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20869 AND `id`=6;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20875 AND `id` IN (11,12,13,14,15,16);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20875 AND `id` IN (23,24,25,26,27,28);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20879 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20879 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20880 AND `id` IN (0,2,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20880 AND `id` IN (1,4,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20881 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20881 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20882 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20882 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20883 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20883 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20896 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20896 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20897 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20897 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20898 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20898 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20900 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20900 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20901 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20901 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20902 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20902 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid` IN (20905,20906,20908,20909,20911) AND `id` IN (0,1,2);
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid`=20910 AND `id` IN (0,2,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20910 AND `id` IN (4,6,8,11);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20910 AND `id` IN (5,7,9,12);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20988 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20988 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=20990 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=20990 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=21101 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=21101 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=21104 AND `id` IN (2,4,6,9,11);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=21104 AND `id` IN (3,5,7,8,10,12);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=21126 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=21126 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=21220 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=21301 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=21338 AND `id` IN (1,3,5,7,9);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=21338 AND `id` IN (2,4,6,8,10);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=21346 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=21346 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=21414 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=21414 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=21694 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=21694 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=21696 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=21696 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=21702 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=21702 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=21904 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=21904 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=23956 AND `id` IN (0,1);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=23956 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=23960 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=23960 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=23961 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=23961 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24069 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24069 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24071 AND `id` IN (0,2,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24071 AND `id` IN (1,3,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24078 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24078 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24082 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24082 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24085 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24085 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24683 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24683 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24684 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24684 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24685 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24685 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24686 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24686 AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24687 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24687 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24696 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24696 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24815 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24815 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=24849 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=24849 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26550 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26550 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26621 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26621 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26624 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26624 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26626 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26626 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26636 AND `id` IN (0,4,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26636 AND `id` IN (1,3,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26637 AND `id` IN (4,6);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26637 AND `id` IN (8,10);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26638 AND `id`=4;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26638 AND `id`=5;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26639 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26639 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26669 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26669 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26670 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26670 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26694 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26694 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26696 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26696 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26716 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26716 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26722 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26722 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26727 AND `id` IN (1,3,6,8,11,13);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26727 AND `id` IN (2,4,7,9,12,14);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26728 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26728 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26735 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26735 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26737 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26737 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26782 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26782 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26792 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26792 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26793 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26801 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26801 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26802 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26802 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26803 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26803 AND `id` IN (2,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26805 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26805 AND `id` IN (2,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26830 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26830 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26928 AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26928 AND `id` IN (4,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=26930 AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=26930 AND `id` IN (4,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27633 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27633 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27635 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27635 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27636 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27636 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27638 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27638 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27639 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27639 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27640 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27640 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27641 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27641 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27644 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27644 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27645 AND `id` IN (1,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27645 AND `id` IN (0,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27648 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27648 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27650 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27650 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27651 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27651 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27653 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27653 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27731 AND `id` IN (0,2,4,6,8);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27731 AND `id` IN (1,3,5,7,9);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27732 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27732 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27734 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27736 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27736 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27742 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27742 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27743 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27743 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27744 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27744 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27960 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27960 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27962 AND `id` IN (1,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27962 AND `id` IN (3,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27963 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27963 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27964 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27964 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27965 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27965 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27969 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27969 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27970 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27970 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27971 AND `id` IN (0,2,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27971 AND `id` IN (1,3,5,7);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27972 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27972 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27979 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27979 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=27982 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=27982 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28132 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28132 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28153 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28153 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28199 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28199 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28200 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28200 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28201 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28201 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28231 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28231 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28249 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28249 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28276 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28276 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28368 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28368 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28547 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28547 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28578 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28578 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28579 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28579 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28580 AND `id` IN (0,2,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28580 AND `id` IN (1,4,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28581 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28581 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28582 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28582 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28583 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28583 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28584 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28584 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28585 AND `id` IN (0,1);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28585 AND `id` IN (2,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28826 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28826 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28835 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28835 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28836 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28836 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28837 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28837 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28838 AND `id` IN (0,1);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28838 AND `id` IN (2,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28920 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28920 AND `id` IN (1,3,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28961 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28961 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=28965 AND `id` IN (0,9,11);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=28965 AND `id` IN (1,10,12);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29128 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29128 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29335 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29335 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29365 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29365 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29768 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29768 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29774 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29774 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29819 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29819 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29820 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29820 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29822 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29822 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29826 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29826 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29829 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29829 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29832 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29832 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29836 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29836 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29838 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29838 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29874 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29874 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=29931 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=29931 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=30071 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=30071 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=30085 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=30085 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30111 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30111 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30179 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30179 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30276 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30276 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30277 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30277 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30278 AND `id` IN (0,1);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30278 AND `id` IN (2,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30279 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30279 AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30283 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30283 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30284 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30284 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30285 AND `id` IN (0,2,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30285 AND `id` IN (1,3,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30286 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30286 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30287 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30287 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30319 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30319 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30329 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30329 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30414 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30414 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30418 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30418 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30419 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30419 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30665 AND `id` IN (2,4,6);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30665 AND `id` IN (3,5,7);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30695 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30695 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30892 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30892 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=30893 AND `id` IN (0,2);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=30893 AND `id` IN (1,3);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=31007 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=31007 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=31008 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=31008 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=31009 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=31009 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=31105 AND `id` IN (0,1);
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=32353 AND `id` IN (0,2,4);
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=32353 AND `id` IN (1,3,5);
+UPDATE `smart_scripts` SET `Difficulties`='14' WHERE `source_type`=0 AND `entryorguid`=33235 AND `id` IN (4,5);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=33235 AND `id` IN (2,3);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=34190 AND `id`=0;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=34196 AND `id` IN (0,2);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=34197 AND `id` IN (0,2);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=34198 AND `id` IN (0,1,3,5);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=34199 AND `id`=0;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=34203 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=36666 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=36666 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid` IN (36764,36765,36766,36767,36770,36771,36772,36773) AND `id` IN (0,1);
+UPDATE `smart_scripts` SET `Difficulties`='3,4,5,6' WHERE `source_type`=0 AND `entryorguid`=37230 AND `id` BETWEEN 0 AND 4;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=37582 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=37582 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=37583 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=37583 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=37774 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=37774 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=37779 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=37779 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,3' WHERE `source_type`=0 AND `entryorguid`=38482 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='4' WHERE `source_type`=0 AND `entryorguid`=38482 AND `id`=3;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=47131 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=47134 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=47135 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=47136 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=47137 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=47140 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=47141 AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=47141 AND `id` IN (2,3,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=47145 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=47231 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=47231 AND `id` IN (2,3);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=47232 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid`=-213224 AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid`=-213224 AND `id`=2;
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid` IN (-201785,-201770) AND `id`=0;
+UPDATE `smart_scripts` SET `Difficulties`='1,2' WHERE `source_type`=0 AND `entryorguid`=-201741 AND `id` IN (0,1);
+UPDATE `smart_scripts` SET `Difficulties`='1' WHERE `source_type`=0 AND `entryorguid`=-90985 AND `id` BETWEEN 0 AND 5;
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid` IN (-83416,-83415) AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid` IN (-83416,-83415) AND `id` IN (4,6);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid` IN (-83377,-83375) AND `id` IN (2,4);
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid` IN (-83377,-83375) AND `id` IN (3,5);
+UPDATE `smart_scripts` SET `Difficulties`='0,1' WHERE `source_type`=0 AND `entryorguid` IN (-83177,-52356) AND `id`=1;
+UPDATE `smart_scripts` SET `Difficulties`='2' WHERE `source_type`=0 AND `entryorguid` IN (-83177,-52356) AND `id`=2;
diff --git a/src/server/database/Database/Implementation/WorldDatabase.cpp b/src/server/database/Database/Implementation/WorldDatabase.cpp
index 4b262d914a0..1a5275f0a13 100644
--- a/src/server/database/Database/Implementation/WorldDatabase.cpp
+++ b/src/server/database/Database/Implementation/WorldDatabase.cpp
@@ -27,7 +27,7 @@ void WorldDatabaseConnection::DoPrepareStatements()
PrepareStatement(WORLD_DEL_LINKED_RESPAWN_MASTER, "DELETE FROM linked_respawn WHERE linkedGuid = ? AND linkType = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_REP_LINKED_RESPAWN, "REPLACE INTO linked_respawn (guid, linkedGuid, linkType) VALUES (?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(WORLD_SEL_CREATURE_TEXT, "SELECT CreatureID, GroupID, ID, Text, Type, Language, Probability, Emote, Duration, Sound, SoundPlayType, BroadcastTextId, TextRange FROM creature_text", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_SMART_SCRIPTS, "SELECT entryorguid, source_type, id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, event_param5, event_param_string, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, action_param7, target_type, target_param1, target_param2, target_param3, target_param4, target_x, target_y, target_z, target_o FROM smart_scripts ORDER BY entryorguid, source_type, id, link", CONNECTION_SYNCH);
+ PrepareStatement(WORLD_SEL_SMART_SCRIPTS, "SELECT entryorguid, source_type, id, link, Difficulties, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, event_param5, event_param_string, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, action_param7, target_type, target_param1, target_param2, target_param3, target_param4, target_x, target_y, target_z, target_o FROM smart_scripts ORDER BY entryorguid, source_type, id, link", CONNECTION_SYNCH);
PrepareStatement(WORLD_DEL_GAMEOBJECT, "DELETE FROM gameobject WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_DEL_EVENT_GAMEOBJECT, "DELETE FROM game_event_gameobject WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_INS_GRAVEYARD_ZONE, "INSERT INTO graveyard_zone (ID, GhostZone) VALUES (?, ?)", CONNECTION_ASYNC);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 561ec21655f..9433a4b8761 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -3934,38 +3934,24 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn
continue;
#endif
- if (scriptholder.event.event_flags & SMART_EVENT_FLAG_DIFFICULTY_ALL)//if has instance flag add only if in it
+ if (obj && scriptholder.Difficulties.size())
{
- if (!(obj && obj->GetMap()->IsDungeon()))
- continue;
-
- // TODO: fix it for new maps and difficulties
- switch (obj->GetMap()->GetDifficultyID())
+ bool foundValidDifficulty = false;
+ for (Difficulty difficulty : scriptholder.Difficulties)
{
- case DIFFICULTY_NORMAL:
- case DIFFICULTY_10_N:
- if (!(scriptholder.event.event_flags & SMART_EVENT_FLAG_DIFFICULTY_0))
- continue;
- break;
- case DIFFICULTY_HEROIC:
- case DIFFICULTY_25_N:
- if (!(scriptholder.event.event_flags & SMART_EVENT_FLAG_DIFFICULTY_1))
- continue;
- break;
- case DIFFICULTY_10_HC:
- if (!(scriptholder.event.event_flags & SMART_EVENT_FLAG_DIFFICULTY_2))
- continue;
- break;
- case DIFFICULTY_25_HC:
- if (!(scriptholder.event.event_flags & SMART_EVENT_FLAG_DIFFICULTY_3))
- continue;
- break;
- default:
+ if (difficulty == obj->GetMap()->GetDifficultyID())
+ {
+ foundValidDifficulty = true;
break;
+ }
}
+
+ if (!foundValidDifficulty)
+ continue;
}
+
mAllEventFlags |= scriptholder.event.event_flags;
- mEvents.push_back(scriptholder);//NOTE: 'world(0)' events still get processed in ANY instance mode
+ mEvents.push_back(scriptholder);
}
}
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 5ab032a1ac6..10c3914d9a7 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -30,6 +30,7 @@
#include "ObjectMgr.h"
#include "SpellInfo.h"
#include "SpellMgr.h"
+#include "StringConvert.h"
#include "Timer.h"
#include "UnitDefines.h"
#include "Util.h"
@@ -248,37 +249,65 @@ void SmartAIMgr::LoadSmartAIFromDB()
temp.source_type = source_type;
temp.event_id = fields[2].GetUInt16();
temp.link = fields[3].GetUInt16();
- temp.event.type = (SMART_EVENT)fields[4].GetUInt8();
- temp.event.event_phase_mask = fields[5].GetUInt16();
- temp.event.event_chance = fields[6].GetUInt8();
- temp.event.event_flags = fields[7].GetUInt16();
-
- temp.event.raw.param1 = fields[8].GetUInt32();
- temp.event.raw.param2 = fields[9].GetUInt32();
- temp.event.raw.param3 = fields[10].GetUInt32();
- temp.event.raw.param4 = fields[11].GetUInt32();
- temp.event.raw.param5 = fields[12].GetUInt32();
-
- temp.event.param_string = fields[13].GetString();
-
- temp.action.type = (SMART_ACTION)fields[14].GetUInt8();
- temp.action.raw.param1 = fields[15].GetUInt32();
- temp.action.raw.param2 = fields[16].GetUInt32();
- temp.action.raw.param3 = fields[17].GetUInt32();
- temp.action.raw.param4 = fields[18].GetUInt32();
- temp.action.raw.param5 = fields[19].GetUInt32();
- temp.action.raw.param6 = fields[20].GetUInt32();
- temp.action.raw.param7 = fields[21].GetUInt32();
-
- temp.target.type = (SMARTAI_TARGETS)fields[22].GetUInt8();
- temp.target.raw.param1 = fields[23].GetUInt32();
- temp.target.raw.param2 = fields[24].GetUInt32();
- temp.target.raw.param3 = fields[25].GetUInt32();
- temp.target.raw.param4 = fields[26].GetUInt32();
- temp.target.x = fields[27].GetFloat();
- temp.target.y = fields[28].GetFloat();
- temp.target.z = fields[29].GetFloat();
- temp.target.o = fields[30].GetFloat();
+
+ bool invalidDifficulties = false;
+ for (std::string_view token : Trinity::Tokenize(fields[4].GetStringView(), ',', false))
+ {
+ std::optional<std::underlying_type_t<Difficulty>> tokenValue = Trinity::StringTo<std::underlying_type_t<Difficulty>>(token);
+ if (!tokenValue.has_value())
+ {
+ invalidDifficulties = true;
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Invalid difficulties for entryorguid ({}) source_type ({}) id ({}), skipped loading.",
+ temp.entryOrGuid, temp.GetScriptType(), temp.event_id);
+ break;
+ }
+
+ Difficulty difficultyId = Difficulty(tokenValue.value());
+ if (difficultyId && !sDifficultyStore.LookupEntry(difficultyId))
+ {
+ invalidDifficulties = true;
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Invalid difficulty id ({}) for entryorguid ({}) source_type ({}) id ({}), skipped loading.",
+ difficultyId, temp.entryOrGuid, temp.GetScriptType(), temp.event_id);
+ break;
+ }
+
+ temp.Difficulties.push_back(difficultyId);
+ }
+
+ if (invalidDifficulties)
+ continue;
+
+ temp.event.type = (SMART_EVENT)fields[5].GetUInt8();
+ temp.event.event_phase_mask = fields[6].GetUInt16();
+ temp.event.event_chance = fields[7].GetUInt8();
+ temp.event.event_flags = fields[8].GetUInt16();
+
+ temp.event.raw.param1 = fields[9].GetUInt32();
+ temp.event.raw.param2 = fields[10].GetUInt32();
+ temp.event.raw.param3 = fields[11].GetUInt32();
+ temp.event.raw.param4 = fields[12].GetUInt32();
+ temp.event.raw.param5 = fields[13].GetUInt32();
+
+ temp.event.param_string = fields[14].GetString();
+
+ temp.action.type = (SMART_ACTION)fields[15].GetUInt8();
+ temp.action.raw.param1 = fields[16].GetUInt32();
+ temp.action.raw.param2 = fields[17].GetUInt32();
+ temp.action.raw.param3 = fields[18].GetUInt32();
+ temp.action.raw.param4 = fields[19].GetUInt32();
+ temp.action.raw.param5 = fields[20].GetUInt32();
+ temp.action.raw.param6 = fields[21].GetUInt32();
+ temp.action.raw.param7 = fields[22].GetUInt32();
+
+ temp.target.type = (SMARTAI_TARGETS)fields[23].GetUInt8();
+ temp.target.raw.param1 = fields[24].GetUInt32();
+ temp.target.raw.param2 = fields[25].GetUInt32();
+ temp.target.raw.param3 = fields[26].GetUInt32();
+ temp.target.raw.param4 = fields[27].GetUInt32();
+ temp.target.x = fields[28].GetFloat();
+ temp.target.y = fields[29].GetFloat();
+ temp.target.z = fields[30].GetFloat();
+ temp.target.o = fields[31].GetFloat();
//check target
if (!IsTargetValid(temp))
@@ -1079,19 +1108,25 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
if (e.action.type <= 0 || e.action.type >= SMART_ACTION_END)
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid {} using event({}) has invalid action type ({}), skipped.", e.entryOrGuid, e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid {} using event ({}) has invalid action type ({}), skipped.", e.entryOrGuid, e.event_id, e.GetActionType());
return false;
}
if (e.event.event_phase_mask > SMART_EVENT_PHASE_ALL)
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid {} using event({}) has invalid phase mask ({}), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid {} using event ({}) has invalid phase mask ({}), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask);
return false;
}
if (e.event.event_flags > SMART_EVENT_FLAGS_ALL)
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid {} using event({}) has invalid event flags ({}), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid {} using event ({}) has invalid event flags ({}), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags);
+ return false;
+ }
+
+ if (e.event.event_flags & SMART_EVENT_FLAGS_DEPRECATED)
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid {} using event ({}) has deprecated event flags ({}), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags);
return false;
}
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 966b5fd2b0f..0409ec84385 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -18,6 +18,7 @@
#ifndef TRINITY_SMARTSCRIPTMGR_H
#define TRINITY_SMARTSCRIPTMGR_H
+#include "DBCEnums.h"
#include "Define.h"
#include "ObjectGuid.h"
#include "WaypointDefines.h"
@@ -1588,19 +1589,19 @@ const uint32 SmartAIEventMask[SMART_EVENT_END][2] =
enum SmartEventFlags
{
- SMART_EVENT_FLAG_NOT_REPEATABLE = 0x001, //Event can not repeat
- SMART_EVENT_FLAG_DIFFICULTY_0 = 0x002, //Event only occurs in instance difficulty 0
- SMART_EVENT_FLAG_DIFFICULTY_1 = 0x004, //Event only occurs in instance difficulty 1
- SMART_EVENT_FLAG_DIFFICULTY_2 = 0x008, //Event only occurs in instance difficulty 2
- SMART_EVENT_FLAG_DIFFICULTY_3 = 0x010, //Event only occurs in instance difficulty 3
- SMART_EVENT_FLAG_RESERVED_5 = 0x020,
- SMART_EVENT_FLAG_RESERVED_6 = 0x040,
- SMART_EVENT_FLAG_DEBUG_ONLY = 0x080, //Event only occurs in debug build
- SMART_EVENT_FLAG_DONT_RESET = 0x100, //Event will not reset in SmartScript::OnReset()
- SMART_EVENT_FLAG_WHILE_CHARMED = 0x200, //Event occurs even if AI owner is charmed
-
- SMART_EVENT_FLAG_DIFFICULTY_ALL = (SMART_EVENT_FLAG_DIFFICULTY_0|SMART_EVENT_FLAG_DIFFICULTY_1|SMART_EVENT_FLAG_DIFFICULTY_2|SMART_EVENT_FLAG_DIFFICULTY_3),
- SMART_EVENT_FLAGS_ALL = (SMART_EVENT_FLAG_NOT_REPEATABLE|SMART_EVENT_FLAG_DIFFICULTY_ALL|SMART_EVENT_FLAG_RESERVED_5|SMART_EVENT_FLAG_RESERVED_6|SMART_EVENT_FLAG_DEBUG_ONLY|SMART_EVENT_FLAG_DONT_RESET|SMART_EVENT_FLAG_WHILE_CHARMED),
+ SMART_EVENT_FLAG_NOT_REPEATABLE = 0x001, // Event can not repeat
+ SMART_EVENT_FLAG_DIFFICULTY_0_DEPRECATED = 0x002, // UNUSED, DO NOT REUSE
+ SMART_EVENT_FLAG_DIFFICULTY_1_DEPRECATED = 0x004, // UNUSED, DO NOT REUSE
+ SMART_EVENT_FLAG_DIFFICULTY_2_DEPRECATED = 0x008, // UNUSED, DO NOT REUSE
+ SMART_EVENT_FLAG_DIFFICULTY_3_DEPRECATED = 0x010, // UNUSED, DO NOT REUSE
+ SMART_EVENT_FLAG_RESERVED_5 = 0x020,
+ SMART_EVENT_FLAG_RESERVED_6 = 0x040,
+ SMART_EVENT_FLAG_DEBUG_ONLY = 0x080, //Event only occurs in debug build
+ SMART_EVENT_FLAG_DONT_RESET = 0x100, //Event will not reset in SmartScript::OnReset()
+ SMART_EVENT_FLAG_WHILE_CHARMED = 0x200, //Event occurs even if AI owner is charmed
+
+ SMART_EVENT_FLAGS_DEPRECATED = (SMART_EVENT_FLAG_DIFFICULTY_0_DEPRECATED | SMART_EVENT_FLAG_DIFFICULTY_1_DEPRECATED | SMART_EVENT_FLAG_DIFFICULTY_2_DEPRECATED | SMART_EVENT_FLAG_DIFFICULTY_3_DEPRECATED),
+ SMART_EVENT_FLAGS_ALL = (SMART_EVENT_FLAG_NOT_REPEATABLE| SMART_EVENT_FLAGS_DEPRECATED | SMART_EVENT_FLAG_RESERVED_5 | SMART_EVENT_FLAG_RESERVED_6 | SMART_EVENT_FLAG_DEBUG_ONLY | SMART_EVENT_FLAG_DONT_RESET | SMART_EVENT_FLAG_WHILE_CHARMED),
// Temp flags, used only at runtime, never stored in DB
SMART_EVENT_FLAG_TEMP_IGNORE_CHANCE_ROLL = 0x40000000, //Event occurs no matter what roll_chance_i(e.event.event_chance) returns.
@@ -1628,6 +1629,7 @@ struct SmartScriptHolder
SmartScriptType source_type;
uint32 event_id;
uint32 link;
+ std::vector<Difficulty> Difficulties;
SmartEvent event;
SmartAction action;