aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_05_22_00_world_spell_proc_event.sql1
-rw-r--r--sql/updates/world/2012_05_22_01_world_creature_loot_template.sql2
-rw-r--r--sql/updates/world/2012_05_23_00_world_creature.sql55
-rw-r--r--sql/updates/world/2012_05_23_01_world_sai.sql14
-rw-r--r--sql/updates/world/2012_05_23_02_world_sai.sql21
-rw-r--r--sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql32
-rw-r--r--sql/updates/world/2012_05_23_04_world_gameobject.sql3
-rw-r--r--sql/updates/world/2012_05_23_05_world_creature.sql12
-rw-r--r--sql/updates/world/2012_05_24_00_world_creature_misc.sql5
-rw-r--r--sql/updates/world/2012_05_24_01_world_gameobject.sql3
-rw-r--r--sql/updates/world/2012_05_25_00_world_sai.sql6
-rw-r--r--sql/updates/world/2012_05_25_01_world_waypoints.sql149
-rw-r--r--sql/updates/world/2012_05_25_02_world_creature_template.sql2
-rw-r--r--sql/updates/world/2012_05_25_03_world_template.sql8
-rw-r--r--sql/updates/world/2012_05_26_00_world_scripts.sql20
-rw-r--r--sql/updates/world/2012_05_26_01_world_spell_dbc.sql4
-rw-r--r--sql/updates/world/2012_05_26_02_world_creature_template.sql5
-rw-r--r--sql/updates/world/2012_05_26_03_world_page_text.sql4
-rw-r--r--sql/updates/world/2012_05_26_04_world_creature_template.sql4
-rw-r--r--sql/updates/world/2012_05_26_05_world_creature_template.sql8
-rw-r--r--sql/updates/world/2012_05_26_06_world_smart_scripts.sql143
-rw-r--r--sql/updates/world/2012_05_27_00_world_gameobject_template.sql7
-rw-r--r--sql/updates/world/2012_05_27_01_world_waypoints.sql7
-rwxr-xr-xsrc/server/game/AI/CoreAI/GuardAI.cpp87
-rwxr-xr-xsrc/server/game/AI/CoreAI/GuardAI.h23
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.cpp52
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.cpp9
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAB.cpp2
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundSA.cpp11
-rw-r--r--src/server/game/Calendar/CalendarMgr.cpp24
-rwxr-xr-xsrc/server/game/DataStores/DBCEnums.h4
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.cpp4
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp27
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp55
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp78
-rwxr-xr-xsrc/server/game/Handlers/CalendarHandler.cpp56
-rwxr-xr-xsrc/server/game/Handlers/MiscHandler.cpp45
-rwxr-xr-xsrc/server/game/Handlers/MovementHandler.cpp68
-rwxr-xr-xsrc/server/game/Handlers/SpellHandler.cpp11
-rwxr-xr-xsrc/server/game/Handlers/TradeHandler.cpp2
-rwxr-xr-xsrc/server/game/Server/Protocol/Opcodes.cpp2
-rwxr-xr-xsrc/server/game/Server/Protocol/Opcodes.h6
-rwxr-xr-xsrc/server/game/Server/WorldSession.cpp29
-rwxr-xr-xsrc/server/game/Server/WorldSession.h2
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h9
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp39
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp100
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
49 files changed, 932 insertions, 354 deletions
diff --git a/sql/updates/world/2012_05_22_00_world_spell_proc_event.sql b/sql/updates/world/2012_05_22_00_world_spell_proc_event.sql
new file mode 100644
index 00000000000..ba2ea83f643
--- /dev/null
+++ b/sql/updates/world/2012_05_22_00_world_spell_proc_event.sql
@@ -0,0 +1 @@
+UPDATE `spell_proc_event` SET `procFlags` = 332116 WHERE `entry` = 63611;
diff --git a/sql/updates/world/2012_05_22_01_world_creature_loot_template.sql b/sql/updates/world/2012_05_22_01_world_creature_loot_template.sql
new file mode 100644
index 00000000000..bcae5be9ae1
--- /dev/null
+++ b/sql/updates/world/2012_05_22_01_world_creature_loot_template.sql
@@ -0,0 +1,2 @@
+-- As of patch 3.1.0, the drop rate of Formula: Enchant Boots - Surefooted has been increased to Guaranteed (100%).
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=100 WHERE `entry`=16472 and `item`=22545;
diff --git a/sql/updates/world/2012_05_23_00_world_creature.sql b/sql/updates/world/2012_05_23_00_world_creature.sql
new file mode 100644
index 00000000000..8a965b7fdfe
--- /dev/null
+++ b/sql/updates/world/2012_05_23_00_world_creature.sql
@@ -0,0 +1,55 @@
+-- Chicken Spawns from sniff:
+SET @Chicken := 28161;
+SET @CGUID := 88570;
+DELETE FROM `creature` WHERE `id`=@Chicken;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES
+(@CGUID,@Chicken,571,1,1,5199.809,4704.83,-128.2989,1.70125,120,0,0), -- Chicken Escapee
+(@CGUID+1,@Chicken,571,1,1,5201.715,4702.484,-127.8371,1.53589,120,0,0), -- Chicken Escapee
+(@CGUID+2,@Chicken,571,1,1,5198.132,4702.78,-127.5534,1.797689,120,0,0), -- Chicken Escapee
+(@CGUID+3,@Chicken,571,1,1,5198.32,4704.375,-127.9992,1.064651,120,0,0), -- Chicken Escapee
+(@CGUID+4,@Chicken,571,1,1,5201.744,4704.674,-128.4752,4.555309,120,0,0), -- Chicken Escapee
+(@CGUID+5,@Chicken,571,1,1,5251.442,4508.976,-85.30431,4.304774,120,0,0), -- Chicken Escapee
+(@CGUID+6,@Chicken,571,1,1,5251.708,4511.778,-85.32935,1.64061,120,0,0), -- Chicken Escapee
+(@CGUID+7,@Chicken,571,1,1,5251.118,4509.744,-85.32935,4.886922,120,0,0), -- Chicken Escapee
+(@CGUID+8,@Chicken,571,1,1,5252.795,4509.772,-85.32524,0.7853982,120,0,0), -- Chicken Escapee
+(@CGUID+9,@Chicken,571,1,1,5253.682,4511.424,-85.32755,2.356194,120,0,0), -- Chicken Escapee
+(@CGUID+10,@Chicken,571,1,1,5254.174,4514.632,-84.96572,0.4096795,120,0,0), -- Chicken Escapee
+(@CGUID+11,@Chicken,571,1,1,5252.096,4514.868,-85.32635,4.363323,120,0,0), -- Chicken Escapee
+(@CGUID+12,@Chicken,571,1,1,5251.637,4513.41,-85.32935,3.490659,120,0,0), -- Chicken Escapee
+(@CGUID+13,@Chicken,571,1,1,5253.287,4513.109,-85.32935,3.036873,120,0,0), -- Chicken Escapee
+(@CGUID+14,@Chicken,571,1,1,5253.494,4514.764,-85.31329,3.717551,120,0,0), -- Chicken Escapee
+(@CGUID+15,@Chicken,571,1,1,5251.158,4518.321,-85.3019,1.592369,120,0,0), -- Chicken Escapee
+(@CGUID+16,@Chicken,571,1,1,5250.385,4516.643,-85.3257,5.044002,120,0,0), -- Chicken Escapee
+(@CGUID+17,@Chicken,571,1,1,5251.159,4515.294,-85.32935,4.694936,120,0,0), -- Chicken Escapee
+(@CGUID+18,@Chicken,571,1,1,5252.267,4516.414,-85.30904,0.5235988,120,0,0), -- Chicken Escapee
+(@CGUID+19,@Chicken,571,1,1,5251.693,4517.859,-85.3243,4.590216,120,0,0), -- Chicken Escapee
+(@CGUID+20,@Chicken,571,1,1,5262.68,4528.738,-84.4747,4.718389,120,0,0), -- Chicken Escapee
+(@CGUID+21,@Chicken,571,1,1,5256.907,4480.617,-84.26879,4.927223,120,0,0), -- Chicken Escapee
+(@CGUID+22,@Chicken,571,1,1,5298.603,4489.708,-93.65161,6.16371,120,0,0), -- Chicken Escapee
+(@CGUID+23,@Chicken,571,1,1,5192.673,4513.661,-89.12463,1.299241,120,0,0), -- Chicken Escapee
+(@CGUID+24,@Chicken,571,1,1,5228.781,4579.799,-96.98647,0.05766594,120,0,0), -- Chicken Escapee
+(@CGUID+25,@Chicken,571,1,1,5230.247,4433.143,-96.82567,5.135688,120,0,0), -- Chicken Escapee
+(@CGUID+26,@Chicken,571,1,1,5180.035,4541.38,-97.84879,0.2208638,120,0,0), -- Chicken Escapee
+(@CGUID+27,@Chicken,571,1,1,5178.563,4538.964,-97.54511,0.9771074,120,0,0), -- Chicken Escapee
+(@CGUID+28,@Chicken,571,1,1,5272.981,4417.033,-96.50356,0.9044432,120,0,0), -- Chicken Escapee
+(@CGUID+29,@Chicken,571,1,1,5214.513,4416.202,-96.53072,2.862281,120,0,0), -- Chicken Escapee
+(@CGUID+30,@Chicken,571,1,1,5160.117,4474.996,-96.96887,4.499754,120,0,0), -- Chicken Escapee
+(@CGUID+31,@Chicken,571,1,1,5263.541,4409.121,-95.87889,1.570796,120,0,0), -- Chicken Escapee
+(@CGUID+32,@Chicken,571,1,1,5234.166,4404.604,-95.12725,1.031549,120,0,0), -- Chicken Escapee
+(@CGUID+33,@Chicken,571,1,1,5297.803,4493.681,-93.65161,5.525303,120,0,0), -- Chicken Escapee
+(@CGUID+34,@Chicken,571,1,1,5260.112,4340.577,-97.61092,1.942801,120,0,0), -- Chicken Escapee
+(@CGUID+35,@Chicken,571,1,1,5208.492,4379.111,-95.49483,0.6675518,120,0,0), -- Chicken Escapee
+(@CGUID+36,@Chicken,571,1,1,5172.742,4368.674,-96.27965,0.8766832,120,0,0), -- Chicken Escapee
+(@CGUID+37,@Chicken,571,1,1,5223.491,4467.19,-96.75621,4.723376,120,0,0), -- Chicken Escapee
+(@CGUID+38,@Chicken,571,1,1,5220.966,4469.76,-96.75582,5.183968,120,0,0), -- Chicken Escapee
+(@CGUID+39,@Chicken,571,1,1,5221.419,4473.14,-96.75536,4.98181,120,0,0), -- Chicken Escapee
+(@CGUID+40,@Chicken,571,1,1,5221.419,4473.14,-96.75536,5.49084,120,0,0), -- Chicken Escapee
+(@CGUID+41,@Chicken,571,1,1,5221.828,4470.711,-96.57594,5.315169,120,0,0), -- Chicken Escapee
+(@CGUID+42,@Chicken,571,1,1,5151.083,4416.434,-96.38642,2.066685,120,0,0), -- Chicken Escapee
+(@CGUID+43,@Chicken,571,1,1,5281.582,4425.185,-96.79945,4.45059,120,0,0), -- Chicken Escapee
+(@CGUID+44,@Chicken,571,1,1,5257.173,4424.231,-95.62836,3.996804,120,0,0); -- Chicken Escapee
+
+-- Aura for Chicken Escapee (thx Discovered)
+DELETE FROM `creature_template_addon` WHERE `entry`=28161;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(28161,0,0,0,0,'50734'); -- Chicken Escapee - Frenzyheart Chicken: Invisibility
diff --git a/sql/updates/world/2012_05_23_01_world_sai.sql b/sql/updates/world/2012_05_23_01_world_sai.sql
new file mode 100644
index 00000000000..af2fd5409d1
--- /dev/null
+++ b/sql/updates/world/2012_05_23_01_world_sai.sql
@@ -0,0 +1,14 @@
+-- Delete all spawnings of Chicken Escapee via quest_start_scripts
+DELETE FROM `quest_start_scripts` WHERE `command`=10 AND `datalong`=28161;
+
+-- Elder Harkek SAI
+SET @ENTRY := 28138;
+SET @SPELL_SEE_INVIS_CHICKEN := 50735;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `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,0,19,0,100,0,12532,0,0,0,85,@SPELL_SEE_INVIS_CHICKEN,2,0,0,0,0,7,0,0,0,0,0,0,0,"Elder Harkek - On Quest Accept - Invoker Cast Frenzyheart Chicken: See Invisibility"),
+(@ENTRY,0,1,0,19,0,100,0,12702,0,0,0,85,@SPELL_SEE_INVIS_CHICKEN,2,0,0,0,0,7,0,0,0,0,0,0,0,"Elder Harkek - On Quest Accept - Invoker Cast Frenzyheart Chicken: See Invisibility"),
+(@ENTRY,0,2,0,20,0,100,0,12532,0,0,0,28,@SPELL_SEE_INVIS_CHICKEN,0,0,0,0,0,7,0,0,0,0,0,0,0,"Elder Harkek - On Quest Complete - Remove Aura Frenzyheart Chicken: See Invisibility"),
+(@ENTRY,0,3,0,20,0,100,0,12702,0,0,0,28,@SPELL_SEE_INVIS_CHICKEN,0,0,0,0,0,7,0,0,0,0,0,0,0,"Elder Harkek - On Quest Complete - Remove Aura Frenzyheart Chicken: See Invisibility");
diff --git a/sql/updates/world/2012_05_23_02_world_sai.sql b/sql/updates/world/2012_05_23_02_world_sai.sql
new file mode 100644
index 00000000000..588f25f1568
--- /dev/null
+++ b/sql/updates/world/2012_05_23_02_world_sai.sql
@@ -0,0 +1,21 @@
+-- Chicken Escapee SAI
+SET @ENTRY := 28161;
+SET @SPELL_NET_CHICKEN := 51959;
+SET @SPELL_INVIS_CHICKEN := 50734;
+SET @SPELL_SCARED_CHICKEN := 51846;
+SET @SPELL_CREATE_QUESTITEM := 51037;
+UPDATE `creature` SET `MovementType`=0,`spawndist`=0,`spawntimesecs`=5 WHERE `id`=@ENTRY;
+UPDATE `creature_template` SET `AIName`='SmartAI',`npcflag`=1 WHERE `entry`=@ENTRY;
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+(@ENTRY,0,0,1,8,0,100,0,@SPELL_NET_CHICKEN,0,0,0,28,@SPELL_SCARED_CHICKEN,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Spellhit - Remove Aura Scared Chicken"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,41,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Spellhit - Forced Despawn"),
+(@ENTRY,0,2,3,64,0,100,0,0,0,0,0,85,@SPELL_CREATE_QUESTITEM,2,0,0,0,0,7,0,0,0,0,0,0,0,"Chicken Escapee - On Gossip Hello - Invoker Cast Capture Chicken Escapee"), -- Triggered because of cast-time
+(@ENTRY,0,3,4,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Chicken Escapee - On Gossip Hello - Close Gossip"),
+(@ENTRY,0,4,5,61,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Gossip Hello - Set Npcflag None"),
+(@ENTRY,0,5,6,61,0,100,0,0,0,0,0,28,@SPELL_SCARED_CHICKEN,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Gossip Hello - Remove Aura Scared Chicken"),
+(@ENTRY,0,6,0,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Gossip Hello - Forced Despawn"),
+(@ENTRY,0,7,8,25,0,100,0,0,0,0,0,11,@SPELL_INVIS_CHICKEN,1,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Reset - Cast Frenzyheart Chicken: Invisibility"), -- Just in case
+(@ENTRY,0,8,0,61,0,100,0,0,0,0,0,11,@SPELL_SCARED_CHICKEN,0,0,0,0,0,1,0,0,0,0,0,0,0,"Chicken Escapee - On Reset - Cast Scared Chicken");
diff --git a/sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql b/sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql
new file mode 100644
index 00000000000..22ecebcae31
--- /dev/null
+++ b/sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql
@@ -0,0 +1,32 @@
+SET @entry := 35093;
+SET @epic := 25009;
+SET @gem := @entry+1;
+-- Create references
+DELETE FROM `reference_loot_template` WHERE `entry` IN(@entry,@epic,@gem);
+INSERT INTO `reference_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+(@entry,27452,0,1,1,1,1), -- Light Scribe Bands
+(@entry,27453,0,1,1,1,1), -- Averinn's RIng of Slaying
+(@entry,27454,0,1,1,1,1), -- Volcanic Pauldrons
+(@entry,27455,0,1,1,1,1), -- Irondrake faceguard
+(@entry,27456,0,1,1,1,1), -- Raiments of Nature's Breath
+(@entry,27457,0,1,1,1,1), -- Life Bearer's Gauntlets
+(@entry,27458,0,1,1,1,1), -- Oceansong Kilt
+(@entry,27459,0,1,1,1,1), -- Vambraces of Daring
+(@entry,27460,0,1,1,1,1), -- Reavers' Ring
+(@entry,27461,0,1,1,1,1), -- Chestguard of the Prowler
+-- Epics
+(@epic,29238,0,1,1,1,1), -- Lion's Heart Girdle
+(@epic,29264,0,1,1,1,1), -- Tree-Mender's Belt
+(@epic,29346,0,1,1,1,1), -- Feltooth Eviscerator
+(@epic,32077,0,1,1,1,1), -- Wrath Infused Gauntlets
+-- Gems
+(@gem,30592,0,1,1,1,1), -- Steady Chrysoprase
+(@gem,30593,0,1,1,1,1), -- Potent Fire Opal
+(@gem,30594,0,1,1,1,1); -- Regal Chrysoprase
+-- Assign loot to the chest
+SET @GOloot := 21764; -- lootid of Reinforced Fel Iron Chest Heroic
+DELETE FROM `gameobject_loot_template` WHERE `entry`=@GOloot;
+INSERT INTO `gameobject_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+(@GOloot,1,100,1,0,-@entry, 2), -- one from gear
+(@GOloot,2,30,1,0,-@gem,1), -- one gem (30%)
+(@GOloot,3,100,1,0,-@epic,1); -- one from epics
diff --git a/sql/updates/world/2012_05_23_04_world_gameobject.sql b/sql/updates/world/2012_05_23_04_world_gameobject.sql
new file mode 100644
index 00000000000..afcb1e89317
--- /dev/null
+++ b/sql/updates/world/2012_05_23_04_world_gameobject.sql
@@ -0,0 +1,3 @@
+DELETE FROM `gameobject` WHERE `id`=188677;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(318,188677,571,1,1,2567.449,-388.7118,3.573463,-2.879789,0,0,0.639778,0.76856,1200,100,1);
diff --git a/sql/updates/world/2012_05_23_05_world_creature.sql b/sql/updates/world/2012_05_23_05_world_creature.sql
new file mode 100644
index 00000000000..bb162f927bd
--- /dev/null
+++ b/sql/updates/world/2012_05_23_05_world_creature.sql
@@ -0,0 +1,12 @@
+-- Spawn from Sniff
+DELETE FROM `creature` WHERE `id`=34526;
+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
+(42161,34526,1,1,1,0,0,-1050.052,-286.7274,159.1137,5.951573,120,0,0,1,0,0,0,0,0);
+-- Template updates
+UPDATE `creature_template` SET `faction_A`=104,`faction_H`=104,`baseattacktime`=2000,`npcflag`=`npcflag`|3,`unit_flags`=`unit_flags`|512 WHERE `entry`=34526; -- Aponi Brightmane
+-- Model data
+UPDATE `creature_model_info` SET `bounding_radius`=1.003375,`combat_reach`=4.3125,`gender`=1 WHERE `modelid`=29249; -- Aponi Brightmane
+-- Addon data
+DELETE FROM `creature_template_addon` WHERE `entry`=34526;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(34526,0,1,256,0,NULL); -- Aponi Brightmane
diff --git a/sql/updates/world/2012_05_24_00_world_creature_misc.sql b/sql/updates/world/2012_05_24_00_world_creature_misc.sql
new file mode 100644
index 00000000000..ae35b3fba5d
--- /dev/null
+++ b/sql/updates/world/2012_05_24_00_world_creature_misc.sql
@@ -0,0 +1,5 @@
+UPDATE `creature_template` SET `faction_A`=1914,`faction_H`=1914,`unit_flags`=33024 WHERE `entry`=26452;
+
+DELETE FROM `creature_template_addon` WHERE `entry`=26452;
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(26452,0,0,0,1,383,'');
diff --git a/sql/updates/world/2012_05_24_01_world_gameobject.sql b/sql/updates/world/2012_05_24_01_world_gameobject.sql
new file mode 100644
index 00000000000..32bbc15494f
--- /dev/null
+++ b/sql/updates/world/2012_05_24_01_world_gameobject.sql
@@ -0,0 +1,3 @@
+DELETE FROM `gameobject` WHERE `id`=175759 AND `guid`=219;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(219,175759,530,1,1,9636.439,-7231.265,16.73347,-2.82743,0,0,-0.9876881,0.1564362,900,100,1);
diff --git a/sql/updates/world/2012_05_25_00_world_sai.sql b/sql/updates/world/2012_05_25_00_world_sai.sql
new file mode 100644
index 00000000000..fa5682db02f
--- /dev/null
+++ b/sql/updates/world/2012_05_25_00_world_sai.sql
@@ -0,0 +1,6 @@
+-- Eye of the Lich King SAI
+SET @ENTRY := 36913; -- NPC entry
+UPDATE `creature_template` SET `AIName`='SmartAI' 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,0,1,0,100,6,0,0,1000,1000,66,0,0,0,0,0,0,21,150,0,0,0,0,0,0, 'Eye of the Lich King - OOC - face closest player');
diff --git a/sql/updates/world/2012_05_25_01_world_waypoints.sql b/sql/updates/world/2012_05_25_01_world_waypoints.sql
new file mode 100644
index 00000000000..0d2c04bc6bc
--- /dev/null
+++ b/sql/updates/world/2012_05_25_01_world_waypoints.sql
@@ -0,0 +1,149 @@
+-- Bladewing Bloodletter InhabitType fix
+UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=21033;
+
+-- Bladewing Bloodletter
+SET @NPC := 73849;
+SET @PATH := @NPC*10;
+UPDATE `creature` SET `position_x`=1987.838,`position_y`=6153.995,`position_z`=146.4068,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
+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`) VALUE
+(@PATH,1,1987.838,6153.995,146.4068,0,0,0,100,0),
+(@PATH,2,1981.592,6150.557,146.4068,0,0,0,100,0),
+(@PATH,3,1966.573,6153.941,146.4068,0,0,0,100,0),
+(@PATH,4,1953.747,6155.154,146.4068,0,0,0,100,0),
+(@PATH,5,1941.287,6159.015,146.4068,0,0,0,100,0),
+(@PATH,6,1937.986,6166.096,146.4068,0,0,0,100,0),
+(@PATH,7,1948.558,6175.274,145.1566,0,0,0,100,0),
+(@PATH,8,1959.44,6173.246,145.6567,0,0,0,100,0),
+(@PATH,9,1971.408,6169.729,145.7679,0,0,0,100,0),
+(@PATH,10,1986.747,6168.348,144.8511,0,0,0,100,0),
+(@PATH,11,1998.881,6168.547,144.4066,0,0,0,100,0),
+(@PATH,12,2008.877,6170.33,143.7955,0,0,0,100,0),
+(@PATH,13,2021.965,6166.769,143.657,0,0,0,100,0),
+(@PATH,14,2027.152,6158.083,145.4344,0,0,0,100,0),
+(@PATH,15,2025.352,6149.427,146.4068,0,0,0,100,0),
+(@PATH,16,2011.869,6150.37,146.4068,0,0,0,100,0),
+(@PATH,17,1999.44,6155.886,146.4068,0,0,0,100,0);
+
+-- Bladewing Bloodletter
+SET @NPC := 73850;
+SET @PATH := @NPC*10;
+UPDATE `creature` SET `position_x`=2099.588,`position_y`=6126.344,`position_z`=148.8029,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
+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`) VALUE
+(@PATH,1,2099.588,6126.344,148.8029,0,0,0,100,0),
+(@PATH,2,2094.131,6133.031,148.303,0,0,0,100,0),
+(@PATH,3,2085.703,6143.32,148.303,0,0,0,100,0),
+(@PATH,4,2077.25,6154.094,148.5252,0,0,0,100,0),
+(@PATH,5,2062.893,6175.25,146.414,0,0,0,100,0),
+(@PATH,6,2056.135,6184.647,144.8307,0,0,0,100,0),
+(@PATH,7,2050.784,6189.019,141.9417,0,0,0,100,0),
+(@PATH,8,2044,6181.015,142.6362,0,0,0,100,0),
+(@PATH,9,2044.303,6175.524,143.3028,0,0,0,100,0),
+(@PATH,10,2053.432,6161.702,145.8306,0,0,0,100,0),
+(@PATH,11,2064.378,6145.299,146.7471,0,0,0,100,0),
+(@PATH,12,2064.748,6135.614,147.7195,0,0,0,100,0),
+(@PATH,13,2067.337,6117.838,149.0529,0,0,0,100,0),
+(@PATH,14,2073.338,6100.975,149.664,0,0,0,100,0),
+(@PATH,15,2089.383,6099.217,149.3585,0,0,0,100,0),
+(@PATH,16,2099.147,6111.964,149.1641,0,0,0,100,0);
+
+-- Bladewing Bloodletter
+SET @NPC := 73852;
+SET @PATH := @NPC*10;
+UPDATE `creature` SET `position_x`=2180.795,`position_y`=6149.398,`position_z`=145.9554,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
+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`) VALUE
+(@PATH,1,2180.795,6149.398,145.9554,0,0,0,100,0),
+(@PATH,2,2185.298,6157.3,146.8721,0,0,0,100,0),
+(@PATH,3,2191.635,6164.935,146.6221,0,0,0,100,0),
+(@PATH,4,2203.45,6168.873,146.2055,0,0,0,100,0),
+(@PATH,5,2217.238,6165.062,145.6221,0,0,0,100,0),
+(@PATH,6,2225.425,6159.092,145.1501,0,0,0,100,0),
+(@PATH,7,2228.766,6146.569,145.3166,0,0,0,100,0),
+(@PATH,8,2225.81,6129.76,143.9,0,0,0,100,0),
+(@PATH,9,2203.906,6114.964,145.0111,0,0,0,100,0),
+(@PATH,10,2184.713,6115.808,145.7333,0,0,0,100,0),
+(@PATH,11,2173.165,6123,146.8721,0,0,0,100,0),
+(@PATH,12,2175.542,6139.301,146.8721,0,0,0,100,0);
+
+-- Bladewing Bloodletter
+SET @NPC := 73853;
+SET @PATH := @NPC*10;
+UPDATE `creature` SET `position_x`=2153.506,`position_y`=6119.981,`position_z`=148.0267,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
+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`) VALUE
+(@PATH,1,2153.506,6119.981,148.0267,0,0,0,100,0),
+(@PATH,2,2144.238,6124.169,148.0267,0,0,0,100,0),
+(@PATH,3,2133.341,6127.807,148.0267,0,0,0,100,0),
+(@PATH,4,2120.865,6126.57,148.0267,0,0,0,100,0),
+(@PATH,5,2110.276,6122.198,148.0267,0,0,0,100,0),
+(@PATH,6,2108.702,6111.856,148.0267,0,0,0,100,0),
+(@PATH,7,2113.887,6104.159,148.0267,0,0,0,100,0),
+(@PATH,8,2123.298,6095.088,148.0267,0,0,0,100,0),
+(@PATH,9,2136.37,6099.125,148.0267,0,0,0,100,0),
+(@PATH,10,2146.343,6107.208,148.0267,0,0,0,100,0),
+(@PATH,11,2150.752,6118.491,148.0267,0,0,0,100,0),
+(@PATH,12,2158.115,6126.979,148.0267,0,0,0,100,0),
+(@PATH,13,2168.949,6133.578,148.0267,0,0,0,100,0),
+(@PATH,14,2180.009,6134.229,148.0267,0,0,0,100,0),
+(@PATH,15,2189.201,6129.583,148.0267,0,0,0,100,0),
+(@PATH,16,2192.429,6119.862,148.0267,0,0,0,100,0),
+(@PATH,17,2187.044,6112.755,148.0267,0,0,0,100,0),
+(@PATH,18,2176.445,6111.443,148.0267,0,0,0,100,0),
+(@PATH,19,2166.243,6114.129,148.0267,0,0,0,100,0);
+
+-- Bladewing Bloodletter
+SET @NPC := 73858;
+SET @PATH := @NPC*10;
+UPDATE `creature` SET `position_x`=2128.704,`position_y`=6018.743,`position_z`=141.9579,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
+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`) VALUE
+(@PATH,1,2128.704,6018.743,141.9579,0,0,0,100,0),
+(@PATH,2,2118.804,6016.506,141.9433,0,0,0,100,0),
+(@PATH,3,2100.692,6019.814,141.9433,0,0,0,100,0),
+(@PATH,4,2080.599,6017.728,144.3877,0,0,0,100,0),
+(@PATH,5,2070.564,6003.17,144.1802,0,0,0,100,0),
+(@PATH,6,2079.148,5988.599,143.5968,0,0,0,100,0),
+(@PATH,7,2088.214,5974.081,142.9579,0,0,0,100,0),
+(@PATH,8,2102.427,5966.812,142.208,0,0,0,100,0),
+(@PATH,9,2117.762,5969.647,141.9579,0,0,0,100,0),
+(@PATH,10,2130.632,5977.25,141.9579,0,0,0,100,0),
+(@PATH,11,2135.56,5993.264,141.9579,0,0,0,100,0),
+(@PATH,12,2148.631,6003.11,141.1247,0,0,0,100,0),
+(@PATH,13,2144.206,6017.48,141.9579,0,0,0,100,0);
+
+-- Bladewing Bloodletter
+SET @NPC := 73860;
+SET @PATH := @NPC*10;
+UPDATE `creature` SET `position_x`=1951.455,`position_y`=5919.516,`position_z`=140.4673,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
+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`) VALUE
+(@PATH,1,1951.455,5919.516,140.4673,0,0,0,100,0),
+(@PATH,2,1953.539,5912.287,140.4179,0,0,0,100,0),
+(@PATH,3,1955.967,5902.248,140.4179,0,0,0,100,0),
+(@PATH,4,1947.568,5889.415,140.4179,0,0,0,100,0),
+(@PATH,5,1938.332,5877.63,140.4179,0,0,0,100,0),
+(@PATH,6,1946.422,5859.488,140.4179,0,0,0,100,0),
+(@PATH,7,1958.004,5850.275,140.4179,0,0,0,100,0),
+(@PATH,8,1967.889,5861.601,140.4673,0,0,0,100,0),
+(@PATH,9,1967.766,5874.843,140.4673,0,0,0,100,0),
+(@PATH,10,1962.739,5881.181,140.4673,0,0,0,100,0),
+(@PATH,11,1965.367,5889.64,140.4673,0,0,0,100,0),
+(@PATH,12,1977.617,5904.389,140.4673,0,0,0,100,0),
+(@PATH,13,1979.003,5918.971,140.4673,0,0,0,100,0),
+(@PATH,14,1969.612,5933.128,140.4673,0,0,0,100,0),
+(@PATH,15,1958.879,5940.208,140.4673,0,0,0,100,0),
+(@PATH,16,1952.594,5927.489,140.4673,0,0,0,100,0);
diff --git a/sql/updates/world/2012_05_25_02_world_creature_template.sql b/sql/updates/world/2012_05_25_02_world_creature_template.sql
new file mode 100644
index 00000000000..fd4c1743f07
--- /dev/null
+++ b/sql/updates/world/2012_05_25_02_world_creature_template.sql
@@ -0,0 +1,2 @@
+-- Floating Flavor Eye InhabitType fix
+UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=21659;
diff --git a/sql/updates/world/2012_05_25_03_world_template.sql b/sql/updates/world/2012_05_25_03_world_template.sql
new file mode 100644
index 00000000000..6ef112f342f
--- /dev/null
+++ b/sql/updates/world/2012_05_25_03_world_template.sql
@@ -0,0 +1,8 @@
+-- Fix unit flags for Blackhand Incarcerator
+UPDATE `creature_template` SET `unit_flags`=`unit_flags`|768 WHERE `entry`=10316;
+-- Fix unit flags for Pyroguard Emberseer
+UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33554688 WHERE `entry`=9816;
+-- Remove hack event script
+DELETE FROM `event_scripts` WHERE `id`=4884;
+-- Remove script to Dragonspire Hall Runes "UBRS"
+UPDATE `gameobject_template` SET `ScriptName`= '' WHERE `entry` BETWEEN 175194 AND 175200;
diff --git a/sql/updates/world/2012_05_26_00_world_scripts.sql b/sql/updates/world/2012_05_26_00_world_scripts.sql
new file mode 100644
index 00000000000..18b0fa2f6b2
--- /dev/null
+++ b/sql/updates/world/2012_05_26_00_world_scripts.sql
@@ -0,0 +1,20 @@
+-- Correction for Obsidian Nullifier EAI
+UPDATE `creature_ai_scripts` SET
+ `action1_param1` = 23
+WHERE `id` = 1531201;
+
+-- Correction for Wildspawn Felsworn and Wildspawn Hellcaller SAI
+UPDATE `smart_scripts` SET
+ `event_phase_mask` = 2,
+ `action_type` = 22,
+ `action_param1` = 1,
+ `target_type` = 1
+WHERE
+ (`entryorguid` = 11457 AND
+ `source_type` = 0 AND
+ `id` = 10 AND
+ `link` = 0) OR
+ (`entryorguid` = 11455 AND
+ `source_type` = 0 AND
+ `id` = 11 AND
+ `link` = 0);
diff --git a/sql/updates/world/2012_05_26_01_world_spell_dbc.sql b/sql/updates/world/2012_05_26_01_world_spell_dbc.sql
new file mode 100644
index 00000000000..7efebc37489
--- /dev/null
+++ b/sql/updates/world/2012_05_26_01_world_spell_dbc.sql
@@ -0,0 +1,4 @@
+-- Fire Shield from 2.0.12 dbc
+DELETE FROM `spell_dbc` WHERE `Id`=13377;
+INSERT INTO `spell_dbc` (`Id`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `Stances`, `StancesNot`, `Targets`, `CastingTimeIndex`, `AuraInterruptFlags`, `ProcFlags`, `ProcChance`, `ProcCharges`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `RangeIndex`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `Effect1`, `Effect2`, `Effect3`, `EffectDieSides1`, `EffectDieSides2`, `EffectDieSides3`, `EffectRealPointsPerLevel1`, `EffectRealPointsPerLevel2`, `EffectRealPointsPerLevel3`, `EffectBasePoints1`, `EffectBasePoints2`, `EffectBasePoints3`, `EffectMechanic1`, `EffectMechanic2`, `EffectMechanic3`, `EffectImplicitTargetA1`, `EffectImplicitTargetA2`, `EffectImplicitTargetA3`, `EffectImplicitTargetB1`, `EffectImplicitTargetB2`, `EffectImplicitTargetB3`, `EffectRadiusIndex1`, `EffectRadiusIndex2`, `EffectRadiusIndex3`, `EffectApplyAuraName1`, `EffectApplyAuraName2`, `EffectApplyAuraName3`, `EffectAmplitude1`, `EffectAmplitude2`, `EffectAmplitude3`, `EffectMultipleValue1`, `EffectMultipleValue2`, `EffectMultipleValue3`, `EffectMiscValue1`, `EffectMiscValue2`, `EffectMiscValue3`, `EffectMiscValueB1`, `EffectMiscValueB2`, `EffectMiscValueB3`, `EffectTriggerSpell1`, `EffectTriggerSpell2`, `EffectTriggerSpell3`, `EffectSpellClassMaskA1`, `EffectSpellClassMaskA2`, `EffectSpellClassMaskA3`, `EffectSpellClassMaskB1`, `EffectSpellClassMaskB2`, `EffectSpellClassMaskB3`, `EffectSpellClassMaskC1`, `EffectSpellClassMaskC2`, `EffectSpellClassMaskC3`, `MaxTargetLevel`, `SpellFamilyName`, `SpellFamilyFlags1`, `SpellFamilyFlags2`, `SpellFamilyFlags3`, `MaxAffectedTargets`, `DmgClass`, `PreventionType`, `DmgMultiplier1`, `DmgMultiplier2`, `DmgMultiplier3`, `AreaGroupId`, `SchoolMask`, `Comment`) VALUES
+(13377, 1, 0, 2512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 101, 0, 0, 40, 40, 21, 1, 0, -1, -1, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 3000, 0, 0, '0', '0', '0', 0, 0, 0, 0, 0, 0, 13376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 2, 'Fire Shield');
diff --git a/sql/updates/world/2012_05_26_02_world_creature_template.sql b/sql/updates/world/2012_05_26_02_world_creature_template.sql
new file mode 100644
index 00000000000..e51567390b7
--- /dev/null
+++ b/sql/updates/world/2012_05_26_02_world_creature_template.sql
@@ -0,0 +1,5 @@
+-- Training dummies
+UPDATE `creature_template` SET
+ `flags_extra`=0x40000, /* NO_SKILLGAIN */
+ `mechanic_immune_mask`=0x20|0x4000 /* GRIP|BLEED */ /* two of the templates already had bleed immunity, is that correct? */
+WHERE `ScriptName`='npc_training_dummy';
diff --git a/sql/updates/world/2012_05_26_03_world_page_text.sql b/sql/updates/world/2012_05_26_03_world_page_text.sql
new file mode 100644
index 00000000000..9dc285cd99d
--- /dev/null
+++ b/sql/updates/world/2012_05_26_03_world_page_text.sql
@@ -0,0 +1,4 @@
+-- First page of A Steamy Romance Novel: Northern Exposure
+DELETE FROM `page_text` WHERE `entry`=3562;
+INSERT INTO `page_text` (`entry`, `text`, `next_page`) VALUES
+(3562, 'The tiny gnome peered over the railing into the secluded Dalaran courtyard.$B$B"The view from the balcony is amazing. You have to come see!"$B$BArmor legplates creaked as Marcus walked over, taking in a deep breath as he absently scratched his scruffy chin.$B$B"The Hero''s Welcome is no slouch. And there''s something in the room that might interest you."$B$BTavi bounded into the room, pausing only a moment before jumping onto the massive bed. She turned to gaze at Marcus with her huge saucer-like eyes, narrowing them playfully and replacing her glowing smile with a diabolical grin.', 3563);
diff --git a/sql/updates/world/2012_05_26_04_world_creature_template.sql b/sql/updates/world/2012_05_26_04_world_creature_template.sql
new file mode 100644
index 00000000000..911cd45ef8c
--- /dev/null
+++ b/sql/updates/world/2012_05_26_04_world_creature_template.sql
@@ -0,0 +1,4 @@
+-- Training dummies
+UPDATE `creature_template` SET
+ `mechanic_immune_mask` = `mechanic_immune_mask` &~ 0x4000 /* BLEED */
+WHERE `ScriptName`='npc_training_dummy';
diff --git a/sql/updates/world/2012_05_26_05_world_creature_template.sql b/sql/updates/world/2012_05_26_05_world_creature_template.sql
new file mode 100644
index 00000000000..59d69b3fbe1
--- /dev/null
+++ b/sql/updates/world/2012_05_26_05_world_creature_template.sql
@@ -0,0 +1,8 @@
+-- Blade's Edge - Legion - Invis Bunny
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry`=20736;
+-- Death's Door Warp-Gate Explosion Bunny
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry`=22502;
+-- Death's Door North Warp-Gate
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry`=22471;
+-- Death's Door South Warp-Gate
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry`=22472;
diff --git a/sql/updates/world/2012_05_26_06_world_smart_scripts.sql b/sql/updates/world/2012_05_26_06_world_smart_scripts.sql
new file mode 100644
index 00000000000..397a5ad517a
--- /dev/null
+++ b/sql/updates/world/2012_05_26_06_world_smart_scripts.sql
@@ -0,0 +1,143 @@
+-- Blackhand Dreadweaver <Blackhand Legion> SAI
+SET @ENTRY := 9817; -- NPC entry
+SET @SPELL1 := 12739; -- Shadow Bolt
+SET @SPELL2 := 7068; -- Veil of Shadow
+SET @SPELL3 := 12380; -- Shadow Channeling
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM creature_ai_scripts WHERE creature_id=@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,0,11,0,100,2,0,0,0,0,58,1,@SPELL1,3600,6300,25,30,1,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - On Reset - Load caster template Cast Shadow Bolt'),
+(@ENTRY,0,1,0,25,0,100,0,0,0,0,0,11,@SPELL3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - On Reset - Aura Shadow Channeling'),
+(@ENTRY,0,2,3,4,0,100,2,0,0,0,0,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - On Aggro - Cast Shadow Bolt'),
+(@ENTRY,0,3,0,61,0,100,2,0,0,0,0,39,10,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - On Aggro - Call for help'),
+(@ENTRY,0,4,0,0,0,100,2,9400,21400,22000,28800,11,@SPELL2,3,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - Combat - Cast Veil of Shadow'),
+(@ENTRY,0,5,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - HP@15% - Flee for help'),
+(@ENTRY,0,6,7,1,0,100,2,0,8000,12000,14000,92,0,0,1,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - OOC - interupt channeling'),
+(@ENTRY,0,7,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - OOC - set phase 1'),
+(@ENTRY,0,8,0,1,1,100,2,0,0,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - OOC - emote (phase 1)'),
+(@ENTRY,0,9,10,1,1,100,2,4000,4000,4000,4000,11,@SPELL3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - OOC - Aura Shadow Channeling (phase 1)'),
+(@ENTRY,0,10,0,61,1,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Dreadweaver - OOC - set phase 0 (phase 1)');
+
+-- Blackhand Summoner <Blackhand Legion> SAI
+SET @ENTRY := 9818; -- NPC entry
+SET @SPELL1 := 12466; -- Fireball
+SET @SPELL2 := 15532; -- Frost Nova
+SET @SPELL3 := 15792; -- Summon Blackhand Veteran
+SET @SPELL4 := 15794; -- Summon Blackhand Dreadweaver
+SET @SPELL5 := 12380; -- Shadow Channeling
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM creature_ai_scripts WHERE creature_id=@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,0,11,0,100,2,0,0,0,0,58,1,@SPELL1,3600,6300,25,30,1,0,0,0,0,0,0,0, 'Blackhand Summoner - On Reset - Load caster template Cast Fireball'),
+(@ENTRY,0,1,0,25,0,100,0,0,0,0,0,11,@SPELL5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Summoner - On Reset - Aura Shadow Channeling'),
+(@ENTRY,0,2,3,4,0,100,2,0,0,0,0,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Blackhand Summoner - On Aggro - Cast Shadow Bolt'),
+(@ENTRY,0,3,0,61,0,100,2,0,0,0,0,39,10,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Summoner - On Aggro - Call for help'),
+(@ENTRY,0,4,0,0,0,100,2,11400,11400,12700,16700,11,@SPELL2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Summoner - Combat - Cast Frost Nova'),
+(@ENTRY,0,5,6,0,0,100,3,30000,35000,0,0,11,@SPELL3,1,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Summoner - Combat - Cast Summon Blackhand Veteran'),
+(@ENTRY,0,6,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Summoner - Combat - say 0'),
+(@ENTRY,0,7,8,0,0,100,3,40000,45000,0,0,11,@SPELL4,1,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Summoner - Combat - Cast Summon Blackhand Dreadweaver'),
+(@ENTRY,0,8,0,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Summoner - Combat - say 1'),
+(@ENTRY,0,9,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Summoner - HP@15% - Flee for help'),
+(@ENTRY,0,10,0,1,0,100,2,0,8000,12000,14000,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Summoner - OOC - emote');
+-- NPC talk text insert
+DELETE FROM `creature_text` WHERE `entry`=9818;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(9818,0,0,'%s begins to summon in a Blackhand Veteran!',16,0,100,0,0,0,'Blackhand Summoner'),
+(9818,1,0,'%s begins to summon in a Blackhand Dreadweaver!',16,0,100,0,0,0,'Blackhand Summoner');
+
+-- Blackhand Veteran <Blackhand Legion> SAI
+SET @ENTRY := 9819; -- NPC entry
+SET @SPELL1 := 15749; -- Shield Charge
+SET @SPELL2 := 14516; -- Strike
+SET @SPELL3 := 11972; -- Shield Bash
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM creature_ai_scripts WHERE creature_id=@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,4,0,100,2,0,0,0,0,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Blackhand Veteran - On Aggro - Cast Shield Charge'),
+(@ENTRY,0,1,0,61,0,100,2,0,0,0,0,39,10,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Veteran - On Aggro - Call for help'),
+(@ENTRY,0,2,0,0,0,100,2,7800,15800,13800,22900,11,@SPELL2,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Blackhand Veteran - Combat - Cast Veil of Shadow'),
+(@ENTRY,0,3,0,0,0,100,2,10000,20000,6000,12000,11,@SPELL3,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Blackhand Veteran - Combat - Cast Veil of Shadow'),
+(@ENTRY,0,4,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Veteran - HP@15% - Flee for help'),
+(@ENTRY,0,5,0,1,0,100,2,0,8000,12000,14000,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Veteran - OOC - emote');
+
+-- Rage Talon Dragonspawn SAI
+SET @ENTRY := 9096; -- NPC entry
+SET @SPELL1 := 15580; -- Strike
+SET @SPELL2 := 12021; -- Fixate
+SET @SPELL3 := 15572; -- Sunder Armor
+SET @SPELL4 := 3391; -- Thrash
+SET @SPELL5 := 8269; -- Frenzy
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM creature_ai_scripts WHERE creature_id=@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,0,0,0,100,2,4000,13200,6600,14400,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Rage Talon Dragonspawn - Combat - Cast Strike'),
+(@ENTRY,0,1,0,0,0,100,2,7700,17100,20300,34200,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Rage Talon Dragonspawn - Combat - Cast Fixate'),
+(@ENTRY,0,2,0,0,0,100,2,1400,12300,7100,11700,11,@SPELL3,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Rage Talon Dragonspawn - Combat - Cast Sunder Armor'),
+(@ENTRY,0,3,0,0,0,100,2,8200,17100,5600,18100,11,@SPELL4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rage Talon Dragonspawn - Combat - Cast Thrash'),
+(@ENTRY,0,4,5,2,0,100,2,0,30,120000,120000,11,@SPELL5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rage Talon Dragonspawn - HP@30% - Cast Frenzy'),
+(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Summoner - HP@30% - say 0');
+-- NPC talk text insert
+DELETE FROM `creature_text` WHERE `entry`=9096;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(9096,0,0,'%s goes into a frenzy!',16,0,100,0,0,0,'Rage Talon Dragonspawn');
+
+ -- Scarshield Legionnaire <Scarshield Legion> SAI
+SET @ENTRY := 9097; -- NPC entry
+SET @SPELL1 := 15496; -- Cleave
+SET @SPELL2 := 11972; -- Shield Bash
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM creature_ai_scripts WHERE creature_id=@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,0,4,0,100,2,0,0,0,0,39,10,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Scarshield Legionnaire - On Aggro - Call for help'),
+(@ENTRY,0,1,0,0,0,100,2,7800,11500,8000,22100,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Scarshield Legionnaire - Combat - Cast Cleave'),
+(@ENTRY,0,2,0,0,0,100,2,4000,10000,14000,20000,11,@SPELL2,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Scarshield Legionnaire - Combat - Cast Shield Bash');
+
+-- Scarshield Acolyte <Scarshield Legion> SAI
+SET @ENTRY := 9045; -- NPC entry
+SET @SPELL1 := 14032; -- Shadow Word: Pain
+SET @SPELL2 := 12039; -- Heal
+SET @SPELL3 := 8362; -- Renew
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM creature_ai_scripts WHERE creature_id=@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,0,4,0,100,2,0,0,0,0,39,10,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Scarshield Acolyte - On Aggro - Call for help'),
+(@ENTRY,0,1,0,0,0,100,2,7700,15700,21900,33500,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Scarshield Acolyte - Combat - Cast Shadow Word: Pain'),
+(@ENTRY,0,2,0,2,0,100,3,0,75,0,0,11,@SPELL2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Scarshield Acolyte - HP@75% - Cast Heal'),
+(@ENTRY,0,3,0,14,0,100,2,35,8,5000,6000,11,@SPELL3,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Scarshield Acolyte - Friendly hp@35 - Cast Renew on friendly unit');
+
+-- Scarshield Spellbinder <Scarshield Legion> SAI
+SET @ENTRY := 9098; -- NPC entry
+SET @SPELL1 := 13748; -- Arcane Bolt
+SET @SPELL2 := 15123; -- Resist Fire
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM creature_ai_scripts WHERE creature_id=@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,0,11,0,100,2,0,0,0,0,58,1,@SPELL1,1100,3000,30,30,1,0,0,0,0,0,0,0, 'Scarshield Spellbinder - On Reset - Load caster template Cast Arcane Bolt'),
+(@ENTRY,0,1,0,4,0,100,2,0,0,0,0,39,10,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Scarshield Spellbinder - On Aggro - Call for help'),
+(@ENTRY,0,2,0,16,0,100,2,@SPELL2,30,3000,6000,11,@SPELL2,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Blackhand Summoner - Combat - Cast Resist Fire');
+
+-- Blackhand Incarcerator SAI
+SET @ENTRY := 10316; -- NPC entry
+SET @SPELL1 := 15281; -- Encage Emberseer
+SET @SPELL2 := 12039; -- Heal
+SET @SPELL3 := 8362; -- Renew
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM creature_ai_scripts WHERE creature_id=@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,0,1,0,100,3,1000,1000,1000,1000,11,@SPELL1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Incarcerator - OOC - Cast Encage Emberseer'),
+(@ENTRY,0,1,2,38,0,100,2,0,1,0,0,92,0,@SPELL1,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Incarcerator - On data set - Stop Casting Encage Emberseer'),
+(@ENTRY,0,2,4,61,0,100,0,0,0,0,0,19,768,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Incarcerator - On data set - Remove unit flags'),
+(@ENTRY,0,3,4,4,0,100,2,0,0,0,0,9,0,0,0,0,0,0,15,175244,100,0,0,0,0,0, 'Blackhand Incarcerator - On aggro - close emberseer in door'),
+(@ENTRY,0,4,0,61,0,100,0,0,0,0,0,9,0,0,0,0,0,0,15,175705,100,0,0,0,0,0, 'Blackhand Incarcerator - On aggro - close doors'),
+(@ENTRY,0,5,0,0,0,100,2,7800,15800,13800,22900,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Blackhand Incarcerator - Combat - Cast Strike'),
+(@ENTRY,0,6,0,0,0,100,2,10000,20000,6000,12000,11,@SPELL3,0,0,0,0,0,5,0,0,0,0,0,0,0, 'Blackhand Incarcerator - Combat - Cast Encage'),
+(@ENTRY,0,7,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Incarcerator - HP@15% - Flee for help'),
+(@ENTRY,0,8,0,6,0,100,0,0,0,0,0,41,10000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Incarcerator - On death - Despawn after 10 sec');
diff --git a/sql/updates/world/2012_05_27_00_world_gameobject_template.sql b/sql/updates/world/2012_05_27_00_world_gameobject_template.sql
new file mode 100644
index 00000000000..5fa3c15a505
--- /dev/null
+++ b/sql/updates/world/2012_05_27_00_world_gameobject_template.sql
@@ -0,0 +1,7 @@
+-- Gameobject updates based on sniffs
+UPDATE `gameobject_template` SET `size` =2.5,`questItem1`=30876,`data0`=57,`data1`=21583 WHERE `entry`=185032;
+UPDATE `gameobject` SET `position_x`=-3420.991,`position_y`=1373.175,`position_z`=257.5233,`orientation`=3.141593 WHERE `id`=185032;
+-- Gameobject loot template
+DELETE FROM `gameobject_loot_template` WHERE `entry`=21583;
+INSERT INTO `gameobject_loot_template` VALUES
+(21583,30876,100,1,0,1,1); -- Quenched Illidari-Bane Blade
diff --git a/sql/updates/world/2012_05_27_01_world_waypoints.sql b/sql/updates/world/2012_05_27_01_world_waypoints.sql
new file mode 100644
index 00000000000..3685b58a629
--- /dev/null
+++ b/sql/updates/world/2012_05_27_01_world_waypoints.sql
@@ -0,0 +1,7 @@
+-- RE FIX Reanimated Frost Wyrm
+DELETE FROM `creature` WHERE `guid` IN (116670,116671,116672,116681,116683,116684,116685,116686,116687,116696,116697,116699,116700,116701);
+UPDATE `creature` SET `MovementType`=2 WHERE `guid` BETWEEN 40497 AND 40505;
+UPDATE `creature_addon` SET `bytes1`=50331648,`bytes2`=1 WHERE `guid` BETWEEN 40497 AND 40505;
+-- Fix Wildhammer Scout
+UPDATE `creature` SET `MovementType`=0 WHERE guid IN (69122,69123,69124,69125,69126,69127);
+UPDATE `creature_addon` SET `path_id`=0 WHERE guid IN (69122,69123,69124,69125,69126,69127);
diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp
index 252bcbabca5..6e2326ca9d5 100755
--- a/src/server/game/AI/CoreAI/GuardAI.cpp
+++ b/src/server/game/AI/CoreAI/GuardAI.cpp
@@ -23,7 +23,7 @@
#include "World.h"
#include "CreatureAIImpl.h"
-int GuardAI::Permissible(const Creature* creature)
+int GuardAI::Permissible(Creature const* creature)
{
if (creature->isGuard())
return PERMIT_BASE_SPECIAL;
@@ -31,7 +31,7 @@ int GuardAI::Permissible(const Creature* creature)
return PERMIT_BASE_NO;
}
-GuardAI::GuardAI(Creature* creature) : ScriptedAI(creature), i_victimGuid(0), i_state(STATE_NORMAL), i_tracker(TIME_INTERVAL_LOOK)
+GuardAI::GuardAI(Creature* creature) : ScriptedAI(creature)
{
}
@@ -40,108 +40,35 @@ bool GuardAI::CanSeeAlways(WorldObject const* obj)
if (!obj->isType(TYPEMASK_UNIT))
return false;
- std::list<HostileReference*> t_list = me->getThreatManager().getThreatList();
- for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
- {
- if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
- if (unit == obj)
- return true;
- }
+ std::list<HostileReference*> threatList = me->getThreatManager().getThreatList();
+ for (std::list<HostileReference*>::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
+ if ((*itr)->getUnitGuid() == obj->GetGUID())
+ return true;
return false;
}
-void GuardAI::MoveInLineOfSight(Unit* unit)
-{
- // Ignore Z for flying creatures
- if (!me->CanFly() && me->GetDistanceZ(unit) > CREATURE_Z_ATTACK_RANGE)
- return;
-
- if (!me->getVictim() && me->IsValidAttackTarget(unit) &&
- (unit->IsHostileToPlayers() || me->IsHostileTo(unit)) &&
- unit->isInAccessiblePlaceFor(me))
- {
- float attackRadius = me->GetAttackDistance(unit);
- if (me->IsWithinDistInMap(unit, attackRadius))
- {
- //Need add code to let guard support player
- AttackStart(unit);
- //u->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
- }
- }
-}
-
void GuardAI::EnterEvadeMode()
{
if (!me->isAlive())
{
- sLog->outStaticDebug("Creature stopped attacking because he is dead [guid=%u]", me->GetGUIDLow());
me->GetMotionMaster()->MoveIdle();
-
- i_state = STATE_NORMAL;
-
- i_victimGuid = 0;
me->CombatStop(true);
me->DeleteThreatList();
return;
}
- Unit* victim = ObjectAccessor::GetUnit(*me, i_victimGuid);
-
- if (!victim)
- {
- sLog->outStaticDebug("Creature stopped attacking because victim does not exist [guid=%u]", me->GetGUIDLow());
- }
- else if (!victim->isAlive())
- {
- sLog->outStaticDebug("Creature stopped attacking because victim is dead [guid=%u]", me->GetGUIDLow());
- }
- else if (victim->HasStealthAura())
- {
- sLog->outStaticDebug("Creature stopped attacking because victim is using stealth [guid=%u]", me->GetGUIDLow());
- }
- else if (victim->isInFlight())
- {
- sLog->outStaticDebug("Creature stopped attacking because victim is flying away [guid=%u]", me->GetGUIDLow());
- }
- else
- {
- sLog->outStaticDebug("Creature stopped attacking because victim outran him [guid=%u]", me->GetGUIDLow());
- }
+ sLog->outDebug(LOG_FILTER_UNITS, "Guard entry: %u enters evade mode.", me->GetEntry());
me->RemoveAllAuras();
me->DeleteThreatList();
- i_victimGuid = 0;
me->CombatStop(true);
- i_state = STATE_NORMAL;
// Remove ChaseMovementGenerator from MotionMaster stack list, and add HomeMovementGenerator instead
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE)
me->GetMotionMaster()->MoveTargetedHome();
}
-void GuardAI::UpdateAI(const uint32 /*diff*/)
-{
- // update i_victimGuid if me->getVictim() !=0 and changed
- if (!UpdateVictim())
- return;
-
- Unit* const victim = me->getVictim();
- if (!victim)
- return;
-
- i_victimGuid = victim->GetGUID();
-
- if (me->isAttackReady())
- {
- if (me->IsWithinMeleeRange(victim))
- {
- me->AttackerStateUpdate(victim);
- me->resetAttackTimer();
- }
- }
-}
-
void GuardAI::JustDied(Unit* killer)
{
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
diff --git a/src/server/game/AI/CoreAI/GuardAI.h b/src/server/game/AI/CoreAI/GuardAI.h
index c80c5a6c343..c8dd9d54921 100755
--- a/src/server/game/AI/CoreAI/GuardAI.h
+++ b/src/server/game/AI/CoreAI/GuardAI.h
@@ -20,34 +20,19 @@
#define TRINITY_GUARDAI_H
#include "ScriptedCreature.h"
-#include "Timer.h"
class Creature;
class GuardAI : public ScriptedAI
{
- enum GuardState
- {
- STATE_NORMAL = 1,
- STATE_LOOK_AT_VICTIM = 2
- };
-
public:
+ explicit GuardAI(Creature* creature);
- explicit GuardAI(Creature* c);
-
- void MoveInLineOfSight(Unit*);
- void EnterEvadeMode();
- void JustDied(Unit*);
+ static int Permissible(Creature const* creature);
bool CanSeeAlways(WorldObject const* obj);
- void UpdateAI(const uint32);
- static int Permissible(const Creature*);
-
- private:
- uint64 i_victimGuid;
- GuardState i_state;
- TimeTracker i_tracker;
+ void EnterEvadeMode();
+ void JustDied(Unit* killer);
};
#endif
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index bcec8d273b9..160b406a6ea 100755
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -153,40 +153,56 @@ void PetAI::UpdateAI(const uint32 diff)
if (spellInfo->IsPositive())
{
- // non combat spells allowed
- // only pet spells have IsNonCombatSpell and not fit this reqs:
- // Consume Shadows, Lesser Invisibility, so ignore checks for its
if (spellInfo->CanBeUsedInCombat())
{
- // allow only spell without spell cost or with spell cost but not duration limit
- int32 duration = spellInfo->GetDuration();
- if ((spellInfo->ManaCost || spellInfo->ManaCostPercentage || spellInfo->ManaPerSecond) && duration > 0)
+ // check spell cooldown
+ if (me->HasSpellCooldown(spellInfo->Id))
continue;
- // allow only spell without cooldown > duration
- int32 cooldown = spellInfo->GetRecoveryTime();
- if (cooldown >= 0 && duration >= 0 && cooldown > duration)
+ // Check if we're in combat or commanded to attack
+ if (!me->isInCombat() && !me->GetCharmInfo()->IsCommandAttack())
continue;
}
Spell* spell = new Spell(me, spellInfo, TRIGGERED_NONE, 0);
-
bool spellUsed = false;
- for (std::set<uint64>::const_iterator tar = m_AllySet.begin(); tar != m_AllySet.end(); ++tar)
- {
- Unit* target = ObjectAccessor::GetUnit(*me, *tar);
- //only buff targets that are in combat, unless the spell can only be cast while out of combat
- if (!target)
- continue;
+ // Some spells can target enemy or friendly (DK Ghoul's Leap)
+ // Check for enemy first (pet then owner)
+ Unit* target = me->getAttackerForHelper();
+ if (!target && owner)
+ target = owner->getAttackerForHelper();
- if (spell->CanAutoCast(target))
+ if (target)
+ {
+ if (CanAttack(target) && spell->CanAutoCast(target))
{
targetSpellStore.push_back(std::make_pair(target, spell));
spellUsed = true;
- break;
}
}
+
+ // No enemy, check friendly
+ if (!spellUsed)
+ {
+ for (std::set<uint64>::const_iterator tar = m_AllySet.begin(); tar != m_AllySet.end(); ++tar)
+ {
+ Unit* ally = ObjectAccessor::GetUnit(*me, *tar);
+
+ //only buff targets that are in combat, unless the spell can only be cast while out of combat
+ if (!ally)
+ continue;
+
+ if (spell->CanAutoCast(ally))
+ {
+ targetSpellStore.push_back(std::make_pair(ally, spell));
+ spellUsed = true;
+ break;
+ }
+ }
+ }
+
+ // No valid targets at all
if (!spellUsed)
delete spell;
}
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 9d5858e1ca4..c589edcee7a 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -850,9 +850,12 @@ void Battleground::EndBattleground(uint32 winner)
if (team == winner)
{
// update achievement BEFORE personal rating update
- ArenaTeamMember* member = winner_arena_team->GetMember(player->GetGUID());
- if (member)
- player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, 1);
+ if (ArenaTeamMember* member = winner_arena_team->GetMember(player->GetGUID()))
+ {
+ uint32 rating = player->GetArenaPersonalRating(winner_arena_team->GetSlot());
+ player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA,
+ rating ? rating : 1);
+ }
winner_arena_team->MemberWon(player, loser_matchmaker_rating, winner_matchmaker_change);
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index 52d2cdefd65..d28f5ddfe6a 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -290,7 +290,7 @@ int32 BattlegroundAB::_GetNodeNameId(uint8 node)
case BG_AB_NODE_LUMBER_MILL:return LANG_BG_AB_NODE_LUMBER_MILL;
case BG_AB_NODE_GOLD_MINE: return LANG_BG_AB_NODE_GOLD_MINE;
default:
- ASSERT(0);
+ ASSERT(false);
}
return 0;
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index 977897b8d48..133a0aec560 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -720,8 +720,13 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
DelCreature(BG_SA_MAXNPC + i);
GraveyardStatus[i] = Source->GetTeamId();
- WorldSafeLocsEntry const* sg = NULL;
- sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]);
+ WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]);
+ if (!sg)
+ {
+ sLog->outError("BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]);
+ return;
+ }
+
AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], (GraveyardStatus[i] == TEAM_ALLIANCE? ALLIANCE : HORDE));
uint32 npc = 0;
uint32 flag = 0;
@@ -781,7 +786,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
SendWarningToAll(LANG_BG_SA_H_GY_SOUTH);
break;
default:
- ASSERT(0);
+ ASSERT(false);
break;
};
}
diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp
index cef68891890..62bc0ab3205 100644
--- a/src/server/game/Calendar/CalendarMgr.cpp
+++ b/src/server/game/Calendar/CalendarMgr.cpp
@@ -95,9 +95,9 @@ CalendarEventIdList const& CalendarMgr::GetPlayerEvents(uint64 guid)
CalendarInvite* CalendarMgr::GetInvite(uint64 inviteId)
{
- CalendarInviteMap::iterator it = _invites.find(inviteId);
- if (it != _invites.end())
- return &(it->second);
+ CalendarInviteMap::iterator itr = _invites.find(inviteId);
+ if (itr != _invites.end())
+ return &(itr->second);
sLog->outError("CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId);
return NULL;
@@ -105,9 +105,9 @@ CalendarInvite* CalendarMgr::GetInvite(uint64 inviteId)
CalendarEvent* CalendarMgr::GetEvent(uint64 eventId)
{
- CalendarEventMap::iterator it = _events.find(eventId);
- if (it != _events.end())
- return &(it->second);
+ CalendarEventMap::iterator itr = _events.find(eventId);
+ if (itr != _events.end())
+ return &(itr->second);
sLog->outError("CalendarMgr::GetEvent: [" UI64FMTD "] not found!", eventId);
return NULL;
@@ -316,11 +316,6 @@ void CalendarMgr::AddAction(CalendarAction const& action)
if (!calendarEvent)
return;
- CalendarInviteIdList const& inviteIds = calendarEvent->GetInviteIdList();
- for (CalendarInviteIdList::const_iterator it = inviteIds.begin(); it != inviteIds.end(); ++it)
- if (uint64 invitee = RemoveInvite(*it))
- SendCalendarEventRemovedAlert(invitee, *calendarEvent);
-
RemoveEvent(eventId);
break;
}
@@ -464,8 +459,6 @@ bool CalendarMgr::RemoveEvent(uint64 eventId)
return false;
}
- _events.erase(itr);
-
bool val = true;
CalendarInviteIdList const& invites = itr->second.GetInviteIdList();
@@ -474,8 +467,13 @@ bool CalendarMgr::RemoveEvent(uint64 eventId)
CalendarInvite* invite = GetInvite(*itrInvites);
if (!invite || !RemovePlayerEvent(invite->GetInvitee(), eventId))
val = false;
+
+ if (uint64 invitee = RemoveInvite(*itrInvites))
+ SendCalendarEventRemovedAlert(invitee, itr->second);
}
+ _events.erase(itr);
+
return val;
}
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h
index 80949effa0c..23578a55816 100755
--- a/src/server/game/DataStores/DBCEnums.h
+++ b/src/server/game/DataStores/DBCEnums.h
@@ -245,7 +245,7 @@ enum AreaFlags
AREA_FLAG_CITY = 0x00000200, // only for one zone named "City" (where it located?)
AREA_FLAG_OUTLAND = 0x00000400, // expansion zones? (only Eye of the Storm not have this flag, but have 0x00004000 flag)
AREA_FLAG_SANCTUARY = 0x00000800, // sanctuary area (PvP disabled)
- AREA_FLAG_NEED_FLY = 0x00001000, // Unknown
+ AREA_FLAG_NEED_FLY = 0x00001000, // Respawn alive at the graveyard without corpse
AREA_FLAG_UNUSED1 = 0x00002000, // Unused in 3.3.5a
AREA_FLAG_OUTLAND2 = 0x00004000, // expansion zones? (only Circle of Blood Arena not have this flag, but have 0x00000400 flag)
AREA_FLAG_OUTDOOR_PVP = 0x00008000, // pvp objective area? (Death's Door also has this flag although it's no pvp object area)
@@ -260,7 +260,7 @@ enum AreaFlags
AREA_FLAG_WINTERGRASP = 0x01000000, // Wintergrasp and it's subzones
AREA_FLAG_INSIDE = 0x02000000, // used for determinating spell related inside/outside questions in Map::IsOutdoors
AREA_FLAG_OUTSIDE = 0x04000000, // used for determinating spell related inside/outside questions in Map::IsOutdoors
- AREA_FLAG_WINTERGRASP_2 = 0x08000000, // Same as AREA_FLAG_WINTERGRASP except for The Sunken Ring and Western Bridge.
+ AREA_FLAG_WINTERGRASP_2 = 0x08000000, // Can Hearth And Resurrect From Area
AREA_FLAG_NO_FLY_ZONE = 0x20000000 // Marks zones where you cannot fly
};
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index d120713636d..6506a113ae1 100755
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -1668,8 +1668,8 @@ bool Creature::IsImmunedToSpell(SpellInfo const* spellInfo)
if (!spellInfo)
return false;
- // Spells that don't have effectMechanics.
- if (!spellInfo->HasAnyEffectMechanic() && GetCreatureTemplate()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))
+ // Creature is immune to main mechanic of the spell
+ if (GetCreatureTemplate()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))
return true;
// This check must be done instead of 'if (GetCreatureTemplate()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))' for not break
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index f5f336a2402..41c95ac3d04 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -10157,7 +10157,8 @@ uint32 Player::GetItemCount(uint32 item, bool inBankAlso, Item* skipItem) const
if (inBankAlso)
{
- for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i)
+ // checking every item from 39 to 74 (including bank bags)
+ for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_BAG_END; ++i)
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
if (pItem != skipItem && pItem->GetEntry() == item)
count += pItem->GetCount();
@@ -10197,7 +10198,7 @@ uint32 Player::GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipIte
if (Bag* pBag = GetBagByPos(i))
count += pBag->GetItemCountWithLimitCategory(limitCategory, skipItem);
- for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i)
+ for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_BAG_END; ++i)
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
if (pItem != skipItem)
if (ItemTemplate const* pProto = pItem->GetTemplate())
@@ -10223,7 +10224,7 @@ Item* Player::GetItemByGuid(uint64 guid) const
if (pItem->GetGUID() == guid)
return pItem;
- for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i)
+ for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_BAG_END; ++i)
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
if (pItem->GetGUID() == guid)
return pItem;
@@ -12180,11 +12181,6 @@ Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update
pItem->SetItemRandomProperties(randomPropertyId);
pItem = StoreItem(dest, pItem, update);
- const ItemTemplate* proto = pItem->GetTemplate();
- for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
- if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger
- CastSpell(this, proto->Spells[i].SpellId, true, pItem);
-
if (allowedLooters.size() > 1 && pItem->GetTemplate()->GetMaxStackSize() == 1 && pItem->IsSoulBound())
{
pItem->SetSoulboundTradeable(allowedLooters);
@@ -12290,6 +12286,14 @@ Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool
AddEnchantmentDurations(pItem);
AddItemDurations(pItem);
+
+ const ItemTemplate* proto = pItem->GetTemplate();
+ for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
+ if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger
+ if (bag == INVENTORY_SLOT_BAG_0 || (bag >= INVENTORY_SLOT_BAG_START && bag < INVENTORY_SLOT_BAG_END))
+ if (!HasAura(proto->Spells[i].SpellId))
+ CastSpell(this, proto->Spells[i].SpellId, true, pItem);
+
return pItem;
}
else
@@ -12326,6 +12330,13 @@ Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool
pItem2->SetState(ITEM_CHANGED, this);
+ const ItemTemplate* proto = pItem2->GetTemplate();
+ for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
+ if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger
+ if (bag == INVENTORY_SLOT_BAG_0 || (bag >= INVENTORY_SLOT_BAG_START && bag < INVENTORY_SLOT_BAG_END))
+ if (!HasAura(proto->Spells[i].SpellId))
+ CastSpell(this, proto->Spells[i].SpellId, true, pItem2);
+
return pItem2;
}
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index ba481176d23..71977bf469c 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -7366,30 +7366,16 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (procSpell->SpellIconID != 2019)
return false;
- AuraEffect* aurEffA = NULL;
- AuraEffectList const& auras = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE);
- for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
+ if (Creature* totem = GetMap()->GetCreature(m_SummonSlot[1])) // Fire totem summon slot
{
- SpellInfo const* spell = (*i)->GetSpellInfo();
- if (spell->SpellFamilyName == uint32(SPELLFAMILY_SHAMAN) && spell->SpellFamilyFlags.HasFlag(0, 0x02000000, 0))
+ if (SpellInfo const* totemSpell = sSpellMgr->GetSpellInfo(totem->m_spells[0]))
{
- if ((*i)->GetCasterGUID() != GetGUID())
- continue;
- if (spell->Id == 63283)
- continue;
- aurEffA = (*i);
- break;
+ int32 bp0 = CalculatePctN(totemSpell->Effects[EFFECT_0].CalcValue(), triggerAmount);
+ int32 bp1 = CalculatePctN(totemSpell->Effects[EFFECT_1].CalcValue(), triggerAmount);
+ CastCustomSpell(this, 63283, &bp0, &bp1, NULL, true);
+ return true;
}
}
- if (aurEffA)
- {
- int32 bp0 = 0, bp1 = 0;
- bp0 = CalculatePctN(triggerAmount, aurEffA->GetAmount());
- if (AuraEffect* aurEffB = aurEffA->GetBase()->GetEffect(EFFECT_1))
- bp1 = CalculatePctN(triggerAmount, aurEffB->GetAmount());
- CastCustomSpell(this, 63283, &bp0, &bp1, NULL, true, NULL, triggeredByAura);
- return true;
- }
return false;
}
break;
@@ -7786,17 +7772,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
}
}
- // Item - Death Knight T10 Melee 4P Bonus
- if (dummySpell->Id == 70656)
- {
- Player* player = ToPlayer();
- if (!player)
- return false;
-
- for (uint32 i = 0; i < MAX_RUNES; ++i)
- if (player->GetRuneCooldown(i) == 0)
- return false;
- }
break;
}
case SPELLFAMILY_POTION:
@@ -8064,7 +8039,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
*handled = true;
if (victim && victim->HasAura(53601))
{
- int32 bp0 = CalculatePctN(int32(damage / 12), dummySpell->Effects[EFFECT_2]. CalcValue());
+ int32 bp0 = CalculatePctN(int32(damage / 12), dummySpell->Effects[EFFECT_2].CalcValue());
// Item - Paladin T9 Holy 4P Bonus
if (AuraEffect const* aurEff = GetAuraEffect(67191, 0))
AddPctN(bp0, aurEff->GetAmount());
@@ -8724,6 +8699,16 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
trigger_spell_id = 50475;
basepoints0 = CalculatePctN(int32(damage), triggerAmount);
}
+ // Item - Death Knight T10 Melee 4P Bonus
+ else if (auraSpellInfo->Id == 70656)
+ {
+ if (GetTypeId() != TYPEID_PLAYER || getClass() != CLASS_DEATH_KNIGHT)
+ return false;
+
+ for (uint8 i = 0; i < MAX_RUNES; ++i)
+ if (ToPlayer()->GetRuneCooldown(i) == 0)
+ return false;
+ }
break;
}
case SPELLFAMILY_ROGUE:
@@ -10206,7 +10191,7 @@ Unit* Unit::GetFirstControlled() const
// Sequence: charmed, pet, other guardians
Unit* unit = GetCharm();
if (!unit)
- if (uint64 guid = GetUInt64Value(UNIT_FIELD_SUMMON))
+ if (uint64 guid = GetMinionGUID())
unit = ObjectAccessor::GetUnit(*this, guid);
return unit;
@@ -17033,7 +17018,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
}
if (IsInMap(caster))
- caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId+1, target, true, NULL, NULL, origCasterGUID);
+ caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId+1, target, false, NULL, NULL, origCasterGUID);
else // This can happen during Player::_LoadAuras
{
int32 bp0 = seatId;
@@ -17043,7 +17028,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
else
{
if (IsInMap(caster))
- caster->CastSpell(target, spellEntry, true, NULL, NULL, origCasterGUID);
+ caster->CastSpell(target, spellEntry, false, NULL, NULL, origCasterGUID);
else
Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, NULL, NULL, origCasterGUID);
}
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 9dea557f650..1e36b4c732b 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -6247,74 +6247,54 @@ uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
switch (guidhigh)
{
case HIGHGUID_ITEM:
- if (_hiItemGuid >= 0xFFFFFFFE)
- {
- sLog->outError("Item guid overflow!! Can't continue, shutting down server. ");
- World::StopNow(ERROR_EXIT_CODE);
- }
+ {
+ ASSERT(_hiItemGuid < 0xFFFFFFFE && "Item guid overflow!");
return _hiItemGuid++;
+ }
case HIGHGUID_UNIT:
- if (_hiCreatureGuid >= 0x00FFFFFE)
- {
- sLog->outError("Creature guid overflow!! Can't continue, shutting down server. ");
- World::StopNow(ERROR_EXIT_CODE);
- }
+ {
+ ASSERT(_hiCreatureGuid < 0x00FFFFFE && "Creature guid overflow!");
return _hiCreatureGuid++;
+ }
case HIGHGUID_PET:
- if (_hiPetGuid >= 0x00FFFFFE)
- {
- sLog->outError("Pet guid overflow!! Can't continue, shutting down server. ");
- World::StopNow(ERROR_EXIT_CODE);
- }
+ {
+ ASSERT(_hiPetGuid < 0x00FFFFFE && "Pet guid overflow!");
return _hiPetGuid++;
+ }
case HIGHGUID_VEHICLE:
- if (_hiVehicleGuid >= 0x00FFFFFF)
- {
- sLog->outError("Vehicle guid overflow!! Can't continue, shutting down server. ");
- World::StopNow(ERROR_EXIT_CODE);
- }
+ {
+ ASSERT(_hiVehicleGuid < 0x00FFFFFF && "Vehicle guid overflow!");
return _hiVehicleGuid++;
+ }
case HIGHGUID_PLAYER:
- if (_hiCharGuid >= 0xFFFFFFFE)
- {
- sLog->outError("Players guid overflow!! Can't continue, shutting down server. ");
- World::StopNow(ERROR_EXIT_CODE);
- }
+ {
+ ASSERT(_hiCharGuid < 0xFFFFFFFE && "Player guid overflow!");
return _hiCharGuid++;
+ }
case HIGHGUID_GAMEOBJECT:
- if (_hiGoGuid >= 0x00FFFFFE)
- {
- sLog->outError("Gameobject guid overflow!! Can't continue, shutting down server. ");
- World::StopNow(ERROR_EXIT_CODE);
- }
+ {
+ ASSERT(_hiGoGuid < 0x00FFFFFE && "Gameobject guid overflow!");
return _hiGoGuid++;
+ }
case HIGHGUID_CORPSE:
- if (_hiCorpseGuid >= 0xFFFFFFFE)
- {
- sLog->outError("Corpse guid overflow!! Can't continue, shutting down server. ");
- World::StopNow(ERROR_EXIT_CODE);
- }
+ {
+ ASSERT(_hiCorpseGuid < 0xFFFFFFFE && "Corpse guid overflow!");
return _hiCorpseGuid++;
+ }
case HIGHGUID_DYNAMICOBJECT:
- if (_hiDoGuid >= 0xFFFFFFFE)
- {
- sLog->outError("DynamicObject guid overflow!! Can't continue, shutting down server. ");
- World::StopNow(ERROR_EXIT_CODE);
- }
+ {
+ ASSERT(_hiDoGuid < 0xFFFFFFFE && "DynamicObject guid overflow!");
return _hiDoGuid++;
+ }
case HIGHGUID_MO_TRANSPORT:
- if (_hiMoTransGuid >= 0xFFFFFFFE)
- {
- sLog->outError("MO Transport guid overflow!! Can't continue, shutting down server. ");
- World::StopNow(ERROR_EXIT_CODE);
- }
+ {
+ ASSERT(_hiMoTransGuid < 0xFFFFFFFE && "MO Transport guid overflow!");
return _hiMoTransGuid++;
+ }
default:
- ASSERT(0);
+ ASSERT(false && "ObjectMgr::GenerateLowGuid - Unknown HIGHGUID type");
+ return 0;
}
-
- ASSERT(0);
- return 0;
}
void ObjectMgr::LoadGameObjectLocales()
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index d1277d154cc..298c742fc3a 100755
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
@@ -20,7 +20,7 @@
----- Opcodes Not Used yet -----
SMSG_CALENDAR_CLEAR_PENDING_ACTION SendCalendarClearPendingAction()
-SMSG_CALENDAR_RAID_LOCKOUT_UPDATED SendCalendarRaidLockoutUpdated(InstanceSave const* save) <--- Structure unknown, using LOCKOUT_ADDED
+SMSG_CALENDAR_RAID_LOCKOUT_UPDATED SendCalendarRaidLockoutUpdated(InstanceSave const* save)
----- Opcodes without Sniffs -----
SMSG_CALENDAR_FILTER_GUILD [ for (... uint32(count) { packguid(???), uint8(???) } ]
@@ -74,7 +74,11 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
else
{
sLog->outError("SMSG_CALENDAR_SEND_CALENDAR: No Invite found with id [" UI64FMTD "]", *it);
- data << uint64(0) << uint64(0) << uint8(0) << uint8(0);
+ data << uint64(0);
+ data << uint64(0);
+ data << uint8(0);
+ data << uint8(0);
+ data << uint8(0);
data.appendPackGUID(0);
}
}
@@ -96,8 +100,12 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
else
{
sLog->outError("SMSG_CALENDAR_SEND_CALENDAR: No Event found with id [" UI64FMTD "]", *it);
- data << uint64(0) << uint8(0) << uint32(0)
- << uint32(0) << uint32(0) << uint32(0);
+ data << uint64(0);
+ data << uint8(0);
+ data << uint32(0);
+ data << uint32(0);
+ data << uint32(0);
+ data << uint32(0);
data.appendPackGUID(0);
}
}
@@ -835,26 +843,6 @@ void WorldSession::SendCalendarClearPendingAction()
SendPacket(&data);
}
-void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save)
-{
- if (!save)
- return;
-
- uint64 guid = _player->GetGUID();
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [" UI64FMTD
- "] Map: %u, Difficulty %u", guid, save->GetMapId(), save->GetDifficulty());
-
- time_t cur_time = time_t(time(NULL));
-
- WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_UPDATED, 4 + 4 + 4 + 4 + 8);
- data << secsToTimeBitFields(cur_time);
- data << uint32(save->GetMapId());
- data << uint32(save->GetDifficulty());
- data << uint32(save->GetResetTime() - cur_time);
- data << uint64(save->GetInstanceId());
- SendPacket(&data);
-}
-
void WorldSession::SendCalendarCommandResult(CalendarError err, char const* param /*= NULL*/)
{
uint64 guid = _player->GetGUID();
@@ -898,3 +886,23 @@ void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add)
data << uint64(save->GetInstanceId());
SendPacket(&data);
}
+
+void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save)
+{
+ if (!save)
+ return;
+
+ uint64 guid = _player->GetGUID();
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [" UI64FMTD
+ "] Map: %u, Difficulty %u", guid, save->GetMapId(), save->GetDifficulty());
+
+ time_t cur_time = time_t(time(NULL));
+
+ WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_UPDATED, 4 + 4 + 4 + 4 + 8);
+ data << secsToTimeBitFields(cur_time);
+ data << uint32(save->GetMapId());
+ data << uint32(save->GetDifficulty());
+ data << uint32(0); // Amount of seconds that has changed to the reset time
+ data << uint32(save->GetResetTime() - cur_time);
+ SendPacket(&data);
+}
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 35872f8c63f..a280bc30b7c 100755
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -51,6 +51,7 @@
#include "GameObjectAI.h"
#include "Group.h"
#include "AccountMgr.h"
+#include "Spell.h"
void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data)
{
@@ -1714,3 +1715,47 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket)
_player->SetPendingBind(0, 0);
}
+
+void WorldSession::HandleUpdateMissileTrajectory(WorldPacket& recvPacket)
+{
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_UPDATE_MISSILE_TRAJECTORY");
+
+ uint64 guid;
+ uint32 spellId;
+ float elevation, speed;
+ float curX, curY, curZ;
+ float targetX, targetY, targetZ;
+ uint8 moveStop;
+
+ recvPacket >> guid >> spellId >> elevation >> speed;
+ recvPacket >> curX >> curY >> curZ;
+ recvPacket >> targetX >> targetY >> targetZ;
+ recvPacket >> moveStop;
+
+ Unit* caster = ObjectAccessor::GetUnit(*_player, guid);
+ Spell* spell = caster ? caster->GetCurrentSpell(CURRENT_GENERIC_SPELL) : NULL;
+ if (!spell || spell->m_spellInfo->Id != spellId || !spell->m_targets.HasDst() || !spell->m_targets.HasSrc())
+ {
+ recvPacket.rfinish();
+ return;
+ }
+
+ Position pos = *spell->m_targets.GetSrcPos();
+ pos.Relocate(curX, curY, curZ);
+ spell->m_targets.ModSrc(pos);
+
+ pos = *spell->m_targets.GetDstPos();
+ pos.Relocate(targetX, targetY, targetZ);
+ spell->m_targets.ModDst(pos);
+
+ spell->m_targets.SetElevation(elevation);
+ spell->m_targets.SetSpeed(speed);
+
+ if (moveStop)
+ {
+ uint32 opcode;
+ recvPacket >> opcode;
+ recvPacket.SetOpcode(opcode);
+ HandleMovementOpcodes(recvPacket);
+ }
+}
diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp
index b3d663e1850..c271a43462a 100755
--- a/src/server/game/Handlers/MovementHandler.cpp
+++ b/src/server/game/Handlers/MovementHandler.cpp
@@ -64,10 +64,9 @@ void WorldSession::HandleMoveWorldportAckOpcode()
GetPlayer()->m_InstanceValid = true;
Map* oldMap = GetPlayer()->GetMap();
- ASSERT(oldMap);
if (GetPlayer()->IsInWorld())
{
- sLog->outCrash("Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName(), oldMap->GetId(), loc.GetMapId());
+ sLog->outError("Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName(), oldMap->GetId(), loc.GetMapId());
oldMap->RemovePlayerFromMap(GetPlayer(), false);
}
@@ -200,8 +199,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
sLog->outStaticDebug("Guid " UI64FMTD, guid);
sLog->outStaticDebug("Flags %u, time %u", flags, time/IN_MILLISECONDS);
- Unit* mover = _player->m_mover;
- Player* plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL;
+ Player* plMover = _player->m_mover->ToPlayer();
if (!plMover || !plMover->IsBeingTeleportedNear())
return;
@@ -240,33 +238,33 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
GetPlayer()->ProcessDelayedOperations();
}
-void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data)
+void WorldSession::HandleMovementOpcodes(WorldPacket & recvData)
{
- uint16 opcode = recv_data.GetOpcode();
+ uint16 opcode = recvData.GetOpcode();
Unit* mover = _player->m_mover;
- ASSERT(mover != NULL); // there must always be a mover
+ ASSERT(mover != NULL); // there must always be a mover
- Player* plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL;
+ Player* plrMover = mover->ToPlayer();
// ignore, waiting processing in WorldSession::HandleMoveWorldportAckOpcode and WorldSession::HandleMoveTeleportAck
- if (plMover && plMover->IsBeingTeleported())
+ if (plrMover && plrMover->IsBeingTeleported())
{
- recv_data.rfinish(); // prevent warnings spam
+ recvData.rfinish(); // prevent warnings spam
return;
}
/* extract packet */
uint64 guid;
- recv_data.readPackGUID(guid);
+ recvData.readPackGUID(guid);
MovementInfo movementInfo;
movementInfo.guid = guid;
- ReadMovementInfo(recv_data, &movementInfo);
+ ReadMovementInfo(recvData, &movementInfo);
- recv_data.rfinish(); // prevent warnings spam
+ recvData.rfinish(); // prevent warnings spam
// prevent tampered movement data
if (guid != mover->GetGUID())
@@ -274,7 +272,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data)
if (!movementInfo.pos.IsPositionValid())
{
- recv_data.rfinish(); // prevent warnings spam
+ recvData.rfinish(); // prevent warnings spam
return;
}
@@ -285,27 +283,27 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data)
// (also received at zeppelin leave by some reason with t_* as absolute in continent coordinates, can be safely skipped)
if (movementInfo.t_pos.GetPositionX() > 50 || movementInfo.t_pos.GetPositionY() > 50 || movementInfo.t_pos.GetPositionZ() > 50)
{
- recv_data.rfinish(); // prevent warnings spam
+ recvData.rfinish(); // prevent warnings spam
return;
}
if (!Trinity::IsValidMapCoord(movementInfo.pos.GetPositionX() + movementInfo.t_pos.GetPositionX(), movementInfo.pos.GetPositionY() + movementInfo.t_pos.GetPositionY(),
movementInfo.pos.GetPositionZ() + movementInfo.t_pos.GetPositionZ(), movementInfo.pos.GetOrientation() + movementInfo.t_pos.GetOrientation()))
{
- recv_data.rfinish(); // prevent warnings spam
+ recvData.rfinish(); // prevent warnings spam
return;
}
// if we boarded a transport, add us to it
- if (plMover && !plMover->GetTransport())
+ if (plrMover && !plrMover->GetTransport())
{
// elevators also cause the client to send MOVEMENTFLAG_ONTRANSPORT - just dismount if the guid can be found in the transport list
for (MapManager::TransportSet::const_iterator iter = sMapMgr->m_Transports.begin(); iter != sMapMgr->m_Transports.end(); ++iter)
{
if ((*iter)->GetGUID() == movementInfo.t_guid)
{
- plMover->m_transport = (*iter);
- (*iter)->AddPassenger(plMover);
+ plrMover->m_transport = (*iter);
+ (*iter)->AddPassenger(plrMover);
break;
}
}
@@ -318,29 +316,29 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data)
movementInfo.flags &= ~MOVEMENTFLAG_ONTRANSPORT;
}
}
- else if (plMover && plMover->GetTransport()) // if we were on a transport, leave
+ else if (plrMover && plrMover->GetTransport()) // if we were on a transport, leave
{
- plMover->m_transport->RemovePassenger(plMover);
- plMover->m_transport = NULL;
+ plrMover->m_transport->RemovePassenger(plrMover);
+ plrMover->m_transport = NULL;
movementInfo.t_pos.Relocate(0.0f, 0.0f, 0.0f, 0.0f);
movementInfo.t_time = 0;
movementInfo.t_seat = -1;
}
// fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
- if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
- plMover->HandleFall(movementInfo);
+ if (opcode == MSG_MOVE_FALL_LAND && plrMover && !plrMover->isInFlight())
+ plrMover->HandleFall(movementInfo);
- if (plMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plMover->IsInWater())
+ if (plrMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plrMover->IsInWater())
{
// now client not include swimming flag in case jumping under water
- plMover->SetInWater(!plMover->IsInWater() || plMover->GetBaseMap()->IsUnderWater(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY(), movementInfo.pos.GetPositionZ()));
+ plrMover->SetInWater(!plrMover->IsInWater() || plrMover->GetBaseMap()->IsUnderWater(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY(), movementInfo.pos.GetPositionZ()));
}
/*----------------------*/
/* process position-change */
- WorldPacket data(opcode, recv_data.size());
+ WorldPacket data(opcode, recvData.size());
movementInfo.time = getMSTime();
movementInfo.guid = mover->GetGUID();
WriteMovementInfo(&data, &movementInfo);
@@ -357,27 +355,25 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data)
mover->UpdatePosition(movementInfo.pos);
- if (plMover) // nothing is charmed, or player charmed
+ if (plrMover) // nothing is charmed, or player charmed
{
- plMover->UpdateFallInformationIfNeed(movementInfo, opcode);
+ plrMover->UpdateFallInformationIfNeed(movementInfo, opcode);
if (movementInfo.pos.GetPositionZ() < -500.0f)
{
- if (!(plMover->InBattleground()
- && plMover->GetBattleground()
- && plMover->GetBattleground()->HandlePlayerUnderMap(_player)))
+ if (!(plrMover->GetBattleground() && plrMover->GetBattleground()->HandlePlayerUnderMap(_player)))
{
// NOTE: this is actually called many times while falling
// even after the player has been teleported away
// TODO: discard movement packets after the player is rooted
- if (plMover->isAlive())
+ if (plrMover->isAlive())
{
- plMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
+ plrMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
// player can be alive if GM/etc
// change the death state to CORPSE to prevent the death timer from
// starting in the next player update
- if (!plMover->isAlive())
- plMover->KillPlayer();
+ if (!plrMover->isAlive())
+ plrMover->KillPlayer();
}
}
}
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index b2d52c85467..1affdf0aff7 100755
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -650,13 +650,22 @@ void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
uint8 castCount;
float x, y, z; // Position of missile hit
- recvPacket.readPackGUID(casterGuid);
+ recvPacket >> casterGuid;
recvPacket >> spellId;
recvPacket >> castCount;
recvPacket >> x;
recvPacket >> y;
recvPacket >> z;
+ Unit* caster = ObjectAccessor::GetUnit(*_player, casterGuid);
+ Spell* spell = caster ? caster->FindCurrentSpellBySpellId(spellId) : NULL;
+ if (spell && spell->m_targets.HasDst())
+ {
+ Position pos = *spell->m_targets.GetDstPos();
+ pos.Relocate(x, y, z);
+ spell->m_targets.ModDst(pos);
+ }
+
WorldPacket data(SMSG_SET_PROJECTILE_POSITION, 21);
data << uint64(casterGuid);
data << uint8(castCount);
diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp
index dc26aaa42ca..9d7fa7da396 100755
--- a/src/server/game/Handlers/TradeHandler.cpp
+++ b/src/server/game/Handlers/TradeHandler.cpp
@@ -531,7 +531,7 @@ void WorldSession::HandleBeginTradeOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::SendCancelTrade()
{
- if (m_playerRecentlyLogout)
+ if (PlayerRecentlyLoggedOut() || PlayerLogout())
return;
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index 517935acbd2..bd9c75c251d 100755
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -1148,7 +1148,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x45F*/ { "CMSG_CALENDAR_EVENT_INVITE_NOTES", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
/*0x460*/ { "SMSG_CALENDAR_EVENT_INVITE_NOTES", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x461*/ { "SMSG_CALENDAR_EVENT_INVITE_NOTES_ALERT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
- /*0x462*/ { "CMSG_UPDATE_MISSILE_TRAJECTORY", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
+ /*0x462*/ { "CMSG_UPDATE_MISSILE_TRAJECTORY", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleUpdateMissileTrajectory },
/*0x463*/ { "SMSG_UPDATE_ACCOUNT_DATA_COMPLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x464*/ { "SMSG_TRIGGER_MOVIE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x465*/ { "CMSG_COMPLETE_MOVIE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h
index 3c77ced6741..65e7b3597ce 100755
--- a/src/server/game/Server/Protocol/Opcodes.h
+++ b/src/server/game/Server/Protocol/Opcodes.h
@@ -1248,8 +1248,8 @@ enum Opcodes
SMSG_CALENDAR_CLEAR_PENDING_ACTION = 0x4BB,
SMSG_EQUIPMENT_SET_LIST = 0x4BC, // equipment manager list?
CMSG_EQUIPMENT_SET_SAVE = 0x4BD,
- CMSG_UPDATE_PROJECTILE_POSITION = 0x4BE, // uint64 caster, uint32 spellId, uint8 castId, vector3 position
- SMSG_SET_PROJECTILE_POSITION = 0x4BF, // uint64 caster, uint8 castId, vector3 position
+ CMSG_UPDATE_PROJECTILE_POSITION = 0x4BE,
+ SMSG_SET_PROJECTILE_POSITION = 0x4BF,
SMSG_TALENTS_INFO = 0x4C0,
CMSG_LEARN_PREVIEW_TALENTS = 0x4C1,
CMSG_LEARN_PREVIEW_TALENTS_PET = 0x4C2,
@@ -1354,7 +1354,7 @@ enum SessionStatus
STATUS_AUTHED = 0, // Player authenticated (_player == NULL, m_playerRecentlyLogout = false or will be reset before handler call, m_GUID have garbage)
STATUS_LOGGEDIN, // Player in game (_player != NULL, m_GUID == _player->GetGUID(), inWorld())
STATUS_TRANSFER, // Player transferring to another map (_player != NULL, m_GUID == _player->GetGUID(), !inWorld())
- STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT, // _player!= NULL or _player == NULL && m_playerRecentlyLogout, m_GUID store last _player guid)
+ STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT, // _player != NULL or _player == NULL && m_playerRecentlyLogout && m_playerLogout, m_GUID store last _player guid)
STATUS_NEVER, // Opcode not accepted from client (deprecated or server side only)
STATUS_UNHANDLED, // Opcode not handled yet
};
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index 88248b7bc55..98bb0123896 100755
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -290,7 +290,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
// lag can cause STATUS_LOGGEDIN opcodes to arrive after the player started a transfer
break;
case STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT:
- if (!_player && !m_playerRecentlyLogout)
+ if (!_player && !m_playerRecentlyLogout && !m_playerLogout) // There's a short delay between _player = null and m_playerRecentlyLogout = true during logout
LogUnexpectedOpcode(packet, "STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT",
"the player has not logged in yet and not recently logout");
else
@@ -404,7 +404,7 @@ void WorldSession::LogoutPlayer(bool Save)
if (_player)
{
- if (uint64 lguid = GetPlayer()->GetLootGUID())
+ if (uint64 lguid = _player->GetLootGUID())
DoLootRelease(lguid);
///- If the player just died before logging out, make him appear as a ghost
@@ -518,21 +518,21 @@ void WorldSession::LogoutPlayer(bool Save)
if (_player->GetGroup() && !_player->GetGroup()->isRaidGroup() && m_Socket)
_player->RemoveFromGroup();
- ///- Send update to group and reset stored max enchanting level
+ //! Send update to group and reset stored max enchanting level
if (_player->GetGroup())
{
_player->GetGroup()->SendUpdate();
_player->GetGroup()->ResetMaxEnchantingLevel();
}
- ///- Broadcast a logout message to the player's friends
+ //! Broadcast a logout message to the player's friends
sSocialMgr->SendFriendStatus(_player, FRIEND_OFFLINE, _player->GetGUIDLow(), true);
sSocialMgr->RemovePlayerSocial(_player->GetGUIDLow());
- // Call script hook before deletion
- sScriptMgr->OnPlayerLogout(GetPlayer());
+ //! Call script hook before deletion
+ sScriptMgr->OnPlayerLogout(_player);
- ///- Remove the player from the world
+ //! Remove the player from the world
// the player may not be in the world when logging out
// e.g if he got disconnected during a transfer to another map
// calls to GetMap in this case may cause crashes
@@ -540,22 +540,19 @@ void WorldSession::LogoutPlayer(bool Save)
sLog->outChar("Account: %d (IP: %s) Logout Character:[%s] (GUID: %u) Level: %d", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName(), _player->GetGUIDLow(), _player->getLevel());
if (Map* _map = _player->FindMap())
_map->RemovePlayerFromMap(_player, true);
- SetPlayer(NULL); // deleted in Remove call
- ///- Send the 'logout complete' packet to the client
+ SetPlayer(NULL); //! Pointer already deleted during RemovePlayerFromMap
+
+ //! Send the 'logout complete' packet to the client
+ //! Client will respond by sending 3x CMSG_CANCEL_TRADE, which we currently dont handle
WorldPacket data(SMSG_LOGOUT_COMPLETE, 0);
SendPacket(&data);
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
- ///- Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline
- //No SQL injection as AccountId is uint32
-
+ //! Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ACCOUNT_ONLINE);
-
stmt->setUInt32(0, GetAccountId());
-
CharacterDatabase.Execute(stmt);
-
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
}
m_playerLogout = false;
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index bb54a0ae19e..00d5a8b5a86 100755
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -221,6 +221,7 @@ class WorldSession
bool PlayerLoading() const { return m_playerLoading; }
bool PlayerLogout() const { return m_playerLogout; }
bool PlayerLogoutWithSave() const { return m_playerLogout && m_playerSave; }
+ bool PlayerRecentlyLoggedOut() const { return m_playerRecentlyLogout; }
void SizeError(WorldPacket const& packet, uint32 size) const;
@@ -785,6 +786,7 @@ class WorldSession
void HandleResetInstancesOpcode(WorldPacket& recv_data);
void HandleHearthAndResurrect(WorldPacket& recv_data);
void HandleInstanceLockResponse(WorldPacket& recvPacket);
+ void HandleUpdateMissileTrajectory(WorldPacket& recvPacket);
// Looking for Dungeon/Raid
void HandleLfgSetCommentOpcode(WorldPacket& recv_data);
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index d28ba9e1e19..5a29e6b325d 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -660,19 +660,23 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
}
break;
case SPELL_AURA_PERIODIC_ENERGIZE:
- if (GetSpellInfo()->SpellFamilyName == SPELLFAMILY_GENERIC)
+ switch (m_spellInfo->Id)
{
- // Replenishment (0.25% from max)
- // Infinite Replenishment
- if (m_spellInfo->SpellIconID == 3184 && m_spellInfo->SpellVisual[0] == 12495)
- amount = GetBase()->GetUnitOwner()->GetMaxPower(POWER_MANA) * 25 / 10000;
- }
- // Innervate
- else if (m_spellInfo->Id == 29166)
+ case 57669: // Replenishment (0.2% from max)
+ amount = GetBase()->GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.002f;
+ break;
+ case 61782: // Infinite Replenishment
+ amount = GetBase()->GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.0025f;
+ break;
+ case 29166: // Innervate
ApplyPctF(amount, float(GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA)) / GetTotalTicks());
- // Owlkin Frenzy
- else if (m_spellInfo->Id == 48391)
+ break;
+ case 48391: // Owlkin Frenzy
ApplyPctU(amount, GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA));
+ break;
+ default:
+ break;
+ }
break;
case SPELL_AURA_PERIODIC_HEAL:
if (!caster)
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h
index beef71ea857..0af2af948d3 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h
@@ -33,7 +33,8 @@ enum Data
DATA_WARCHIEF_REND_BLACKHAND,
DATA_GYTH,
DATA_THE_BEAST,
- DATA_GENERAL_DRAKKISATH
+ DATA_GENERAL_DRAKKISATH,
+ DATA_DRAGONSPIRE_ROOM,
};
enum Npc
{
@@ -51,6 +52,9 @@ enum Npc
NPC_GYTH = 10339,
NPC_THE_BEAST = 10430,
NPC_GENERAL_DRAKKISATH = 10363,
+ NPC_BLACKHAND_DREADWEAVER = 9817,
+ NPC_BLACKHAND_SUMMONER = 9818,
+ NPC_BLACKHAND_VETERAN = 9819,
};
enum AdditionalData
@@ -58,6 +62,9 @@ enum AdditionalData
SPELL_SUMMON_ROOKERY_WHELP = 15745,
MAX_ENCOUNTER = 14,
MAX_DRAGONSPIRE_HALL_RUNES = 7,
+ EVENT_PYROGUARD_EMBERSEER = 4884,
+ AREATRIGGER_ENTER_UBRS = 2046,
+ AREATRIGGER_STADIUM = 2026,
};
enum GameObjects
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
index 411b800cd03..0279f3e2834 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
@@ -20,11 +20,24 @@
#include "ScriptedCreature.h"
#include "blackrock_spire.h"
+enum Text
+{
+ EMOTE_ONE_STACK = 0,
+ EMOTE_TEN_STACK = 1,
+ EMOTE_FREE_OF_BONDS = 2,
+ YELL_FREE_OF_BONDS = 3,
+};
+
enum Spells
{
- SPELL_FIRENOVA = 23462,
- SPELL_FLAMEBUFFET = 23341,
- SPELL_PYROBLAST = 17274,
+ SPELL_ENCAGED_EMBERSEER = 15282, // Self on spawn
+ SPELL_FIRE_SHIELD_TRIGGER = 13377, // Self on spawn missing from 335 dbc
+ SPELL_FREEZE_ANIM = 16245, // Self on event start
+ SPELL_EMBERSEER_GROWING = 16048, // Self on event start
+ SPELL_EMBERSEER_FULL_STRENGTH = 16047, // Emberseer Full Strength
+ SPELL_FIRENOVA = 23462, // Combat
+ SPELL_FLAMEBUFFET = 23341, // Combat
+ SPELL_PYROBLAST = 17274, // Combat
};
enum Events
@@ -51,6 +64,12 @@ public:
void Reset()
{
+ if(instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS)
+ OpenDoors(false);
+ instance->SetBossState(DATA_PYROGAURD_EMBERSEER,NOT_STARTED);
+ // respawn any dead Blackhand Incarcerators
+ DoCast(me, SPELL_ENCAGED_EMBERSEER);
+ //DoCast(me, SPELL_FIRE_SHIELD_TRIGGER);
_Reset();
}
@@ -64,12 +83,26 @@ public:
void JustDied(Unit* /*killer*/)
{
+ instance->SetBossState(DATA_PYROGAURD_EMBERSEER,DONE);
+ OpenDoors(true);
_JustDied();
}
+ void OpenDoors(bool Boss_Killed)
+ {
+ if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN)))
+ door1->SetGoState(GO_STATE_ACTIVE);
+ if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS)))
+ door2->SetGoState(GO_STATE_ACTIVE);
+ if (Boss_Killed)
+ if (GameObject* door3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_OUT)))
+ door3->SetGoState(GO_STATE_ACTIVE);
+ }
+
void UpdateAI(uint32 const diff)
{
if (!UpdateVictim())
+
return;
events.Update(diff);
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
index b5b1b34a593..fdb73fe1196 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
@@ -49,6 +49,12 @@ public:
uint64 Gyth;
uint64 TheBeast;
uint64 GeneralDrakkisath;
+ uint64 go_emberseerin;
+ uint64 go_doors;
+ uint64 go_emberseerout;
+ uint64 go_roomrunes[MAX_DRAGONSPIRE_HALL_RUNES];
+ uint8 Runemaxprotectors[MAX_DRAGONSPIRE_HALL_RUNES];
+ uint8 Runeprotectorsdead[MAX_DRAGONSPIRE_HALL_RUNES];
void Initialize()
{
@@ -67,6 +73,9 @@ public:
Gyth = 0;
TheBeast = 0;
GeneralDrakkisath = 0;
+ go_emberseerin = 0;
+ go_doors = 0;
+ go_emberseerout = 0;
}
bool IsEncounterInProgress() const
@@ -125,7 +134,11 @@ public:
case NPC_GENERAL_DRAKKISATH:
GeneralDrakkisath = creature->GetGUID();
break;
- }
+ case NPC_BLACKHAND_DREADWEAVER:
+ case NPC_BLACKHAND_SUMMONER:
+ case NPC_BLACKHAND_VETERAN:
+ break;
+ }
}
void OnGameObjectCreate(GameObject* go)
@@ -135,6 +148,36 @@ public:
case GO_WHELP_SPAWNER:
go->CastSpell(NULL, SPELL_SUMMON_ROOKERY_WHELP);
break;
+ case GO_EMBERSEER_IN:
+ go_emberseerin = go->GetGUID();
+ break;
+ case GO_DOORS:
+ go_doors = go->GetGUID();
+ break;
+ case GO_EMBERSEER_OUT:
+ go_emberseerout = go->GetGUID();
+ break;
+ case GO_ROOM_1_RUNE:
+ go_roomrunes[0] = go->GetGUID();
+ break;
+ case GO_ROOM_2_RUNE:
+ go_roomrunes[1] = go->GetGUID();
+ break;
+ case GO_ROOM_3_RUNE:
+ go_roomrunes[2] = go->GetGUID();
+ break;
+ case GO_ROOM_4_RUNE:
+ go_roomrunes[3] = go->GetGUID();
+ break;
+ case GO_ROOM_5_RUNE:
+ go_roomrunes[4] = go->GetGUID();
+ break;
+ case GO_ROOM_6_RUNE:
+ go_roomrunes[5] = go->GetGUID();
+ break;
+ case GO_ROOM_7_RUNE:
+ go_roomrunes[6] = go->GetGUID();
+ break;
}
}
@@ -167,6 +210,18 @@ public:
return true;
}
+ void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId)
+ {
+ switch (eventId)
+ {
+ case EVENT_PYROGUARD_EMBERSEER:
+ SetBossState(DATA_PYROGAURD_EMBERSEER,IN_PROGRESS);
+ break;
+ default:
+ break;
+ }
+ }
+
uint64 GetData64(uint32 type)
{
switch (type)
@@ -199,6 +254,26 @@ public:
return TheBeast;
case DATA_GENERAL_DRAKKISATH:
return GeneralDrakkisath;
+ case GO_EMBERSEER_IN:
+ return go_emberseerin;
+ case GO_DOORS:
+ return go_doors;
+ case GO_EMBERSEER_OUT:
+ return go_emberseerout;
+ case GO_ROOM_1_RUNE:
+ return go_roomrunes[0];
+ case GO_ROOM_2_RUNE:
+ return go_roomrunes[1];
+ case GO_ROOM_3_RUNE:
+ return go_roomrunes[2];
+ case GO_ROOM_4_RUNE:
+ return go_roomrunes[3];
+ case GO_ROOM_5_RUNE:
+ return go_roomrunes[4];
+ case GO_ROOM_6_RUNE:
+ return go_roomrunes[5];
+ case GO_ROOM_7_RUNE:
+ return go_roomrunes[6];
}
return 0;
@@ -247,30 +322,7 @@ public:
};
-uint8 ActivatedRunes = 0;
-
-class go_dragonspire_hall_rune : public GameObjectScript
-{
-public:
- go_dragonspire_hall_rune() : GameObjectScript("go_dragonspire_hall_rune") { }
-
- void OnGameObjectStateChanged(GameObject* go, uint32 state)
- {
- if (state == GO_STATE_READY)
- {
- if (++ActivatedRunes == MAX_DRAGONSPIRE_HALL_RUNES)
- {
- if (GameObject* door1 = GetClosestGameObjectWithEntry(go, GO_EMBERSEER_IN, 150.0f))
- door1->SetGoState(GO_STATE_ACTIVE);
- if (GameObject* door2 = GetClosestGameObjectWithEntry(go, GO_DOORS, 150.0f))
- door2->SetGoState(GO_STATE_ACTIVE);
- }
- }
- }
-};
-
void AddSC_instance_blackrock_spire()
{
new instance_blackrock_spire();
- new go_dragonspire_hall_rune;
}
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 09ff5935b6e..4e2eb633662 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -1535,7 +1535,7 @@ class spell_item_impale_leviroth : public SpellScriptLoader
void HandleDummy(SpellEffIndex /* effIndex */)
{
if (Unit* target = GetHitCreature())
- if (target->GetEntry() == NPC_LEVIROTH && target->HealthBelowPct(95))
+ if (target->GetEntry() == NPC_LEVIROTH && !target->HealthBelowPct(95))
target->CastSpell(target, SPELL_LEVIROTH_SELF_IMPALE, true);
}