aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_06_18_05_world_misc.sql29
-rw-r--r--sql/updates/world/2013_06_18_06_world_conditions.sql4
-rw-r--r--sql/updates/world/2013_06_18_07_world_gossip.sql18
-rw-r--r--sql/updates/world/2013_06_19_00_world_creature.sql78
-rw-r--r--sql/updates/world/2013_06_20_00_world_creature.sql2
-rw-r--r--sql/updates/world/2013_06_20_01_world_misc.sql7
-rw-r--r--sql/updates/world/2013_06_20_02_world_creature_text.sql11
-rw-r--r--sql/updates/world/2013_06_20_03_world_spell_script_names.sql3
-rw-r--r--sql/updates/world/2013_06_20_04_world_waypoints.sql156
-rw-r--r--sql/updates/world/2013_06_21_00_world_creature.sql15
-rw-r--r--sql/updates/world/2013_06_21_01_world_creature.sql3
-rw-r--r--src/server/game/Events/GameEventMgr.cpp56
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp17
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp3
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp2
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp3
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp2
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp3
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp4
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp3
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_erekem.cpp3
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp3
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp652
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp6
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp2
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp74
36 files changed, 724 insertions, 455 deletions
diff --git a/sql/updates/world/2013_06_18_05_world_misc.sql b/sql/updates/world/2013_06_18_05_world_misc.sql
new file mode 100644
index 00000000000..7971ea5e89a
--- /dev/null
+++ b/sql/updates/world/2013_06_18_05_world_misc.sql
@@ -0,0 +1,29 @@
+-- Add texts for Captured Rageclaw
+DELETE FROM `creature_text` WHERE `entry`=29686;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(29686,0,0,'I poop on you, trollses!',0,0,100,0,0,0,'Captured Rageclaw'),
+(29686,0,1,'ARRRROOOOGGGGAAAA!',0,0,100,0,0,0,'Captured Rageclaw'),
+(29686,0,2,'No more mister nice wolvar!',0,0,100,0,0,0,'Captured Rageclaw');
+
+-- Add option conditions for Crusade Recruit
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (15) AND `SourceGroup` IN (9650);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,9650,0,0,9,12509,0,0,0,0,'','Crusade Recruit - Show gossip option only if player has quest Troll Patrol: Intestinal Fortitude');
+
+-- Add Any Missing Gossip Option for Gymer
+DELETE FROM `gossip_menu_option` WHERE menu_id=9852;
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(9852,0,0,"I'm ready, Gymer. Let's go!",1,1,0,0,0,0,'');
+
+-- Add option conditions for Gymer
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (15) AND `SourceGroup` IN (9852);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,9852,0,0,9,12919,0,0,0,0,'','Gymer - Show gossip option only if player has quest The Storm King''s Vengeance');
+
+-- Gymer SAI Quest: The Storm King''s Vengeance
+SET @ENTRY := 29647;
+UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`= '' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,62,0,100,0,9852,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Gymer - On Gossip Option Select - Close Gossip Window'),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,85,55568,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Gymer - On Gossip Option Select - Player cast Summon Gymer on self');
diff --git a/sql/updates/world/2013_06_18_06_world_conditions.sql b/sql/updates/world/2013_06_18_06_world_conditions.sql
new file mode 100644
index 00000000000..07bbf69bf39
--- /dev/null
+++ b/sql/updates/world/2013_06_18_06_world_conditions.sql
@@ -0,0 +1,4 @@
+-- Add spell target for Throw Ingredient
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=51025;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `Comment`) VALUES
+(13,1,51025,0,31,3,28240,0,0, 'Throw Ingredient can be casted on Finklestein''s Cauldron Bunny');
diff --git a/sql/updates/world/2013_06_18_07_world_gossip.sql b/sql/updates/world/2013_06_18_07_world_gossip.sql
new file mode 100644
index 00000000000..733ccab0748
--- /dev/null
+++ b/sql/updates/world/2013_06_18_07_world_gossip.sql
@@ -0,0 +1,18 @@
+-- Add Missing Gossip Menu Gurgthock
+UPDATE `creature_template` SET `gossip_menu_id`=9863 WHERE `entry`=30007;
+-- Add Missing Gossip Menu items for Gurgthock
+DELETE FROM `gossip_menu` WHERE `entry`=9863 AND `text_id`=13679; -- Before Quest 12948
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9863,13679);
+DELETE FROM `gossip_menu` WHERE `entry`=9863 AND `text_id`=13680; -- After Quest 12948
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9863,13680);
+-- Add Gossip Menu conditions for Gurgthock
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14) AND `SourceGroup` IN (9863);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,9863,13679,0,8,12948,0,0,1,0,'','Gurgthock - Show gossip text only if player does not have Quest 12948 rewarded'),
+(14,9863,13680,0,8,12948,0,0,0,0,'','Gurgthock - Show gossip text only if player does have Quest 12948 rewarded');
+-- Add some miss texts for Gurgthock
+DELETE FROM `creature_text` WHERE `entry`=30007 AND `groupid` IN (7,8,9);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(30007,7,0,'The grand Amphitheater of Anguish awaits, $N. Remember, once a battle starts you have to stay in the area. WIN OR DIE!',12,0,100,1,0,0,'Gurgthock'),
+(30007,8,0,'Here we are once again, ladies and gentlemen. The epic struggle between life and death in the Amphitheater of Anguish! For this round we have $N versus the hulking jormungar, Yg... Yggd? Yggdoze? Who comes up with these names?! $N versus big worm!',14,0,100,0,0,13363,'Gurgthock SAY_QUEST_AMPHITHEATER_ANGUISH_YGGDRAS'),
+(30007,9,0,'Prepare to make you stand, $N! Get in the Amphitheater and stand ready! Remember, you and your opponent must stay in the arena at all times or you will be disqualified!',12,0,100,1,0,0,'Gurgthock');
diff --git a/sql/updates/world/2013_06_19_00_world_creature.sql b/sql/updates/world/2013_06_19_00_world_creature.sql
new file mode 100644
index 00000000000..7ac3cd694f9
--- /dev/null
+++ b/sql/updates/world/2013_06_19_00_world_creature.sql
@@ -0,0 +1,78 @@
+-- Fix The Amphitheater of Anguish Spawning
+SET @GUID := 125601; -- 40 required
+DELETE FROM `creature` WHERE `id`IN (30193,30102);
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+39;
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES
+-- Invisible Stalker
+(@GUID+0,15214,571,1,1,0,0,5729.15 ,-3015.369,296.5512,4.607669,120,0,0,1,0,0,0,0,0),
+(@GUID+1,15214,571,1,1,0,0,5818.867,-2976.993,290.2759,2.495821,120,0,0,1,0,0,0,0,0),
+(@GUID+2,15214,571,1,1,0,0,5743.459,-3012.192,290.7671,2.565634,120,0,0,1,0,0,0,0,0),
+(@GUID+3,15214,571,1,1,0,0,5740.554,-3009.175,290.2759,0.296706,120,0,0,1,0,0,0,0,0),
+(@GUID+4,15214,571,1,1,0,0,5791.739,-3015.988,286.5712,1.605703,120,0,0,1,0,0,0,0,0),
+(@GUID+5,15214,571,1,1,0,0,5816.957,-2972.925,290.2759,3.333579,120,0,0,1,0,0,0,0,0),
+(@GUID+6,15214,571,1,1,0,0,5796.063,-3015.993,286.6147,4.974188,120,0,0,1,0,0,0,0,0),
+(@GUID+7,15214,571,1,1,0,0,5824.51 ,-2955.568,296.551,0.9948376,120,0,0,1,0,0,0,0,0),
+-- Amphitheater Spectator
+(@GUID+8,30102,571,1,1,0,0,5723.329,-3040.881,303.6286,0.3316126,120,0,0,1,0,0,0,0,0),
+(@GUID+9,30102,571,1,1,0,0,5691.038,-2993.651,307.4399,0.05358058,120,0,0,1,0,0,0,0,0),
+(@GUID+10,30102,571,1,1,0,0,5697.557,-2985.958,303.6294,0.3316126,120,0,0,1,0,0,0,0,0),
+(@GUID+11,30102,571,1,1,0,0,5732.329,-3059.191,303.6294,0.541052,120,0,0,1,0,0,0,0,0),
+(@GUID+12,30102,571,1,1,0,0,5735.703,-3037.584,296.5507,0.5585054,120,0,0,1,0,0,0,0,0),
+(@GUID+13,30102,571,1,1,0,0,5849.702,-2984.776,300.2807,3.089233,120,0,0,1,0,0,0,0,0),
+(@GUID+14,30102,571,1,1,0,0,5862.831,-2978.309,307.4399,3.071779,120,0,0,1,0,0,0,0,0),
+(@GUID+15,30102,571,1,1,0,0,5826.039,-2935.936,300.2697,3.647738,120,0,0,1,0,0,0,0,0),
+(@GUID+16,30102,571,1,1,0,0,5691.663,-2974.02,303.6294,0.122173,120,0,0,1,0,0,0,0,0),
+(@GUID+17,30102,571,1,1,0,0,5823.243,-2895.698,307.4401,3.979351,120,0,0,1,0,0,0,0,0),
+(@GUID+18,30102,571,1,1,0,0,5824.486,-2917.669,303.6294,4.122175,120,0,0,1,0,0,0,0,0),
+(@GUID+19,30102,571,1,1,0,0,5801.149,-2895.24,303.6294,4.537856,120,0,0,1,0,0,0,0,0),
+(@GUID+20,30102,571,1,1,0,0,5814.957,-2911.626,300.2807,4.253134,120,0,0,1,0,0,0,0,0),
+(@GUID+21,30102,571,1,1,0,0,5821.17,-2911.49,303.6294,3.787364,120,0,0,1,0,0,0,0,0),
+(@GUID+22,30102,571,1,1,0,0,5790.656,-2901.042,300.2807,4.939282,120,0,0,1,0,0,0,0,0),
+-- Amphitheater Spectator
+(@GUID+23,30193,571,1,1,0,0,5716.436,-3047.592,307.4399,0.3490658,120,0,0,1,0,0,0,0,0),
+(@GUID+24,30193,571,1,1,0,0,5730.827,-3041.423,300.2801,0.4886922,120,0,0,1,0,0,0,0,0),
+(@GUID+25,30193,571,1,1,0,0,5704.682,-2986.659,300.2743,0.3665192,120,0,0,1,0,0,0,0,0),
+(@GUID+26,30193,571,1,1,0,0,5705.174,-2973.334,296.5504,0.1396263,120,0,0,1,0,0,0,0,0),
+(@GUID+27,30193,571,1,1,0,0,5722.959,-3059.555,307.44,0.541052,120,0,0,1,0,0,0,0,0),
+(@GUID+28,30193,571,1,1,0,0,5841.792,-2986.62,296.5501,3.179028,120,0,0,1,0,0,0,0,0),
+(@GUID+29,30193,571,1,1,0,0,5855.139,-2997.216,300.2807,3.700098,120,0,0,1,0,0,0,0,0),
+(@GUID+30,30193,571,1,1,0,0,5742.438,-3050.167,296.5508,0.5235988,120,0,0,1,0,0,0,0,0),
+(@GUID+31,30193,571,1,1,0,0,5865.154,-3003.392,303.6294,3.124139,120,0,0,1,0,0,0,0,0),
+(@GUID+32,30193,571,1,1,0,0,5856.421,-2985.136,303.6294,3.089233,120,0,0,1,0,0,0,0,0),
+(@GUID+33,30193,571,1,1,0,0,5868.514,-2990.317,307.44,3.127902,120,0,0,1,0,0,0,0,0),
+(@GUID+34,30193,571,1,1,0,0,5696.096,-2968.275,300.2807,0.03490658,120,0,0,1,0,0,0,0,0),
+(@GUID+35,30193,571,1,1,0,0,5715.793,-2945.014,296.5512,5.462881,120,0,0,1,0,0,0,0,0),
+(@GUID+36,30193,571,1,1,0,0,5810.117,-2898.158,303.6294,4.359755,120,0,0,1,0,0,0,0,0),
+(@GUID+37,30193,571,1,1,0,0,5836.928,-2924.024,307.4398,3.965052,120,0,0,1,0,0,0,0,0),
+-- Amphitheater Vendor
+(@GUID+38,30098,571,1,1,0,0,5691.513,-3001.708,307.3175,1.629701,120,0,0,1,0,0,0,0,0),
+(@GUID+39,30098,571,1,1,0,0,5834.321,-2966.102,296.4593,1.962511,120,0,0,1,0,0,0,0,0);
+
+SET @GUID := 13; -- 2 required
+DELETE FROM `creature` WHERE `guid` IN (@GUID,@GUID+1);
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES
+-- Zena <Wodin's Warrior Kitten>
+(@GUID+0,30140,571,1,1,0,0,5791.278,-3021.8,286.468,4.550161,120,5,0,1,0,1,0,0,0),
+-- [DND] Anguish Spectator Bunny
+(@GUID+1,30156,571,1,1,0,0,5776.664,-2989.059,278.9828,0.4014257,120,0,0,1,0,0,0,0,0);
+
+-- Update [DND] Anguish Spectator Bunny
+UPDATE `creature_template` SET `InhabitType`=4, `flags_extra`=128 WHERE `entry`=30156;
+-- Update Wodin the Troll-Servant
+UPDATE `creature` SET `modelid`=12829, `orientation`=1.832596 WHERE `guid`=200821;
+UPDATE `creature_template_addon` SET `bytes1`=0, `bytes2`=1 WHERE `entry`=30009;
+-- Update Gurgthock <Fight Promoter>
+UPDATE `creature` SET `orientation`=2.024582 WHERE `guid`=200822;
+UPDATE `creature_template_addon` SET `path_id`=0, `mount`=26755, `bytes1`=0, `bytes2`=1 WHERE `entry`=30007;
+-- Invisible Stalker
+UPDATE `creature` SET `modelid`=0 WHERE `id`=15214;
+
+-- Add Missing go's
+SET @OGUID := 7093; -- 5 required
+DELETE FROM `gameobject` WHERE `map`=571 AND `id` IN (192238,192614,192615,192237,192240);
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@OGUID+0,192238,571,1,1,5784.361,-3105.425,326.7856,0.4450589,0,0,0.2206974,0.9753423,120,0,1),
+(@OGUID+1,192614,571,1,1,5850.665,-3038.08,307.9219,2.015852,0,0,0.845727,0.5336158,120,0,1),
+(@OGUID+2,192615,571,1,1,5770.064,-3076.525,307.9219,2.015852,0,0,0.845727,0.5336158,120,0,1),
+(@OGUID+3,192237,571,1,1,5865.14,-3066.895,326.8948,0.4450589,0,0,0.2206974,0.9753423,120,0,1),
+(@OGUID+4,192240,571,1,1,5827.597,-3123.574,345.3081,-1.125737,0,0,-0.5336142,0.845728,120,0,1);
diff --git a/sql/updates/world/2013_06_20_00_world_creature.sql b/sql/updates/world/2013_06_20_00_world_creature.sql
new file mode 100644
index 00000000000..1ce9bce76d7
--- /dev/null
+++ b/sql/updates/world/2013_06_20_00_world_creature.sql
@@ -0,0 +1,2 @@
+-- Cleaning db, those mobs already have emote asigned on creature_template_addon
+DELETE FROM creature_addon WHERE guid IN (SELECT guid FROM creature WHERE `id` = 33236) AND `emote`=27;
diff --git a/sql/updates/world/2013_06_20_01_world_misc.sql b/sql/updates/world/2013_06_20_01_world_misc.sql
new file mode 100644
index 00000000000..426e898f601
--- /dev/null
+++ b/sql/updates/world/2013_06_20_01_world_misc.sql
@@ -0,0 +1,7 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=55945;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(55945,"spell_gen_spectator_cheer_trigger");
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (30102,30193);
+INSERT INTO `creature_template_addon` (`entry`,`bytes2`,`auras`) VALUES
+(30102,1, '55944 56060'),(30193,1, '55944 56060');
diff --git a/sql/updates/world/2013_06_20_02_world_creature_text.sql b/sql/updates/world/2013_06_20_02_world_creature_text.sql
new file mode 100644
index 00000000000..416ead95371
--- /dev/null
+++ b/sql/updates/world/2013_06_20_02_world_creature_text.sql
@@ -0,0 +1,11 @@
+-- Creature text for Amphitheater Vendor
+DELETE FROM `creature_text` WHERE `entry` IN (30098);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(30098,0,0, 'Snacks!',12,0,100,0,0,0,'Amphitheater Vendor'),
+(30098,0,1, 'Snacks for sale!',12,0,100,0,0,0,'Amphitheater Vendor'),
+(30098,0,2, 'Get your snacks here!',12,0,100,0,0,0,'Amphitheater Vendor'),
+(30098,0,3, 'Snacks! Get your snacks here!',12,0,100,0,0,0,'Amphitheater Vendor'),
+(30098,0,4, 'Popcorn! Get your popcorn!',12,0,100,0,0,0,'Amphitheater Vendor'),
+(30098,0,5, 'Peanuts! Get your peanuts here!',12,0,100,0,0,0,'Amphitheater Vendor'),
+(30098,0,6, 'Anguish Ale! Cold Anguish Ale here!',12,0,100,0,0,0,'Amphitheater Vendor'),
+(30098,0,7, 'Popcorn! Peanuts! Ale!',12,0,100,0,0,0,'Amphitheater Vendor');
diff --git a/sql/updates/world/2013_06_20_03_world_spell_script_names.sql b/sql/updates/world/2013_06_20_03_world_spell_script_names.sql
new file mode 100644
index 00000000000..5863a4031aa
--- /dev/null
+++ b/sql/updates/world/2013_06_20_03_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=56096;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(56096,"spell_gen_vendor_bark_trigger");
diff --git a/sql/updates/world/2013_06_20_04_world_waypoints.sql b/sql/updates/world/2013_06_20_04_world_waypoints.sql
new file mode 100644
index 00000000000..2828f320835
--- /dev/null
+++ b/sql/updates/world/2013_06_20_04_world_waypoints.sql
@@ -0,0 +1,156 @@
+-- Pathing for Amphitheater Vendor Entry: 30098
+SET @NPC := 125639;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=5714.727,`position_y`=-2993.386,`position_z`=296.461 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '56094');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`,`orientation`) VALUES
+(@PATH,1,5714.727,-2993.386,296.461,6000,0,0,100,0,2.04084),
+(@PATH,2,5714.554,-2992.06,296.4618,0,0,0,100,0,0),
+(@PATH,3,5711.305,-2988.808,296.4676,0,0,0,100,0,0),
+(@PATH,4,5705.161,-2981.065,296.4691,0,0,0,100,0,0),
+(@PATH,5,5700.827,-2970.708,296.4702,0,0,0,100,0,0),
+(@PATH,6,5696.297,-2957.711,296.4715,0,0,0,100,0,0),
+(@PATH,7,5696.799,-2955.088,296.4714,0,0,0,100,0,0),
+(@PATH,8,5697.822,-2953.404,296.4712,6000,0,0,100,0,0),
+(@PATH,9,5695.771,-2953.885,296.4716,0,0,0,100,0,0),
+(@PATH,10,5696.042,-2961.384,296.4715,0,0,0,100,0,0),
+(@PATH,11,5702.383,-2974.2,296.4698,0,0,0,100,0,0),
+(@PATH,12,5707.034,-2983.82,296.4686,0,0,0,100,0,0),
+(@PATH,13,5713.569,-2990.567,296.4613,0,0,0,100,0,0),
+(@PATH,14,5712.346,-2989.936,296.4673,6000,0,0,100,0,0),
+(@PATH,15,5714.215,-2991.943,296.4613,0,0,0,100,0,0),
+(@PATH,16,5717.194,-2999.773,296.4234,0,0,0,100,0,0),
+(@PATH,17,5728.412,-3022.169,296.4291,0,0,0,100,0,0),
+(@PATH,18,5730.965,-3027.998,296.45895,0,0,0,100,0,0),
+(@PATH,19,5708.885,-3039.621,307.3123,0,0,0,100,0,0),
+(@PATH,20,5711.497,-3040.242,307.3558,6000,0,0,100,0,0),
+(@PATH,21,5711.84,-3044.363,307.3188,0,0,0,100,0,0),
+(@PATH,22,5716.811,-3055.433,307.3327,0,0,0,100,0,0),
+(@PATH,23,5721.602,-3063.456,307.36,0,0,0,100,0,0),
+(@PATH,24,5725.222,-3067.889,307.3367,0,0,0,100,0,0),
+(@PATH,25,5725.133,-3070.596,307.3248,0,0,0,100,0,0),
+(@PATH,26,5719.292,-3073.477,311.0657,0,0,0,100,0,0),
+(@PATH,27,5713.645,-3075.998,312.6586,6000,0,0,100,0,0),
+(@PATH,28,5714.134,-3075.827,312.6587,0,0,0,100,0,0),
+(@PATH,29,5720.383,-3072.84,310.5493,0,0,0,100,0,0),
+(@PATH,30,5725.57,-3070.224,307.3301,0,0,0,100,0,0),
+(@PATH,31,5723.997,-3066.298,307.3327,0,0,0,100,0,0),
+(@PATH,32,5720.401,-3061.947,307.3509,0,0,0,100,0,0),
+(@PATH,33,5716.573,-3055.332,307.33,0,0,0,100,0,0),
+(@PATH,34,5713.17,-3048.396,307.3137,0,0,0,100,0,0),
+(@PATH,35,5708.885,-3039.621,307.3123,0,0,0,100,0,0),
+(@PATH,36,5710.52,-3038.915,307.3293,6000,0,0,100,0,0),
+(@PATH,37,5730.965,-3027.998,296.45895,0,0,0,100,0,0),
+(@PATH,38,5732.765,-3031.719,296.4664,0,0,0,100,0,0),
+(@PATH,39,5732.112,-3034.138,296.4667,6000,0,0,100,0,0),
+(@PATH,40,5733.084,-3031.317,296.4664,0,0,0,100,0,0),
+(@PATH,41,5730.009,-3025.079,296.4313,0,0,0,100,0,0),
+(@PATH,42,5725.542,-3017.257,296.4236,0,0,0,100,0,0),
+(@PATH,43,5717.127,-2999.863,296.4223,0,0,0,100,0,0),
+(@PATH,44,5714.964,-2994.664,296.4603,0,0,0,100,0,0),
+(@PATH,45,5692.41,-3004.103,307.3565,6000,0,0,100,0,0.1291),
+(@PATH,46,5691.513,-3001.708,307.3175,0,0,0,100,0,0),
+(@PATH,47,5688.313,-2996.178,307.3124,0,0,0,100,0,0),
+(@PATH,48,5684.693,-2989.563,307.3086,0,0,0,100,0,0),
+(@PATH,49,5677.367,-2974.369,307.3082,0,0,0,100,0,0),
+(@PATH,50,5674.822,-2968.894,307.309,0,0,0,100,0,0),
+(@PATH,51,5678.438,-2968.422,307.3421,6000,0,0,100,0,0),
+(@PATH,52,5676.909,-2970.624,307.3198,0,0,0,100,0,0),
+(@PATH,53,5678.826,-2977.606,307.3074,0,0,0,100,0,0),
+(@PATH,54,5685.183,-2989.712,307.3122,0,0,0,100,0,0),
+(@PATH,55,5692.096,-3002.872,307.3178,0,0,0,100,0,0),
+(@PATH,56,5693.071,-3001.71,307.3307,6000,0,0,100,0,0),
+(@PATH,57,5694.927,-3003.501,307.34024,0,0,0,100,0,0),
+(@PATH,58,5714.964,-2994.664,296.4603,0,0,0,100,0,0);
+-- 0xF130007592007A8C .go 5714.727 -2993.386 296.461
+
+-- Pathing for Amphitheater Vendor Entry: 30098
+SET @NPC := 125640;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=5815.197,`position_y`=-2890.652,`position_z`=307.3073 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '56094');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`,`orientation`) VALUES
+(@PATH,1,5815.197,-2890.652,307.3073,0,0,0,100,0,0),
+(@PATH,2,5794.252,-2883.318,307.3083,0,0,0,100,0,0),
+(@PATH,3,5788.011,-2882.464,307.3129,0,0,0,100,0,0),
+(@PATH,4,5777.774,-2887.472,307.314,6000,0,0,100,0,5.081746),
+(@PATH,5,5781.212,-2885.993,307.3153,0,0,0,100,0,0),
+(@PATH,6,5790.22,-2882.968,307.3221,0,0,0,100,0,0),
+(@PATH,7,5812.069,-2889.932,307.3122,0,0,0,100,0,0),
+(@PATH,8,5824.013,-2894.033,307.3106,0,0,0,100,0,0),
+(@PATH,9,5832.72,-2904.214,307.3027,0,0,0,100,0,0),
+(@PATH,10,5839.131,-2917.173,307.3007,0,0,0,100,0,0),
+(@PATH,11,5842.978,-2932.468,307.3301,6000,0,0,100,0,3.49564),
+(@PATH,12,5823.141,-2942.902,296.4594,0,0,0,100,0,0),
+(@PATH,13,5820.456,-2941.357,296.463,0,0,0,100,0,0),
+(@PATH,14,5818.377,-2934.065,296.4635,0,0,0,100,0,0),
+(@PATH,15,5815.375,-2925.807,296.4646,0,0,0,100,0,0),
+(@PATH,16,5810.773,-2915.595,296.4659,0,0,0,100,0,0),
+(@PATH,17,5806.843,-2906.805,296.467,0,0,0,100,0,0),
+(@PATH,18,5803.637,-2903.886,296.4672,0,0,0,100,0,0),
+(@PATH,19,5793.222,-2907.475,296.4679,0,0,0,100,0,0),
+(@PATH,20,5789.824,-2907.318,296.4679,0,0,0,100,0,0),
+(@PATH,21,5793.065,-2905.667,296.4679,6000,0,0,100,0,0),
+(@PATH,22,5802.28,-2903.771,296.467,0,0,0,100,0,0),
+(@PATH,23,5805.051,-2905.157,296.4671,0,0,0,100,0,0),
+(@PATH,24,5811.012,-2917.848,296.4655,0,0,0,100,0,0),
+(@PATH,25,5816.104,-2930.128,296.4639,0,0,0,100,0,0),
+(@PATH,26,5819.828,-2938.419,296.463,0,0,0,100,0,0),
+(@PATH,27,5823.147,-2946.686,296.4627,0,0,0,100,0,0),
+(@PATH,28,5826.026,-2950.458,296.4608,6000,0,0,100,0,0),
+(@PATH,29,5836.404,-2972.255,296.4608,0,0,0,100,0,0),
+(@PATH,30,5838.149,-2976.351,296.4612,0,0,0,100,0,0),
+(@PATH,31,5859.727,-2966.575,307.32678,0,0,0,100,0,0),
+(@PATH,32,5861.81,-2971.323,307.3561,0,0,0,100,0,0),
+(@PATH,33,5863.061,-2972.167,307.3237,0,0,0,100,0,0),
+(@PATH,34,5866.722,-2976.944,307.311,0,0,0,100,0,0),
+(@PATH,35,5871.775,-2988.365,307.3141,0,0,0,100,0,0),
+(@PATH,36,5872.965,-2994.138,307.3567,0,0,0,100,0,0),
+(@PATH,37,5874.925,-2998.613,307.3567,0,0,0,100,0,0),
+(@PATH,38,5880.139,-2996.332,310.5986,0,0,0,100,0,0),
+(@PATH,39,5887.151,-2993.677,312.6583,0,0,0,100,0,0),
+(@PATH,40,5889.792,-2992.4,312.6583,0,0,0,100,0,0),
+(@PATH,41,5885.894,-2993.681,312.6583,6000,0,0,100,0,0),
+(@PATH,42,5880.026,-2996.398,310.5436,0,0,0,100,0,0),
+(@PATH,43,5874.923,-2998.589,307.3567,0,0,0,100,0,0),
+(@PATH,44,5872.593,-2994.324,307.3567,0,0,0,100,0,0),
+(@PATH,45,5866.108,-2975.193,307.3089,0,0,0,100,0,0),
+(@PATH,46,5863.831,-2970.042,307.3072,0,0,0,100,0,0),
+(@PATH,47,5862.619,-2971.012,307.3227,0,0,0,100,0,0),
+(@PATH,48,5859.727,-2966.575,307.32678,6000,0,0,100,0,0),
+(@PATH,49,5838.149,-2976.351,296.4612,0,0,0,100,0,0),
+(@PATH,50,5840.075,-2980.193,296.4609,0,0,0,100,0,0),
+(@PATH,51,5841.883,-2981.336,296.4596,0,0,0,100,0,0),
+(@PATH,52,5845.005,-2984.348,296.4602,0,0,0,100,0,0),
+(@PATH,53,5847.249,-2989.125,296.461,0,0,0,100,0,0),
+(@PATH,54,5850.176,-2994.417,296.4619,0,0,0,100,0,0),
+(@PATH,55,5854.216,-3003.275,296.4633,0,0,0,100,0,0),
+(@PATH,56,5857.905,-3012.948,296.4679,0,0,0,100,0,0),
+(@PATH,57,5855.694,-3012.666,296.4679,6000,0,0,100,0,0),
+(@PATH,58,5856.008,-3008.202,296.4679,0,0,0,100,0,0),
+(@PATH,59,5852.001,-2999.263,296.4626,0,0,0,100,0,0),
+(@PATH,60,5846.733,-2987.699,296.4607,0,0,0,100,0,0),
+(@PATH,61,5841.884,-2981.688,296.4596,0,0,0,100,0,0),
+(@PATH,62,5839.803,-2981.84,296.4595,6000,0,0,100,0,0),
+(@PATH,63,5838.802,-2979.086,296.464,0,0,0,100,0,0),
+(@PATH,64,5837.438,-2973.646,296.4601,0,0,0,100,0,0),
+(@PATH,65,5834.321,-2966.102,296.4593,0,0,0,100,0,0),
+(@PATH,66,5827.733,-2952.834,296.4597,0,0,0,100,0,0),
+(@PATH,67,5824.319,-2947.607,296.4614,0,0,0,100,0,0),
+(@PATH,68,5824.185,-2944.959,296.4594,0,0,0,100,0,0),
+(@PATH,69,5823.141,-2942.902,296.4594,0,0,0,100,0,0),
+(@PATH,70,5842.978,-2932.468,307.3301,0,0,0,100,0,0),
+(@PATH,71,5842.981,-2931.031,307.3559,6000,0,0,100,0,2.07934),
+(@PATH,72,5842.807,-2925.778,307.3042,0,0,0,100,0,0),
+(@PATH,73,5836.683,-2912.875,307.3041,0,0,0,100,0,0),
+(@PATH,74,5832.72,-2904.214,307.3027,0,0,0,100,0,0),
+(@PATH,75,5824.013,-2894.033,307.3106,0,0,0,100,0,0);
+-- 0xF130007592006C29 .go 5815.197 -2890.652 307.3073
+
+-- Remove unneeded spawn
+DELETE FROM `creature` WHERE `guid`=109649;
+DELETE FROM `creature_addon` WHERE `guid`=109649;
diff --git a/sql/updates/world/2013_06_21_00_world_creature.sql b/sql/updates/world/2013_06_21_00_world_creature.sql
new file mode 100644
index 00000000000..7749b46d5e4
--- /dev/null
+++ b/sql/updates/world/2013_06_21_00_world_creature.sql
@@ -0,0 +1,15 @@
+-- Restore Lost Data
+DELETE FROM `creature_addon` WHERE `guid` IN (14448,14449,14456,14458,14459);
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES
+(14448,144480,1,0, '22766'),
+(14449,144490,1,0, '22766'),
+(14456,144560,1,0, '22766'),
+(14458,144580,1,0, '22766'),
+(14459,144590,1,0, '22766');
+
+DELETE FROM `creature_template_addon` WHERE `entry`=3457;
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`bytes2`,`mount`,`auras`) VALUES
+(3457,0,1,0, '22766');
+
+-- Fix respawn for Steelforged Defenders at Ulduar
+UPDATE `creature` SET `spawntimesecs`=7200 WHERE (`id`=33236);
diff --git a/sql/updates/world/2013_06_21_01_world_creature.sql b/sql/updates/world/2013_06_21_01_world_creature.sql
new file mode 100644
index 00000000000..64b0de97f34
--- /dev/null
+++ b/sql/updates/world/2013_06_21_01_world_creature.sql
@@ -0,0 +1,3 @@
+-- Proper respawn time for a lot of mobs and delete incorrectly spawned mobs
+DELETE FROM `creature` WHERE `id` IN (14397,15718);
+UPDATE `creature` SET `spawntimesecs`=7200 WHERE (`map` IN (209,329,429,469,509,531) AND `spawntimesecs` IN (3520,3300,1800,1650)) OR `id` IN (12129,32593);
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index df482411a0d..74cea10809e 100644
--- a/src/server/game/Events/GameEventMgr.cpp
+++ b/src/server/game/Events/GameEventMgr.cpp
@@ -272,10 +272,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = CharacterDatabase.Query("SELECT eventEntry, state, next_start FROM game_event_save");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
-
- }
else
{
uint32 count = 0;
@@ -318,10 +315,7 @@ void GameEventMgr::LoadFromDB()
// 0 1
QueryResult result = WorldDatabase.Query("SELECT eventEntry, prerequisite_event FROM game_event_prerequisite");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
-
- }
else
{
uint32 count = 0;
@@ -366,15 +360,11 @@ void GameEventMgr::LoadFromDB()
{
uint32 oldMSTime = getMSTime();
- // 0 1
- QueryResult result = WorldDatabase.Query("SELECT creature.guid, game_event_creature.eventEntry FROM creature"
- " JOIN game_event_creature ON creature.guid = game_event_creature.guid");
+ // 0 1
+ QueryResult result = WorldDatabase.Query("SELECT guid, eventEntry FROM game_event_creature");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
-
- }
else
{
uint32 count = 0;
@@ -387,6 +377,13 @@ void GameEventMgr::LoadFromDB()
int32 internal_event_id = mGameEvent.size() + event_id - 1;
+ CreatureData const* data = sObjectMgr->GetCreatureData(guid);
+ if (!data)
+ {
+ TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_creature` contains creature (GUID: %u) not found in `creature` table.", guid);
+ continue;
+ }
+
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
{
TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_creature` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
@@ -409,15 +406,11 @@ void GameEventMgr::LoadFromDB()
{
uint32 oldMSTime = getMSTime();
- // 0 1
- QueryResult result = WorldDatabase.Query("SELECT gameobject.guid, game_event_gameobject.eventEntry FROM gameobject"
- " JOIN game_event_gameobject ON gameobject.guid=game_event_gameobject.guid");
+ // 0 1
+ QueryResult result = WorldDatabase.Query("SELECT guid, eventEntry FROM game_event_gameobject");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
-
- }
else
{
uint32 count = 0;
@@ -430,6 +423,13 @@ void GameEventMgr::LoadFromDB()
int32 internal_event_id = mGameEvent.size() + event_id - 1;
+ GameObjectData const* data = sObjectMgr->GetGOData(guid);
+ if (!data)
+ {
+ TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_gameobject` contains gameobject (GUID: %u) not found in `gameobject` table.", guid);
+ continue;
+ }
+
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
{
TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_gameobject` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
@@ -456,9 +456,7 @@ void GameEventMgr::LoadFromDB()
"FROM creature JOIN game_event_model_equip ON creature.guid=game_event_model_equip.guid");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
- }
else
{
uint32 count = 0;
@@ -512,9 +510,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT id, quest, eventEntry FROM game_event_creature_quest");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
- }
else
{
uint32 count = 0;
@@ -551,9 +547,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT id, quest, eventEntry FROM game_event_gameobject_quest");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
- }
else
{
uint32 count = 0;
@@ -590,9 +584,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT quest, eventEntry, condition_id, num FROM game_event_quest_condition");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
- }
else
{
uint32 count = 0;
@@ -631,9 +623,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT eventEntry, condition_id, req_num, max_world_state_field, done_world_state_field FROM game_event_condition");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
- }
else
{
uint32 count = 0;
@@ -671,9 +661,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = CharacterDatabase.Query("SELECT eventEntry, condition_id, done FROM game_event_condition_save");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
- }
else
{
uint32 count = 0;
@@ -717,9 +705,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT guid, eventEntry, npcflag FROM game_event_npcflag");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
- }
else
{
uint32 count = 0;
@@ -755,9 +741,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT questId, eventEntry FROM game_event_seasonal_questrelation");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty.");
- }
else
{
uint32 count = 0;
@@ -860,9 +844,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT eventEntry, bgflag FROM game_event_battleground_holiday");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battleground holidays in game events. DB table `game_event_battleground_holiday` is empty.");
- }
else
{
uint32 count = 0;
@@ -897,9 +879,7 @@ void GameEventMgr::LoadFromDB()
" JOIN game_event_pool ON pool_template.entry = game_event_pool.pool_entry");
if (!result)
- {
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
- }
else
{
uint32 count = 0;
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 6546fd16d78..e6351a18fe3 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -1597,20 +1597,7 @@ bool Aura::CanStackWith(Aura const* existingAura) const
}
}
- bool isVehicleAura1 = false;
- bool isVehicleAura2 = false;
- uint8 i = 0;
- while (i < MAX_SPELL_EFFECTS && !(isVehicleAura1 && isVehicleAura2))
- {
- if (m_spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_CONTROL_VEHICLE)
- isVehicleAura1 = true;
- if (existingSpellInfo->Effects[i].ApplyAuraName == SPELL_AURA_CONTROL_VEHICLE)
- isVehicleAura2 = true;
-
- ++i;
- }
-
- if (isVehicleAura1 && isVehicleAura2)
+ if (HasEffectType(SPELL_AURA_CONTROL_VEHICLE) && existingAura->HasEffectType(SPELL_AURA_CONTROL_VEHICLE))
{
Vehicle* veh = NULL;
if (GetOwner()->ToUnit())
@@ -1622,7 +1609,7 @@ bool Aura::CanStackWith(Aura const* existingAura) const
if (!veh->GetAvailableSeatCount())
return false; // No empty seat available
- return true; // Empty seat available (skip rest)
+ return !sameCaster; // Empty seat available (skip rest) and different caster
}
// spell of same spell rank chain
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp
index 2259cc84e15..adc2ad1c6ac 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_chrono_lord_epoch.cpp
@@ -138,7 +138,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Talk(SAY_SLAY);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
index 8020d606532..6c945e4d2b2 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
@@ -239,7 +239,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Talk(SAY_SLAY);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
index 7cf095d176c..68f2fe1992b 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
@@ -125,7 +125,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Talk(SAY_SLAY);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp
index f404e1b242d..c12171486ae 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp
@@ -148,7 +148,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Talk(SAY_SLAY);
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
index 5b65d049dd3..35c158c1d1a 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
@@ -270,7 +270,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Unit* pEmbraceTarget = GetEmbraceTarget();
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
index 21666f69c9e..874d025f2d9 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
@@ -341,8 +341,9 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
+
Talk(SAY_SLAY);
}
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
index 2177027d177..5c5982c2c01 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
@@ -181,7 +181,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Talk(SAY_SLAY);
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
index 2438273dcba..48bf4c72d43 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
@@ -178,8 +178,9 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
+
Talk(SAY_KILL);
}
diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
index 8318a916afe..6f5626229e2 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
@@ -272,7 +272,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Talk(SAY_SLAY);
diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
index e1743bd0ade..58c82307065 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
@@ -160,7 +160,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Talk(SAY_SLAY);
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
index 0603ce0f764..23e99980508 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
@@ -154,8 +154,9 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
+
Talk(SAY_KILL);
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
index 464d6f13e4d..3e4ebcb5929 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp
@@ -163,7 +163,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Talk(SAY_SLAY);
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
index 359c7e0172e..c594ecf3447 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
@@ -221,10 +221,12 @@ public:
if (instance)
instance->SetData(DATA_SJONNIR_EVENT, DONE);
}
+
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
+
Talk(SAY_SLAY);
}
diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
index d524e3fb708..67bac18081f 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
@@ -149,8 +149,9 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
+
Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
index f08f42be265..5245f3c4586 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
@@ -226,8 +226,9 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
+
Talk(SAY_SLAY);
}
diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
index 8e43baecdb1..6be02886512 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
@@ -322,8 +322,9 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
+
Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
index d05f475b22f..a73c97a9157 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
@@ -214,7 +214,7 @@ public:
}
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Talk(SAY_SLAY);
diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
index a237845cf89..b8e42384229 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
@@ -185,7 +185,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
Talk(SAY_SLAY);
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index fffb87ed022..13d019cb119 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -812,7 +812,7 @@ public:
struct npc_nexus_drake_hatchlingAI : public FollowerAI //The spell who makes the npc follow the player is missing, also we can use FollowerAI!
{
- npc_nexus_drake_hatchlingAI(Creature* creature) : FollowerAI(creature)
+ npc_nexus_drake_hatchlingAI(Creature* creature) : FollowerAI(creature)
{
HarpoonerGUID = 0;
}
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index 329759ab439..d2f53c05dc6 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -31,13 +31,12 @@
enum DrakuruShackles
{
- SPELL_LEFT_CHAIN = 59951,
- SPELL_RIGHT_CHAIN = 59952,
- SPELL_UNLOCK_SHACKLE = 55083,
- SPELL_FREE_RAGECLAW = 55223,
-
- NPC_RAGECLAW = 29686,
- QUEST_TROLLS_IS_GONE_CRAZY = 12861
+ NPC_RAGECLAW = 29686,
+ QUEST_TROLLS_IS_GONE_CRAZY = 12861,
+ SPELL_LEFT_CHAIN = 59951,
+ SPELL_RIGHT_CHAIN = 59952,
+ SPELL_UNLOCK_SHACKLE = 55083,
+ SPELL_FREE_RAGECLAW = 55223
};
class npc_drakuru_shackles : public CreatureScript
@@ -49,11 +48,9 @@ public:
{
npc_drakuru_shacklesAI(Creature* creature) : ScriptedAI(creature) {}
- uint64 RageclawGUID;
-
void Reset()
{
- RageclawGUID = 0;
+ _rageclawGUID = 0;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
float x, y, z;
@@ -61,20 +58,20 @@ public:
if (Unit* summon = me->SummonCreature(NPC_RAGECLAW, x, y, z, 0, TEMPSUMMON_DEAD_DESPAWN, 1000))
{
- RageclawGUID = summon->GetGUID();
+ _rageclawGUID = summon->GetGUID();
LockRageclaw();
}
}
void LockRageclaw()
{
- Unit* Rageclaw = Unit::GetCreature(*me, RageclawGUID);
+ Unit* rageclaw = Unit::GetCreature(*me, _rageclawGUID);
// pointer check not needed
- me->SetInFront(Rageclaw);
- Rageclaw->SetInFront(me);
+ me->SetInFront(rageclaw);
+ rageclaw->SetInFront(me);
- DoCast(Rageclaw, SPELL_LEFT_CHAIN, true);
- DoCast(Rageclaw, SPELL_RIGHT_CHAIN, true);
+ DoCast(rageclaw, SPELL_LEFT_CHAIN, true);
+ DoCast(rageclaw, SPELL_RIGHT_CHAIN, true);
}
void UnlockRageclaw(Unit* who)
@@ -82,30 +79,33 @@ public:
if (!who)
return;
- Creature* Rageclaw = Unit::GetCreature(*me, RageclawGUID);
+ Creature* rageclaw = Unit::GetCreature(*me, _rageclawGUID);
// pointer check not needed
- DoCast(Rageclaw, SPELL_FREE_RAGECLAW, true);
+ DoCast(rageclaw, SPELL_FREE_RAGECLAW, true);
me->setDeathState(DEAD);
}
- void SpellHit(Unit* pCaster, const SpellInfo* pSpell)
+ void SpellHit(Unit* caster, const SpellInfo* spell)
{
- if (pSpell->Id == SPELL_UNLOCK_SHACKLE)
+ if (spell->Id == SPELL_UNLOCK_SHACKLE)
{
- if (pCaster->ToPlayer()->GetQuestStatus(QUEST_TROLLS_IS_GONE_CRAZY) == QUEST_STATUS_INCOMPLETE)
+ if (caster->ToPlayer()->GetQuestStatus(QUEST_TROLLS_IS_GONE_CRAZY) == QUEST_STATUS_INCOMPLETE)
{
- if (Creature* pRageclaw = Unit::GetCreature(*me, RageclawGUID))
+ if (Creature* rageclaw = Unit::GetCreature(*me, _rageclawGUID))
{
- UnlockRageclaw(pCaster);
- pCaster->ToPlayer()->KilledMonster(pRageclaw->GetCreatureTemplate(), RageclawGUID);
- me->DisappearAndDie();
+ UnlockRageclaw(caster);
+ caster->ToPlayer()->KilledMonster(rageclaw->GetCreatureTemplate(), _rageclawGUID);
+ me->DespawnOrUnsummon();
}
else
me->setDeathState(JUST_DIED);
}
}
}
+
+ private:
+ uint64 _rageclawGUID;
};
CreatureAI* GetAI(Creature* creature) const
@@ -120,16 +120,11 @@ public:
enum Rageclaw
{
- SPELL_UNSHACKLED = 55085,
- SPELL_KNEEL = 39656
+ SPELL_UNSHACKLED = 55085,
+ SPELL_KNEEL = 39656,
+ SAY_RAGECLAW = 0
};
-const char* SAY_RAGECLAW_1 = "I poop on you, trollses!";
-const char* SAY_RAGECLAW_2 = "ARRRROOOOGGGGAAAA!";
-const char* SAY_RAGECLAW_3 = "No more mister nice wolvar!";
-
-#define SAY_RAGECLAW RAND(SAY_RAGECLAW_1, SAY_RAGECLAW_2, SAY_RAGECLAW_3)
-
class npc_captured_rageclaw : public CreatureScript
{
public:
@@ -139,55 +134,28 @@ public:
{
npc_captured_rageclawAI(Creature* creature) : ScriptedAI(creature) {}
- uint32 DespawnTimer;
- bool Despawn;
-
void Reset()
{
- Despawn = false;
- DespawnTimer = 0;
me->setFaction(35);
DoCast(me, SPELL_KNEEL, true); // Little Hack for kneel - Thanks Illy :P
}
void MoveInLineOfSight(Unit* /*who*/){}
- void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell)
+ void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
{
- if (pSpell->Id == SPELL_FREE_RAGECLAW)
+ if (spell->Id == SPELL_FREE_RAGECLAW)
{
me->RemoveAurasDueToSpell(SPELL_LEFT_CHAIN);
-
me->RemoveAurasDueToSpell(SPELL_RIGHT_CHAIN);
-
me->RemoveAurasDueToSpell(SPELL_KNEEL);
-
me->setFaction(me->GetCreatureTemplate()->faction_H);
-
DoCast(me, SPELL_UNSHACKLED, true);
- me->MonsterSay(SAY_RAGECLAW, LANG_UNIVERSAL, 0);
+ Talk(SAY_RAGECLAW);
me->GetMotionMaster()->MoveRandom(10);
-
- DespawnTimer = 10000;
- Despawn = true;
+ me->DespawnOrUnsummon(10000);
}
}
-
- void UpdateAI(uint32 uiDiff)
- {
- if (UpdateVictim())
- {
- DoMeleeAttackIfReady();
- return;
- }
-
- if (!Despawn)
- return;
-
- if (DespawnTimer <= uiDiff)
- me->DisappearAndDie();
- else DespawnTimer -= uiDiff;
- }
};
CreatureAI* GetAI(Creature* creature) const
@@ -197,56 +165,10 @@ public:
};
/*####
-## npc_gymer
-####*/
-
-#define GOSSIP_ITEM_G "I'm ready, Gymer. Let's go!"
-
-enum eGymer
-{
- QUEST_STORM_KING_VENGEANCE = 12919,
- SPELL_GYMER = 55568
-};
-
-class npc_gymer : public CreatureScript
-{
-public:
- npc_gymer() : CreatureScript("npc_gymer") { }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->IsQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
-
- if (player->GetQuestStatus(QUEST_STORM_KING_VENGEANCE) == QUEST_STATUS_INCOMPLETE)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_G, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->SEND_GOSSIP_MENU(13640, creature->GetGUID());
- }
-
- return true;
- }
-
- bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_INFO_DEF+1)
- {
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, SPELL_GYMER, true);
- }
-
- return true;
- }
-};
-
-/*####
## npc_gurgthock
####*/
-enum eGurgthock
+enum Gurgthock
{
QUEST_AMPHITHEATER_ANGUISH_TUSKARRMAGEDDON = 12935,
QUEST_AMPHITHEATER_ANGUISH_KORRAK_BLOODRAGER = 12936,
@@ -284,10 +206,10 @@ enum eGurgthock
SPELL_BLAST_OF_AIR = 55912, // air
SPELL_MAGMA_WAVE = 55916, // fire
- SPELL_ORB_OF_WATER = 55888, // fiend of water spell
- SPELL_ORB_OF_STORMS = 55882, // fiend of air spell
- SPELL_BOULDER = 55886, // fiend of earth spell
- SPELL_ORB_OF_FLAME = 55872, // fiend of fire spell
+ SPELL_ORB_OF_WATER = 55888, // fiend of water spell
+ SPELL_ORB_OF_STORMS = 55882, // fiend of air spell
+ SPELL_BOULDER = 55886, // fiend of earth spell
+ SPELL_ORB_OF_FLAME = 55872, // fiend of fire spell
};
struct BossAndAdd
@@ -342,21 +264,10 @@ public:
{
npc_gurgthockAI(Creature* creature) : ScriptedAI(creature) {}
- uint64 SummonGUID;
- uint64 uiPlayerGUID;
-
- uint32 uiTimer;
- uint32 uiPhase;
- uint32 uiRemoveFlagTimer;
- uint32 uiQuest;
- uint8 uiBossRandom;
-
- bool bRemoveFlag;
-
void Reset()
{
- SummonGUID = 0;
- uiPlayerGUID = 0;
+ _summonGUID = 0;
+ _playerGUID = 0;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
uiTimer = 0;
@@ -364,25 +275,25 @@ public:
uiQuest = 0;
uiRemoveFlagTimer = 5000;
- uiBossRandom = 0;
+ _bossRandom = 0;
- bRemoveFlag = false;
+ _removeFlag = false;
}
void SetGUID(uint64 guid, int32 /*id*/)
{
- uiPlayerGUID = guid;
+ _playerGUID = guid;
}
- void SetData(uint32 uiId, uint32 uiValue)
+ void SetData(uint32 type, uint32 data)
{
- bRemoveFlag = true;
+ _removeFlag = true;
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- switch (uiId)
+ switch (type)
{
case 1:
- switch (uiValue)
+ switch (data)
{
case QUEST_AMPHITHEATER_ANGUISH_TUSKARRMAGEDDON:
Talk(SAY_QUEST_ACCEPT_TUSKARRMAGEDON);
@@ -412,40 +323,40 @@ public:
}
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 diff)
{
- ScriptedAI::UpdateAI(uiDiff);
+ ScriptedAI::UpdateAI(diff);
- if (bRemoveFlag)
+ if (_removeFlag)
{
- if (uiRemoveFlagTimer <= uiDiff)
+ if (uiRemoveFlagTimer <= diff)
{
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- bRemoveFlag = false;
+ _removeFlag = false;
uiRemoveFlagTimer = 10000;
- } else uiRemoveFlagTimer -= uiDiff;
+ } else uiRemoveFlagTimer -= diff;
}
if (uiPhase)
{
- Player* player = me->GetPlayer(*me, uiPlayerGUID);
+ Player* player = me->GetPlayer(*me, _playerGUID);
- if (uiTimer <= uiDiff)
+ if (uiTimer <= diff)
{
switch (uiPhase)
{
case 1:
if (Creature* summon = me->SummonCreature(NPC_ORINOKO_TUSKBREAKER, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
- SummonGUID = summon->GetGUID();
+ _summonGUID = summon->GetGUID();
uiPhase = 2;
uiTimer = 4000;
break;
case 2:
- if (Creature* summon = Unit::GetCreature(*me, SummonGUID))
+ if (Creature* summon = Unit::GetCreature(*me, _summonGUID))
summon->GetMotionMaster()->MoveJump(5776.319824f, -2981.005371f, 273.100037f, 10.0f, 20.0f);
uiPhase = 0;
- SummonGUID = 0;
+ _summonGUID = 0;
break;
case 3:
Talk(SAY_QUEST_ACCEPT_KORRAK_2);
@@ -454,7 +365,7 @@ public:
break;
case 4:
if (Creature* summon = me->SummonCreature(NPC_KORRAK_BLOODRAGER, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
- SummonGUID = summon->GetGUID();
+ _summonGUID = summon->GetGUID();
uiTimer = 3000;
uiPhase = 0;
break;
@@ -524,15 +435,28 @@ public:
uiPhase = 14;
break;
case 14:
- uiBossRandom = urand(0, 3);
- if (Creature* creature = me->SummonCreature(Boss[uiBossRandom].uiBoss, SpawnPosition[2], TEMPSUMMON_CORPSE_DESPAWN, 1000))
- creature->AI()->SetData(1, uiBossRandom);
+ _bossRandom = urand(0, 3);
+ if (Creature* creature = me->SummonCreature(Boss[_bossRandom].uiBoss, SpawnPosition[2], TEMPSUMMON_CORPSE_DESPAWN, 1000))
+ creature->AI()->SetData(1, _bossRandom);
uiPhase = 0;
break;
}
- }else uiTimer -= uiDiff;
+ }
+ else uiTimer -= diff;
}
}
+
+ private:
+ bool _removeFlag;
+ uint8 _bossRandom;
+ uint64 _summonGUID;
+ uint64 _playerGUID;
+
+ uint32 uiTimer;
+ uint32 uiPhase;
+ uint32 uiRemoveFlagTimer;
+ uint32 uiQuest;
+
};
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
@@ -572,15 +496,15 @@ public:
## npc_orinoko_tuskbreaker
####*/
-enum eOrinokoTuskbreaker
+enum OrinokoTuskbreaker
{
- SPELL_BATTLE_SHOUT = 32064,
- SPELL_FISHY_SCENT = 55937,
- SPELL_IMPALE = 55929,
- SPELL_SUMMON_WHISKER = 55946,
+ NPC_WHISKER = 30113,
+ NPC_HUNGRY_PENGUIN = 30110,
- NPC_WHISKER = 30113,
- NPC_HUNGRY_PENGUIN = 30110
+ SPELL_BATTLE_SHOUT = 32064,
+ SPELL_FISHY_SCENT = 55937,
+ SPELL_IMPALE = 55929,
+ SPELL_SUMMON_WHISKER = 55946
};
class npc_orinoko_tuskbreaker : public CreatureScript
@@ -596,31 +520,21 @@ public:
me->SetReactState(REACT_PASSIVE);
}
- bool bSummoned;
- bool bBattleShout;
- bool bFishyScent;
-
- uint32 uiBattleShoutTimer;
- uint32 uiFishyScentTimer;
-
- uint64 AffectedGUID;
- uint64 uiWhisker;
-
void Reset()
{
- bSummoned = false;
- bBattleShout = false;
- bFishyScent = false;
+ _summoned = false;
+ _battleShout = false;
+ _fishyScent = false;
uiBattleShoutTimer = 0;
uiFishyScentTimer = 20000;
- uiWhisker = 0;
- AffectedGUID = 0;
+ _whiskerGUID = 0;
+ _affectedGUID = 0;
}
void EnterEvadeMode()
{
- if (Creature* pWhisker = me->GetCreature(*me, uiWhisker))
- pWhisker->RemoveFromWorld();
+ if (Creature* whisker = me->GetCreature(*me, _whiskerGUID))
+ whisker->RemoveFromWorld();
}
void MovementInform(uint32 type, uint32 /*pointId*/)
@@ -639,35 +553,35 @@ public:
DoCast(who, SPELL_IMPALE);
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
- if (!bBattleShout && uiBattleShoutTimer <= uiDiff)
+ if (!_battleShout && uiBattleShoutTimer <= diff)
{
DoCast(me, SPELL_BATTLE_SHOUT);
- bBattleShout = true;
- } else uiBattleShoutTimer -= uiDiff;
+ _battleShout = true;
+ } else uiBattleShoutTimer -= diff;
- if (uiFishyScentTimer <= uiDiff)
+ if (uiFishyScentTimer <= diff)
{
- if (Unit* pAffected = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ if (Unit* affected = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
- DoCast(pAffected, SPELL_FISHY_SCENT);
- AffectedGUID = pAffected->GetGUID();
+ DoCast(affected, SPELL_FISHY_SCENT);
+ _affectedGUID = affected->GetGUID();
}
uiFishyScentTimer = 20000;
- } else uiFishyScentTimer -= uiDiff;
+ } else uiFishyScentTimer -= diff;
- if (!bSummoned && !HealthAbovePct(50))
+ if (!_summoned && !HealthAbovePct(50))
{
Talk(SAY_CALL_FOR_HELP);
//DoCast(me->GetVictim(), SPELL_SUMMON_WHISKER); petai is not working correctly???
- if (Creature* pWhisker = me->SummonCreature(NPC_WHISKER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0))
- uiWhisker = pWhisker->GetGUID();
- bSummoned = true;
+ if (Creature* whisker = me->SummonCreature(NPC_WHISKER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0))
+ _whiskerGUID = whisker->GetGUID();
+ _summoned = true;
}
DoMeleeAttackIfReady();
@@ -681,10 +595,10 @@ public:
summon->AI()->AttackStart(me->GetVictim());
break;
case NPC_HUNGRY_PENGUIN:
- if (Unit* pAffected = Unit::GetUnit(*me, AffectedGUID))
+ if (Unit* affected = Unit::GetUnit(*me, _affectedGUID))
{
- if (pAffected->IsAlive())
- summon->AI()->AttackStart(pAffected);
+ if (affected->IsAlive())
+ summon->AI()->AttackStart(affected);
}
break;
}
@@ -692,14 +606,23 @@ public:
void JustDied(Unit* killer)
{
- if (uiWhisker)
- if (Creature* pWhisker = me->GetCreature(*me, uiWhisker))
- pWhisker->RemoveFromWorld();
+ if (_whiskerGUID)
+ if (Creature* whisker = me->GetCreature(*me, _whiskerGUID))
+ whisker->RemoveFromWorld();
if (killer->GetTypeId() == TYPEID_PLAYER)
killer->GetCharmerOrOwnerPlayerOrPlayerItself()->GroupEventHappens(QUEST_AMPHITHEATER_ANGUISH_TUSKARRMAGEDDON, killer);
}
+
+ private:
+ bool _summoned;
+ bool _battleShout;
+ bool _fishyScent;
+ uint32 uiBattleShoutTimer;
+ uint32 uiFishyScentTimer;
+ uint64 _affectedGUID;
+ uint64 _whiskerGUID;
};
CreatureAI* GetAI(Creature* creature) const
@@ -712,12 +635,12 @@ public:
## npc_korrak_bloodrager
####*/
-enum eKorrakBloodrager
+enum KorrakBloodrager
{
- SPELL_GROW = 55948,
- SPELL_CHARGE = 24193,
- SPELL_UPPERCUT = 30471,
- SPELL_ENRAGE = 42745
+ SPELL_GROW = 55948,
+ SPELL_CHARGE = 24193,
+ SPELL_UPPERCUT = 30471,
+ SPELL_ENRAGE = 42745
};
class npc_korrak_bloodrager : public CreatureScript
@@ -733,18 +656,14 @@ public:
SetDespawnAtEnd(false);
}
- uint32 uiChargeTimer;
- uint32 uiUppercutTimer;
-
- bool bEnrage;
-
void Reset()
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_PASSIVE);
- uiChargeTimer = 15000;
- uiUppercutTimer = 12000;
- bEnrage = false;
+ _enrage = false;
+ _chargeTimer = 15000;
+ _uppercutTimer = 12000;
+
}
void WaypointReached(uint32 waypointId)
@@ -764,31 +683,31 @@ public:
DoCast(me, SPELL_GROW);
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 diff)
{
- npc_escortAI::UpdateAI(uiDiff);
+ npc_escortAI::UpdateAI(diff);
if (!UpdateVictim())
return;
- if (uiUppercutTimer <= uiDiff)
+ if (_uppercutTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0))
DoCast(target, SPELL_UPPERCUT);
- uiUppercutTimer = 12000;
- } else uiUppercutTimer -= uiDiff;
+ _uppercutTimer = 12000;
+ } else _uppercutTimer -= diff;
- if (uiChargeTimer <= uiDiff)
+ if (_chargeTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0))
DoCast(target, SPELL_CHARGE);
- uiChargeTimer = 15000;
- } else uiChargeTimer -= uiDiff;
+ _chargeTimer = 15000;
+ } else _chargeTimer -= diff;
- if (!bEnrage && !HealthAbovePct(20))
+ if (!_enrage && !HealthAbovePct(20))
{
DoCast(me, SPELL_ENRAGE);
- bEnrage = true;
+ _enrage = true;
}
DoMeleeAttackIfReady();
}
@@ -798,6 +717,10 @@ public:
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
player->GroupEventHappens(QUEST_AMPHITHEATER_ANGUISH_KORRAK_BLOODRAGER, killer);
}
+ private:
+ bool _enrage;
+ uint32 _chargeTimer;
+ uint32 _uppercutTimer;
};
CreatureAI* GetAI(Creature* creature) const
@@ -810,11 +733,11 @@ public:
## npc_yggdras
####*/
-enum eYggdras
+enum Yggdras
{
- SPELL_CLEAVE = 40504,
- SPELL_CORRODE_FLESH = 57076,
- SPELL_JORMUNGAR_SPAWN = 55859
+ SPELL_CLEAVE = 40504,
+ SPELL_CORRODE_FLESH = 57076,
+ SPELL_JORMUNGAR_SPAWN = 55859
};
class npc_yggdras : public CreatureScript
@@ -826,16 +749,13 @@ public:
{
npc_yggdrasAI(Creature* creature) : ScriptedAI(creature) {}
- uint32 uiCleaveTimer;
- uint32 uiCorrodeFleshTimer;
-
void Reset()
{
- uiCleaveTimer = 9000;
- uiCorrodeFleshTimer = 6000;
+ _cleaveTimer = 9000;
+ _corrodeFleshTimer = 6000;
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
@@ -858,17 +778,17 @@ public:
}
}
- if (uiCleaveTimer <= uiDiff)
+ if (_cleaveTimer <= diff)
{
DoCast(me->GetVictim(), SPELL_CLEAVE);
- uiCleaveTimer = 9000;
- } else uiCleaveTimer -= uiDiff;
+ _cleaveTimer = 9000;
+ } else _cleaveTimer -= diff;
- if (uiCorrodeFleshTimer <= uiDiff)
+ if (_corrodeFleshTimer <= diff)
{
DoCast(me->GetVictim(), SPELL_CORRODE_FLESH);
- uiCorrodeFleshTimer = 6000;
- } else uiCorrodeFleshTimer -= uiDiff;
+ _corrodeFleshTimer = 6000;
+ } else _corrodeFleshTimer -= diff;
DoMeleeAttackIfReady();
}
@@ -890,6 +810,9 @@ public:
for (uint8 i = 0; i < 3; ++i)
DoCast(killer, SPELL_JORMUNGAR_SPAWN, true);
}
+ private:
+ uint32 _cleaveTimer;
+ uint32 _corrodeFleshTimer;
};
CreatureAI* GetAI(Creature* creature) const
@@ -902,13 +825,13 @@ public:
## npc_stinkbeard
####*/
-enum eStinkbeard
+enum Stinkbeard
{
- SPELL_ENRAGE_STINKBEARD = 50420,
- SPELL_KNOCK_AWAY = 31389,
- SPELL_STINKY_BEARD = 55867,
- SPELL_THUNDERBLADE = 55866,
- SPELL_THUNDERCLAP = 15588
+ SPELL_ENRAGE_STINKBEARD = 50420,
+ SPELL_KNOCK_AWAY = 31389,
+ SPELL_STINKY_BEARD = 55867,
+ SPELL_THUNDERBLADE = 55866,
+ SPELL_THUNDERCLAP = 15588
};
class npc_stinkbeard : public CreatureScript
@@ -926,19 +849,13 @@ public:
SetDespawnAtEnd(false);
}
- uint32 uiKnockAwayTimer;
- uint32 uiStinkyBeardTimer;
-
- bool bEnrage;
- bool bThunderClap;
-
void Reset()
{
me->AddAura(SPELL_THUNDERBLADE, me);
uiKnockAwayTimer = 10000;
uiStinkyBeardTimer = 15000;
- bEnrage = false;
- bThunderClap = false;
+ _enrage = false;
+ _thunderClap = false;
}
void WaypointReached(uint32 waypointId)
@@ -981,10 +898,10 @@ public:
}
}
- if (bThunderClap && !HealthAbovePct(10))
+ if (_thunderClap && !HealthAbovePct(10))
{
DoCastAOE(SPELL_THUNDERCLAP);
- bThunderClap = true;
+ _thunderClap = true;
}
if (uiKnockAwayTimer <= uiDiff)
@@ -1007,10 +924,10 @@ public:
uiStinkyBeardTimer = 15000;
} else uiStinkyBeardTimer -= uiDiff;
- if (!bEnrage && !HealthAbovePct(20))
+ if (!_enrage && !HealthAbovePct(20))
{
DoCast(me, SPELL_ENRAGE_STINKBEARD);
- bEnrage = true;
+ _enrage = true;
}
DoMeleeAttackIfReady();
}
@@ -1023,6 +940,11 @@ public:
std::string sText = ("And with AUTHORITY, " + std::string(killer->GetName()) + " dominates the magnataur lord! Stinkbeard's clan is gonna miss him back home in the Dragonblight!");
me->MonsterYell(sText.c_str(), LANG_UNIVERSAL, 0);
}
+ private:
+ bool _enrage;
+ bool _thunderClap;
+ uint32 uiKnockAwayTimer;
+ uint32 uiStinkyBeardTimer;
};
CreatureAI* GetAI(Creature* creature) const
@@ -1189,16 +1111,13 @@ public:
{
npc_fiend_elementalAI(Creature* creature) : ScriptedAI(creature) {}
- uint32 uiMissleTimer;
- uint32 uiSpell;
-
void Reset()
{
if (me->GetPositionZ() >= 287.0f)
me->GetMotionMaster()->MoveIdle();
- uiSpell = 0;
- uiMissleTimer = urand(2000, 7000);
+ _spell = 0;
+ _missleTimer = urand(2000, 7000);
}
void AttackStart(Unit* who)
@@ -1209,30 +1128,34 @@ public:
AttackStartNoMove(who);
}
- void SetData(uint32 uiData, uint32 uiValue)
+ void SetData(uint32 Data, uint32 Value)
{
- if (uiData == 1)
- uiSpell = Boss[uiValue].uiAddSpell;
+ if (Data == 1)
+ _spell = Boss[Value].uiAddSpell;
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
if (me->GetPositionZ() >= 287.0f)
{
- if (uiMissleTimer <= uiDiff)
+ if (_missleTimer <= diff)
{
- if (uiSpell) // Sometimes it is 0, why?
- DoCast(me, uiSpell); // this spell (what spell) is not supported ... YET!
- uiMissleTimer = urand(2000, 7000);
- } else uiMissleTimer -= uiDiff;
+ if (_spell) // Sometimes it is 0, why?
+ DoCast(me, _spell); // this spell (what spell) is not supported ... YET!
+ _missleTimer = urand(2000, 7000);
+ } else _missleTimer -= diff;
}
DoMeleeAttackIfReady();
}
+
+ private:
+ uint32 _missleTimer;
+ uint32 _spell;
};
CreatureAI* GetAI(Creature* creature) const
@@ -1261,11 +1184,11 @@ public:
me->GetMotionMaster()->MovePoint(0, x, y, z);
}
- void MovementInform(uint32 uiType, uint32 /*uiId*/)
+ void MovementInform(uint32 Type, uint32 /*uiId*/)
{
- if (uiType != POINT_MOTION_TYPE)
+ if (Type != POINT_MOTION_TYPE)
return;
- me->DisappearAndDie();
+ me->DespawnOrUnsummon();
}
};
@@ -1279,16 +1202,17 @@ public:
## npc_crusade_recruit
######*/
-enum eCrusade_recruit
+enum CrusadeRecruit
{
- SPELL_QUEST_CREDIT = 50633,
-
- QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE = 12509,
-
- GOSSIP_CRUSADE_TEXT = 13069
+ SPELL_QUEST_CREDIT = 50633,
+ QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE = 12509
};
-#define GOSSIP_ITEM_1 "Get out there and make those Scourge wish they were never reborn!"
+enum CrusadeRecruitEvents
+{
+ EVENT_RECRUIT_1 = 1,
+ EVENT_RECRUIT_2 = 2
+};
class npc_crusade_recruit : public CreatureScript
{
@@ -1299,86 +1223,57 @@ public:
{
npc_crusade_recruitAI(Creature* creature) : ScriptedAI(creature) {}
- uint8 m_uiPhase; //The current phase we are in
- uint32 m_uiTimer; //Timer until phase transition
- float m_heading; //Store creature heading
-
void Reset()
{
- m_uiTimer = 0;
- m_uiPhase = 0;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_COWER);
- m_heading = me->GetOrientation();
+ _heading = me->GetOrientation();
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 diff)
{
- if (m_uiPhase)
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
{
- if (m_uiTimer <= uiDiff)
+ switch (eventId)
{
- switch (m_uiPhase)
- {
- case 1:
- // say random text
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
- Talk(SAY_RECRUIT);
- m_uiTimer = 3000;
- m_uiPhase = 2;
- break;
- case 2:
- // walk forward
- me->SetWalk(true);
- me->GetMotionMaster()->MovePoint(0, me->GetPositionX() + (cos(m_heading) * 10), me->GetPositionY() + (sin(m_heading) * 10), me->GetPositionZ());
- m_uiTimer = 5000;
- m_uiPhase = 3;
- break;
- case 3:
- // despawn
- me->DisappearAndDie();
- m_uiTimer = 0;
- m_uiPhase = 0;
- break;
- }
+ case EVENT_RECRUIT_1:
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
+ Talk(SAY_RECRUIT);
+ _events.ScheduleEvent(EVENT_RECRUIT_2, 3000);
+ break;
+ case EVENT_RECRUIT_2:
+ me->SetWalk(true);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX() + (cos(_heading) * 10), me->GetPositionY() + (sin(_heading) * 10), me->GetPositionZ());
+ me->DespawnOrUnsummon(5000);
+ break;
+ default:
+ break;
}
- else
- m_uiTimer -= uiDiff;
}
- ScriptedAI::UpdateAI(uiDiff);
if (!UpdateVictim())
return;
}
- };
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_crusade_recruitAI(creature);
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (player->GetQuestStatus(QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
-
- player->SEND_GOSSIP_MENU(GOSSIP_CRUSADE_TEXT, creature->GetGUID());
- return true;
- }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_INFO_DEF +1)
+ void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/)
{
+ _events.ScheduleEvent(EVENT_RECRUIT_1, 100);
player->CLOSE_GOSSIP_MENU();
creature->CastSpell(player, SPELL_QUEST_CREDIT, true);
- CAST_AI(npc_crusade_recruit::npc_crusade_recruitAI, (creature->AI()))->m_uiPhase = 1;
creature->SetFacingToObject(player);
}
- return true;
+ private:
+ EventMap _events;
+ float _heading; // Store creature heading
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_crusade_recruitAI(creature);
}
};
@@ -1389,8 +1284,9 @@ public:
enum ScourgeEnclosure
{
- QUEST_OUR_ONLY_HOPE = 12916,
- NPC_GYMER_DUMMY = 29928 //from quest template
+ QUEST_OUR_ONLY_HOPE = 12916,
+ NPC_GYMER_DUMMY = 29928, // From quest template
+ SPELL_GYMER_LOCK_EXPLOSION = 55529
};
class go_scourge_enclosure : public GameObjectScript
@@ -1403,12 +1299,12 @@ public:
go->UseDoorOrButton();
if (player->GetQuestStatus(QUEST_OUR_ONLY_HOPE) == QUEST_STATUS_INCOMPLETE)
{
- Creature* pGymerDummy = go->FindNearestCreature(NPC_GYMER_DUMMY, 20.0f);
- if (pGymerDummy)
+ Creature* gymerDummy = go->FindNearestCreature(NPC_GYMER_DUMMY, 20.0f);
+ if (gymerDummy)
{
- player->KilledMonsterCredit(pGymerDummy->GetEntry(), pGymerDummy->GetGUID());
- pGymerDummy->CastSpell(pGymerDummy, 55529, true);
- pGymerDummy->DisappearAndDie();
+ player->KilledMonsterCredit(gymerDummy->GetEntry(), gymerDummy->GetGUID());
+ gymerDummy->CastSpell(gymerDummy, SPELL_GYMER_LOCK_EXPLOSION, true);
+ gymerDummy->DespawnOrUnsummon();
}
}
return true;
@@ -1675,7 +1571,7 @@ public:
}
};
-uint32 const FetchIngredients[21] [4] =
+uint32 const FetchIngredients[21][4] =
{
{ SPELL_FETCH_KNOTROOT, SPELL_HAVE_KNOTROOT, ITEM_KNOTROOT, SAY_KNOTROOT },
{ SPELL_FETCH_PICKLED_EAGLE_EGG, SPELL_HAVE_PICKLED_EAGLE_EGG, ITEM_PICKLED_EAGLE_EGG, SAY_PICKLED_EAGLE_EGG },
@@ -1776,7 +1672,6 @@ class spell_random_ingredient : public SpellScriptLoader
{
if (Player* player = GetHitPlayer())
{
-
uint8 ingredient = 0;
switch (GetSpellInfo()->Id)
@@ -1794,8 +1689,8 @@ class spell_random_ingredient : public SpellScriptLoader
if (Creature* finklestein = GetClosestCreatureWithEntry(player, NPC_FINKLESTEIN, 25.0f))
{
- finklestein->CastSpell(player, FetchIngredients[ingredient] [0], true, NULL);
- finklestein->AI()->Talk(FetchIngredients[ingredient] [3], player->GetGUID());
+ finklestein->CastSpell(player, FetchIngredients[ingredient][0], true, NULL);
+ finklestein->AI()->Talk(FetchIngredients[ingredient][3], player->GetGUID());
}
}
}
@@ -1832,14 +1727,14 @@ class spell_pot_check : public SpellScriptLoader
!sSpellMgr->GetSpellInfo(SPELL_FETCH_PUTRID_PIRATE_PERSPIRATION) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_ICECROWN_BOTTLED_WATER) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_WASPS_WINGS) ||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_PRISMATIC_MOJO) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_RAPTOR_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_AMBERSEED) ||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_SHRUNKEN_DRAGONS_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_CHILLED_SERPENT_MUCUS) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_CRYSTALLIZED_HOGSNOT) ||
- !sSpellMgr->GetSpellInfo(SPELL_FETCH_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_FROZEN_SPIDER_ICHOR) ||
+ !sSpellMgr->GetSpellInfo(SPELL_FETCH_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_FROZEN_SPIDER_ICHOR) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_KNOTROOT) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_PICKLED_EAGLE_EGG) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_SPECKLED_GUANO) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_WITHERED_BATWING) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_SEASONED_SLIDER_CIDER) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_PULVERIZED_GARGOYLE_TEETH) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_MUDDY_MIRE_MAGGOT) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_SPIKY_SPIDER_EGG) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_HAIRY_HERRING_HEAD) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_PUTRID_PIRATE_PERSPIRATION) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_ICECROWN_BOTTLED_WATER) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_WASPS_WINGS) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_PRISMATIC_MOJO) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_RAPTOR_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_AMBERSEED) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_SHRUNKEN_DRAGONS_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_CHILLED_SERPENT_MUCUS) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_CRYSTALLIZED_HOGSNOT) ||
- !sSpellMgr->GetSpellInfo(SPELL_HAVE_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_FROZEN_SPIDER_ICHOR))
+ !sSpellMgr->GetSpellInfo(SPELL_HAVE_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_FROZEN_SPIDER_ICHOR))
return false;
return true;
}
@@ -1850,14 +1745,14 @@ class spell_pot_check : public SpellScriptLoader
{
for (uint8 i = 0; i < 21; ++i)
{
- if(player->HasAura(FetchIngredients[i] [0]))
+ if (player->HasAura(FetchIngredients[i][0]))
{
player->CastSpell(player, SPELL_THROW_INGREDIENT);
- player->RemoveAura(FetchIngredients[i] [0]);
- if(player->HasAura(FetchIngredients[i] [1]))
+ player->RemoveAura(FetchIngredients[i][0]);
+ if (player->HasAura(FetchIngredients[i][1]))
{
- player->RemoveAura(FetchIngredients[i] [1]);
- player->DestroyItemCount(FetchIngredients[i] [2], 1, true);
+ player->RemoveAura(FetchIngredients[i][1]);
+ player->DestroyItemCount(FetchIngredients[i][2], 1, true);
if (i < 15)
{
if (Creature* finklestein = GetClosestCreatureWithEntry(player, NPC_FINKLESTEIN, 25.0f))
@@ -1889,8 +1784,8 @@ class spell_pot_check : public SpellScriptLoader
void RemoveItems(Player* player)
{
for (uint8 i = 0; i < 21; ++i)
- if (player->HasItemCount(FetchIngredients[i] [2], 1, true))
- player->DestroyItemCount(FetchIngredients[i] [2], 1, true);
+ if (player->HasItemCount(FetchIngredients[i][2], 1, true))
+ player->DestroyItemCount(FetchIngredients[i][2], 1, true);
}
void Register()
@@ -1919,14 +1814,14 @@ class spell_fetch_ingredient_aura : public SpellScriptLoader
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
+ Unit* target = GetTarget();
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
- if (Unit* target = GetTarget())
- if (target->HasAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF))
- if (Creature* finklestein = GetClosestCreatureWithEntry(target, NPC_FINKLESTEIN, 100.0f))
- {
- target->RemoveAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF);
- finklestein->AI()->Talk(SAY_RUINED, target->GetGUID());
- }
+ if (target->HasAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF))
+ if (Creature* finklestein = GetClosestCreatureWithEntry(target, NPC_FINKLESTEIN, 100.0f))
+ {
+ target->RemoveAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF);
+ finklestein->AI()->Talk(SAY_RUINED, target->GetGUID());
+ }
}
void Register()
@@ -1943,23 +1838,22 @@ class spell_fetch_ingredient_aura : public SpellScriptLoader
void AddSC_zuldrak()
{
- new npc_drakuru_shackles;
- new npc_captured_rageclaw;
- new npc_gymer;
- new npc_gurgthock;
- new npc_orinoko_tuskbreaker;
- new npc_korrak_bloodrager;
- new npc_yggdras;
- new npc_stinkbeard;
- new npc_released_offspring_harkoa;
- new npc_crusade_recruit;
- new npc_elemental_lord;
- new npc_fiend_elemental;
- new go_scourge_enclosure;
- new npc_alchemist_finklestein;
- new go_finklesteins_cauldron;
- new spell_random_ingredient_aura;
- new spell_random_ingredient;
- new spell_pot_check;
- new spell_fetch_ingredient_aura;
+ new npc_drakuru_shackles();
+ new npc_captured_rageclaw();
+ new npc_gurgthock();
+ new npc_orinoko_tuskbreaker();
+ new npc_korrak_bloodrager();
+ new npc_yggdras();
+ new npc_stinkbeard();
+ new npc_released_offspring_harkoa();
+ new npc_crusade_recruit();
+ new npc_elemental_lord();
+ new npc_fiend_elemental();
+ new go_scourge_enclosure();
+ new npc_alchemist_finklestein();
+ new go_finklesteins_cauldron();
+ new spell_random_ingredient_aura();
+ new spell_random_ingredient();
+ new spell_pot_check();
+ new spell_fetch_ingredient_aura();
}
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
index b96418097f3..4f1d93aa04e 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
@@ -71,10 +71,10 @@ public:
events.ScheduleEvent(EVENT_RESONANCE, 5000);
events.ScheduleEvent(EVENT_MAGNETIC_PULL, urand(15000, 30000));
if (IsHeroic())
- {
+ {
events.ScheduleEvent(EVENT_THUNDERING_STORM, 15000);
events.ScheduleEvent(EVENT_SONIC_SHOCK, 10000);
- }
+ }
//database should have `RegenHealth`=0 to prevent regen
uint32 hp = me->CountPctFromMaxHealth(40);
@@ -160,7 +160,7 @@ public:
DoCast(target, SPELL_THUNDERING_STORM, true);
events.ScheduleEvent(EVENT_THUNDERING_STORM, 15000);
break;
- }
+ }
case EVENT_SONIC_SHOCK:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20, false))
if (target->IsAlive())
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index 7cac1128815..06e6c676ffa 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -574,7 +574,7 @@ public:
void KilledUnit(Unit* victim)
{
- if (victim == me)
+ if (victim->GetTypeId() != TYPEID_PLAYER)
return;
/// @todo Find better way to handle emote
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index a99c02a60c0..2ffd8c80601 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -3673,6 +3673,78 @@ class spell_gen_whisper_gulch_yogg_saron_whisper : public SpellScriptLoader
}
};
+enum SpectatorCheerTrigger
+{
+ EMOTE_ONE_SHOT_CHEER = 4,
+ EMOTE_ONE_SHOT_EXCLAMATION = 5,
+ EMOTE_ONE_SHOT_APPLAUD = 21
+};
+
+uint8 const EmoteArray[3] = { EMOTE_ONE_SHOT_CHEER, EMOTE_ONE_SHOT_EXCLAMATION, EMOTE_ONE_SHOT_APPLAUD };
+
+class spell_gen_spectator_cheer_trigger : public SpellScriptLoader
+{
+ public:
+ spell_gen_spectator_cheer_trigger() : SpellScriptLoader("spell_gen_spectator_cheer_trigger") { }
+
+ class spell_gen_spectator_cheer_trigger_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_gen_spectator_cheer_trigger_SpellScript)
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->HandleEmoteCommand(EmoteArray[urand(0, 2)]);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_spectator_cheer_trigger_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_gen_spectator_cheer_trigger_SpellScript();
+ }
+
+};
+
+enum VendorBarkTrigger
+
+{
+ NPC_AMPHITHEATER_VENDOR = 30098,
+ SAY_AMPHITHEATER_VENDOR = 0
+};
+
+class spell_gen_vendor_bark_trigger : public SpellScriptLoader
+{
+ public:
+ spell_gen_vendor_bark_trigger() : SpellScriptLoader("spell_gen_vendor_bark_trigger") { }
+
+ class spell_gen_vendor_bark_trigger_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_gen_vendor_bark_trigger_SpellScript)
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ if (Creature* vendor = GetCaster()->ToCreature())
+ if (vendor->GetEntry() == NPC_AMPHITHEATER_VENDOR)
+ vendor->AI()->Talk(SAY_AMPHITHEATER_VENDOR);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_vendor_bark_trigger_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_gen_vendor_bark_trigger_SpellScript();
+ }
+
+};
+
void AddSC_generic_spell_scripts()
{
new spell_gen_absorb0_hitlimit1();
@@ -3762,4 +3834,6 @@ void AddSC_generic_spell_scripts()
new spell_gen_darkflight();
new spell_gen_orc_disguise();
new spell_gen_whisper_gulch_yogg_saron_whisper();
+ new spell_gen_spectator_cheer_trigger();
+ new spell_gen_vendor_bark_trigger();
}