diff options
42 files changed, 397 insertions, 73 deletions
diff --git a/sql/updates/world/3.3.5/2016_08_21_03_world.sql b/sql/updates/world/3.3.5/2016_08_21_03_world.sql new file mode 100644 index 00000000000..c8b1f0f1c2e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_21_03_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `spell_ranks` WHERE `first_spell_id` = 34453 AND `rank` IN (1,2); +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2 WHERE `entry` IN (32117,37440,32113,37436,32116,37439,32115,37438,32114,37437,32118,37441); +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry` IN (22582); +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|130 WHERE `entry` IN (30780,30782,30784,30786); +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|80358666 WHERE `entry` IN (37283,37444); diff --git a/sql/updates/world/3.3.5/2016_08_21_04_world.sql b/sql/updates/world/3.3.5/2016_08_21_04_world.sql new file mode 100644 index 00000000000..7d7fbd23005 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_21_04_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `gameobject` SET `spawntimesecs` = 2 WHERE `id` = 188489; diff --git a/sql/updates/world/3.3.5/2016_08_21_05_world.sql b/sql/updates/world/3.3.5/2016_08_21_05_world.sql new file mode 100644 index 00000000000..e7327102a1f --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_21_05_world.sql @@ -0,0 +1,11 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (25686,25684,25699,25701); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (25686,25701,25684,25699) 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 +-- DB/Creature: Add missing SAI Gorloc Gibberer and Gorloc Dredger +(25686, 0, 0, 0, 0, 0, 100, 0, 0, 4000, 4000, 6000, 11, 50520, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Gibberer - In Combat - Cast \'Deep Dredge\''), +(25701, 0, 0, 0, 0, 0, 100, 0, 0, 4000, 4000, 6000, 11, 50520, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Dredger - In Combat - Cast \'Deep Dredge\''), +-- DB/Creature: Add missing SAI Talramas Abomination +(25684, 0, 0, 0, 0, 0, 100, 0, 0, 2000, 20000, 20000, 11, 50366, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Talramas Abomination - In Combat - Cast \'Plague Cloud\''), +-- DB/Creature: Add missing SAI Gorloc Mud Splasher +(25699, 0, 0, 0, 0, 0, 100, 0, 0, 2000, 12000, 20000, 11, 50522, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Mud Splasher - In Combat - Cast \'Gorloc Stomp\''); diff --git a/sql/updates/world/3.3.5/2016_08_21_06_world.sql b/sql/updates/world/3.3.5/2016_08_21_06_world.sql new file mode 100644 index 00000000000..22fce10b220 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_21_06_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `gossip_menu_option` SET `option_text`='I require training', `OptionBroadcastTextID` =6503 WHERE `menu_id`=4762 AND `id`=0; diff --git a/sql/updates/world/3.3.5/2016_08_21_07_world.sql b/sql/updates/world/3.3.5/2016_08_21_07_world.sql new file mode 100644 index 00000000000..62d1963db90 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_21_07_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask`=8388672 WHERE `entry`=23777; diff --git a/sql/updates/world/3.3.5/2016_08_22_00_world.sql b/sql/updates/world/3.3.5/2016_08_22_00_world.sql new file mode 100644 index 00000000000..3b741e03565 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_22_00_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry`=42793 AND `SourceTypeOrReferenceId`=13; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 42793, 0, 0, 31, 0, 3, 24009, 0, 0, 0, 0, "", "Spell Burn Body targets Alliance Corpse"), +(13, 1, 42793, 0, 1, 31, 0, 3, 24010, 0, 0, 0, 0, "", "Spell Burn Body targets Forsaken Corpse"); diff --git a/sql/updates/world/3.3.5/2016_08_23_00_world.sql b/sql/updates/world/3.3.5/2016_08_23_00_world.sql new file mode 100644 index 00000000000..22a4ef95f4e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_23_00_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN(17) AND `SourceEntry`=13982; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17,0,13982,0,0,29,0,9016,10,1,0,0,0,'',"Spell 'Bael'Gar's Fiery Essence' requires Bael'Gar's corpse"); diff --git a/sql/updates/world/3.3.5/2016_08_23_01_world.sql b/sql/updates/world/3.3.5/2016_08_23_01_world.sql new file mode 100644 index 00000000000..0c266a2e88f --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_23_01_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=39246 AND `ConditionTypeOrReference`=36; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=39246; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17,0,39246,0,0,29,0,22105,10,1,0,11,0,'',"Spell 'Fumping' requires dead Decrepit Clefthoof"); diff --git a/sql/updates/world/3.3.5/2016_08_23_02_world.sql b/sql/updates/world/3.3.5/2016_08_23_02_world.sql new file mode 100644 index 00000000000..144a4aa4377 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_23_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `conditions` SET `ConditionValue2`=33844 WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=62709 AND `ElseGroup`=0; diff --git a/sql/updates/world/3.3.5/2016_08_23_03_world.sql b/sql/updates/world/3.3.5/2016_08_23_03_world.sql new file mode 100644 index 00000000000..727544cd88c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_23_03_world.sql @@ -0,0 +1,5 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=66512; +DELETE FROM `spell_script_names` WHERE `ScriptName` IN('spell_q14076_14092_pound_drum','spell_q12279_cast_net'); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(66512,'spell_q14076_14092_pound_drum'), +(48794,'spell_q12279_cast_net'); diff --git a/sql/updates/world/3.3.5/2016_08_23_04_world.sql b/sql/updates/world/3.3.5/2016_08_23_04_world.sql new file mode 100644 index 00000000000..d7697d28ad7 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_23_04_world.sql @@ -0,0 +1,10 @@ +-- NPC ID / entry 35646 Wormhole (summoned by item 48933 Wormhole Generator: Northrend) + +DELETE FROM `gossip_menu_option` WHERE `menu_id`= 10668; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`,`VerifiedBuild`) VALUES +(10668, 0, 0, 'Borean Tundra', 35939, 1, 1, 0, 0, 0, 0, '', 0, 0), +(10668, 1, 0, 'Howling Fjord', 35943, 1, 1, 0, 0, 0, 0, '', 0, 0), +(10668, 2, 0, 'Sholazar Basin', 35940, 1, 1, 0, 0, 0, 0, '', 0, 0), +(10668, 3, 0, 'Icecrown', 35941, 1, 1, 0, 0, 0, 0, '', 0, 0), +(10668, 4, 0, 'Storm Peaks', 35942, 1, 1, 0, 0, 0, 0, '', 0, 0), +(10668, 5, 0, 'Underground...', 36022, 1, 1, 0, 0, 0, 0, '', 0, 0); diff --git a/sql/updates/world/3.3.5/2016_08_23_05_world.sql b/sql/updates/world/3.3.5/2016_08_23_05_world.sql new file mode 100644 index 00000000000..cab7e8f3a20 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_23_05_world.sql @@ -0,0 +1,63 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`="spell_brewfest_relay_race_turn_in"; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(43755, "spell_brewfest_relay_race_turn_in"); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=-43880; +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(-43880, -43332, 0, "On removal of aura 'Ramsteins Swift Work Ram' also remove aura 'Exhausted'"), +(-43880, -43310, 0, "On removal of aura 'Ramsteins Swift Work Ram' also remove aura 'Ram Level - Neutral'"), +(-43880, -43052, 0, "On removal of aura 'Ramsteins Swift Work Ram' also remove aura 'Ram Fatigue'"), +(-43880, -42994, 0, "On removal of aura 'Ramsteins Swift Work Ram' also remove aura 'Ram - Gallop'"), +(-43880, -42993, 0, "On removal of aura 'Ramsteins Swift Work Ram' also remove aura 'Ram - Canter'"), +(-43880, -42992, 0, "On removal of aura 'Ramsteins Swift Work Ram' also remove aura 'Ram - Trot'"), +(-43880, -42146, 0, "On removal of aura 'Ramsteins Swift Work Ram' also remove aura 'Brewfest Racing Ram Aura [DND]'"); + +DELETE FROM `gossip_menu_option` WHERE `id`=4 AND `menu_id` IN (8934, 8976); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(8934, 4, 0, "I want to race for tokens!", 0, 1, 1, 0, 0, 0, 0, "", 0, -1), +(8976, 4, 0, "I want to race for tokens!", 0, 1, 1, 0, 0, 0, 0, "", 0, -1); + +UPDATE `smart_scripts` SET `link`=2 WHERE `id`=1 AND `entryorguid` IN (24468, 24510); +DELETE FROM `smart_scripts` WHERE `id`=2 AND `entryorguid` IN (24468, 24510); +DELETE FROM `smart_scripts` WHERE `entryorguid`=23558 AND `id` IN (6, 7, 8, 9); +DELETE FROM `smart_scripts` WHERE `entryorguid`=24497 AND `id` IN (8, 9, 10, 11); +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 +(24468, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 43755, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Pol Amberstill <Ram Racing Apprentice> - Within 0-25 Range - Cast 'Brewfest - Daily - Relay Race - Player - Increase Mount Duration - DND'"), +(24510, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 43755, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Driz Tumblequick <Ram Racing Apprentice> - Within 0-25 Range - Cast 'Brewfest - Daily - Relay Race - Player - Increase Mount Duration - DND'"), +(23558, 0, 6, 7, 62, 0, 100, 0, 8934, 4, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Neill Ramstein <Ram Racing Master> - On Gossip Option 4 Selected - Close Gossip"), +(23558, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 85, 43880, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Neill Ramstein <Ram Racing Master> - On Gossip Option 4 Selected - Cast Spell 'Ramstein's Swift Work Ram'"), +(23558, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 85, 44689, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Neill Ramstein <Ram Racing Master> - On Gossip Option 4 Selected - Cast Spell 'Relay Race Accept Hidden Debuff - DND'"), +(23558, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 44262, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Neill Ramstein <Ram Racing Master> - On Gossip Option 4 Selected - Cast Spell 'Brewfest - Create Ram Racing Crop'"), +(24497, 0, 8, 9, 62, 0, 100, 0, 8976, 4, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Ram Master Ray <Ram Racing Master> - On Gossip Option 4 Selected - Close Gossip"), +(24497, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 85, 43880, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Ram Master Ray <Ram Racing Master> - On Gossip Option 4 Selected - Cast Spell 'Ramstein's Swift Work Ram'"), +(24497, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 85, 44689, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Ram Master Ray <Ram Racing Master> - On Gossip Option 4 Selected - Cast Spell 'Relay Race Accept Hidden Debuff - DND'"), +(24497, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 44262, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Ram Master Ray <Ram Racing Master> - On Gossip Option 4 Selected - Cast Spell 'Brewfest - Create Ram Racing Crop'"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (8934, 8976) AND `SourceEntry`=4; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 8934, 4, 0, 0, 8, 0, 11122, 0, 0, 0, 0, 0, "", "Brewfest Relay Race - Show gossip if player has turned in the quest 'There and Back Again'"), +(15, 8934, 4, 0, 0, 1, 0, 44689, 0, 0, 1, 0, 0, "", "Brewfest Relay Race - Show gossip if player does not have aura 'Relay Race Accept Hidden Debuff - DND'"), +(15, 8934, 4, 0, 0, 1, 0, 43883, 0, 0, 1, 0, 0, "", "Brewfest Relay Race - Show gossip if player does not have aura 'Rental Racing Ram'"), +(15, 8976, 4, 0, 0, 8, 0, 11412, 0, 0, 0, 0, 0, "", "Brewfest Relay Race - Show gossip if player has turned in the quest 'There and Back Again'"), +(15, 8976, 4, 0, 0, 1, 0, 44689, 0, 0, 1, 0, 0, "", "Brewfest Relay Race - Show gossip if player does not have aura 'Relay Race Accept Hidden Debuff - DND'"), +(15, 8976, 4, 0, 0, 1, 0, 43883, 0, 0, 1, 0, 0, "", "Brewfest Relay Race - Show gossip if player does not have aura 'Rental Racing Ram'"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (24468, 24510, 24364, 24527) AND `ElseGroup`=1; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (24468, 24510) AND `SourceGroup`=3; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, 24468, 0, 1, 1, 0, 43880, 0, 0, 0, 0, 0, "", "SAI triggers only if player has aura 'Ramsteins Swift Work Ram'"), +(22, 1, 24468, 0, 1, 2, 0, 33797, 1, 0, 0, 0, 0, "", "SAI triggers only if player has item 'Portable Brewfest Keg'"), +(22, 1, 24510, 0, 1, 1, 0, 43880, 0, 0, 0, 0, 0, "", "SAI triggers only if player has aura 'Ramsteins Swift Work Ram'"), +(22, 1, 24510, 0, 1, 2, 0, 33797, 1, 0, 0, 0, 0, "", "SAI triggers only if player has item 'Portable Brewfest Keg'"), +(22, 1, 24364, 0, 1, 1, 0, 43880, 0, 0, 0, 0, 0, "", "SAI triggers only if player has aura 'Ramsteins Swift Work Ram'"), +(22, 1, 24364, 0, 1, 2, 0, 33797, 1, 0, 1, 0, 0, "", "SAI triggers only if player does not have item 'Portable Brewfest Keg'"), +(22, 1, 24527, 0, 1, 1, 0, 43880, 0, 0, 0, 0, 0, "", "SAI triggers only if player has aura 'Ramsteins Swift Work Ram'"), +(22, 1, 24527, 0, 1, 2, 0, 33797, 1, 0, 1, 0, 0, "", "SAI triggers only if player does not have item 'Portable Brewfest Keg'"), +(22, 3, 24468, 0, 0, 1, 0, 43880, 0, 0, 0, 0, 0, "", "SAI triggers only if player has aura 'Ramsteins Swift Work Ram'"), +(22, 3, 24510, 0, 0, 1, 0, 43880, 0, 0, 0, 0, 0, "", "SAI triggers only if player has aura 'Ramstein's Swift Work Ram'"); + +-- Update wrong comments +UPDATE `conditions` SET `Comment`="SAI triggers only if player has aura 'Rental Racing Ram'" WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=24510 AND `ConditionTypeOrReference`=1 AND `ConditionValue1`=43883; +UPDATE `conditions` SET `Comment`="SAI triggers only if player has item 'Portable Brewfest Keg'" WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=24510 AND `ConditionTypeOrReference`=2; +UPDATE `smart_scripts` SET `Comment`="Driz Tumblequick <Ram Racing Apprentice> - Within 0-25 Range - Cast 'Brewfest - Throw Keg - DND'" WHERE `entryorguid`=24510 AND `id`=0; diff --git a/sql/updates/world/3.3.5/2016_08_24_00_world.sql b/sql/updates/world/3.3.5/2016_08_24_00_world.sql new file mode 100644 index 00000000000..db20add8d90 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_24_00_world.sql @@ -0,0 +1,33 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry`=43189 AND `SourceTypeOrReferenceId`=17; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 43189, 0, 0, 29, 0, 24173, 100, 0, 1, 0, 0, "", "Spell 'Test Horn' cannot be cast if NPC 'Frostgore' is nearby"), +(17, 0, 43189, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, "", "Spell 'Test Horn' cannot be cast if nearby NPC 'Frostgore' is alive"); + +UPDATE `event_scripts` SET `x`=2932.631, `y`=-4488.105, `z`=285.6876, `o`=3.298672 WHERE `id`=15726; + +DELETE FROM `waypoints` WHERE `entry`=24173; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(24173, 1, 2918.373, -4505.415, 280.0419, ""), +(24173, 2, 2920.935, -4521.924, 276.0025, ""), +(24173, 3, 2923.956, -4535.499, 274.4535, ""), +(24173, 4, 2944.427, -4555.303, 273.6897, ""); + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=24173; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (24173, 2417300); +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 +(24173, 0, 0, 0, 0, 0, 100, 0, 5000, 10000, 10000, 20000, 11, 52058, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Frostgore - In Combat - Cast 'Ground Slam'"), +(24173, 0, 1, 2, 11, 0, 100, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Frostgore - On Spawn - Add UNIT_FLAG_IMMUNE_TO_PC"), +(24173, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 53, 1, 24173, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Frostgore - On Spawn - Start Waypoint"), +(24173, 0, 3, 0, 40, 0, 100, 0, 4, 0, 0, 0, 80, 2417300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Frostgore - On WP 4 Reached - Start Script"), +(2417300, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, "Frostgore - On Script - Set home position to summoner's position"), +(2417300, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, "Frostgore - On Script - Turn to summoner"), +(2417300, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Frostgore - On Script - Say Text 0"), +(2417300, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Frostgore - On Script - Say Text 1"), +(2417300, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Frostgore - On Script - Remove UNIT_FLAG_IMMUNE_TO_PC"), +(2417300, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, "Frostgore - On Script - Attack summoner"); + +DELETE FROM `creature_text` WHERE `entry`=24173; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(24173, 0, 0, (SELECT MaleText FROM broadcast_text WHERE ID = 22876), 12, 0, 100, 1, 0, 0, 22876, 0, "Frostgore"), +(24173, 1, 0, (SELECT MaleText FROM broadcast_text WHERE ID = 22877), 12, 0, 100, 25, 0, 0, 22877, 0, "Frostgore"); diff --git a/sql/updates/world/3.3.5/2016_08_24_01_world.sql b/sql/updates/world/3.3.5/2016_08_24_01_world.sql new file mode 100644 index 00000000000..65efdb08659 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_24_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `target_type`=27 WHERE `entryorguid`=30423 AND `id`=1; diff --git a/sql/updates/world/3.3.5/2016_08_24_02_world.sql b/sql/updates/world/3.3.5/2016_08_24_02_world.sql new file mode 100644 index 00000000000..e1407e23780 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_24_02_world.sql @@ -0,0 +1,2 @@ +-- fix random incorrect unit flag on dragonkin type +UPDATE `creature_template` SET `unit_flags`=(`unit_flags`&~(0x100|0x200|0x2000000)) WHERE `entry`=31403; diff --git a/sql/updates/world/3.3.5/2016_08_24_03_world.sql b/sql/updates/world/3.3.5/2016_08_24_03_world.sql new file mode 100644 index 00000000000..68b4d9274ec --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_24_03_world.sql @@ -0,0 +1,2 @@ +-- Scarlet Mine Car must have UNIT_FIELD_FLAGS UNIT_FLAG_IMMUNE_TO_PC +UPDATE `creature_template` SET `unit_flags`= `unit_flags`| 520 WHERE `entry`= 28817; diff --git a/sql/updates/world/3.3.5/2016_08_24_04_world.sql b/sql/updates/world/3.3.5/2016_08_24_04_world.sql new file mode 100644 index 00000000000..5076e7f521d --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_24_04_world.sql @@ -0,0 +1,7 @@ +-- fix sons of hodir reputation amounts to correspond to 3.3.5 retail +UPDATE `quest_template` SET `RewardFactionOverride1`=65000 WHERE `id` IN (13559,13108,13003); -- Hodir's Tribute awards 650 rep per turn-in; Whatever it Takes! and Thrusing Hodir's Spear also award 650 rep +UPDATE `quest_template` SET `RewardFactionOverride1`=2860000 WHERE `id` IN (12915,12924); -- Mending Fences and A Spark of Hope award 28600 rep +UPDATE `quest_template` SET `RewardFactionOverride1`=32500 WHERE `id` IN (12924,13011,12975,12985,13001); -- Forging an Alliance, Jormuttar is Soo Fat..., In Memoriam, Forging a Head, Raising Hodir's Spear reward 325 rep each +UPDATE `quest_template` SET `RewardFactionOverride1`=45500 WHERE `id` IN (12981,12977,13010,13420,13421,13006,12994,13046); -- Hot and Cold, Blowing Hodir's Horn, 'Krolmir, Hammer of Storms', Everfrost, Remember Everfrost!, Polishing the Helm, Spy Hunter, Feeding Arngrim each award 455 reputation +UPDATE `quest_template` SET `RewardFactionOverride1`=32500 WHERE `id` = 12987; -- Mounting Hodir's Helm awards 325 rep +UPDATE `quest_template` SET `RewardFactionOverride1`=97 WHERE `id` = 12976; -- A Monument to the Fallen awards 97 rep diff --git a/sql/updates/world/3.3.5/2016_08_24_05_world.sql b/sql/updates/world/3.3.5/2016_08_24_05_world.sql new file mode 100644 index 00000000000..34b2dc925a3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_24_05_world.sql @@ -0,0 +1,2 @@ +-- fix typo in previous update. nobody saw that! +UPDATE `quest_template` SET `RewardFactionOverride1`=9700 WHERE `id` = 12976; -- A Monument to the Fallen awards 97 rep diff --git a/sql/updates/world/3.3.5/2016_08_24_06_world.sql b/sql/updates/world/3.3.5/2016_08_24_06_world.sql new file mode 100644 index 00000000000..7df954dec3b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_24_06_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `quest_template` SET `RewardFactionID1`=67 WHERE `ID`=5237; +UPDATE `quest_template` SET `RewardFactionID1`=469 WHERE `ID`=5238; + +UPDATE `quest_offer_reward` SET `RewardText`="$N, your successful re-engineering of the cauldrons is a tremendous victory for us!$B$B<The high executor clears his throat and begins to bellow loudly.>$B$BLet all within my presence hear: for service to the Forsaken and to the Horde as a whole above and beyond what was expected - in the face of overwhelming odds and incredible danger, might I add - I give $N this, and I extend upon $Ghim:her; our undying gratitude as a true hero of the Horde. Huzzah!" WHERE `ID`=5237; diff --git a/sql/updates/world/3.3.5/2016_08_24_07_world.sql b/sql/updates/world/3.3.5/2016_08_24_07_world.sql new file mode 100644 index 00000000000..2c1c2941dc2 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_24_07_world.sql @@ -0,0 +1,6 @@ +-- move sons of hodir reputation changes to reputation_reward_rate table +-- also add multipliers to Argent Crusade, Alliance Vanguard, Horde Expedition, Kirin Tor, Knights of the Ebon Blade and Wyrmrest Accord as per 3.3.0 retail patch notes +UPDATE `quest_template` SET `RewardFactionOverride1`=0 WHERE `RewardFactionID1`=1119; +UPDATE `quest_template` SET `RewardFactionOverride1`=2200000 WHERE `id` IN (12915,12924); +INSERT INTO `reputation_reward_rate` (`faction`) VALUES (1106),(1037),(1052),(1091),(1090),(1098) ON DUPLICATE KEY UPDATE `faction`=`faction`; +UPDATE `reputation_reward_rate` SET `quest_rate`=1.3,`quest_daily_rate`=1.3,`quest_weekly_rate`=1.3,`quest_monthly_rate`=1.3,`quest_repeatable_rate`=1.3 WHERE `faction` IN (1106,1037,1052,1091,1090,1098); diff --git a/sql/updates/world/3.3.5/9999_99_99_99_KELTHUZAD.sql b/sql/updates/world/3.3.5/2016_08_24_08_world.sql index 45b28c4d1d6..45b28c4d1d6 100644 --- a/sql/updates/world/3.3.5/9999_99_99_99_KELTHUZAD.sql +++ b/sql/updates/world/3.3.5/2016_08_24_08_world.sql diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 90fad46c21b..f1beca149d1 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1013,7 +1013,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsCreature(*itr)) - (*itr)->ToCreature()->UpdateEntry(e.action.updateTemplate.creature); + (*itr)->ToCreature()->UpdateEntry(e.action.updateTemplate.creature, nullptr, e.action.updateTemplate.updateLevel != 0); delete targets; break; @@ -2758,6 +2758,11 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /* ObjectGuid charmerOrOwnerGuid = me->GetCharmerOrOwnerGUID(); if (!charmerOrOwnerGuid) + if (TempSummon* tempSummon = me->ToTempSummon()) + if (Unit* summoner = tempSummon->GetSummoner()) + charmerOrOwnerGuid = summoner->GetGUID(); + + if (!charmerOrOwnerGuid) charmerOrOwnerGuid = me->GetCreatorGUID(); if (Unit* owner = ObjectAccessor::GetUnit(*me, charmerOrOwnerGuid)) diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index e0f5dac4f5e..28d434ad988 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -740,6 +740,7 @@ struct SmartAction struct { uint32 creature; + uint32 updateLevel; } updateTemplate; struct diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 2356b2098ff..37b44b3d952 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -77,6 +77,8 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) case ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS: case ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL: case ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN: + case ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM: + case ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM: break; default: if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT) @@ -237,11 +239,12 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) return true; case ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE: return true; // not check correctness node indexes - case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM: + case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM: + case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY: if (equipped_item.item_quality >= MAX_ITEM_QUALITY) { - TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM (%u) contains an unknown quality state value in value1 (%u), ignored.", - criteria->ID, criteria->Type, dataType, equipped_item.item_quality); + TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) contains an unknown quality state value in value1 (%u), ignored.", + criteria->ID, criteria->Type, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM ? "ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM" : "ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY"), dataType, equipped_item.item_quality); return false; } return true; @@ -390,7 +393,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un } return instance->CheckAchievementCriteriaMeet(criteria_id, source, target, miscvalue1); } - case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM: + case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM: { ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(miscvalue1); if (!pProto) @@ -418,6 +421,13 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un return source->HasTitle(titleInfo->bit_index); return false; } + case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY: + { + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(miscvalue1); + if (!pProto) + return false; + return pProto->Quality == item.item_quality; + } default: break; } diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h index bdbd9e04446..21ff1b234d8 100644 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -66,14 +66,15 @@ enum AchievementCriteriaDataType ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY = 16, // holiday_id 0 event in holiday time ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE = 17, // min_score max_score player's team win bg and opposition team have team score in range ACHIEVEMENT_CRITERIA_DATA_TYPE_INSTANCE_SCRIPT = 18, // 0 0 maker instance script call for check current criteria requirements fit - ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM = 19, // item_level item_quality for equipped item in slot to check item level and quality + ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM = 19, // item_level item_quality for equipped item in slot to check item level and quality ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID = 20, // map_id 0 player must be on map with id in map_id ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE = 21, // class_id race_id ACHIEVEMENT_CRITERIA_DATA_TYPE_NTH_BIRTHDAY = 22, // N login on day of N-th Birthday - ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE = 23 // title_id known (pvp) title, values from dbc + ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE = 23, // title_id known (pvp) title, values from dbc + ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY = 24 // item_quality }; -#define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE 24 // maximum value in AchievementCriteriaDataType enum +#define MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE 25 // maximum value in AchievementCriteriaDataType enum struct AchievementCriteriaData { @@ -164,7 +165,7 @@ struct AchievementCriteriaData uint32 max_score; } bg_loss_team_score; // ACHIEVEMENT_CRITERIA_DATA_TYPE_INSTANCE_SCRIPT = 18 (no data) - // ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM = 19 + // ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPPED_ITEM = 19 struct { uint32 item_level; @@ -185,6 +186,11 @@ struct AchievementCriteriaData { uint32 title_id; } known_title; + // ACHIEVEMENT_CRITERIA_DATA_TYPE_S_ITEM_QUALITY = 23 + struct + { + uint32 item_quality; + } item; // ... struct { diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 19d117ce09e..b95a6c93d5c 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -40,7 +40,7 @@ typedef std::set<Group*> GroupSet; extern uint32 const ClockWorldState[]; // used in zone_wintergrasp.cpp -extern uint32 const WintergraspFaction[]; +TC_GAME_API extern uint32 const WintergraspFaction[]; enum WintergrastData { diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index c4a2e193be9..05ba2211752 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -400,7 +400,7 @@ bool Creature::InitEntry(uint32 entry, CreatureData const* data /*= nullptr*/) return true; } -bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/) +bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/, bool updateLevel /* = true */) { if (!InitEntry(entry, data)) return false; @@ -434,7 +434,8 @@ bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/) SetAttackTime(OFF_ATTACK, cInfo->BaseAttackTime); SetAttackTime(RANGED_ATTACK, cInfo->RangeAttackTime); - SelectLevel(); + if (updateLevel) + SelectLevel(); SetMeleeDamageSchool(SpellSchools(cInfo->dmgschool)); CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(getLevel(), cInfo->unit_class); diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 029dd1eb77b..7e8d5e3a9ad 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -501,7 +501,7 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma bool HasSpell(uint32 spellID) const override; - bool UpdateEntry(uint32 entry, CreatureData const* data = nullptr); + bool UpdateEntry(uint32 entry, CreatureData const* data = nullptr, bool updateLevel = true); void UpdateMovementFlags(); diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index def6c382893..d1984da9648 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -1426,7 +1426,7 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType) float maxdamage = ((base_value + weapon_maxdamage) * base_pct + total_value) * total_pct; // Pet's base damage changes depending on happiness - if (IsHunterPet() && attType == BASE_ATTACK) + if (IsHunterPet()) { switch (ToPet()->GetHappinessState()) { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 7b066f57def..e004ef25411 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -881,10 +881,6 @@ void Unit::CastSpell(SpellCastTargets const& targets, SpellInfo const* spellInfo return; } - /// @todo this is a workaround - not needed anymore, but required for some scripts :( - if (!originalCaster && triggeredByAura) - originalCaster = triggeredByAura->GetCasterGUID(); - Spell* spell = new Spell(this, spellInfo, triggerFlags, originalCaster); if (value) diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index bb8e89d4829..39d55ef784e 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -139,6 +139,9 @@ bool GameEventMgr::StartEvent(uint16 event_id, bool overwrite) if (data.end <= data.start) data.end = data.start + data.length; } + + // When event is started, set its worldstate to current time + sWorld->setWorldState(event_id, time(NULL)); return false; } else @@ -174,6 +177,9 @@ void GameEventMgr::StopEvent(uint16 event_id, bool overwrite) RemoveActiveEvent(event_id); UnApplyEvent(event_id); + // When event is stopped, clean up its worldstate + sWorld->setWorldState(event_id, 0); + if (overwrite && !serverwide_evt) { data.start = time(NULL) - data.length * MINUTE; @@ -1033,6 +1039,8 @@ uint32 GameEventMgr::Update() // return the next e } else { + // If event is inactive, periodically clean up its worldstate + sWorld->setWorldState(itr, 0); //TC_LOG_DEBUG("misc", "GameEvent %u is not active", itr->first); if (IsActiveEvent(itr)) deactivate.insert(itr); @@ -1115,8 +1123,10 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id) UpdateEventNPCVendor(event_id, true); // update bg holiday UpdateBattlegroundSettings(); - // check for seasonal quest reset. - sWorld->ResetEventSeasonalQuests(event_id); + // If event's worldstate is 0, it means the event hasn't been started yet. In that case, reset seasonal quests. + // When event ends (if it expires or if it's stopped via commands) worldstate will be set to 0 again, ready for another seasonal quest reset. + if (sWorld->getWorldState(event_id) == 0) + sWorld->ResetEventSeasonalQuests(event_id); } void GameEventMgr::UpdateEventNPCFlags(uint16 event_id) diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 5283805c59d..8304054c663 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -1156,7 +1156,7 @@ namespace Trinity bool operator()(Creature* u) { - if (u->GetEntry() == i_entry && u->IsAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range)) + if (u->getDeathState() != DEAD && u->GetEntry() == i_entry && u->IsAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range)) { i_range = i_obj.GetDistance(u); // use found unit range as new range limit for next check return true; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 45dcb6d9d17..ce5d3c9f8a1 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4749,7 +4749,7 @@ SpellCastResult Spell::CheckCast(bool strict) // Check global cooldown if (strict && !(_triggeredCastFlags & TRIGGERED_IGNORE_GCD) && HasGlobalCooldown()) - return SPELL_FAILED_NOT_READY; + return !m_spellInfo->HasAttribute(SPELL_ATTR0_DISABLED_WHILE_ACTIVE) ? SPELL_FAILED_NOT_READY : SPELL_FAILED_DONT_REPORT; // only triggered spells can be processed an ended battleground if (!IsTriggered() && m_caster->GetTypeId() == TYPEID_PLAYER) diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 3cf78b79f67..95082a4268a 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -1023,7 +1023,6 @@ class npc_scarlet_miner_cart : public CreatureScript { npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature) { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetDisplayId(me->GetCreatureTemplate()->Modelid1); // Modelid2 is a horse. } diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index f20de459b12..70c1c0221c4 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -204,12 +204,15 @@ public: } } - void JustReachedHome() override + void MovementInform(uint32 type, uint32 data) override { - if (m_uiSummonPhase == 2) + if (type == POINT_MOTION_TYPE && data == EVENT_FORGE_CAST) { - me->SetOrientation(2.29f); - m_uiSummonPhase = 3; + if (m_uiSummonPhase == 2) + { + me->SetOrientation(2.29f); + m_uiSummonPhase = 3; + } } } @@ -298,12 +301,12 @@ public: case 1: // 1 - Start run to Anvil Talk(EMOTE_TO_ANVIL); - me->GetMotionMaster()->MoveTargetedHome(); + me->GetMotionMaster()->MovePoint(EVENT_FORGE_CAST, me->GetHomePosition()); m_uiSummonPhase = 2; // Set Next Phase break; case 2: // 2 - Check if reached Anvil - // This is handled in: void JustReachedHome() override + // This is handled in: void MovementInform(uint32, uint32) override break; case 3: // 3 - Cast Temper on the Anvil diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 3d801cc2fbb..a99803ee99a 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -215,17 +215,6 @@ class npc_tournament_training_dummy : public CreatureScript me->SetControlled(true, UNIT_STATE_STUNNED); Initialize(); - // Cast Defend spells to max stack size - switch (me->GetEntry()) - { - case NPC_CHARGE_TARGET: - DoCast(SPELL_CHARGE_DEFEND); - break; - case NPC_RANGED_TARGET: - me->CastCustomSpell(SPELL_RANGED_DEFEND, SPELLVALUE_AURA_STACK, 3, me); - break; - } - events.Reset(); events.ScheduleEvent(EVENT_DUMMY_RECAST_DEFEND, 5000); } @@ -286,14 +275,14 @@ class npc_tournament_training_dummy : public CreatureScript case NPC_CHARGE_TARGET: { if (!me->HasAura(SPELL_CHARGE_DEFEND)) - DoCast(SPELL_CHARGE_DEFEND); + DoCast(me, SPELL_CHARGE_DEFEND, true); break; } case NPC_RANGED_TARGET: { Aura* defend = me->GetAura(SPELL_RANGED_DEFEND); if (!defend || defend->GetStackAmount() < 3 || defend->GetDuration() <= 8000) - DoCast(SPELL_RANGED_DEFEND); + DoCast(me, SPELL_RANGED_DEFEND, true); break; } } diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index 56d333b2dda..699dd578b8d 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -241,7 +241,6 @@ public: boss_teron_gorefiendAI(Creature* creature) : BossAI(creature, DATA_TERON_GOREFIEND) { Initialize(); - instance = creature->GetInstanceScript(); } void Initialize() @@ -259,8 +258,6 @@ public: Done = false; } - InstanceScript* instance; - uint32 IncinerateTimer; uint32 SummonDoomBlossomTimer; uint32 EnrageTimer; diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp index bd36e3cb765..a7b58737374 100644 --- a/src/server/scripts/Spells/spell_holiday.cpp +++ b/src/server/scripts/Spells/spell_holiday.cpp @@ -846,6 +846,7 @@ enum RamBlaBla { SPELL_GIDDYUP = 42924, SPELL_RENTAL_RACING_RAM = 43883, + SPELL_SWIFT_WORK_RAM = 43880, SPELL_RENTAL_RACING_RAM_AURA = 42146, SPELL_RAM_LEVEL_NEUTRAL = 43310, SPELL_RAM_TROT = 42992, @@ -853,6 +854,7 @@ enum RamBlaBla SPELL_RAM_GALLOP = 42994, SPELL_RAM_FATIGUE = 43052, SPELL_EXHAUSTED_RAM = 43332, + SPELL_RELAY_RACE_TURN_IN = 44501, // Quest SPELL_BREWFEST_QUEST_SPEED_BUNNY_GREEN = 43345, @@ -873,7 +875,7 @@ class spell_brewfest_giddyup : public SpellScriptLoader void OnChange(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); - if (!target->HasAura(SPELL_RENTAL_RACING_RAM)) + if (!target->HasAura(SPELL_RENTAL_RACING_RAM) && !target->HasAura(SPELL_SWIFT_WORK_RAM)) { target->RemoveAura(GetId()); return; @@ -1110,6 +1112,38 @@ class spell_brewfest_relay_race_intro_force_player_to_throw : public SpellScript } }; +class spell_brewfest_relay_race_turn_in : public SpellScriptLoader +{ +public: + spell_brewfest_relay_race_turn_in() : SpellScriptLoader("spell_brewfest_relay_race_turn_in") { } + + class spell_brewfest_relay_race_turn_in_SpellScript : public SpellScript + { + PrepareSpellScript(spell_brewfest_relay_race_turn_in_SpellScript); + + void HandleDummy(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); + + if (Aura* aura = GetHitUnit()->GetAura(SPELL_SWIFT_WORK_RAM)) + { + aura->SetDuration(aura->GetDuration() + 30 * IN_MILLISECONDS); + GetCaster()->CastSpell(GetHitUnit(), SPELL_RELAY_RACE_TURN_IN, TRIGGERED_FULL_MASK); + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_brewfest_relay_race_turn_in_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_brewfest_relay_race_turn_in_SpellScript(); + } +}; + // 43876 - Dismount Ram class spell_brewfest_dismount_ram : public SpellScriptLoader { @@ -1382,6 +1416,7 @@ void AddSC_holiday_spell_scripts() new spell_brewfest_apple_trap(); new spell_brewfest_exhausted_ram(); new spell_brewfest_relay_race_intro_force_player_to_throw(); + new spell_brewfest_relay_race_turn_in(); new spell_brewfest_dismount_ram(); new spell_brewfest_barker_bunny(); // Midsummer Fire Festival diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 715e4d4ed2d..bf0fc3d0565 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1127,6 +1127,75 @@ class spell_q9452_cast_net: public SpellScriptLoader } }; +enum PoundDrumSpells +{ + SPELL_SUMMON_DEEP_JORMUNGAR = 66510, + SPELL_STORMFORGED_MOLE_MACHINE = 66492 +}; + +class spell_q14076_14092_pound_drum : public SpellScriptLoader +{ + public: + spell_q14076_14092_pound_drum() : SpellScriptLoader("spell_q14076_14092_pound_drum") { } + + class spell_q14076_14092_pound_drum_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q14076_14092_pound_drum_SpellScript); + + void HandleSummon() + { + Unit* caster = GetCaster(); + + if (roll_chance_i(80)) + caster->CastSpell(caster, SPELL_SUMMON_DEEP_JORMUNGAR, true); + else + caster->CastSpell(caster, SPELL_STORMFORGED_MOLE_MACHINE, true); + } + + void HandleActiveObject(SpellEffIndex /*effIndex*/) + { + GetHitGObj()->SetLootState(GO_JUST_DEACTIVATED); + } + + void Register() override + { + OnCast += SpellCastFn(spell_q14076_14092_pound_drum_SpellScript::HandleSummon); + OnEffectHitTarget += SpellEffectFn(spell_q14076_14092_pound_drum_SpellScript::HandleActiveObject, EFFECT_0, SPELL_EFFECT_ACTIVATE_OBJECT); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_q14076_14092_pound_drum_SpellScript(); + } +}; + +class spell_q12279_cast_net : public SpellScriptLoader +{ + public: + spell_q12279_cast_net() : SpellScriptLoader("spell_q12279_cast_net") { } + + class spell_q12279_cast_net_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12279_cast_net_SpellScript); + + void HandleActiveObject(SpellEffIndex /*effIndex*/) + { + GetHitGObj()->SetLootState(GO_JUST_DEACTIVATED); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_q12279_cast_net_SpellScript::HandleActiveObject, EFFECT_1, SPELL_EFFECT_ACTIVATE_OBJECT); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_q12279_cast_net_SpellScript(); + } +}; + enum HodirsHelm { SAY_1 = 1, @@ -2523,6 +2592,8 @@ void AddSC_quest_spell_scripts() new spell_q13280_13283_plant_battle_standard(); new spell_q14112_14145_chum_the_water(); new spell_q9452_cast_net(); + new spell_q12279_cast_net(); + new spell_q14076_14092_pound_drum(); new spell_q12987_read_pronouncement(); new spell_q12277_wintergarde_mine_explosion(); new spell_q12066_bunny_kill_credit(); diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 5e6407e361e..c33d74d0faa 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -586,7 +586,7 @@ public: events.Reset(); running = false; } - + void Reset() override { Initialize(); @@ -1660,25 +1660,25 @@ public: # npc_wormhole ######*/ -#define GOSSIP_ENGINEERING1 "Borean Tundra" -#define GOSSIP_ENGINEERING2 "Howling Fjord" -#define GOSSIP_ENGINEERING3 "Sholazar Basin" -#define GOSSIP_ENGINEERING4 "Icecrown" -#define GOSSIP_ENGINEERING5 "Storm Peaks" -#define GOSSIP_ENGINEERING6 "Underground..." - -enum WormholeSpells +enum NPC_Wormhole { - SPELL_BOREAN_TUNDRA = 67834, - SPELL_SHOLAZAR_BASIN = 67835, - SPELL_ICECROWN = 67836, - SPELL_STORM_PEAKS = 67837, - SPELL_HOWLING_FJORD = 67838, - SPELL_UNDERGROUND = 68081, - - TEXT_WORMHOLE = 907, - - DATA_SHOW_UNDERGROUND = 1, + DATA_SHOW_UNDERGROUND = 1, // -> Random 0 or 1 + + MENU_ID_WORMHOLE = 10668, // "This tear in the fabric of time and space looks ominous." + NPC_TEXT_WORMHOLE = 14785, // (not 907 "What brings you to this part of the world, $n?") + GOSSIP_OPTION_1 = 0, // "Borean Tundra" + GOSSIP_OPTION_2 = 1, // "Howling Fjord" + GOSSIP_OPTION_3 = 2, // "Sholazar Basin" + GOSSIP_OPTION_4 = 3, // "Icecrown" + GOSSIP_OPTION_5 = 4, // "Storm Peaks" + GOSSIP_OPTION_6 = 5, // "Underground..." + + SPELL_BOREAN_TUNDRA = 67834, // 0 + SPELL_HOWLING_FJORD = 67838, // 1 + SPELL_SHOLAZAR_BASIN = 67835, // 2 + SPELL_ICECROWN = 67836, // 3 + SPELL_STORM_PEAKS = 67837, // 4 + SPELL_UNDERGROUND = 68081 // 5 }; class npc_wormhole : public CreatureScript @@ -1718,16 +1718,16 @@ class npc_wormhole : public CreatureScript { if (player == creature->ToTempSummon()->GetSummoner()) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + player->ADD_GOSSIP_ITEM_DB(MENU_ID_WORMHOLE, GOSSIP_OPTION_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->ADD_GOSSIP_ITEM_DB(MENU_ID_WORMHOLE, GOSSIP_OPTION_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + player->ADD_GOSSIP_ITEM_DB(MENU_ID_WORMHOLE, GOSSIP_OPTION_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + player->ADD_GOSSIP_ITEM_DB(MENU_ID_WORMHOLE, GOSSIP_OPTION_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + player->ADD_GOSSIP_ITEM_DB(MENU_ID_WORMHOLE, GOSSIP_OPTION_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); if (creature->AI()->GetData(DATA_SHOW_UNDERGROUND)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ENGINEERING6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + player->ADD_GOSSIP_ITEM_DB(MENU_ID_WORMHOLE, GOSSIP_OPTION_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - player->PlayerTalkClass->SendGossipMenu(TEXT_WORMHOLE, creature->GetGUID()); + player->SEND_GOSSIP_MENU(NPC_TEXT_WORMHOLE, creature->GetGUID()); } } diff --git a/src/tools/mmaps_generator/MapBuilder.cpp b/src/tools/mmaps_generator/MapBuilder.cpp index fe0e3ffd13d..bf157a228dd 100644 --- a/src/tools/mmaps_generator/MapBuilder.cpp +++ b/src/tools/mmaps_generator/MapBuilder.cpp @@ -70,6 +70,10 @@ namespace MMAP m_rcContext = new rcContext(false); + // percentageDone - Initializing + m_totalTiles = 0; + m_totalTilesBuilt = 0; + discoverTiles(); } @@ -152,6 +156,9 @@ namespace MMAP } } printf("found %u.\n\n", count); + + // percentageDone - total tiles to process + m_totalTiles = count; } /**************************************************************************/ @@ -424,7 +431,8 @@ namespace MMAP /**************************************************************************/ void MapBuilder::buildTile(uint32 mapID, uint32 tileX, uint32 tileY, dtNavMesh* navMesh) { - printf("[Map %03i] Building tile [%02u,%02u]\n", mapID, tileX, tileY); + // percentageDone - added, now it will show addional reference percentage done of the overall process + printf("%u%% [Map %03i] Building tile [%02u,%02u]\n", percentageDone(m_totalTiles, m_totalTilesBuilt), mapID, tileX, tileY); MeshData meshData; @@ -458,6 +466,9 @@ namespace MMAP // build navmesh tile buildMoveMapTile(mapID, tileX, tileY, meshData, bmin, bmax, navMesh); + + // percentageDone - increment tiles built + m_totalTilesBuilt++; } /**************************************************************************/ @@ -1015,4 +1026,13 @@ namespace MMAP return true; } + /**************************************************************************/ + uint32 MapBuilder::percentageDone(uint32 totalTiles, uint32 totalTilesBuilt) + { + if (totalTiles) + return totalTilesBuilt * 100 / totalTiles; + + return 0; + } + } diff --git a/src/tools/mmaps_generator/MapBuilder.h b/src/tools/mmaps_generator/MapBuilder.h index d4b1bdf00fc..9c22a66ea87 100644 --- a/src/tools/mmaps_generator/MapBuilder.h +++ b/src/tools/mmaps_generator/MapBuilder.h @@ -123,6 +123,8 @@ namespace MMAP bool shouldSkipMap(uint32 mapID); bool isTransportMap(uint32 mapID); bool shouldSkipTile(uint32 mapID, uint32 tileX, uint32 tileY); + // percentageDone - method to calculate percentage + uint32 percentageDone(uint32 totalTiles, uint32 totalTilesDone); TerrainBuilder* m_terrainBuilder; TileList m_tiles; @@ -136,6 +138,9 @@ namespace MMAP float m_maxWalkableAngle; bool m_bigBaseUnit; + // percentageDone - variables to calculate percentage + uint32 m_totalTiles; + std::atomic<uint32> m_totalTilesBuilt; // build performance - not really used for now rcContext* m_rcContext; |
