aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql1
-rw-r--r--sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql239
-rw-r--r--sql/updates/world/2012_01_28_00_world_conditions.sql (renamed from sql/updates/world/2012_01_28_world_conditions.sql)2
-rw-r--r--sql/updates/world/2012_01_29_00_world_spell_dbc.sql4
-rw-r--r--sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql3
-rw-r--r--sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql3
-rw-r--r--sql/updates/world/2012_01_29_03_world_misc.sql102
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.cpp5
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.h3
-rwxr-xr-xsrc/server/game/Miscellaneous/SharedDefines.h5
-rwxr-xr-xsrc/server/game/Quests/QuestDef.h2
-rw-r--r--src/server/scripts/Kalimdor/moonglade.cpp146
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp70
-rw-r--r--src/server/scripts/World/npcs_special.cpp281
14 files changed, 861 insertions, 5 deletions
diff --git a/sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql b/sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql
new file mode 100644
index 00000000000..d81cf3a6617
--- /dev/null
+++ b/sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql
@@ -0,0 +1 @@
+DELETE FROM `character_queststatus_rewarded` WHERE `quest` IN (8619,8635,8636,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8670,8671,8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8688,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725,8726,8727,8862,8863,8864,8865,8866,8867,8870,8871,8872,8873,8874,8875,8876,8877,8878,8879,8880,8881,8882,8883,13012,13013,13014,13015,13016,13017,13018,13019,13020,13021,13022,13023,13024,13025,13026,13027,13028,13029,13030,13031,13032,13033,13065,13066,13067,11120,11431,11442,11409,11318,11117,11400,11419,11118,11122,11293,11294,11321,11407,11408,11412,11413,11441,11446,11454,11486,11487,12020,12022,12318,12193,12062,12491,11447,12191,12492,12194,12192,12278,12306,12420,12421,13932,13649,13931,11127,11320,11347,11437,11438,11444,11445,9319,9322,9323,9324,9325,9326,9330,9331,9332,9339,9365,9367,9368,9386,9388,9389,11657,11691,11731,11882,11883,11886,11891,11915,11917,11921,11922,11923,11924,11925,11926,11933,11935,11947,11948,11952,11953,11954,11955,11964,11966,11970,11971,11972,12012,14022,114023,114024,114028,114030,114033,114036,114037,114040,114041,114043,114044,114064,114065,114035,114047,114048,114051,114053,114054,114055,114058,114059,114060,114061,114062,114488,24597,24609,24656,24657,24745,24848,24849,24666,24792,24804,24611,24536,24612,24635,24636,24655,24610,24629,24614,24576,24613,24615,24638,24645,24647,24648,24649,24650,24651,24652,24658,24659,24660,24662,24663,24664,24665,24793,24805,24850,24851,24541,14483,24661,1657,1658,6961,6962,6963,6964,6983,6984,7021,7022,7023,7024,7025,7042,7043,7045,7061,7062,7063,8149,8150,8311,8312,8322,8353,8354,8355,8356,8357,8358,8359,8360,8373,8409,8744,8746,8762,8763,8767,8768,8769,8788,8799,8803,8827,8828,8860,8861,8868,8897,8898,8899,8900,8901,8902,8903,8904,8971,8972,8973,8974,8975,8976,8979,8980,8981,8982,8983,8984,8993,9024,9025,9026,9027,9028,11131,11135,11219,11220,11242,11356,11357,11360,11361,11392,11401,11403,11404,11405,11435,11439,11440,11449,11450,11528,11558,11580,11581,11583,11584,11696,11732,11734,11735,11736,11737,11738,11739,11740,11741,11742,11743,11744,11745,11746,11747,11748,11749,11750,11751,11752,11753,11754,11755,11756,11757,11758,11759,11760,11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,11776,11777,11778,11779,11780,11781,11782,11783,11784,11785,11786,11787,11799,11800,11801,11802,11803,11804,11805,11806,11807,11808,11809,11810,11811,11812,11813,11814,11815,11816,11817,11818,11819,11820,11821,11822,11823,11824,11825,11826,11827,11828,11829,11830,11831,11832,11833,11834,11835,11836,11837,11838,11839,11840,11841,11842,11843,11844,11845,11846,11847,11848,11849,11850,11851,11852,11853,11854,11855,11856,11857,11858,11859,11860,11861,11862,11863,11937,11976,12133,12135,12139,12155,12286,12313,12331,12332,12333,12334,12335,12336,12337,12338,12339,12340,12341,12342,12343,12344,12345,12346,12347,12348,12349,12350,12351,12352,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12940,12941,12944,12945,12946,12947,12950,13203,13433,13434,13435,13436,13437,13438,13439,13440,13441,13442,13443,13444,13445,13446,13447,13448,13449,13450,13451,13452,13453,13454,13455,13456,13457,13458,13459,13460,13461,13462,13463,13464,13465,13466,13467,13468,13469,13470,13471,13472,13473,13474,13485,13486,13487,13488,13489,13490,13491,13492,13493,13494,13495,13496,13497,13498,13499,13500,13501,13548,13966);
diff --git a/sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql b/sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql
new file mode 100644
index 00000000000..0bf0b4bb1e5
--- /dev/null
+++ b/sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql
@@ -0,0 +1,239 @@
+DELETE FROM `game_event_seasonal_questrelation` WHERE `questId` IN (8619,8635,8636,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8670,8671,8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8688,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725,8726,8727,8862,8863,8864,8865,8866,8867,8870,8871,8872,8873,8874,8875,8876,8877,8878,8879,8880,8881,8882,8883,13012,13013,13014,13015,13016,13017,13018,13019,13020,13021,13022,13023,13024,13025,13026,13027,13028,13029,13030,13031,13032,13033,13065,13066,13067,11120,11431,11442,11409,11318,11117,11400,11419,11118,11122,11293,11294,11321,11407,11408,11412,11413,11441,11446,11454,11486,11487,12020,12022,12318,12193,12062,12491,11447,12191,12492,12194,12192,12278,12306,12420,12421,13932,13649,13931,11127,11320,11347,11437,11438,11444,11445,9319,9322,9323,9324,9325,9326,9330,9331,9332,9339,9365,9367,9368,9386,9388,9389,11657,11691,11731,11882,11883,11886,11891,11915,11917,11921,11922,11923,11924,11925,11926,11933,11935,11947,11948,11952,11953,11954,11955,11964,11966,11970,11971,11972,12012,14488,24597,24609,24656,24657,24745,24848,24849,24666,24792,24804,24611,24536,24612,24635,24636,24655,24610,24629,24614,24576,24613,24615,24638,24645,24647,24648,24649,24650,24651,24652,24658,24659,24660,24662,24663,24664,24665,24793,24805,24850,24851,24541,14483,24661);
+INSERT INTO `game_event_seasonal_questrelation` (`questId`,`eventEntry`) VALUES
+(8619,7),
+(8635,7),
+(8636,7),
+(8642,7),
+(8643,7),
+(8644,7),
+(8645,7),
+(8646,7),
+(8647,7),
+(8648,7),
+(8649,7),
+(8650,7),
+(8651,7),
+(8652,7),
+(8653,7),
+(8654,7),
+(8670,7),
+(8671,7),
+(8672,7),
+(8673,7),
+(8674,7),
+(8675,7),
+(8676,7),
+(8677,7),
+(8678,7),
+(8679,7),
+(8680,7),
+(8681,7),
+(8682,7),
+(8683,7),
+(8684,7),
+(8685,7),
+(8686,7),
+(8688,7),
+(8713,7),
+(8714,7),
+(8715,7),
+(8716,7),
+(8717,7),
+(8718,7),
+(8719,7),
+(8720,7),
+(8721,7),
+(8722,7),
+(8723,7),
+(8724,7),
+(8725,7),
+(8726,7),
+(8727,7),
+(8862,7),
+(8863,7),
+(8864,7),
+(8865,7),
+(8866,7),
+(8867,7),
+(8870,7),
+(8871,7),
+(8872,7),
+(8873,7),
+(8874,7),
+(8875,7),
+(8876,7),
+(8877,7),
+(8878,7),
+(8879,7),
+(8880,7),
+(8881,7),
+(8882,7),
+(8883,7),
+(13012,7),
+(13013,7),
+(13014,7),
+(13015,7),
+(13016,7),
+(13017,7),
+(13018,7),
+(13019,7),
+(13020,7),
+(13021,7),
+(13022,7),
+(13023,7),
+(13024,7),
+(13025,7),
+(13026,7),
+(13027,7),
+(13028,7),
+(13029,7),
+(13030,7),
+(13031,7),
+(13032,7),
+(13033,7),
+(13065,7),
+(13066,7),
+(13067,7),
+(11120,24),
+(11431,24),
+(11442,24),
+(11409,24),
+(11318,24),
+(11117,24),
+(11400,24),
+(11419,24),
+(11118,24),
+(11122,24),
+(11293,24),
+(11294,24),
+(11321,24),
+(11407,24),
+(11408,24),
+(11412,24),
+(11413,24),
+(11441,24),
+(11446,24),
+(11454,24),
+(11486,24),
+(11487,24),
+(12020,24),
+(12022,24),
+(12318,24),
+(12193,24),
+(12062,24),
+(12491,24),
+(11447,24),
+(12191,24),
+(12492,24),
+(12194,24),
+(12192,24),
+(12278,24),
+(12306,24),
+(12420,24),
+(12421,24),
+(13932,24),
+(13649,24),
+(13931,24),
+(11127,24),
+(11320,24),
+(11347,24),
+(11437,24),
+(11438,24),
+(11444,24),
+(11445,24),
+(9319,1),
+(9322,1),
+(9323,1),
+(9324,1),
+(9325,1),
+(9326,1),
+(9330,1),
+(9331,1),
+(9332,1),
+(9339,1),
+(9365,1),
+(9367,1),
+(9368,1),
+(9386,1),
+(9388,1),
+(9389,1),
+(11657,1),
+(11691,1),
+(11731,1),
+(11882,1),
+(11883,1),
+(11886,1),
+(11891,1),
+(11915,1),
+(11917,1),
+(11921,1),
+(11922,1),
+(11923,1),
+(11924,1),
+(11925,1),
+(11926,1),
+(11933,1),
+(11935,1),
+(11947,1),
+(11948,1),
+(11952,1),
+(11953,1),
+(11954,1),
+(11955,1),
+(11964,1),
+(11966,1),
+(11970,1),
+(11971,1),
+(11972,1),
+(12012,1),
+(13479,9),
+(13480,9),
+(13483,9),
+(13484,9),
+(13502,9),
+(13503,9),
+(14488,8),
+(24597,8),
+(24609,8),
+(24656,8),
+(24657,8),
+(24745,8),
+(24848,8),
+(24849,8),
+(24666,8),
+(24792,8),
+(24804,8),
+(24611,8),
+(24536,8),
+(24612,8),
+(24635,8),
+(24636,8),
+(24655,8),
+(24610,8),
+(24629,8),
+(24614,8),
+(24576,8),
+(24613,8),
+(24615,8),
+(24638,8),
+(24645,8),
+(24647,8),
+(24648,8),
+(24649,8),
+(24650,8),
+(24651,8),
+(24652,8),
+(24658,8),
+(24659,8),
+(24660,8),
+(24662,8),
+(24663,8),
+(24664,8),
+(24665,8),
+(24793,8),
+(24805,8),
+(24850,8),
+(24851,8),
+(24541,8),
+(14483,8),
+(24661,8);
diff --git a/sql/updates/world/2012_01_28_world_conditions.sql b/sql/updates/world/2012_01_28_00_world_conditions.sql
index 8d087af7e88..e66d893db35 100644
--- a/sql/updates/world/2012_01_28_world_conditions.sql
+++ b/sql/updates/world/2012_01_28_00_world_conditions.sql
@@ -13,4 +13,4 @@ UPDATE `conditions` SET `ConditionValue1`=64 WHERE `SourceTypeOrReferenceId`=17
UPDATE `conditions` SET `ConditionValue1`=4 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24107 AND `ConditionTypeOrReference`=16;
UPDATE `conditions` SET `ConditionValue1`=8 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24108 AND `ConditionTypeOrReference`=16;
UPDATE `conditions` SET `ConditionValue1`=512 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=69530 AND `ConditionTypeOrReference`=16;
-UPDATE `conditions` SET `ConditionValue1`=1024 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=69533 AND `ConditionTypeOrReference`=16; \ No newline at end of file
+UPDATE `conditions` SET `ConditionValue1`=1024 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=69533 AND `ConditionTypeOrReference`=16;
diff --git a/sql/updates/world/2012_01_29_00_world_spell_dbc.sql b/sql/updates/world/2012_01_29_00_world_spell_dbc.sql
new file mode 100644
index 00000000000..bbde43e3313
--- /dev/null
+++ b/sql/updates/world/2012_01_29_00_world_spell_dbc.sql
@@ -0,0 +1,4 @@
+-- Gushing Wound Removal spell
+DELETE FROM `spell_dbc` WHERE `id`=30023;
+INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES
+(30023,0,0,256,0,0,0,0,0,0,0,0,0,0,1,0,0,101,0,0,0,0,26,1,0,-1,0,0,164,164,164,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35321,38363,39215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,"Gushing Wound Removal");
diff --git a/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql b/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql
new file mode 100644
index 00000000000..d31489b8fce
--- /dev/null
+++ b/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_bonus_data` WHERE `entry` = 63544;
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+(63544, -1, -1, 0, 0, 'Priest - Empowered Renew');
diff --git a/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql b/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql
new file mode 100644
index 00000000000..13f9380c950
--- /dev/null
+++ b/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 57908 AND `spell_effect` = 57915;
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(57908,57915,0,'q13129 - Give quest item');
diff --git a/sql/updates/world/2012_01_29_03_world_misc.sql b/sql/updates/world/2012_01_29_03_world_misc.sql
new file mode 100644
index 00000000000..3253b5cd55b
--- /dev/null
+++ b/sql/updates/world/2012_01_29_03_world_misc.sql
@@ -0,0 +1,102 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (26374);
+INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES
+(26374,'spell_gen_elune_candle');
+
+-- Set Gigant Spotlight as not selectable
+UPDATE `creature_template` SET `unit_flags`=33554432 WHERE `entry`=15902;
+
+DELETE FROM `creature_template_addon` WHERE (`entry`IN(15902,15466));
+INSERT INTO `creature_template_addon`(`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(15466,0,0,0,0,0,17327), -- Add spirit particles to Omen minions
+(15902,0,0,0,0,0,50236); -- Add Spotlight aura to Gigant Spotlight (ummoned by 26392 on Omen's death)
+
+UPDATE `creature_template` SET `ScriptName`='npc_giant_spotlight' WHERE `entry`=15902;
+UPDATE `creature_template` SET `RegenHealth`=0,`ScriptName`='npc_omen' WHERE `entry`=15467;
+UPDATE `creature_template` SET `ScriptName`='npc_firework',`AIName`='',`faction_A`=35,`faction_H`=35,`unit_flags`=33555200 WHERE `entry` IN (15879,15880,15881,15882,15883,15884,15885,15886,15887,15888,15889,15890,15872,15873,15874,15875,15876,15877,15911,15912,15913,15914,15915,15916,15918);
+-- Cleanup EventAI and SmartAI
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (15879,15880,15881,15882,15883,15884,15885,15886,15887,15888,15889,15890,15872,15873,15874,15875,15876,15877,15911,15912,15913,15914,15915,15916,15918);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (15879,15880,15881,15882,15883,15884,15885,15886,15887,15888,15889,15890,15872,15873,15874,15875,15876,15877,15911,15912,15913,15914,15915,15916,15918);
+
+-- Update al targeting stuff for Fireworks and Rocket clusters
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (26294,26295,26333,26334,26336,26337,26338,26488,26490,26517,26521,26344,26347,26345,26348,26349,26351,26352,26354,26355,26356);
+INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+-- Targeting Firework Launcher
+(13,0,26294,0,18,0,180771,0,0,'',"Small White Rocket target Firework Launcher"),
+(13,0,26294,0,18,0,180850,0,0,'',"Small White Rocket target Firework Launcher"),
+(13,0,26294,0,18,0,180868,0,0,'',"Small White Rocket target Firework Launcher"),
+(13,0,26295,0,18,0,180771,0,0,'',"Small Yellow Rocket target Firework Launcher"),
+(13,0,26295,0,18,0,180850,0,0,'',"Small Yellow Rocket target Firework Launcher"),
+(13,0,26295,0,18,0,180868,0,0,'',"Small Yellow Rocket target Firework Launcher"),
+(13,0,26333,0,18,0,180771,0,0,'',"Large Blue Rocket target Firework Launcher"),
+(13,0,26333,0,18,0,180850,0,0,'',"Large Blue Rocket target Firework Launcher"),
+(13,0,26333,0,18,0,180868,0,0,'',"Large Blue Rocket target Firework Launcher"),
+(13,0,26334,0,18,0,180771,0,0,'',"Large Green Rocket target Firework Launcher"),
+(13,0,26334,0,18,0,180850,0,0,'',"Large Green Rocket target Firework Launcher"),
+(13,0,26334,0,18,0,180868,0,0,'',"Large Green Rocket target Firework Launcher"),
+(13,0,26336,0,18,0,180771,0,0,'',"Large Red Rocket target Firework Launcher"),
+(13,0,26336,0,18,0,180850,0,0,'',"Large Red Rocket target Firework Launcher"),
+(13,0,26336,0,18,0,180868,0,0,'',"Large Red Rocket target Firework Launcher"),
+(13,0,26337,0,18,0,180771,0,0,'',"Large White Rocket target Firework Launcher"),
+(13,0,26337,0,18,0,180850,0,0,'',"Large White Rocket target Firework Launcher"),
+(13,0,26337,0,18,0,180868,0,0,'',"Large White Rocket target Firework Launcher"),
+(13,0,26338,0,18,0,180771,0,0,'',"Large Yellow Rocket target Firework Launcher"),
+(13,0,26338,0,18,0,180850,0,0,'',"Large Yellow Rocket target Firework Launcher"),
+(13,0,26338,0,18,0,180868,0,0,'',"Large Yellow Rocket target Firework Launcher"),
+-- Targeting Cluster Launcher
+(13,0,26488,0,18,0,180772,0,0,'',"Large Blue Rocket Cluster target Cluster Launcher"),
+(13,0,26488,0,18,0,180859,0,0,'',"Large Blue Rocket Cluster target Cluster Launcher"),
+(13,0,26488,0,18,0,180869,0,0,'',"Large Blue Rocket Cluster target Cluster Launcher"),
+(13,0,26488,0,18,0,180874,0,0,'',"Large Blue Rocket Cluster target Cluster Launcher"),
+(13,0,26490,0,18,0,180772,0,0,'',"Large Green Rocket Cluster target Cluster Launcher"),
+(13,0,26490,0,18,0,180859,0,0,'',"Large Green Rocket Cluster target Cluster Launcher"),
+(13,0,26490,0,18,0,180869,0,0,'',"Large Green Rocket Cluster target Cluster Launcher"),
+(13,0,26490,0,18,0,180874,0,0,'',"Large Green Rocket Cluster target Cluster Launcher"),
+(13,0,26517,0,18,0,180772,0,0,'',"Large Red Rocket Cluster target Cluster Launcher"),
+(13,0,26517,0,18,0,180859,0,0,'',"Large Red Rocket Cluster target Cluster Launcher"),
+(13,0,26517,0,18,0,180869,0,0,'',"Large Red Rocket Cluster target Cluster Launcher"),
+(13,0,26517,0,18,0,180874,0,0,'',"Large Red Rocket Cluster target Cluster Launcher"),
+(13,0,26521,0,18,0,180772,0,0,'',"Lucky Lunar rocket Cluster target Cluster Launcher"),
+(13,0,26521,0,18,0,180859,0,0,'',"Lucky Lunar rocket Cluster target Cluster Launcher"),
+(13,0,26521,0,18,0,180869,0,0,'',"Lucky Lunar rocket Cluster target Cluster Launcher"),
+(13,0,26521,0,18,0,180874,0,0,'',"Lucky Lunar rocket Cluster target Cluster Launcher"),
+-- Targeting Firework Launcher (Again)
+(13,0,26347,0,18,0,180771,0,0,'',"Rocket, RED target Firework Launcher"),
+(13,0,26347,0,18,0,180850,0,0,'',"Rocket, RED target Firework Launcher"),
+(13,0,26347,0,18,0,180868,0,0,'',"Rocket, RED target Firework Launcher"),
+(13,0,26344,0,18,0,180771,0,0,'',"Rocket, BLUE target Firework Launcher"),
+(13,0,26344,0,18,0,180850,0,0,'',"Rocket, BLUE target Firework Launcher"),
+(13,0,26344,0,18,0,180868,0,0,'',"Rocket, BLUE target Firework Launcher"),
+(13,0,26345,0,18,0,180771,0,0,'',"Rocket, GREEEN target Firework Launcher"),
+(13,0,26345,0,18,0,180850,0,0,'',"Rocket, GREEEN target Firework Launcher"),
+(13,0,26345,0,18,0,180868,0,0,'',"Rocket, GREEEN target Firework Launcher"),
+(13,0,26348,0,18,0,180771,0,0,'',"Rocket, WHITE target Firework Launcher"),
+(13,0,26348,0,18,0,180850,0,0,'',"Rocket, WHITE target Firework Launcher"),
+(13,0,26348,0,18,0,180868,0,0,'',"Rocket, WHITE target Firework Launcher"),
+(13,0,26349,0,18,0,180771,0,0,'',"Rocket, YELLOW target Firework Launcher"),
+(13,0,26349,0,18,0,180850,0,0,'',"Rocket, YELLOW target Firework Launcher"),
+(13,0,26349,0,18,0,180868,0,0,'',"Rocket, YELLOW target Firework Launcher"),
+(13,0,26351,0,18,0,180771,0,0,'',"Rocket, BLUE BIG target Firework Launcher"),
+(13,0,26351,0,18,0,180850,0,0,'',"Rocket, BLUE BIG target Firework Launcher"),
+(13,0,26351,0,18,0,180868,0,0,'',"Rocket, BLUE BIG target Firework Launcher"),
+(13,0,26352,0,18,0,180771,0,0,'',"Rocket, GREEN BIG target Firework Launcher"),
+(13,0,26352,0,18,0,180850,0,0,'',"Rocket, GREEN BIG target Firework Launcher"),
+(13,0,26352,0,18,0,180868,0,0,'',"Rocket, GREEN BIG target Firework Launcher"),
+(13,0,26354,0,18,0,180771,0,0,'',"Rocket, RED BIG target Firework Launcher"),
+(13,0,26354,0,18,0,180850,0,0,'',"Rocket, RED BIG target Firework Launcher"),
+(13,0,26354,0,18,0,180868,0,0,'',"Rocket, RED BIG target Firework Launcher"),
+(13,0,26355,0,18,0,180771,0,0,'',"Rocket, WHITE BIG target Firework Launcher"),
+(13,0,26355,0,18,0,180850,0,0,'',"Rocket, WHITE BIG target Firework Launcher"),
+(13,0,26355,0,18,0,180868,0,0,'',"Rocket, WHITE BIG target Firework Launcher"),
+(13,0,26356,0,18,0,180771,0,0,'',"Rocket, YELLOW BIG target Firework Launcher"),
+(13,0,26356,0,18,0,180850,0,0,'',"Rocket, YELLOW BIG target Firework Launcher"),
+(13,0,26356,0,18,0,180868,0,0,'',"Rocket, YELLOW BIG target Firework Launcher");
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=15466;
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=15466 AND `source_type`=0);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(15466,0,0,0,8,0,100,0,26636,0,8000,9000,11,25495,0,0,0,0,0,1,0,0,0,0,0,0,0,"Minion of Omen - Cast Firework Dazzled when hitted by Elune's Candle firework");
+
+-- Cast quest credit spell when getting Elune's Blessing buff
+DELETE FROM `spell_scripts` WHERE `id`=26393;
+INSERT INTO `spell_scripts`(`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
+(26393,1,0,15,26394,2,0,0,0,0,0);
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index e33676d1d65..5d121869f54 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -771,6 +771,7 @@ void Battleground::EndBattleground(uint32 winner)
}
}
+ uint8 aliveWinners = GetAlivePlayersCountByTeam(winner);
for (BattlegroundPlayerMap::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
uint32 team = itr->second.Team;
@@ -796,6 +797,10 @@ void Battleground::EndBattleground(uint32 winner)
if (player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
+ // Last standing - Rated 5v5 arena & be solely alive player
+ if (team == winner && isArena() && isRated() && GetArenaType() == ARENA_TYPE_5v5 && aliveWinners == 1 && player->isAlive())
+ player->CastSpell(player, SPELL_THE_LAST_STANDING, true);
+
if (!player->isAlive())
{
player->ResurrectPlayer(1.0f);
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index fbbd94cad22..6eb64a2caba 100755
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -98,7 +98,8 @@ enum BattlegroundSpells
SPELL_RECENTLY_DROPPED_FLAG = 42792, // Recently Dropped Flag
SPELL_AURA_PLAYER_INACTIVE = 43681, // Inactive
SPELL_HONORABLE_DEFENDER_25Y = 68652, // +50% honor when standing at a capture point that you control, 25yards radius (added in 3.2)
- SPELL_HONORABLE_DEFENDER_60Y = 66157 // +50% honor when standing at a capture point that you control, 60yards radius (added in 3.2), probably for 40+ player battlegrounds
+ SPELL_HONORABLE_DEFENDER_60Y = 66157, // +50% honor when standing at a capture point that you control, 60yards radius (added in 3.2), probably for 40+ player battlegrounds
+ SPELL_THE_LAST_STANDING = 26549, // Arena achievement related
};
enum BattlegroundTimeIntervals
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 53f70096cbd..81b1b14d27d 100755
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -2398,7 +2398,10 @@ enum QuestSort
QUEST_SORT_BREWFEST = 370,
QUEST_SORT_INSCRIPTION = 371,
QUEST_SORT_DEATH_KNIGHT = 372,
- QUEST_SORT_JEWELCRAFTING = 373
+ QUEST_SORT_JEWELCRAFTING = 373,
+ QUEST_SORT_NOBLEGARDEN = 374,
+ QUEST_SORT_PILGRIMS_BOUNTY = 375,
+ QUEST_SORT_LOVE_IS_IN_THE_AIR = 376,
};
inline uint8 ClassByQuestSort(int32 QuestSort)
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index 3e142e1d84c..973735b84da 100755
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -251,7 +251,7 @@ class Quest
uint32 GetFlags() const { return Flags; }
bool IsDaily() const { return Flags & QUEST_FLAGS_DAILY; }
bool IsWeekly() const { return Flags & QUEST_FLAGS_WEEKLY; }
- bool IsSeasonal() const { return ZoneOrSort == -QUEST_SORT_SEASONAL; }
+ bool IsSeasonal() const { return (ZoneOrSort == -QUEST_SORT_SEASONAL || ZoneOrSort == -QUEST_SORT_SPECIAL || ZoneOrSort == -QUEST_SORT_LUNAR_FESTIVAL || ZoneOrSort == -QUEST_SORT_MIDSUMMER || ZoneOrSort == -QUEST_SORT_BREWFEST || ZoneOrSort == -QUEST_SORT_LOVE_IS_IN_THE_AIR || ZoneOrSort == -QUEST_SORT_NOBLEGARDEN); }
bool IsDailyOrWeekly() const { return Flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
bool IsAutoAccept() const { return Flags & QUEST_FLAGS_AUTO_ACCEPT; }
bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp
index 595a72ec2bf..f9e4bce34d0 100644
--- a/src/server/scripts/Kalimdor/moonglade.cpp
+++ b/src/server/scripts/Kalimdor/moonglade.cpp
@@ -573,9 +573,151 @@ public:
};
/*####
-#
+# npc_omen
####*/
+enum Omen
+{
+ NPC_OMEN = 15467,
+
+ SPELL_OMEN_CLEAVE = 15284,
+ SPELL_OMEN_STARFALL = 26540,
+ SPELL_OMEN_SUMMON_SPOTLIGHT = 26392,
+ SPELL_ELUNE_CANDLE = 26374,
+
+ GO_ELUNE_TRAP_1 = 180876,
+ GO_ELUNE_TRAP_2 = 180877,
+
+ EVENT_CAST_CLEAVE = 1,
+ EVENT_CAST_STARFALL = 2,
+ EVENT_DESPAWN = 3,
+};
+
+class npc_omen : public CreatureScript
+{
+public:
+ npc_omen() : CreatureScript("npc_omen") { }
+
+ struct npc_omenAI : public ScriptedAI
+ {
+ npc_omenAI(Creature* creature) : ScriptedAI(creature)
+ {
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->GetMotionMaster()->MovePoint(1, 7549.977f, -2855.137f, 456.9678f);
+ }
+
+ EventMap events;
+
+ void MovementInform(uint32 type, uint32 pointId)
+ {
+ if (type != POINT_MOTION_TYPE)
+ return;
+
+ if (pointId == 1)
+ {
+ me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ if (Player* player = me->SelectNearestPlayer(40.0f))
+ AttackStart(player);
+ }
+ }
+
+ void EnterCombat(Unit* /*attacker*/)
+ {
+ events.Reset();
+ events.ScheduleEvent(EVENT_CAST_CLEAVE, urand(3000, 5000));
+ events.ScheduleEvent(EVENT_CAST_STARFALL, urand(8000, 10000));
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ DoCast(SPELL_OMEN_SUMMON_SPOTLIGHT);
+ }
+
+ void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
+ {
+ if (spell->Id == SPELL_ELUNE_CANDLE)
+ {
+ if (me->HasAura(SPELL_OMEN_STARFALL))
+ me->RemoveAurasDueToSpell(SPELL_OMEN_STARFALL);
+
+ events.RescheduleEvent(EVENT_CAST_STARFALL, urand(14000, 16000));
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ switch (events.ExecuteEvent())
+ {
+ case EVENT_CAST_CLEAVE:
+ DoCastVictim(SPELL_OMEN_CLEAVE);
+ events.ScheduleEvent(EVENT_CAST_CLEAVE, urand(8000, 10000));
+ break;
+ case EVENT_CAST_STARFALL:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_OMEN_STARFALL);
+ events.ScheduleEvent(EVENT_CAST_STARFALL, urand(14000, 16000));
+ break;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_omenAI(creature);
+ }
+};
+
+class npc_giant_spotlight : public CreatureScript
+{
+public:
+ npc_giant_spotlight() : CreatureScript("npc_giant_spotlight") { }
+
+ struct npc_giant_spotlightAI : public ScriptedAI
+ {
+ npc_giant_spotlightAI(Creature* creature) : ScriptedAI(creature) {}
+
+ EventMap events;
+
+ void Reset()
+ {
+ events.Reset();
+ events.ScheduleEvent(EVENT_DESPAWN, 5*MINUTE*IN_MILLISECONDS);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ events.Update(diff);
+
+ if (events.ExecuteEvent() == EVENT_DESPAWN)
+ {
+ if (GameObject* trap = me->FindNearestGameObject(GO_ELUNE_TRAP_1, 5.0f))
+ trap->RemoveFromWorld();
+
+ if (GameObject* trap = me->FindNearestGameObject(GO_ELUNE_TRAP_2, 5.0f))
+ trap->RemoveFromWorld();
+
+ if (Creature* omen = me->FindNearestCreature(NPC_OMEN, 5.0f, false))
+ omen->DespawnOrUnsummon();
+
+ me->DespawnOrUnsummon();
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_giant_spotlightAI(creature);
+ }
+};
+
void AddSC_moonglade()
{
new npc_bunthen_plainswind();
@@ -583,4 +725,6 @@ void AddSC_moonglade()
new npc_silva_filnaveth();
new npc_clintar_dreamwalker();
new npc_clintar_spirit();
+ new npc_omen();
+ new npc_giant_spotlight();
}
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 2b31a50510d..d0307966795 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -412,6 +412,75 @@ class spell_gen_leeching_swarm : public SpellScriptLoader
}
};
+enum EluneCandle
+{
+ NPC_OMEN = 15467,
+
+ SPELL_ELUNE_CANDLE_OMEN_HEAD = 26622,
+ SPELL_ELUNE_CANDLE_OMEN_CHEST = 26624,
+ SPELL_ELUNE_CANDLE_OMEN_HAND_R = 26625,
+ SPELL_ELUNE_CANDLE_OMEN_HAND_L = 26649,
+ SPELL_ELUNE_CANDLE_NORMAL = 26636,
+};
+
+class spell_gen_elune_candle : public SpellScriptLoader
+{
+ public:
+ spell_gen_elune_candle() : SpellScriptLoader("spell_gen_elune_candle") {}
+
+ class spell_gen_elune_candle_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_gen_elune_candle_SpellScript);
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_HEAD))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_CHEST))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_HAND_R))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_HAND_L))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_NORMAL))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* target = GetHitUnit())
+ {
+ uint32 spellId = 0;
+
+ if (target->GetEntry() == NPC_OMEN)
+ {
+ switch (urand(0, 3))
+ {
+ case 0: spellId = SPELL_ELUNE_CANDLE_OMEN_HEAD; break;
+ case 1: spellId = SPELL_ELUNE_CANDLE_OMEN_CHEST; break;
+ case 2: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_R; break;
+ case 3: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_L; break;
+ }
+ }
+ else
+ spellId = SPELL_ELUNE_CANDLE_NORMAL;
+
+ GetCaster()->CastSpell(target, spellId, true, NULL);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_elune_candle_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_gen_elune_candle_SpellScript();
+ }
+};
+
// 24750 Trick
enum eTrickSpells
{
@@ -1592,4 +1661,5 @@ void AddSC_generic_spell_scripts()
new spell_gen_luck_of_the_draw();
new spell_gen_dalaran_disguise("spell_gen_sunreaver_disguise");
new spell_gen_dalaran_disguise("spell_gen_silver_covenant_disguise");
+ new spell_gen_elune_candle();
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 21e4fe6a3a0..9227c0c1138 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -40,6 +40,7 @@ npc_sayge 100% Darkmoon event fortune teller, buff player based
npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap
npc_shadowfiend 100% restore 5% of owner's mana when shadowfiend die from damage
npc_locksmith 75% list of keys needs to be confirmed
+npc_firework 100% NPC's summoned by rockets and rocket clusters, for making them cast visual
EndContentData */
#include "ScriptPCH.h"
@@ -2764,6 +2765,285 @@ public:
}
};
+enum Fireworks
+{
+ NPC_OMEN = 15467,
+ NPC_MINION_OF_OMEN = 15466,
+ NPC_FIREWORK_BLUE = 15879,
+ NPC_FIREWORK_GREEN = 15880,
+ NPC_FIREWORK_PURPLE = 15881,
+ NPC_FIREWORK_RED = 15882,
+ NPC_FIREWORK_YELLOW = 15883,
+ NPC_FIREWORK_WHITE = 15884,
+ NPC_FIREWORK_BIG_BLUE = 15885,
+ NPC_FIREWORK_BIG_GREEN = 15886,
+ NPC_FIREWORK_BIG_PURPLE = 15887,
+ NPC_FIREWORK_BIG_RED = 15888,
+ NPC_FIREWORK_BIG_YELLOW = 15889,
+ NPC_FIREWORK_BIG_WHITE = 15890,
+
+ NPC_CLUSTER_BLUE = 15872,
+ NPC_CLUSTER_RED = 15873,
+ NPC_CLUSTER_GREEN = 15874,
+ NPC_CLUSTER_PURPLE = 15875,
+ NPC_CLUSTER_WHITE = 15876,
+ NPC_CLUSTER_YELLOW = 15877,
+ NPC_CLUSTER_BIG_BLUE = 15911,
+ NPC_CLUSTER_BIG_GREEN = 15912,
+ NPC_CLUSTER_BIG_PURPLE = 15913,
+ NPC_CLUSTER_BIG_RED = 15914,
+ NPC_CLUSTER_BIG_WHITE = 15915,
+ NPC_CLUSTER_BIG_YELLOW = 15916,
+ NPC_CLUSTER_ELUNE = 15918,
+
+ GO_FIREWORK_LAUNCHER_1 = 180771,
+ GO_FIREWORK_LAUNCHER_2 = 180868,
+ GO_FIREWORK_LAUNCHER_3 = 180850,
+ GO_CLUSTER_LAUNCHER_1 = 180772,
+ GO_CLUSTER_LAUNCHER_2 = 180859,
+ GO_CLUSTER_LAUNCHER_3 = 180869,
+ GO_CLUSTER_LAUNCHER_4 = 180874,
+
+ SPELL_ROCKET_BLUE = 26344,
+ SPELL_ROCKET_GREEN = 26345,
+ SPELL_ROCKET_PURPLE = 26346,
+ SPELL_ROCKET_RED = 26347,
+ SPELL_ROCKET_WHITE = 26348,
+ SPELL_ROCKET_YELLOW = 26349,
+ SPELL_ROCKET_BIG_BLUE = 26351,
+ SPELL_ROCKET_BIG_GREEN = 26352,
+ SPELL_ROCKET_BIG_PURPLE = 26353,
+ SPELL_ROCKET_BIG_RED = 26354,
+ SPELL_ROCKET_BIG_WHITE = 26355,
+ SPELL_ROCKET_BIG_YELLOW = 26356,
+ SPELL_LUNAR_FORTUNE = 26522,
+
+ ANIM_GO_LAUNCH_FIREWORK = 3,
+ ZONE_MOONGLADE = 493,
+};
+
+Position omenSummonPos = {7558.993f, -2839.999f, 450.0214f, 4.46f};
+
+class npc_firework : public CreatureScript
+{
+public:
+ npc_firework() : CreatureScript("npc_firework") { }
+
+ struct npc_fireworkAI : public ScriptedAI
+ {
+ npc_fireworkAI(Creature* creature) : ScriptedAI(creature) {}
+
+ bool isCluster()
+ {
+ switch (me->GetEntry())
+ {
+ case NPC_FIREWORK_BLUE:
+ case NPC_FIREWORK_GREEN:
+ case NPC_FIREWORK_PURPLE:
+ case NPC_FIREWORK_RED:
+ case NPC_FIREWORK_YELLOW:
+ case NPC_FIREWORK_WHITE:
+ case NPC_FIREWORK_BIG_BLUE:
+ case NPC_FIREWORK_BIG_GREEN:
+ case NPC_FIREWORK_BIG_PURPLE:
+ case NPC_FIREWORK_BIG_RED:
+ case NPC_FIREWORK_BIG_YELLOW:
+ case NPC_FIREWORK_BIG_WHITE:
+ return false;
+ case NPC_CLUSTER_BLUE:
+ case NPC_CLUSTER_GREEN:
+ case NPC_CLUSTER_PURPLE:
+ case NPC_CLUSTER_RED:
+ case NPC_CLUSTER_YELLOW:
+ case NPC_CLUSTER_WHITE:
+ case NPC_CLUSTER_BIG_BLUE:
+ case NPC_CLUSTER_BIG_GREEN:
+ case NPC_CLUSTER_BIG_PURPLE:
+ case NPC_CLUSTER_BIG_RED:
+ case NPC_CLUSTER_BIG_YELLOW:
+ case NPC_CLUSTER_BIG_WHITE:
+ case NPC_CLUSTER_ELUNE:
+ default:
+ return true;
+ }
+ }
+
+ GameObject* FindNearestLauncher()
+ {
+ GameObject* launcher = NULL;
+
+ if (isCluster())
+ {
+ GameObject* launcher1 = GetClosestGameObjectWithEntry(me, GO_CLUSTER_LAUNCHER_1, 0.5f);
+ GameObject* launcher2 = GetClosestGameObjectWithEntry(me, GO_CLUSTER_LAUNCHER_2, 0.5f);
+ GameObject* launcher3 = GetClosestGameObjectWithEntry(me, GO_CLUSTER_LAUNCHER_3, 0.5f);
+ GameObject* launcher4 = GetClosestGameObjectWithEntry(me, GO_CLUSTER_LAUNCHER_4, 0.5f);
+
+ if (launcher1)
+ launcher = launcher1;
+ else if (launcher2)
+ launcher = launcher2;
+ else if (launcher3)
+ launcher = launcher3;
+ else if (launcher4)
+ launcher = launcher4;
+ }
+ else
+ {
+ GameObject* launcher1 = GetClosestGameObjectWithEntry(me, GO_FIREWORK_LAUNCHER_1, 0.5f);
+ GameObject* launcher2 = GetClosestGameObjectWithEntry(me, GO_FIREWORK_LAUNCHER_2, 0.5f);
+ GameObject* launcher3 = GetClosestGameObjectWithEntry(me, GO_FIREWORK_LAUNCHER_3, 0.5f);
+
+ if (launcher1)
+ launcher = launcher1;
+ else if (launcher2)
+ launcher = launcher2;
+ else if (launcher3)
+ launcher = launcher3;
+ }
+
+ return launcher;
+ }
+
+ uint32 GetFireworkSpell(uint32 entry)
+ {
+ switch (entry)
+ {
+ case NPC_FIREWORK_BLUE:
+ return SPELL_ROCKET_BLUE;
+ case NPC_FIREWORK_GREEN:
+ return SPELL_ROCKET_GREEN;
+ case NPC_FIREWORK_PURPLE:
+ return SPELL_ROCKET_PURPLE;
+ case NPC_FIREWORK_RED:
+ return SPELL_ROCKET_RED;
+ case NPC_FIREWORK_YELLOW:
+ return SPELL_ROCKET_YELLOW;
+ case NPC_FIREWORK_WHITE:
+ return SPELL_ROCKET_WHITE;
+ case NPC_FIREWORK_BIG_BLUE:
+ return SPELL_ROCKET_BIG_BLUE;
+ case NPC_FIREWORK_BIG_GREEN:
+ return SPELL_ROCKET_BIG_GREEN;
+ case NPC_FIREWORK_BIG_PURPLE:
+ return SPELL_ROCKET_BIG_PURPLE;
+ case NPC_FIREWORK_BIG_RED:
+ return SPELL_ROCKET_BIG_RED;
+ case NPC_FIREWORK_BIG_YELLOW:
+ return SPELL_ROCKET_BIG_YELLOW;
+ case NPC_FIREWORK_BIG_WHITE:
+ return SPELL_ROCKET_BIG_WHITE;
+ default:
+ return 0;
+ }
+ }
+
+ uint32 GetFireworkGameObjectId()
+ {
+ uint32 spellId = 0;
+
+ switch (me->GetEntry())
+ {
+ case NPC_CLUSTER_BLUE:
+ spellId = GetFireworkSpell(NPC_FIREWORK_BLUE);
+ break;
+ case NPC_CLUSTER_GREEN:
+ spellId = GetFireworkSpell(NPC_FIREWORK_GREEN);
+ break;
+ case NPC_CLUSTER_PURPLE:
+ spellId = GetFireworkSpell(NPC_FIREWORK_PURPLE);
+ break;
+ case NPC_CLUSTER_RED:
+ spellId = GetFireworkSpell(NPC_FIREWORK_RED);
+ break;
+ case NPC_CLUSTER_YELLOW:
+ spellId = GetFireworkSpell(NPC_FIREWORK_YELLOW);
+ break;
+ case NPC_CLUSTER_WHITE:
+ spellId = GetFireworkSpell(NPC_FIREWORK_WHITE);
+ break;
+ case NPC_CLUSTER_BIG_BLUE:
+ spellId = GetFireworkSpell(NPC_FIREWORK_BIG_BLUE);
+ break;
+ case NPC_CLUSTER_BIG_GREEN:
+ spellId = GetFireworkSpell(NPC_FIREWORK_BIG_GREEN);
+ break;
+ case NPC_CLUSTER_BIG_PURPLE:
+ spellId = GetFireworkSpell(NPC_FIREWORK_BIG_PURPLE);
+ break;
+ case NPC_CLUSTER_BIG_RED:
+ spellId = GetFireworkSpell(NPC_FIREWORK_BIG_RED);
+ break;
+ case NPC_CLUSTER_BIG_YELLOW:
+ spellId = GetFireworkSpell(NPC_FIREWORK_BIG_YELLOW);
+ break;
+ case NPC_CLUSTER_BIG_WHITE:
+ spellId = GetFireworkSpell(NPC_FIREWORK_BIG_WHITE);
+ break;
+ case NPC_CLUSTER_ELUNE:
+ spellId = GetFireworkSpell(urand(NPC_FIREWORK_BLUE, NPC_FIREWORK_WHITE));
+ break;
+ }
+
+ const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
+
+ if (spellInfo && spellInfo->Effects[0].Effect == SPELL_EFFECT_SUMMON_OBJECT_WILD)
+ return spellInfo->Effects[0].MiscValue;
+
+ return 0;
+ }
+
+ void Reset()
+ {
+ if (GameObject* launcher = FindNearestLauncher())
+ {
+ launcher->SendCustomAnim(ANIM_GO_LAUNCH_FIREWORK);
+ me->SetOrientation(launcher->GetOrientation() + M_PI/2);
+ }
+ else
+ return;
+
+ if (isCluster())
+ {
+ // Check if we are near Elune'ara lake south, if so try to summon Omen or a minion
+ if (me->GetZoneId() == ZONE_MOONGLADE)
+ {
+ if (!me->FindNearestCreature(NPC_OMEN, 100.0f, false) && me->GetDistance2d(omenSummonPos.GetPositionX(), omenSummonPos.GetPositionY()) <= 100.0f)
+ {
+ switch (urand(0,9))
+ {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ if (Creature* minion = me->SummonCreature(NPC_MINION_OF_OMEN, me->GetPositionX()+frand(-5.0f, 5.0f), me->GetPositionY()+frand(-5.0f, 5.0f), me->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
+ minion->AI()->AttackStart(me->SelectNearestPlayer(20.0f));
+ break;
+ case 9:
+ me->SummonCreature(NPC_OMEN, omenSummonPos);
+ break;
+ }
+ }
+ }
+ if (me->GetEntry() == NPC_CLUSTER_ELUNE)
+ DoCast(SPELL_LUNAR_FORTUNE);
+
+ float displacement = 0.7f;
+ for (uint8 i = 0; i < 4; i++)
+ me->SummonGameObject(GetFireworkGameObjectId(), me->GetPositionX() + (i%2 == 0 ? displacement : -displacement), me->GetPositionY() + (i > 1 ? displacement : -displacement), me->GetPositionZ() + 4.0f, me->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 1);
+ }
+ else
+ //me->CastSpell(me, GetFireworkSpell(me->GetEntry()), true);
+ me->CastSpell(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), GetFireworkSpell(me->GetEntry()), true);
+ }
+ };
+
+ CreatureAI *GetAI(Creature* creature) const
+ {
+ return new npc_fireworkAI(creature);
+ }
+};
+
void AddSC_npcs_special()
{
new npc_air_force_bots;
@@ -2796,5 +3076,6 @@ void AddSC_npcs_special()
new npc_experience;
new npc_fire_elemental;
new npc_earth_elemental;
+ new npc_firework;
}