aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_04_18_03_world_creature_loot_template.sql2
-rw-r--r--sql/updates/world/2012_04_18_04_world_pickpocketing_loot_template.sql501
-rw-r--r--sql/updates/world/2012_04_18_05_world_conditions.sql4
-rw-r--r--sql/updates/world/2012_04_18_06_world_creature_template.sql2
-rw-r--r--sql/updates/world/2012_04_18_07_world_fishing_loot_template.sql2
-rw-r--r--sql/updates/world/2012_04_18_08_world_creature_loot_template.sql22
-rw-r--r--sql/updates/world/2012_04_19_00_world_creature_template.sql7
-rw-r--r--sql/updates/world/2012_04_19_01_world_pickpocketing_loot_template.sql202
-rw-r--r--sql/updates/world/2012_04_19_02_world_creature_loot_template.sql2
-rw-r--r--sql/updates/world/2012_04_19_03_world_instance_ulduar.sql174
-rw-r--r--sql/updates/world/2012_04_20_00_world_gameobject_loot_template.sql15
-rw-r--r--sql/updates/world/2012_04_20_01_world_item_loot_template.sql10
-rw-r--r--sql/updates/world/2012_04_20_02_world_creature_loot_template.sql4
-rw-r--r--sql/updates/world/2012_04_20_03_world_creature_loot_template.sql7
-rw-r--r--sql/updates/world/2012_04_20_04_world_creature_loot_template.sql3
-rw-r--r--sql/updates/world/2012_04_20_05_gameobject_template.sql8
-rw-r--r--sql/updates/world/2012_04_21_00_world_spell_script_names.sql14
-rw-r--r--sql/updates/world/2012_04_22_00_world_sai.sql63
-rwxr-xr-xsrc/server/game/AI/EventAI/CreatureEventAI.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp13
-rwxr-xr-xsrc/server/game/Combat/ThreatManager.cpp3
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.cpp6
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.h2
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp3
-rwxr-xr-xsrc/server/game/Entities/Object/Object.h4
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp13
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp4
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.h2
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiersImpl.h25
-rwxr-xr-xsrc/server/game/Maps/Map.h2
-rwxr-xr-xsrc/server/game/Miscellaneous/SharedDefines.h2
-rwxr-xr-xsrc/server/game/Scripting/ScriptLoader.cpp2
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp14
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp29
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.cpp13
-rwxr-xr-xsrc/server/game/Spells/SpellScript.cpp2
-rwxr-xr-xsrc/server/game/Spells/SpellScript.h2
-rw-r--r--src/server/scripts/CMakeLists.txt1
-rw-r--r--src/server/scripts/Northrend/CMakeLists.txt2
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp31
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp376
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp1374
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp8
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp270
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h226
-rw-r--r--src/server/scripts/Outland/boss_doomlord_kazzak.cpp37
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp40
-rw-r--r--src/server/scripts/World/npcs_special.cpp167
-rw-r--r--src/server/shared/Debugging/WheatyExceptionReport.cpp18
49 files changed, 2978 insertions, 757 deletions
diff --git a/sql/updates/world/2012_04_18_03_world_creature_loot_template.sql b/sql/updates/world/2012_04_18_03_world_creature_loot_template.sql
new file mode 100644
index 00000000000..5ad26809cdf
--- /dev/null
+++ b/sql/updates/world/2012_04_18_03_world_creature_loot_template.sql
@@ -0,0 +1,2 @@
+-- Increase dropchance for Venture Co. Explosives
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=-10 WHERE `entry` IN(28123,28124) AND `item`=39651;
diff --git a/sql/updates/world/2012_04_18_04_world_pickpocketing_loot_template.sql b/sql/updates/world/2012_04_18_04_world_pickpocketing_loot_template.sql
new file mode 100644
index 00000000000..ab1c562f7dd
--- /dev/null
+++ b/sql/updates/world/2012_04_18_04_world_pickpocketing_loot_template.sql
@@ -0,0 +1,501 @@
+-- implement missing Northrend pickpocket loot
+-- reference IDs
+SET @NEWREF0 := 10026;
+SET @NEWREF1 := @NEWREF0+1;
+SET @NEWREF2 := @NEWREF0+2;
+SET @NEWREF3 := @NEWREF0+3;
+SET @NEWREF4 := @NEWREF0+4;
+SET @NEWREF5 := @NEWREF0+5;
+SET @NEWREF6 := @NEWREF0+6;
+SET @NEWREF7 := @NEWREF0+7;
+SET @NEWREF8 := @NEWREF0+8;
+SET @NEWREF9 := @NEWREF0+9;
+-- new references
+DELETE FROM `reference_loot_template` WHERE entry IN (@NEWREF0, @NEWREF1, @NEWREF2, @NEWREF3, @NEWREF4, @NEWREF5, @NEWREF6, @NEWREF7, @NEWREF8, @NEWREF9);
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`mincountOrRef`,`maxcount`) VALUES
+(@NEWREF0,33447,25,1,1),-- Runic Healing Potion
+(@NEWREF0,35953,30,1,1),-- Mead Basted Caribou
+(@NEWREF0,38260,50,1,1),-- Empty Tobacco Pouch
+(@NEWREF0,43575,80,1,1),-- Reinforced Junkbox
+(@NEWREF1,36862,4,1,1),-- Wrogn Troll Dice
+(@NEWREF1,40202,20,1,1),-- Sizzling Grizzly Flank
+(@NEWREF2,33452,30,1,1),-- Honey-Spiced Lichen
+(@NEWREF2,38269,35,1,1),-- Soggy Handkerchief
+(@NEWREF3,33454,15,1,1),-- Salted Venison
+(@NEWREF3,38261,13,1,1),-- Ben House Key
+(@NEWREF4,38263,19,1,1),-- Too-Small Amband
+(@NEWREF4,38264,18,1,1),-- A Very Pretty Rock
+(@NEWREF5,29448,9,1,1),-- Mag'har Mild Cheese
+(@NEWREF5,29450,13,1,1),-- Telaari Grapes
+(@NEWREF5,37467,40,1,1),-- A Steamy Romance Novel: Forbidden Love
+(@NEWREF6,35947,25,1,1),-- Sparkling Frostcap
+(@NEWREF6,38269,40,1,1),-- Soggy Handkerchief
+(@NEWREF7,33447,25,1,1),-- Runic Healing Potion
+(@NEWREF7,35947,25,1,1),-- Sparkling Frostcap
+(@NEWREF7,38269,40,1,1),-- Soggy Handkerchief
+(@NEWREF7,43575,80,1,1),-- Reinforced Junkbox
+(@NEWREF8,35948,11,1,1),-- Savory Snowplum
+(@NEWREF8,35950,9,1,1),-- Sweet Potato Bread
+(@NEWREF8,35952,8,1,1),-- Briny Hardcheese
+(@NEWREF9,33447,25,1,1),-- Runic Healing Potion
+(@NEWREF9,38260,50,1,1),-- Empty Tobacco Pouch
+(@NEWREF9,43575,80,1,1); -- Reinforced Junkbox
+-- implement pickpokect loot
+UPDATE `creature_template` SET `pickpocketloot`=entry WHERE `entry` IN (25800,23667,23674,23760,23796,23865,23875,23963,24069,24262,24400,24460,25351,25427,25428,25429,25430,25601,25801,26073,26202,26334,26413,26447,26480,26481,26620,26621,26624,26626,26635,26636,26637,26639,26658,26681,26696,26727,26729,26800,26802,26836,26948,27105,27210,27211,/**/27234,27235,27247,27278,27289,27334,27342,27431,27533,27580,27639,27640,27699,27800,27859,27860,27961,27964,27965,28494,28496,28565,28803,28837,28838,28848,28961,28965,29369,29407,29553,29554,29656,29793,29820,29822,29836,29874,29875,29885,29920,30283,30319,30856,30868,31396,31554,32263);
+UPDATE `creature_template` SET `pickpocketloot`=25430 WHERE `entry` IN (23654,23656,23663,23665,25434,26728,26827,26926,27554,32572);
+UPDATE `creature_template` SET `pickpocketloot`=26481 WHERE `entry` IN (23662,23940,24016,24161,26493,26655,27007,27009);
+UPDATE `creature_template` SET `pickpocketloot`=25351 WHERE `entry` IN (23993,24540,25224,25383,26343,26492,26891,26946,27224,27226,27283,27360,27552,27799,27823,27826,28564,28750);
+UPDATE `creature_template` SET `pickpocketloot`=27533 WHERE `entry` IN (26555,26669,26670,26694,26830,27871,28022,28108,28242,28268,28419,29123,29133,29722,29738,30701,30894,30922,30949,31139,31150,31779,31847,32278,32505);
+UPDATE `creature_template` SET `pickpocketloot`=30319 WHERE `entry` IN (30111,30179);
+DELETE FROM `pickpocketing_loot_template` WHERE entry IN (25800,23656,23662,23663,23665,23667,23674,23760,23796,23865,23875,23940,23963,23993,24016,24069,24161,24262,24400,24460,24540,25224,25351,25383,25427,25428,25429,25430,25434,25601,25801,26073,26202,26334,26343,26413,26447,26480,26481,26492,26493,26555,26620,26621,26624,26626,26635,26636,26637,26639,26655,26658,26669,26670,26681,26694,26696,26727,26728,26729,26800,26802,26827,26830,26836,26891,26926,26946,26948,27007,27009,27105,27210,27211,27224,27226,27234,27235,27247,27278,27283,27289,27334,27342,27360,27431,27533,27552,27554,27580,27639,27640,27699,27799,27800,27823,27826,27859,27860,27871,27961,27964,27965,28022,28108,28242,28268,28419,28494,28496,28564,28565,28750,28803,28837,28838,28848,28961,28965,29123,29133,29369,29407,29553,29554,29656,29722,29738,29793,29820,29822,29836,29874,29875,29885,29920,30111,30179,30283,30319,30701,30856,30868,30894,30922,30949,31139,31150,31396,31554,31779,31847,32263,32278,32505,32572);
+INSERT INTO `pickpocketing_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- Plague Walker
+(30283,43575,100,0,1,1),-- Reinforced Junkbox
+(30283,0,100,0,-@NEWREF6,1),
+-- Twilight Darkcaster
+(30319,0,100,0,-@NEWREF0,1),
+(30319,33449,11,0,1,1),-- Crusty Flatbread
+(30319,1,100,0,-@NEWREF1,1),
+(30319,2,100,0,-@NEWREF3,1),
+-- High Priest Talet-Kha
+(26073,43575,58,0,1,1),-- Reinforced Junkbox
+(26073,0,100,0,-@NEWREF5,1),
+(26073,33449,8,0,1,1),-- Crusty Flatbread
+(26073,33447,8,0,1,1),-- Runic Healing Potion
+-- Nedar, Lord of Rhinos
+(25801,0,100,0,-@NEWREF5,1),
+(25801,33447,6,0,1,1),-- Runic Healing Potion
+(25801,38261,6,0,1,1),-- Bent House Key
+-- Clam Master K
+(25800,43575,47,0,1,1),-- Reinforced Junkbox
+(25800,0,100,0,-@NEWREF5,1),
+(25800,38261,15,0,1,1),-- Bent House Key
+(25800,33449,5,0,1,1),-- Crusty Flatbread
+(25800,33447,5,0,1,1),-- Runic Healing Potion
+-- Magmothregar
+(25430,0,100,0,-@NEWREF3,1),
+(25430,1,100,0,-@NEWREF9,1),
+(25430,33449,7,0,1,1),-- Crusty Flatbread
+(25430,36862,4,0,1,1),-- Wrogn Troll Dice
+-- Kaganishu
+(25427,43575,43,0,1,1),-- Reinforced Junkbox
+(25427,33454,35,0,1,1),-- Salted Venison
+(25427,0,100,0,-@NEWREF4,1),
+(25427,33447,8,0,1,1),-- Runic Healing Potion
+-- Prince Valanar
+(25601,43575,43,0,1,1),-- Reinforced Junkbox
+(25601,37467,39,0,1,1),-- A Steamy Romance Novel: Forbidden Love
+(25601,33447,9,0,1,1),-- Runic Healing Potion
+(25601,38261,9,0,1,1),-- Bent House Key
+(25601,33449,4,0,1,1),-- Crusty Flatbread
+(25601,29450,4,0,1,1),-- Telaari Grapes
+-- Ghostly Sage
+(25351,43575,42,0,1,1),-- Reinforced Junkbox
+(25351,0,100,0,-@NEWREF2,1),
+(25351,33447,10,0,1,1),-- Runic Healing Potion
+-- Luthion the Vile
+(27860,43575,42,0,1,1),-- Reinforced Junkbox
+(27860,0,100,0,-@NEWREF5,1),
+(27860,38261,13,0,1,1),-- Bent House Key
+(27860,33449,6,0,1,1),-- Crusty Flatbread
+(27860,33447,6,0,1,1),-- Runic Healing Potion
+-- Reckless Scavenger
+(26658,0,100,0,-@NEWREF2,1),
+(26658,43575,40,0,1,1),-- Reinforced Junkbox
+-- Ziggurat Defender
+(26202,43575,40,0,1,1),-- Reinforced Junkbox
+(26202,0,100,0,-@NEWREF2,1),
+(26202,33447,7,0,1,1),-- Runic Healing Potion
+(26202,29569,3,0,1,1),-- Strong Junkbox
+-- Magmoth Forager
+(25429,43575,39,0,1,1),-- Reinforced Junkbox
+(25429,33454,27,0,1,1),-- Salted Venison
+(25429,0,100,0,-@NEWREF4,1),
+(25429,33447,10,0,1,1),-- Runic Healing Potion
+(25429,38266,0.5,0,1,1),-- Rotund Relic
+-- Magmoth Shaman
+(25428,43575,39,0,1,1),-- Reinforced Junkbox
+(25428,33454,28,0,1,1),-- Salted Venison
+(25428,0,100,0,-@NEWREF4,1),
+(25428,33447,9,0,1,1),-- Runic Healing Potion
+(25428,38266,0.5,0,1,1),-- Rotund Relic
+-- Vanthryn the Merciless
+(27859,43575,39,0,1,1),-- Reinforced Junkbox
+(27859,0,100,0,-@NEWREF5,1),
+(27859,33449,12,0,1,1),-- Crusty Flatbread
+(27859,38261,12,0,1,1),-- Bent House Key
+(27859,33447,3,0,1,1),-- Runic Healing Potion
+-- Unbound Corrupter
+(30868,43575,47,0,1,1),-- Reinforced Junkbox
+(30868,40202,18,0,1,1),-- Sizzling Grizzly Flank
+(30868,33447,16,0,1,1),-- Runic Healing Potion
+(30868,0,100,0,-@NEWREF4,1),
+-- Unbound Trickster
+(30856,43575,38,0,1,1),-- Reinforced Junkbox
+(30856,0,100,0,-@NEWREF4,1),
+(30856,33447,19,0,1,1),-- Runic Healing Potion
+(30856,40202,14,0,1,1),-- Sizzling Grizzly Flank
+-- Kreug Oathbreaker
+(27105,43575,63,0,1,1),-- Reinforced Junkbox
+(27105,33447,25,0,1,1),-- Runic Healing Potion
+(27105,38269,13,0,1,1),-- Soggy Handkerchief
+-- Lead Cannoneer Zierhut
+(27235,43575,53,0,1,1),-- Reinforced Junkbox
+(27235,0,100,0,-@NEWREF5,1),
+(27235,33447,8,0,1,1),-- Runic Healing Potion
+(27235,38261,8,0,1,1),-- Bent House Key
+-- Devout Bodyguard
+(27247,43575,50,0,1,1),-- Reinforced Junkbox
+(27247,37467,42,0,1,1),-- A Steamy Romance Novel: Forbidden Love
+(27247,33447,8,0,1,1),-- Runic Healing Potion
+(27247,29450,8,0,1,1),-- Telaari Grapes
+(27247,38261,8,0,1,1),-- Bent House Key
+-- Magnataur Alpha
+(26481,0,100,0,-@NEWREF9,1),
+(26481,1,100,0,-@NEWREF3,1),
+(26481,33449,5,0,1,1),-- Crusty Flatbread
+-- High General Abbendis
+(27210,43575,48,0,1,1),-- Reinforced Junkbox
+(27210,0,100,0,-@NEWREF5,1),
+(27210,33449,10,0,1,1),-- Crusty Flatbread
+(27210,33447,10,0,1,1),-- Runic Healing Potion
+(27210,38261,8,0,1,1),-- Bent House Key
+-- Anub'ar Dreadweaver
+(26413,43575,44,0,1,1),-- Reinforced Junkbox
+(26413,43576,22,0,1,1),-- Chitin Polish
+(26413,33452,11,0,1,1),-- Honey-Spiced Lichen
+(26413,33447,11,0,1,1),-- Runic Healing Potion
+(26413,43577,11,0,1,1),-- Carapace Cleanser
+-- Naxxramas Necrolord
+(27289,33452,44,0,1,1),-- Honey-Spiced Lichen
+(27289,43575,44,0,1,1),-- Reinforced Junkbox
+(27289,33447,11,0,1,1),-- Runic Healing Potion
+-- Onslaught Commander Iustus
+(27334,37467,50,0,1,1),-- A Steamy Romance Novel: Forbidden Love
+(27334,43575,44,0,1,1),-- Reinforced Junkbox
+(27334,29448,13,0,1,1),-- Mag'har Mild Cheese
+(27334,38261,6,0,1,1),-- Bent House Key
+-- Blacksmith Goodman
+(27234,43575,41,0,1,1),-- Reinforced Junkbox
+(27234,0,100,0,-@NEWREF5,1),
+(27234,38261,13,0,1,1),-- Bent House Key
+(27234,33447,9,0,1,1),-- Runic Healing Potion
+(27234,33449,7,0,1,1),-- Crusty Flatbread
+-- Magnataur Youngling
+(26480,33449,19,0,1,1),-- Crusty Flatbread
+(26480,0,100,0,-@NEWREF3,1),
+(26480,1,100,0,-@NEWREF9,1),
+-- Bloodpaw Warrior
+(27342,43575,40,0,1,1),-- Reinforced Junkbox
+(27342,33454,26,0,1,1),-- Salted Venison
+(27342,0,100,0,-@NEWREF4,1),
+(27342,33447,11,0,1,1),-- Runic Healing Potion
+(27342,38266,0.6,0,1,1),-- Rotund Relic
+-- Frigid Geist
+(27533,0,100,0,-@NEWREF7,1),
+-- Snowplain Zealot
+(27278,43575,40,0,1,1),-- Reinforced Junkbox
+(27278,33454,22,0,1,1),-- Salted Venison
+(27278,0,100,0,-@NEWREF4,1),
+(27278,33447,12,0,1,1),-- Runic Healing Potion
+(27278,38266,0.3,0,1,1),-- Rotund Relic
+-- Hulking Atrocity
+(26948,43575,39,0,1,1),-- Reinforced Junkbox
+(26948,0,100,0,-@NEWREF2,1),
+(26948,33447,9,0,1,1),-- Runic Healing Potion
+(26948,29569,0.3,0,1,1),-- Strong Junkbox
+(26948,38268,0.3,0,1,1),-- Spare Hand
+-- Onslaught Executioner
+(27211,43575,39,0,1,1),-- Reinforced Junkbox
+(27211,0,100,0,-@NEWREF5,1),
+(27211,33449,12,0,1,1),-- Crusty Flatbread
+(27211,38261,11,0,1,1),-- Bent House Key
+(27211,33447,5,0,1,1),-- Runic Healing Potion
+-- Gigantaur
+(26836,0,100,0,-@NEWREF9,1),
+(26836,1,100,0,-@NEWREF3,1),
+(26836,33449,12,0,1,1),-- Crusty Flatbread
+-- Leprous Servant
+(27800,43575,38,0,1,1),-- Reinforced Junkbox
+(27800,0,100,0,-@NEWREF2,1),
+(27800,33447,7,0,1,1),-- Runic Healing Potion
+(27800,38268,2,0,1,1),-- Spare Hand
+-- Wretched Belcher
+(26624,43575,100,0,1,1),-- Reinforced Junkbox
+(26624,0,100,0,-@NEWREF2,1),
+(26624,33447,25,0,1,1),-- Runic Healing Potion
+(26624,35947,25,0,1,1),-- Sparkling Frostcap
+-- Drakkari Commander
+(27431,43575,90,0,1,1),-- Reinforced Junkbox
+(27431,0,100,0,-@NEWREF2,1),
+(27431,33447,26,0,1,1),-- Runic Healing Potion
+(27431,35947,10,0,1,1),-- Sparkling Frostcap
+-- Drakkari Guardian
+(26620,0,100,0,-@NEWREF0,1),
+(26620,33454,17,0,1,1),-- Salted Venison
+(26620,33449,9,0,1,1),-- Crusty Flatbread
+(26620,38261,9,0,1,1),-- Bent House Key
+(26620,1,100,0,-@NEWREF1,1),
+-- Risen Drakkari Soulmage
+(26636,43575,85,0,1,1),-- Reinforced Junkbox
+(26636,0,100,0,-@NEWREF2,1),
+(26636,35947,21,0,1,1),-- Sparkling Frostcap
+(26636,33447,16,0,1,1),-- Runic Healing Potion
+-- Ghoul Tormentor
+(26621,43575,81,0,1,1),-- Reinforced Junkbox
+(26621,0,100,0,-@NEWREF2,1),
+(26621,35947,24,0,1,1),-- Sparkling Frostcap
+(26621,33447,14,0,1,1),-- Runic Healing Potion
+-- Risen Drakkari Warrior
+(26635,43575,71,0,1,1),-- Reinforced Junkbox
+(26635,0,100,0,-@NEWREF2,1),
+(26635,33447,29,0,1,1),-- Runic Healing Potion
+(26635,35947,18,0,1,1),-- Sparkling Frostcap
+(26635,38268,0.8,0,1,1),-- Spare Hand
+-- Risen Drakkari Handler
+(26637,0,100,0,-@NEWREF2,1),
+(26637,43575,67,0,1,1),-- Reinforced Junkbox
+(26637,33447,30,0,1,1),-- Runic Healing Potion
+(26637,35947,18,0,1,1),-- Sparkling Frostcap
+-- Scourge Reanimator
+(26626,0,100,0,-@NEWREF2,1),
+(26626,43575,67,0,1,1),-- Reinforced Junkbox
+(26626,33447,21,0,1,1),-- Runic Healing Potion
+(26626,35947,21,0,1,1),-- Sparkling Frostcap
+-- Drakkari Shaman
+(26639,0,100,0,-@NEWREF0,1),
+(26639,33449,18,0,1,1),-- Crusty Flatbread
+(26639,1,100,0,-@NEWREF3,1),
+(26639,40202,11,0,1,1),-- Sizzling Grizzly Flank
+-- Selas
+(27580,43575,50,0,1,1),-- Reinforced Junkbox
+(27580,0,100,0,-@NEWREF3,1),
+(27580,38260,20,0,1,1),-- Empty Tobacco Pouch
+-- Forgemaster Damrath
+(26334,43575,48,0,1,1),-- Reinforced Junkbox
+(26334,0,100,0,-@NEWREF5,1),
+(26334,33447,9,0,1,1),-- Runic Healing Potion
+(26334,38261,9,0,1,1),-- Bent House Key
+-- Grumbald One-Eye
+(26681,43575,39,0,1,1),-- Reinforced Junkbox
+(26681,33454,28,0,1,1),-- Salted Venison
+(26681,0,100,0,-@NEWREF4,1),
+(26681,33447,9,0,1,1),-- Runic Healing Potion
+-- Drakkari Shaman
+(26447,0,100,0,-@NEWREF9,1),
+(26447,1,100,0,-@NEWREF3,1),
+(26447,33449,10,0,1,1),-- Crusty Flatbread
+(26447,35799,0.2,0,1,1),-- Frozen Mojo
+(26447,36862,0.2,0,1,1),-- Wrogn Troll Dice
+-- Drakkari God Hunter
+(29820,0,100,0,-@NEWREF0,1),
+(29820,1,100,0,-@NEWREF1,1),
+-- Drakkari Battle Rider
+(29836,0,100,0,-@NEWREF0,1),
+(29836,40202,18,0,1,1),-- Sizzling Grizzly Flank
+-- Ruins Dweller
+(29920,43575,71,0,1,1),-- Reinforced Junkbox
+(29920,37452,69,0,1,1),-- Fatty Bluefin
+(29920,38274,58,0,1,1),-- Large Snail Shell
+(29920,38273,35,0,1,1),-- Brain Coral
+(29920,33447,16,0,1,1),-- Runic Healing Potion
+-- Drakkari Fire Weaver
+(29822,0,100,0,-@NEWREF0,1),
+(29822,40202,24,0,1,1),-- Sizzling Grizzly Flank
+-- Drakkari Inciter
+(29874,0,100,0,-@NEWREF0,1),
+(29874,36862,16,0,1,1),-- Wrogn Troll Dice
+(29874,40202,12,0,1,1),-- Sizzling Grizzly Flank
+-- Titanium Siegebreaker
+(28961,0,100,0,-@NEWREF0,1),
+(28961,40202,35,0,1,1),-- Sizzling Grizzly Flank
+-- Stormforged Sentinel
+(28837,0,100,0,-@NEWREF0,1),
+(28837,40202,16,0,1,1),-- Sizzling Grizzly Flank
+-- Titanium Thunderer
+(28965,0,100,0,-@NEWREF0,1),
+(28965,40202,44,0,1,1),-- Sizzling Grizzly Flank
+-- Titanium Vanguard
+(28838,0,100,0,-@NEWREF0,1),
+(28838,40202,27,0,1,1),-- Sizzling Grizzly Flank
+-- Dark Rune Scholar
+(27964,0,100,0,-@NEWREF9,1),
+(27964,1,100,0,-@NEWREF1,1),
+-- Dark Rune Worker
+(27961,0,100,0,-@NEWREF0,1),
+(27961,40202,29,0,1,1),-- Sizzling Grizzly Flank
+(27961,36862,4,0,1,1),-- Wrogn Troll Dice
+-- Dark Rune Shaper
+(27965,0,100,0,-@NEWREF0,1),
+(27965,40202,28,0,1,1),-- Sizzling Grizzly Flank
+-- Steel Gate Archaeologist
+(24400,0,100,0,-@NEWREF0,1),
+(24400,1,100,0,-@NEWREF5,1),
+(24400,33449,7,0,1,1),-- Crusty Flatbread
+(24400,38261,9,0,1,1),-- Bent House Key
+-- Blacksouled Keeper
+(23875,0,100,0,-@NEWREF0,1),
+(23875,1,100,0,-@NEWREF3,1),
+(23875,33449,14,0,1,1),-- Crusty Flatbread
+-- Winterskorn Rune-Seer
+(23667,0,100,0,-@NEWREF0,1),
+(23667,33449,7,0,1,1),-- Crusty Flatbread
+(23667,33454,7,0,1,1),-- Salted Venison
+-- Sergeant Lorric
+(23963,43575,45,0,1,1),-- Reinforced Junkbox
+(23963,0,100,0,-@NEWREF5,1),
+(23963,33447,13,0,1,1),-- Runic Healing Potion
+(23963,38261,11,0,1,1),-- Bent House Key
+(23963,33449,7,0,1,1),-- Crusty Flatbread
+-- Gjalerhorn Scavenger
+(27699,0,100,0,-@NEWREF4,1),
+(27699,43575,43,0,1,1),-- Reinforced Junkbox
+(27699,33454,22,0,1,1),-- Salted Venison
+(27699,33447,7,0,1,1),-- Runic Healing Potion
+(27699,29569,0.8,0,1,1),-- Strong Junkbox
+-- Iron Rune Binder
+(23796,0,100,0,-@NEWREF5,1),
+(23796,43575,42,0,1,1),-- Reinforced Junkbox
+(23796,38261,12,0,1,1),-- Bent House Key
+(23796,33449,11,0,1,1),-- Crusty Flatbread
+(23796,33447,9,0,1,1),-- Runic Healing Potion
+(23796,29569,0.5,0,1,1),-- Strong Junkbox
+-- Forsaken Plaguebringer
+(23760,0,100,0,-@NEWREF2,1),
+(23760,43575,41,0,1,1),-- Reinforced Junkbox
+(23760,33447,10,0,1,1),-- Runic Healing Potion
+(23760,38268,0.3,0,1,1),-- Spare Hand
+-- Chillmere Tidehunter
+(24460,43575,40,0,1,1),-- Reinforced Junkbox
+(24460,38274,33,0,1,1),-- Large Snail Shell
+(24460,37452,18,0,1,1),-- Fatty Bluefin
+(24460,38273,15,0,1,1),-- Brain Coral
+(24460,33447,7,0,1,1),-- Runic Healing Potion
+-- Vrykul Soul
+(24262,0,100,0,-@NEWREF2,1),
+(24262,43575,40,0,1,1),-- Reinforced Junkbox
+(24262,33447,3,0,1,1),-- Runic Healing Potion
+-- Iron Rune Sage
+(23674,0,100,0,-@NEWREF5,1),
+(23674,43575,39,0,1,1),-- Reinforced Junkbox
+(23674,38261,13,0,1,1),-- Bent House Key
+(23674,33449,9,0,1,1),-- Crusty Flatbread
+(23674,33447,6,0,1,1),-- Runic Healing Potion
+-- Vengeance Bringer
+(23865,43575,39,0,1,1),-- Reinforced Junkbox
+(23865,0,100,0,-@NEWREF2,1),
+-- Restless Lookout
+(31554,43575,80,0,1,1),-- Reinforced Junkbox
+(31554,35947,40,0,1,1),-- Sparkling Frostcap
+-- Val'kyr Taskmistress
+(31396,43575,56,0,1,1),-- Reinforced Junkbox
+(31396,35947,38,0,1,1),-- Sparkling Frostcap
+(31396,33447,15,0,1,1),-- Runic Healing Potion
+-- Overseer Veraj
+(32263,43575,42,0,1,1),-- Reinforced Junkbox
+(32263,37467,28,0,1,1),-- A Steamy Romance Novel: Forbidden Love
+(32263,38261,15,0,1,1),-- Bent House Key
+(32263,33447,13,0,1,1),-- Runic Healing Potion
+(32263,0,100,0,-@NEWREF8,1),
+-- Steward
+(26729,0,100,0,-@NEWREF0,1),
+(26729,1,100,0,-@NEWREF3,1),
+(26729,33449,31,0,1,1),-- Crusty Flatbread
+(26729,29569,0.5,0,1,1),-- Strong Junkbox
+-- Alliance Berserker
+(26800,43575,62,0,1,1),-- Reinforced Junkbox
+(26800,33449,19,0,1,1),-- Crusty Flatbread
+(26800,38261,16,0,1,1),-- Bent House Key
+(26800,33447,10,0,1,1),-- Runic Healing Potion
+(26800,0,100,0,-@NEWREF5,1),
+-- Alliance Ranger
+(26802,0,100,0,-@NEWREF5,1),
+(26802,43575,60,0,1,1),-- Reinforced Junkbox
+(26802,38261,34,0,1,1),-- Bent House Key
+(26802,33449,24,0,1,1),-- Crusty Flatbread
+(26802,33447,12,0,1,1),-- Runic Healing Potion
+-- Mage Hunter Ascendant
+(26727,0,100,0,-@NEWREF0,1),
+(26727,1,100,0,-@NEWREF3,1),
+(26727,33449,29,0,1,1),-- Crusty Flatbread
+-- Ring-Lord Sorceress
+(27639,43575,87,0,1,1),-- Reinforced Junkbox
+(27639,37467,46,0,1,1),-- A Steamy Romance Novel: Forbidden Love
+(27639,38261,28,0,1,1),-- Bent House Key
+(27639,33447,19,0,1,1),-- Runic Healing Potion
+(27639,0,100,0,-@NEWREF8,1),
+(27639,36863,1.6,0,1,1),-- Decahedral Dwarven Dice
+-- Ring-Lord Conjurer
+(27640,37467,67,0,1,1),-- A Steamy Romance Novel: Forbidden Love
+(27640,43575,64,0,1,1),-- Reinforced Junkbox
+(27640,33447,30,0,1,1),-- Runic Healing Potion
+(27640,38261,26,0,1,1),-- Bent House Key
+(27640,0,100,0,-@NEWREF8,1),
+-- Mildred the Cruel
+(29885,0,100,0,-@NEWREF0,1),
+(29885,40202,13,0,1,1),-- Sizzling Grizzly Flank
+-- Snowblind Devotee
+(29407,43575,42,0,1,1),-- Reinforced Junkbox
+(29407,40202,29,0,1,1),-- Sizzling Grizzly Flank
+(29407,0,100,0,-@NEWREF4,1),
+(29407,33447,12,0,1,1),-- Runic Healing Potion
+-- Snowblind Devotee
+(29554,43575,43,0,1,1),-- Reinforced Junkbox
+(29554,40202,27,0,1,1),-- Sizzling Grizzly Flank
+(29554,0,100,0,-@NEWREF4,1),
+(29554,33447,12,0,1,1),-- Runic Healing Potion
+(29554,38266,0.2,0,1,1),-- Rotund Relic
+-- Frostfeather Witch
+(29793,43575,40,0,1,1),-- Reinforced Junkbox
+(29793,40202,21,0,1,1),-- Sizzling Grizzly Flank
+(29793,0,100,0,-@NEWREF4,1),
+(29793,33447,16,0,1,1),-- Runic Healing Potion
+-- Icemane Yeti
+(29875,43575,39,0,1,1),-- Reinforced Junkbox
+(29875,40202,23,0,1,1),-- Sizzling Grizzly Flank
+(29875,0,100,0,-@NEWREF4,1),
+(29875,33447,15,0,1,1),-- Runic Healing Potion
+(29875,38266,0.3,0,1,1),-- Rotund Relic
+-- Garm Watcher
+(29553,0,100,0,-@NEWREF0,1),
+(29553,1,100,0,-@NEWREF1,1),
+(29553,24231,0.3,0,2,2),-- Coarse Snuff
+-- Stormforged Taskmaster
+(29369,43575,38,0,1,1),-- Reinforced Junkbox
+(29369,37467,34,0,1,1),-- A Steamy Romance Novel: Forbidden Love
+(29369,33447,13,0,1,1),-- Runic Healing Potion
+(29369,38261,6,0,1,1),-- Bent House Key
+(29369,0,100,0,-@NEWREF8,1),
+-- Dragonflayer Bonecrusher
+(24069,0,100,0,-@NEWREF0,1),
+(24069,1,100,0,-@NEWREF1,1),
+(24069,29569,47,0,1,1),-- Strong Junkbox
+(24069,29570,34,0,1,1),-- A Gnome Effigy
+(24069,27855,22,0,1,1),-- Mag'har Grainbread
+(24069,27854,19,0,1,1),-- Smoked Talbuk Venison
+(24069,22829,10,0,1,1),-- Super Healing Potion
+(24069,23438,1.2,0,1,1),-- Star of Elune
+-- Ymirjar Berserker
+(26696,0,100,0,-@NEWREF7,1),
+(26696,29569,1.1,0,1,1),-- Strong Junkbox
+-- Kutube'sa
+(28494,0,100,0,-@NEWREF0,1),
+(28494,1,100,0,-@NEWREF1,1),
+-- Chulo the Mad
+(28496,0,100,0,-@NEWREF0,1),
+(28496,40202,6,0,1,1),-- Sizzling Grizzly Flank
+-- Drakuru's Guard
+(28803,43575,50,0,1,1),-- Reinforced Junkbox
+(28803,33447,33,0,1,1),-- Runic Healing Potion
+(28803,38269,17,0,1,1),-- Soggy Handkerchief
+-- Prophet of Har'koa
+(28848,0,100,0,-@NEWREF0,1),
+(28848,40202,3,0,1,1),-- Sizzling Grizzly Flank
+-- Decaying Ghoul
+(28565,0,100,0,-@NEWREF7,1),
+(28565,22829,0.9,0,1,1),-- Super Healing Potion
+-- Drakuru Berserker
+(29656,0,100,0,-@NEWREF0,1),
+(29656,1,100,0,-@NEWREF3,1),
+(29656,33449,11,0,1,1),-- Crusty Flatbread
+(29656,29569,0.9,0,1,1); -- Strong Junkbox
diff --git a/sql/updates/world/2012_04_18_05_world_conditions.sql b/sql/updates/world/2012_04_18_05_world_conditions.sql
new file mode 100644
index 00000000000..ecf80f270a3
--- /dev/null
+++ b/sql/updates/world/2012_04_18_05_world_conditions.sql
@@ -0,0 +1,4 @@
+-- Add condition to the Lovely Charm aura
+DELETE FROM conditions WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`= 69511;
+INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, ScriptName, COMMENT) VALUES
+(17,0,69511,0,12,8,0,0,0, '', 'Lovely Charm - Only during event');
diff --git a/sql/updates/world/2012_04_18_06_world_creature_template.sql b/sql/updates/world/2012_04_18_06_world_creature_template.sql
new file mode 100644
index 00000000000..8c167c2ffa1
--- /dev/null
+++ b/sql/updates/world/2012_04_18_06_world_creature_template.sql
@@ -0,0 +1,2 @@
+-- Remove Skinning loot from Blackwing Spellbinder
+UPDATE `creature_template` SET `skinloot`=0 WHERE `entry`=12457;
diff --git a/sql/updates/world/2012_04_18_07_world_fishing_loot_template.sql b/sql/updates/world/2012_04_18_07_world_fishing_loot_template.sql
new file mode 100644
index 00000000000..6c39cc95b48
--- /dev/null
+++ b/sql/updates/world/2012_04_18_07_world_fishing_loot_template.sql
@@ -0,0 +1,2 @@
+-- update wrong area.
+UPDATE `fishing_loot_template` SET `entry`=4560 WHERE `entry`=4395 AND `item`=11026;
diff --git a/sql/updates/world/2012_04_18_08_world_creature_loot_template.sql b/sql/updates/world/2012_04_18_08_world_creature_loot_template.sql
new file mode 100644
index 00000000000..4b00685ed55
--- /dev/null
+++ b/sql/updates/world/2012_04_18_08_world_creature_loot_template.sql
@@ -0,0 +1,22 @@
+-- Add loot for Hrothgar's Landing
+DELETE FROM `creature_loot_template` WHERE `entry` IN (34980,34838,34839,34965);
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- AURIAYA 10-man
+-- Drottinn Hrothgar - http://old.wowhead.com/npc=34980
+(34980,46859,-100,1,0,1,1), -- Stolen Tallstrider Leg
+-- Kvaldir Reaver
+(34838,46859,-100,1,0,1,1), -- Stolen Tallstrider Leg
+(34838,49676,5,1,0,1,1), -- Kvaldir Attack Plans
+(34838,33470,35,1,0,1,4), -- 1-4x Frostweave Cloth
+(34838,1,10,1,0,-24727,1), -- 1 of Northrend scrolls
+(34838,2,10,1,0,-26002,1), -- Northrend Grey Item Reference1
+(34838,3,2,1,0,-35080,1), -- Northrend Green Item Reference
+-- Kvaldir Mist Binder
+(34839,46859,-100,1,0,1,1), -- Stolen Tallstrider Leg
+(34839,49676,5,1,0,1,1), -- Kvaldir Attack Plans
+(34839,33470,35,1,0,1,4), -- 1-4x Frostweave Cloth
+(34839,1,10,1,0,-24727,1), -- 1 of Northrend scrolls
+(34839,2,10,1,0,-26002,1), -- Northrend Grey Item Reference1
+(34839,3, 2,1,0,-35080,1), -- Northrend Green Item Reference
+-- Mistcaller Yngvar
+(34965,46859,-100,1,0,1,1); -- Stolen Tallstrider Leg
diff --git a/sql/updates/world/2012_04_19_00_world_creature_template.sql b/sql/updates/world/2012_04_19_00_world_creature_template.sql
new file mode 100644
index 00000000000..e9abd40095e
--- /dev/null
+++ b/sql/updates/world/2012_04_19_00_world_creature_template.sql
@@ -0,0 +1,7 @@
+-- update Plague Slime & Marauding Geist to naxx25 trash lootid
+UPDATE `creature_template` SET `lootid`=100005 WHERE `entry` IN(29575,30424);
+-- update Plague Slime & Marauding Geist to naxx10 trash lootid
+UPDATE `creature_template` SET `lootid`=100003 WHERE `entry` IN(16243,30083);
+DELETE FROM `creature_loot_template` WHERE `entry` IN(30424,29575,16243,30083);
+-- Remove scraps for naxx10 from creature creature_loot_template
+DELETE FROM `creature_loot_template` WHERE `item` IN (22373,22374,22375,22376);
diff --git a/sql/updates/world/2012_04_19_01_world_pickpocketing_loot_template.sql b/sql/updates/world/2012_04_19_01_world_pickpocketing_loot_template.sql
new file mode 100644
index 00000000000..997b16ff65d
--- /dev/null
+++ b/sql/updates/world/2012_04_19_01_world_pickpocketing_loot_template.sql
@@ -0,0 +1,202 @@
+-- Fix to add pickpocketing loot for humoniods in borean tundra
+SET @GORLOCREF := 25100;
+SET @BERYLREF := @GORLOCREF+1;
+SET @BLOODREF := @GORLOCREF+2;
+SET @CHIEFREF := @GORLOCREF+3;
+SET @CULTREF := @GORLOCREF+4;
+SET @KVALDIRREF := @GORLOCREF+5;
+SET @CLAXREF := @GORLOCREF+6;
+SET @MAGMOTHREF := @GORLOCREF+7;
+-- Create reference templates
+DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @GORLOCREF AND @GORLOCREF+7;
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(@GORLOCREF,29576,57,1,0,1,1), -- Shark Bait
+(@GORLOCREF,29569,30,1,0,1,1), -- Strong Junkbox
+(@GORLOCREF,27858,8,1,0,1,1), -- Sunspring Carp
+(@GORLOCREF,22829,3,1,0,1,1), -- Super Healing Potion
+(@GORLOCREF,23436,0.5,1,0,1,1), -- Living Ruby
+(@GORLOCREF,23437,0.5,1,0,1,1), -- Talasite
+(@GORLOCREF,23440,0.5,1,0,1,1), -- Dawnstone
+(@GORLOCREF,23438,0.5,1,0,1,1), -- Star of Elune
+(@GORLOCREF,23439,0.5,1,0,1,1), -- Noble Topaz
+-- --------------------------------------------------
+(@BERYLREF,37467,32.5,1,0,1,1), -- A Steamy Romance Novel: Forbidden Love
+(@BERYLREF,43575,31,1,0,1,1), -- Reinforced Junkbox
+(@BERYLREF,38261,10,1,0,1,1), -- Bent House Key
+(@BERYLREF,29448,7,1,0,1,1), -- Mag'har Mild Cheese
+(@BERYLREF,29450,7,1,0,1,1), -- Telaari Grapes
+(@BERYLREF,33447,6,1,0,1,1), -- Runic Healing Potion
+(@BERYLREF,33449,6,1,0,1,1), -- Crusty Flatbread
+(@BERYLREF,36863,0.5,1,0,1,1), -- Decahedral Dwarven Dice
+-- --------------------------------------------------
+(@BLOODREF,29572,37,1,0,1,1), -- Aboriginal Carvings
+(@BLOODREF,29569,33,1,0,1,1), -- Strong Junkbox
+(@BLOODREF,8952,20,1,0,1,1), -- Roasted Quail
+(@BLOODREF,22829,8,1,0,1,1), -- Super Healing Potion
+(@BLOODREF,23438,0.5,1,0,1,1), -- Star of Elune
+(@BLOODREF,23436,0.5,1,0,1,1), -- Living Ruby
+(@BLOODREF,23441,0.5,1,0,1,1), -- Nightseye
+(@BLOODREF,23437,0.5,1,0,1,1), -- Talasite
+(@BLOODREF,23440,0.5,1,0,1,1), -- Dawnstone
+-- --------------------------------------------------
+(@CHIEFREF,29569,50,1,0,1,1), -- Strong Junkbox
+(@CHIEFREF,27858,20,1,0,1,1), -- Sunspring Carp
+(@CHIEFREF,29576,20,1,0,1,1), -- Shark Bait
+(@CHIEFREF,22829,10,1,0,1,1), -- Super Healing Potion
+-- --------------------------------------------------
+(@CULTREF,29569,40,1,0,1,1), -- Strong Junkbox
+(@CULTREF,29571,37,1,0,1,1), -- A Steamy Romance Novel
+(@CULTREF,30458,8,1,0,1,1), -- Stromgarde Muenster
+(@CULTREF,27855,7,1,0,1,1), -- Mag'har Grainbread
+(@CULTREF,27856,6,1,0,1,1), -- Skethyl Berries
+(@CULTREF,22829,2,1,0,1,1), -- Super Healing Potion
+(@CULTREF,36863,0.5,1,0,1,1), -- Decahedral Dwarven Dice
+-- --------------------------------------------------
+(@KVALDIRREF,29569,39,1,0,1,1), -- Strong Junkbox
+(@KVALDIRREF,29570,28,1,0,1,1), -- A Gnome Effigy
+(@KVALDIRREF,27855,12,1,0,1,1), -- Mag'har Grainbread
+(@KVALDIRREF,27854,12,1,0,1,1), -- Smoked Talbuk Venison
+(@KVALDIRREF,22829,7,1,0,1,1), -- Super Healing Potion
+(@KVALDIRREF,23436,0.5,1,0,1,1), -- Living Ruby
+(@KVALDIRREF,23441,0.5,1,0,1,1), -- Nightseye
+(@KVALDIRREF,23440,0.5,1,0,1,1), -- Dawnstone
+(@KVALDIRREF,23439,0.5,1,0,1,1), -- Noble Topaz
+(@KVALDIRREF,23437,0.5,1,0,1,1), -- Talasite
+-- --------------------------------------------------
+(@CLAXREF,43575,28,1,0,1,1), -- Reinforced Junkbox
+(@CLAXREF,38273,26,1,0,1,1), -- Brain Coral
+(@CLAXREF,38274,23,1,0,1,1), -- Large Snail Shell
+(@CLAXREF,37452,17,1,0,1,1), -- Fatty Bluefin
+(@CLAXREF,33447,6,1,0,1,1), -- Runic Healing Potion
+-- --------------------------------------------------
+(@MAGMOTHREF,38260,33,1,0,1,1), -- Empty Tobacco Pouch
+(@MAGMOTHREF,38261,21,1,0,1,1), -- Bent House Key
+(@MAGMOTHREF,33449,16,1,0,1,1), -- Crusty Flatbread
+(@MAGMOTHREF,43575,16,1,0,1,1), -- Reinforced Junkbox
+(@MAGMOTHREF,33454,9,1,0,1,1), -- Salted Venison
+(@MAGMOTHREF,33447,5,1,0,1,1), -- Runic Healing Potion
+(@MAGMOTHREF,36862,1,1,0,1,1); -- Worn Troll Dice
+-- -------------------
+-- -- NPC Variables --
+-- -------------------
+SET @NPC := 25686;
+SET @NPC1 := 25700;
+SET @NPC2 := 25687;
+SET @NPC3 := 25685;
+SET @NPC4 := 25449;
+SET @NPC5 := 25316;
+SET @NPC6 := 25353;
+SET @NPC7 := 25719;
+SET @NPC8 := 25804;
+SET @NPC9 := 25392;
+SET @NPC10 := 25651;
+SET @NPC11 := 25836;
+SET @NPC12 := 25979;
+SET @NPC13 := 25806;
+SET @NPC14 := 25720;
+SET @NPC15 := 25803;
+SET @NPC16 := 25880;
+SET @NPC17 := 25618;
+SET @NPC18 := 25839;
+SET @NPC19 := 25470;
+SET @NPC20 := 24567;
+SET @NPC21 := 25467;
+SET @NPC22 := 25468;
+SET @NPC23 := 25501;
+SET @NPC24 := 25726;
+SET @NPC25 := 25701;
+SET @NPC26 := 25725;
+SET @NPC27 := 25699;
+SET @NPC28 := 24576;
+SET @NPC29 := 25605;
+SET @NPC30 := 25609;
+SET @NPC31 := 25378;
+SET @NPC32 := 25843;
+SET @NPC33 := 25496;
+SET @NPC34 := 25479;
+SET @NPC35 := 25760;
+SET @NPC36 := 26266;
+SET @NPC37 := 26451;
+SET @NPC38 := 25521;
+SET @NPC39 := 25613;
+SET @NPC40 := 25522;
+SET @NPC41 := 25520;
+SET @NPC42 := 25209;
+SET @NPC43 := 25210;
+SET @NPC44 := 25216;
+SET @NPC45 := 25215;
+SET @NPC46 := 25217;
+SET @NPC47 := 25789;
+SET @NPC48 := 24469;
+SET @NPC49 := 25432;
+SET @NPC50 := 25433;
+SET @NPC51 := 25615;
+SET @NPC52 := 25523;
+-- ----------------------
+-- -- Assign the loots --
+-- ----------------------
+UPDATE `creature_template` SET `pickpocketloot`=`entry` WHERE `entry` IN (@NPC,@NPC1,@NPC2,@NPC3,@NPC4,@NPC5,@NPC6,@NPC7,@NPC8,@NPC9,@NPC10,@NPC11,@NPC12,@NPC13,@NPC14,@NPC15,@NPC16,@NPC17,@NPC18,@NPC19,@NPC20,@NPC21,@NPC22,@NPC23,@NPC24,@NPC25,@NPC26,@NPC27,@NPC28,@NPC29,@NPC30,@NPC31,@NPC32,@NPC33,@NPC34,@NPC35,@NPC36,@NPC37,@NPC38,@NPC39,@NPC40,@NPC41,@NPC42,@NPC43,@NPC44,@NPC45,@NPC46,@NPC47,@NPC48,@NPC49,@NPC50,@NPC51,@NPC52);
+DELETE FROM `pickpocketing_loot_template` WHERE `entry` IN (@NPC,@NPC1,@NPC2,@NPC3,@NPC4,@NPC5,@NPC6,@NPC7,@NPC8,@NPC9,@NPC10,@NPC11,@NPC12,@NPC13,@NPC14,@NPC15,@NPC16,@NPC17,@NPC18,@NPC19,@NPC20,@NPC21,@NPC22,@NPC23,@NPC24,@NPC25,@NPC26,@NPC27,@NPC28,@NPC29,@NPC30,@NPC31,@NPC32,@NPC33,@NPC34,@NPC35,@NPC36,@NPC37,@NPC38,@NPC39,@NPC40,@NPC41,@NPC42,@NPC43,@NPC44,@NPC45,@NPC46,@NPC47,@NPC48,@NPC49,@NPC50,@NPC51,@NPC52);
+INSERT INTO `pickpocketing_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- -----------------------------------------------------------------------------------------------
+(@NPC,1,100,1,0,-@GORLOCREF,1), -- Gorloc ref loot template on Gorloc Gibberer
+(@NPC1,1,100,1,0,-@GORLOCREF,1), -- Gorloc ref loot template on Gorloc Hunter
+(@NPC2,1,100,1,0,-@GORLOCREF,1), -- Gorloc ref loot template on Gorloc Steam Belcher
+(@NPC3,1,100,1,0,-@GORLOCREF,1), -- Gorloc ref loot template on Gorloc Waddler
+-- -----------------------------------------------------------------------------------------------
+(@NPC4,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Beryl Reclaimer
+(@NPC5,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Beryl Sorcerer
+(@NPC6,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Beryl Treasure Hunter
+(@NPC7,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Coldarra Spellbinder
+(@NPC8,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Harold Lane <The Fur Baron>
+(@NPC9,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on High Priest Andorath
+(@NPC10,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Cultist Necrolyte
+(@NPC11,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Loot Crazed Diver
+(@NPC12,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Loot Crazed Hunter
+(@NPC13,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Loot Crazed Poacher
+(@NPC14,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Inquisitor Caleras
+(@NPC15,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Karen "I Don't Caribou" the Culler
+(@NPC16,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Minion of Kaw
+(@NPC17,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Varidus the Flenser
+(@NPC18,1,100,1,0,-@BERYLREF,1), -- Beryl ref loot template on Northsea Mercenary
+-- -----------------------------------------------------------------------------------------------
+(@NPC19,1,100,1,0,-@BLOODREF,1), -- Bloodspore ref loot template on Bloodspore Firestarter
+(@NPC20,1,100,1,0,-@BLOODREF,1), -- Bloodspore ref loot template on Den Vermin
+(@NPC21,1,100,1,0,-@BLOODREF,1), -- Bloodspore ref loot template on Bloodspore Harvester
+(@NPC22,1,100,1,0,-@BLOODREF,1), -- Bloodspore ref loot template on Bloodspore Roaster
+(@NPC23,1,100,1,0,-@BLOODREF,1), -- Bloodspore ref loot template on Gammoth Tender
+-- -----------------------------------------------------------------------------------------------
+(@NPC24,1,100,1,0,-@CHIEFREF,1), -- Chieftian ref loot template on Chieftain Burblegobble
+(@NPC25,1,100,1,0,-@CHIEFREF,1), -- Chieftian ref loot template on Gorloc Dredger
+(@NPC26,1,100,1,0,-@CHIEFREF,1), -- Chieftian ref loot template on Chieftain GurgleBoggle
+(@NPC27,1,100,1,0,-@CHIEFREF,1), -- Chieftian ref loot template on Gorloc Mud Splasher
+(@NPC28,1,100,1,0,-@CHIEFREF,1), -- Chieftian ref loot template on Riplash Myrmidon
+-- -----------------------------------------------------------------------------------------------
+(@NPC29,1,100,1,0,-@CULTREF,1), -- Cultist ref loot template on Clandestine Cultist <Cult of the Damned>
+(@NPC30,1,100,1,0,-@CULTREF,1), -- Cultist ref loot template on En'kilah Necrolord <Cult of the Damned>
+(@NPC31,1,100,1,0,-@CULTREF,1), -- Cultist ref loot template on En'kilah Necromancer <Cult of the Damned>
+(@NPC32,1,100,1,0,-@CULTREF,1), -- Cultist ref loot template on Northsea Thug
+-- -----------------------------------------------------------------------------------------------
+(@NPC33,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Kvaldir Mist Lord
+(@NPC34,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Kvaldir Mistweaver
+(@NPC35,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Kvaldir Raider
+(@NPC36,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Heigarr the Horrible
+(@NPC37,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Ragnar Drakkarlund
+(@NPC37,35774,-100,1,0,1,1), -- Trident of Naz'jan on Ragnar Drakkarlund
+(@NPC38,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Skadir Longboatsman
+(@NPC39,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Skadir Mistweaver
+(@NPC40,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Skadir Raider
+(@NPC41,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Skadir Runecaster
+-- -----------------------------------------------------------------------------------------------
+(@NPC42,1,100,1,0,-@CLAXREF,1), -- Clax ref loot template on Claximus
+(@NPC43,1,100,1,0,-@CLAXREF,1), -- Clax ref loot template on Keymaster Urmgrgl
+(@NPC44,1,100,1,0,-@CLAXREF,1), -- Clax ref loot template on Winterfin Oracle
+(@NPC45,1,100,1,0,-@CLAXREF,1), -- Clax ref loot template on Winterfin Shorestriker
+(@NPC46,1,100,1,0,-@CLAXREF,1), -- Clax ref loot template on Winterfin Warrior
+-- -----------------------------------------------------------------------------------------------
+(@NPC47,1,100,1,0,-@MAGMOTHREF,1), -- Magmoth2 ref loot template on Gammothra the Tormentor
+(@NPC48,1,100,1,0,-@MAGMOTHREF,1), -- Magmoth ref loot template on Magnataur Huntress <Mate of Gammothra>
+(@NPC49,1,100,1,0,-@MAGMOTHREF,1), -- Magmoth ref loot template on Mate of Magmothregar
+(@NPC50,1,100,1,0,-@MAGMOTHREF,1), -- Magmoth ref loot template on Offspring of Magmothregar
+(@NPC51,1,100,1,0,-@MAGMOTHREF,1), -- Magmoth ref loot template on Plagued Magnataur
+(@NPC52,1,100,1,0,-@MAGMOTHREF,1); -- Magmoth ref loot template on Skadir Mariner
diff --git a/sql/updates/world/2012_04_19_02_world_creature_loot_template.sql b/sql/updates/world/2012_04_19_02_world_creature_loot_template.sql
new file mode 100644
index 00000000000..336cd61c0eb
--- /dev/null
+++ b/sql/updates/world/2012_04_19_02_world_creature_loot_template.sql
@@ -0,0 +1,2 @@
+-- fix DB-error on startup
+DELETE FROM `creature_loot_template` WHERE `entry` IN (34965,34980);
diff --git a/sql/updates/world/2012_04_19_03_world_instance_ulduar.sql b/sql/updates/world/2012_04_19_03_world_instance_ulduar.sql
new file mode 100644
index 00000000000..a39ed9c01d5
--- /dev/null
+++ b/sql/updates/world/2012_04_19_03_world_instance_ulduar.sql
@@ -0,0 +1,174 @@
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1603019 AND -1603000;
+UPDATE `creature_template` SET `ScriptName`='' WHERE `ScriptName` IN ('boss_algalon','mob_collapsing_star');
+
+-- Difficulty linking
+UPDATE `creature_template` SET `difficulty_entry_1`=34296 WHERE `entry`=32953; -- Black Hole
+
+UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`faction_A`=35,`faction_H`=35,`unit_flags`=0x8300,`equipment_id`=2478 WHERE `entry`=34064; -- Brann Bronzebeard
+UPDATE `creature_template` SET `speed_walk`=4,`speed_run`=2.14286,`exp`=2,`minlevel`=83,`maxlevel`=83,`faction_A`=190,`faction_H`=190,`unit_flags`=0x8100,`BaseAttackTime`=1000,`equipment_id`=2479 WHERE `entry` IN (32871,33070); -- Algalon the Observer
+UPDATE `creature_template` SET `faction_A`=190,`faction_H`=190,`exp`=2,`minlevel`=83,`maxlevel`=83,`unit_flags`=0x2000000,`speed_run`=1,`InhabitType`=4 WHERE `entry`=34246; -- Azeroth
+UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`exp`=2,`minlevel`=74,`maxlevel`=74,`unit_flags`=0x2000000,`flags_extra`=0x80,`InhabitType`=4 WHERE `entry`=33086; -- Algalon Stalker
+UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`unit_flags`=0x2008000,`speed_run`=1,`equipment_id`=2480,`InhabitType`=4 WHERE `entry` IN (33052,33116); -- Living Constellation
+UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`speed_run`=1,`RegenHealth`=0 WHERE `entry` IN (32955,34215); -- Collapsing Star
+UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`exp`=2,`minlevel`=80,`maxlevel`=80,`unit_flags`=0x2000000,`speed_run`=1,`InhabitType`=4 WHERE `entry` IN (32953,34296); -- Black Hole
+UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`minlevel`=81,`maxlevel`=81,`unit_flags`=0x8000,`speed_walk`=4,`speed_run`=1.42857,`InhabitType`=4 WHERE `entry` IN(33089,34097,34221,34222); -- Dark Matter
+UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`unit_flags`=0x2000000,`flags_extra`=0x80 WHERE `entry`=34100; -- Algalon Void Zone Visual Stalker
+UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`unit_flags`=0x2000000,`speed_run`=1,`InhabitType`=4 WHERE `entry`=34099; -- Worm Hole
+UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`exp`=2,`minlevel`=74,`maxlevel`=74,`unit_flags`=0x2000000,`flags_extra`=0x80,`InhabitType`=4 WHERE `entry`=33104; -- Algalon Stalker Asteroid Target 01
+UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`exp`=2,`minlevel`=74,`maxlevel`=74,`unit_flags`=0x2000000,`flags_extra`=0x80,`InhabitType`=4 WHERE `entry`=33105; -- Algalon Stalker Asteroid Target 02
+
+UPDATE `creature_model_info` SET `bounding_radius`=0.93,`combat_reach`=9,`gender`=0 WHERE `modelid`=28641; -- Algalon the Observer
+UPDATE `creature_model_info` SET `bounding_radius`=0.02,`combat_reach`=0.2,`gender`=2 WHERE `modelid`=29133; -- Azeroth
+UPDATE `creature_model_info` SET `bounding_radius`=0.62,`combat_reach`=0,`gender`=2 WHERE `modelid`=28741; -- Living Constellation
+UPDATE `creature_model_info` SET `bounding_radius`=1,`combat_reach`=1,`gender`=2 WHERE `modelid`=28988; -- Collapsing Star
+UPDATE `creature_model_info` SET `bounding_radius`=1,`combat_reach`=1,`gender`=2 WHERE `modelid`=28460; -- Black Hole
+
+UPDATE `gameobject_template` SET `faction`=114,`flags`=32 WHERE `entry`=194910; -- Doodad_UL_SigilDoor_03
+UPDATE `gameobject_template` SET `data0`=579 WHERE `entry`=194628; -- Celestial Planetarium Access
+
+UPDATE `creature_template` SET `ScriptName`='boss_algalon_the_observer' WHERE `entry`=32871; -- Algalon the Observer
+UPDATE `creature_template` SET `ScriptName`='npc_living_constellation' WHERE `entry`=33052; -- Living Constellation
+UPDATE `creature_template` SET `ScriptName`='npc_collapsing_star' WHERE `entry`=32955; -- Collapsing Star
+UPDATE `creature_template` SET `ScriptName`='npc_brann_bronzebeard_algalon' WHERE `entry`=34064; -- Brann Bronzebeard
+UPDATE `gameobject_template` SET `ScriptName`='go_celestial_planetarium_access' WHERE `entry` IN (194628,194752); -- Celestial Planetarium Access
+UPDATE `creature_template` SET `AIName`='NullCreatureAI' WHERE `entry` IN (32953,34099); -- Black Hole
+
+DELETE FROM `creature` WHERE `guid` IN (41781,41783,41790,41811,41812,41814,41819,41820,41821,41822,41823,41875);
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES
+(41781,33086,603,3,1,1627.400,-339.4133,417.4044,1.378810,7200,0,0), -- Algalon Stalker
+(41783,33086,603,3,1,1622.681,-344.2576,417.3955,1.378810,7200,0,0), -- Algalon Stalker
+(41790,33086,603,3,1,1629.984,-271.4798,417.4045,4.782202,7200,0,0), -- Algalon Stalker
+(41811,33086,603,3,1,1630.005,-345.5189,417.3955,1.378810,7200,0,0), -- Algalon Stalker
+(41812,33089,603,3,16,1622.451,-321.1563,417.6188,4.677482,7200,20,1), -- Dark Matter
+(41814,33089,603,3,16,1649.438,-319.8127,418.3941,1.082104,7200,20,1), -- Dark Matter
+(41819,33089,603,3,16,1615.060,-291.6816,417.7796,3.490659,7200,20,1), -- Dark Matter
+(41820,33089,603,3,16,1647.005,-288.6790,417.3955,3.490659,7200,20,1), -- Dark Matter
+(41821,33089,603,3,16,1622.451,-321.1563,417.6188,4.677482,7200,20,1), -- Dark Matter
+(41822,33089,603,3,16,1649.438,-319.8127,418.3941,1.082104,7200,20,1), -- Dark Matter
+(41823,33089,603,3,16,1615.060,-291.6816,417.7796,3.490659,7200,20,1), -- Dark Matter
+(41875,33089,603,3,16,1647.005,-288.6790,417.3955,3.490659,7200,20,1); -- Dark Matter
+
+SET @OGUID := 252;
+DELETE FROM `gameobject` WHERE `id` IN (194767,194910,194911,194715,194716,194148,194253,194628,194752,194821,194822);
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@OGUID+00,194767,603,3,17,1632.024,-182.9211,427.6681,0.000000,0,0,8.742278E-08,1, 604800,255,1), -- Doodad_UL_SigilDoor_01
+(@OGUID+04,194911,603,3,17,1632.024,-182.9211,408.4224,3.141593,0,0,8.742278E-08,1, 604800,255,1), -- Doodad_UL_SigilDoor_02
+(@OGUID+10,194910,603,3,17,1632.053,-266.1495,438.5608,0.000000,0,0,8.742278E-08,1, 604800,255,0), -- Doodad_UL_SigilDoor_03
+(@OGUID+12,194715,603,3,17,1632.053,-307.6541,417.3211,0.000000,0,0,8.742278E-08,1, 604800,255,0), -- Doodad_UL_UniverseFloor_01
+(@OGUID+19,194716,603,3,17,1632.251,-307.5483,416.2641,0.000000,0,0,8.742278E-08,1, 604800,255,1), -- Doodad_UL_UniverseFloor_02
+(@OGUID+22,194148,603,3,17,1632.053,-307.6541,417.3211,0.000000,0,0,8.742278E-08,1, 604800,255,1), -- Doodad_UL_UniverseGlobe01
+(@OGUID+24,194253,603,3,17,1631.908,-246.4970,417.3211,0.000000,0,0,8.742278E-08,1, 604800,255,1), -- Doodad_UL_Ulduar_Trapdoor_03
+(@OGUID+29,194628,603,1, 1,1646.182,-174.6881,427.2536,1.553341,0,0,0.000000E-00,1, 604800,255,1), -- Celestial Planetarium Access
+(@OGUID+33,194752,603,2, 1,1646.182,-174.6881,427.2536,1.553341,0,0,0.000000E-00,1, 604800,255,1), -- Celestial Planetarium Access
+(@OGUID+37,194821,603,1, 1,1632.099,-306.5609,417.3210,4.694937,0,0,0.000000E-00,1,-604800,255,1), -- Gift of the Observer (10 man)
+(@OGUID+46,194822,603,2, 1,1632.099,-306.5609,417.3210,4.694937,0,0,0.000000E-00,1,-604800,255,1); -- Gift of the Observer (25 man)
+
+DELETE FROM `creature_equip_template` WHERE `entry` IN (2478,2479,2480);
+INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES
+(2478,1903,25972,0),
+(2479,45985,45985,0),
+(2480,44952,0,0);
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (32871,33070,33052,33116,33089,34221,34097,34222,33105);
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES
+(32871,0,0x0000000,0x0,NULL), -- Algalon the Observer
+(33070,0,0x0000000,0x0,NULL), -- Algalon the Observer
+(33052,0,0x3000000,0x1,NULL), -- Living Constellation
+(33116,0,0x3000000,0x1,NULL), -- Living Constellation
+(33089,0,0x3000000,0x1,NULL), -- Dark Matter
+(34221,0,0x3000000,0x1,NULL), -- Dark Matter
+(34097,0,0x3000000,0x1,NULL), -- Unleashed Dark Matter
+(34222,0,0x3000000,0x1,NULL), -- Unleashed Dark Matter
+(33105,0,0x3000000,0x1,NULL); -- Algalon Stalker Asteroid Target 02
+
+DELETE FROM `creature_text` WHERE `entry` IN (32871,34064);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`sound`,`emote`,`comment`) VALUES
+(34064,0,0,'We did it, lads! We got here before Algalon''s arrival. Maybe we can rig the systems to interfere with his analysis--',14,15824,0,'Brann Bronzebeard - SAY_BRANN_ALGALON_INTRO_1'),
+(34064,1,0,'I''ll head back to the Archivum and see if I can jam his signal. I might be able to buy us some time while you take care of him.',12,15825,0,'Brann Bronzebeard - SAY_BRANN_ALGALON_INTRO_2'),
+(34064,2,0,'I know just the place. Will you be all right?',14,15823,6,'Brann Bronzebeard - SAY_BRANN_ALGALON_OUTRO'),
+(32871,0,0,'Translocation complete. Commencing planetary analysis of Azeroth.',12,15405,0,'Algalon the Observer - SAY_ALGALON_INTRO_1'),
+(32871,1,0,'Stand back, mortals. I''m not here to fight you.',12,15406,0,'Algalon the Observer - SAY_ALGALON_INTRO_2'),
+(32871,2,0,'It is in the universe''s best interest to re-originate this planet should my analysis find systemic corruption. Do not interfere.',12,15407,0,'Algalon the Observer - SAY_ALGALON_INTRO_3'),
+(32871,3,0,'Your actions are illogical. All possible results for this encounter have been calculated. The Pantheon will receive the Observer''s message regardless of outcome.',14,15386,0,'Algalon the Observer - SAY_ALGALON_START_TIMER'),
+(32871,4,0,'See your world through my eyes: A universe so vast as to be immeasurable - incomprehensible even to your greatest minds.',14,15390,1,'Algalon the Observer - SAY_ALGALON_AGGRO'),
+(32871,5,0,'The stars come to my aid!',14,15392,0,'Algalon the Observer - SAY_ALGALON_COLLAPSING_STAR'),
+(32871,6,0,'%s begins to Summon Collapsing Stars!',41,0,0,'Algalon the Observer - EMOTE_ALGALON_COLLAPSING_STAR'),
+(32871,7,0,'Witness the fury of the cosmos!',14,15396,0,'Algalon the Observer - SAY_ALGALONG_BIG_BANG'),
+(32871,8,0,'%s begins to cast Big Bang!',41,0,0,'Algalon the Observer - EMOTE_ALGALON_BIG_BANG'),
+(32871,9,0,'You are out of time.',14,15394,0,'Algalon the Observer - SAY_ALGALON_ASCEND'),
+(32871,10,0,'%s begins to cast Cosmic Smash!',41,0,0,'Algalon the Observer - EMOTE_ALGALON_COSMIC_SMASH'),
+(32871,11,0,'Behold the tools of creation!',14,15397,0,'Algalon the Observer - SAY_ALGALON_PHASE_TWO'),
+(32871,12,0,'I have seen worlds bathed in the Makers'' flames, their denizens fading without as much as a whimper. Entire planetary systems born and razed in the time that it takes your mortal hearts to beat once. Yet all throughout, my own heart devoid of emotion... of empathy. I. Have. Felt. Nothing. A million-million lives wasted. Had they all held within them your tenacity? Had they all loved life as you do?',14,15393,1,'Algalon the Observer - SAY_ALGALON_OUTRO_1'),
+(32871,13,0,'Perhaps it is your imperfections... that which grants you free will... that allows you to persevere against all cosmically calculated odds. You prevail where the Titan''s own perfect creations have failed.',14,15401,1,'Algalon the Observer - SAY_ALGALON_OUTRO_2'),
+(32871,14,0,'I''ve rearranged the reply code - your planet will be spared. I cannot be certain of my own calculations anymore.',14,15402,1,'Algalon the Observer - SAY_ALGALON_OUTRO_3'),
+(32871,15,0,'I lack the strength to transmit the signal. You must... hurry... find a place of power... close to the skies.',14,15403,1,'Algalon the Observer - SAY_ALGALON_OUTRO_4'),
+(32871,16,0,'Do not worry about my fate, Bronzen. If the signal is not transmitted in time, re-origination will proceed regardless. Save... your world...',14,15404,1,'Algalon the Observer - SAY_ALGALON_OUTRO_5'),
+(32871,17,0,'Analysis complete. There is partial corruption in the planet''s life-support systems as well as complete corruption in most of the planet''s defense mechanisms.',12,15398,0,'Algalon the Observer - SAY_ALGALON_DESPAWN_1'),
+(32871,18,0,'Begin uplink: Reply Code: ''Omega''. Planetary re-origination requested.',12,15399,0,'Algalon the Observer - SAY_ALGALON_DESPAWN_2'),
+(32871,19,0,'Farewell, mortals. Your bravery is admirable, for such flawed creatures.',12,15400,0,'Algalon the Observer - SAY_ALGALON_DESPAWN_3'),
+(32871,20,0,'Loss of life unavoidable.',14,15387,0,'Algalon the Observer - SAY_ALGALON_KILL'),
+(32871,20,1,'I do what I must.',14,15388,0,'Algalon the Observer - SAY_ALGALON_KILL');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (64996,62266,65509,62304,64597);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`Comment`) VALUES
+(13,1,64996,31,3,34246,'Algalon the Observer - Reorigination on Azeroth'),
+(13,1,62266,31,3,33052,'Algalon Stalker - target Living Constellation'),
+(13,1,65509,31,3,33052,'Black Hole - target Living Constellation'),
+(13,1,62304,31,3,33104,'Cosmic Smash - target trigger'),
+(13,1,64597,31,3,33104,'Cosmic Smash - target trigger');
+
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_algalon_phase_punch';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_algalon_arcane_barrage';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_algalon_trigger_3_adds';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_algalon_collapse';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_algalon_big_bang';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_algalon_remove_phase';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_algalon_cosmic_smash';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_algalon_cosmic_smash_damage';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_algalon_supermassive_fail';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(64412,'spell_algalon_phase_punch'),
+(64599,'spell_algalon_arcane_barrage'),
+(64607,'spell_algalon_arcane_barrage'),
+(62266,'spell_algalon_trigger_3_adds'),
+(62018,'spell_algalon_collapse'),
+(64443,'spell_algalon_big_bang'),
+(64584,'spell_algalon_big_bang'),
+(64445,'spell_algalon_remove_phase'),
+(62295,'spell_algalon_cosmic_smash'),
+(62311,'spell_algalon_cosmic_smash_damage'),
+(64596,'spell_algalon_cosmic_smash_damage'),
+(65311,'spell_algalon_supermassive_fail');
+
+SET @DIFF_ID := 3262;
+DELETE FROM `spelldifficulty_dbc` WHERE `id` BETWEEN @DIFF_ID AND @DIFF_ID+5;
+INSERT INTO `spelldifficulty_dbc` (`id`,`spellid0`,`spellid1`) VALUES
+(@DIFF_ID+0,64395,64592),
+(@DIFF_ID+1,64599,64607),
+(@DIFF_ID+2,64443,64584),
+(@DIFF_ID+3,64122,65108),
+(@DIFF_ID+4,62301,64598),
+(@DIFF_ID+5,62304,64597);
+
+UPDATE `instance_encounters` SET `creditType`=1,`creditEntry`=65184 WHERE `entry` IN (757,771); -- Algalon the Observer
+
+DELETE FROM `disables` WHERE `sourceType`=4 AND `entry` IN (10565,10566,10678,9990,9991,10567,10569,10698,10780,10781,10782,10783,10568,10570);
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (10565,10566,10678,9990,9991,10567,10569,10698,10780,10781,10782,10783,10568,10570);
+INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
+(10565,12,0,0,''), -- Algalon the Observer kills (Ulduar 10 player)
+(10566,12,1,0,''), -- Algalon the Observer kills (Ulduar 25 player)
+(10678,12,0,0,''), -- Herald of the Titans
+(10678,18,0,0,''), -- Herald of the Titans
+(9990,12,0,0,''), -- Lich King 10-player bosses killed
+(9991,12,1,0,''), -- Lich King 25-player bosses killed
+(10567,12,0,0,''), -- Observed (10 player)
+(10569,12,1,0,''), -- Observed (25 player)
+(10698,12,1,0,''), -- Realm First! Celestial Defender
+(10780,12,0,0,''), -- Supermassive (10 player)
+(10781,12,0,0,''), -- Supermassive (10 player)
+(10782,12,1,0,''), -- Supermassive (25 player)
+(10783,12,1,0,''), -- Supermassive (25 player)
+(10568,11,0,0,'achievement_he_feeds_on_your_tears'), -- He Feeds On Your Tears (10 player)
+(10568,12,0,0,''), -- He Feeds On Your Tears (10 player)
+(10570,11,0,0,'achievement_he_feeds_on_your_tears'), -- He Feeds On Your Tears (25 player)
+(10570,12,1,0,''); -- He Feeds On Your Tears (25 player)
diff --git a/sql/updates/world/2012_04_20_00_world_gameobject_loot_template.sql b/sql/updates/world/2012_04_20_00_world_gameobject_loot_template.sql
new file mode 100644
index 00000000000..47a22d519d0
--- /dev/null
+++ b/sql/updates/world/2012_04_20_00_world_gameobject_loot_template.sql
@@ -0,0 +1,15 @@
+SET @Ref := 12002;
+DELETE FROM `reference_loot_template` WHERE `entry`=@Ref;
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(@Ref,47242,100,1,0,1,1);
+DELETE FROM `gameobject_loot_template` WHERE `entry` IN (195668,195667,195666,195665,195672,195671,195670,195669) AND `item`=47242;
+DELETE FROM `gameobject_loot_template` WHERE `entry` IN (195668,195667,195666,195665,195672,195671,195670,195669) AND `mincountOrRef` = -@Ref;
+INSERT INTO gameobject_loot_template (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(195665,5,100,1,0,-@Ref,4), -- 10 man,50 attempts
+(195666,3,100,1,0,-@Ref,4), -- 10 man,45+ attempts
+(195667,3,100,1,0,-@Ref,2), -- 10 man,25+ attempts
+(195668,1,100,1,0,-@Ref,2), -- 10 man,0+ attempts
+(195669,6,100,1,0,-@Ref,4), -- 25 man,50 attempts
+(195670,4,100,1,0,-@Ref,4), -- 25 man,45+ attempts
+(195671,4,100,1,0,-@Ref,2), -- 25 man,25+ attempts
+(195672,2,100,1,0,-@Ref,2); -- 25 man,0+ attempts
diff --git a/sql/updates/world/2012_04_20_01_world_item_loot_template.sql b/sql/updates/world/2012_04_20_01_world_item_loot_template.sql
new file mode 100644
index 00000000000..af52ade0b25
--- /dev/null
+++ b/sql/updates/world/2012_04_20_01_world_item_loot_template.sql
@@ -0,0 +1,10 @@
+SET @Bag := 52676;
+DELETE FROM `item_loot_template` WHERE `entry`=@Bag;
+INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(@Bag,36933,0,1,1,1,3),-- Forest Emerald
+(@Bag,36918,0,1,1,1,3),-- Scarlet Ruby
+(@Bag,36921,0,1,1,1,3),-- Autumn's Glow
+(@Bag,36930,0,1,1,1,3),-- Monarch Topaz
+(@Bag,36924,0,1,1,1,3),-- Sky Sapphire
+(@Bag,36927,0,1,1,1,3),-- Twilight Opal
+(@Bag,43953,5,1,0,1,1); -- Reins of the Blue Drake
diff --git a/sql/updates/world/2012_04_20_02_world_creature_loot_template.sql b/sql/updates/world/2012_04_20_02_world_creature_loot_template.sql
new file mode 100644
index 00000000000..09b5beee75c
--- /dev/null
+++ b/sql/updates/world/2012_04_20_02_world_creature_loot_template.sql
@@ -0,0 +1,4 @@
+DELETE FROM `creature_loot_template` WHERE `entry` IN (31702,32297) AND `item`=44564;
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(31702,44564,0.5,1,0,1,1), -- Recipe: Mighty Arcane Protection Potion on Frostbrood Spawn
+(32297,44564,0.5,1,0,1,1); -- Recipe: Mighty Arcane Protection Potion on Cult Researcher
diff --git a/sql/updates/world/2012_04_20_03_world_creature_loot_template.sql b/sql/updates/world/2012_04_20_03_world_creature_loot_template.sql
new file mode 100644
index 00000000000..a0b586ee0d9
--- /dev/null
+++ b/sql/updates/world/2012_04_20_03_world_creature_loot_template.sql
@@ -0,0 +1,7 @@
+SET @ITEM := 50406; -- Formula: Enchant Gloves - Angler
+UPDATE `creature_template` SET `lootid` = `entry` WHERE `entry` IN(26343,26344,26336);
+DELETE FROM `creature_loot_template` WHERE `item`=@ITEM;
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(26343, @ITEM, 1.1, 1, 0, 1, 1), -- Indu'Le Fisherman
+(26336, @ITEM, 0.9, 1, 0, 1, 1), -- Indu'Le Mystic
+(26344, @ITEM, 1, 1, 0, 1, 1); -- Indu'Le Warrior
diff --git a/sql/updates/world/2012_04_20_04_world_creature_loot_template.sql b/sql/updates/world/2012_04_20_04_world_creature_loot_template.sql
new file mode 100644
index 00000000000..73e01efa23e
--- /dev/null
+++ b/sql/updates/world/2012_04_20_04_world_creature_loot_template.sql
@@ -0,0 +1,3 @@
+-- Make Grimscale Murlocs drop their heads faster...
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=-66 WHERE `item`=21757;
+
diff --git a/sql/updates/world/2012_04_20_05_gameobject_template.sql b/sql/updates/world/2012_04_20_05_gameobject_template.sql
new file mode 100644
index 00000000000..24400b16a5c
--- /dev/null
+++ b/sql/updates/world/2012_04_20_05_gameobject_template.sql
@@ -0,0 +1,8 @@
+-- Restore horrible mistake in UP34 from myself
+UPDATE `gameobject_template` SET `data1`=27512 WHERE `entry`=195669;
+UPDATE `gameobject_template` SET `data1`=27517 WHERE `entry`=195670;
+UPDATE `gameobject_template` SET `data1`=27518 WHERE `entry`=195671;
+-- Fix loottemplates along with it
+UPDATE `gameobject_loot_template` SET `entry`=27512 WHERE `entry`=195669;
+UPDATE `gameobject_loot_template` SET `entry`=27517 WHERE `entry`=195670;
+UPDATE `gameobject_loot_template` SET `entry`=27518 WHERE `entry`=195671;
diff --git a/sql/updates/world/2012_04_21_00_world_spell_script_names.sql b/sql/updates/world/2012_04_21_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..e61ef4aec74
--- /dev/null
+++ b/sql/updates/world/2012_04_21_00_world_spell_script_names.sql
@@ -0,0 +1,14 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (20625,29142,35139,42393,49882,55269,56578,38441,66316,67100,67101,67102);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(20625,'spell_gen_default_count_pct_from_max_hp'), -- Ritual of Doom Sacrifice
+(29142,'spell_gen_default_count_pct_from_max_hp'), -- Eyesore Blaster
+(35139,'spell_gen_default_count_pct_from_max_hp'), -- Throw Boom's Doom
+(42393,'spell_gen_default_count_pct_from_max_hp'), -- Brewfest - Attack Keg
+(49882,'spell_gen_default_count_pct_from_max_hp'), -- Leviroth Self-Impale
+(55269,'spell_gen_default_count_pct_from_max_hp'), -- Deathly Stare
+(56578,'spell_gen_default_count_pct_from_max_hp'), -- Rapid-Fire Harpoon
+(38441,'spell_gen_50pct_count_pct_from_max_hp'), -- Cataclysmic Bolt
+(66316,'spell_gen_50pct_count_pct_from_max_hp'), -- Spinning Pain Spike 10m
+(67100,'spell_gen_50pct_count_pct_from_max_hp'), -- Spinning Pain Spike 25m
+(67101,'spell_gen_50pct_count_pct_from_max_hp'), -- Spinning Pain Spike 10m heroic
+(67102,'spell_gen_50pct_count_pct_from_max_hp'); -- Spinning Pain Spike 25m heroic
diff --git a/sql/updates/world/2012_04_22_00_world_sai.sql b/sql/updates/world/2012_04_22_00_world_sai.sql
new file mode 100644
index 00000000000..f223883c8a7
--- /dev/null
+++ b/sql/updates/world/2012_04_22_00_world_sai.sql
@@ -0,0 +1,63 @@
+-- SAI for Tabard Vendor Elizabeth Ross
+SET @ROSS := 28776;
+SET @GOSSIP := 9832;
+
+UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ROSS;
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP AND `id`>0 AND `id`<11;
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
+(@GOSSIP, 1, 0, 'I''ve lost my Blood Knight Tabard.', 1, 1, 0, 0, 0, 0, ''),
+(@GOSSIP, 2, 0, 'I''ve lost my Tabard of the Hand.', 1, 1, 0, 0, 0, 0, ''),
+(@GOSSIP, 3, 0, 'I''ve lost my Tabard of the Protector.', 1, 1, 0, 0, 0, 0, ''),
+(@GOSSIP, 4, 0, 'I''ve lost my Green Trophy Tabard of the Illidari.', 1, 1, 0, 0, 0, 0, ''),
+(@GOSSIP, 5, 0, 'I''ve lost my Purple Trophy Tabard of the Illidari.', 1, 1, 0, 0, 0, 0, ''),
+(@GOSSIP, 6, 0, 'I''ve lost my Tabard of Summer Skies.', 1, 1, 0, 0, 0, 0, ''),
+(@GOSSIP, 7, 0, 'I''ve lost my Tabard of Summer Flames.', 1, 1, 0, 0, 0, 0, ''),
+(@GOSSIP, 8, 0, 'I''ve lost my Loremaster''s Colors.', 1, 1, 0, 0, 0, 0, ''),
+(@GOSSIP, 9, 0, 'I''ve lost my Tabard of the Explorer.', 1, 1, 0, 0, 0, 0, ''),
+(@GOSSIP, 10, 0, 'I''ve lost my Tabard of the Achiever.', 1, 1, 0, 0, 0, 0, '');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ROSS 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
+(@ROSS, 0, 0, 10, 62, 0, 100, 0, @GOSSIP, 1, 0, 0, 11, 54974, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Cast Spell Create Blood Knight Tabard'),
+(@ROSS, 0, 1, 10, 62, 0, 100, 0, @GOSSIP, 2, 0, 0, 11, 54976, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Cast Spell Create Tabard of the Hand'),
+(@ROSS, 0, 2, 10, 62, 0, 100, 0, @GOSSIP, 3, 0, 0, 11, 55008, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Cast Spell Create Tabard of the Protector'),
+(@ROSS, 0, 3, 10, 62, 0, 100, 0, @GOSSIP, 4, 0, 0, 11, 54977, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Cast Spell Create Green Trophy Tabard of the Illidari'),
+(@ROSS, 0, 4, 10, 62, 0, 100, 0, @GOSSIP, 5, 0, 0, 11, 54982, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Cast Spell Create Purple Trophy Tabard of the Illidari'),
+(@ROSS, 0, 5, 10, 62, 0, 100, 0, @GOSSIP, 6, 0, 0, 11, 62768, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Cast Spell Create Tabard of Summer Skies'),
+(@ROSS, 0, 6, 10, 62, 0, 100, 0, @GOSSIP, 7, 0, 0, 11, 62769, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Cast Spell Create Tabard of Summer Flames'),
+(@ROSS, 0, 7, 10, 62, 0, 100, 0, @GOSSIP, 8, 0, 0, 11, 58194, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Cast Spell Create Loremaster''s Colors'),
+(@ROSS, 0, 8, 10, 62, 0, 100, 0, @GOSSIP, 9, 0, 0, 11, 58224, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Cast Spell Create Tabard of the Explorer'),
+(@ROSS, 0, 9, 10, 62, 0, 100, 0, @GOSSIP, 10, 0, 0, 11, 55006, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Cast Spell Create Tabard of the Achiever'),
+(@ROSS, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Elizabeth Ross - On Gossip Select - Close Gossip');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,@GOSSIP,1,0,2,25549,1,1,1,0,'','Only show gossip if player doesn''t have Blood Knight Tabard'),
+(15,@GOSSIP,1,0,8,9737,0,0,0,0,'','Only show gossip if player already finished quest True Masters of Light'),
+(15,@GOSSIP,2,0,2,24344,1,1,1,0,'','Only show gossip if player doesn''t have Tabard of the Hand'),
+(15,@GOSSIP,2,0,8,9762,0,0,0,0,'','Only show gossip if player already finished quest The Unwritten Prophecy'),
+(15,@GOSSIP,3,0,2,28788,1,1,1,0,'','Only show gossip if player doesn''t have Tabard of the protector'),
+(15,@GOSSIP,3,0,8,10259,0,0,0,0,'','Only show gossip if player already finished quest Into the Breach'),
+(15,@GOSSIP,4,0,2,31404,1,1,1,0,'','Only show gossip if player doesn''t have Green Trophy Tabard of Illidari'),
+(15,@GOSSIP,4,0,2,31405,1,1,1,0,'','Only show gossip if player doesn''t have Purple Trophy Tabard of Illidari'),
+(15,@GOSSIP,4,0,2,31408,1,1,1,0,'','Only show gossip if player doesn''t have Offering of the Sha''tar'),
+(15,@GOSSIP,4,0,8,10781,0,0,0,0,'','Only show gossip if player already finished quest Battle of the Crimson Watch'),
+(15,@GOSSIP,5,0,2,31404,1,1,1,0,'','Only show gossip if player doesn''t have Green Trophy Tabard of Illidari'),
+(15,@GOSSIP,5,0,2,31405,1,1,1,0,'','Only show gossip if player doesn''t have Purple Trophy Tabard of Illidari'),
+(15,@GOSSIP,5,0,2,31408,1,1,1,0,'','Only show gossip if player doesn''t have Offering of the Sha''tar'),
+(15,@GOSSIP,5,0,8,10781,0,0,0,0,'','Only show gossip if player already finished quest Battle of the Crimson Watch'),
+(15,@GOSSIP,6,0,2,35279,1,1,1,0,'','Only show gossip if player doesn''t have Tabard of Summer Skies'),
+(15,@GOSSIP,6,0,2,35280,1,1,1,0,'','Only show gossip if player doesn''t have Tabard of Summer Flames'),
+(15,@GOSSIP,6,0,8,11972,0,0,0,0,'','Only show gossip if player already finished quest Shards of Ahune'),
+(15,@GOSSIP,7,0,2,35279,1,1,1,0,'','Only show gossip if player doesn''t have Tabard of Summer Skies'),
+(15,@GOSSIP,7,0,2,35280,1,1,1,0,'','Only show gossip if player doesn''t have Tabard of Summer Flames'),
+(15,@GOSSIP,7,0,8,11972,0,0,0,0,'','Only show gossip if player already finished quest Shards of Ahune'),
+(15,@GOSSIP,8,0,2,43300,1,1,1,0,'','Only show gossip if player doesn''t have Loremaster''s Colors'),
+(15,@GOSSIP,8,0,17,1681,0,0,0,0,'','Only show gossip if player have achievement Loremaster (A)'),
+(15,@GOSSIP,8,1,2,43300,1,1,1,0,'','Only show gossip if player doesn''t have Loremaster''s Colors'),
+(15,@GOSSIP,8,1,17,1682,0,0,0,0,'','Only show gossip if player have achievement Loremaster (H)'),
+(15,@GOSSIP,9,0,2,43348,1,1,1,0,'','Only show gossip if player doesn''t have Tabard of the Explorer'),
+(15,@GOSSIP,9,0,17,45,0,0,0,0,'','Only show gossip if player have achievement Explore Northrend'),
+(15,@GOSSIP,10,0,2,40643,1,1,1,0,'','Only show gossip if player doesn''t have Tabard of the Explorer'),
+(15,@GOSSIP,10,0,17,1021,0,0,0,0,'','Only show gossip if player have achievement Twenty-Five Tabards');
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp
index 7a2b83273c9..835705a0d7c 100755
--- a/src/server/game/AI/EventAI/CreatureEventAI.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp
@@ -1107,7 +1107,7 @@ void CreatureEventAI::UpdateAI(const uint32 diff)
break;
case EVENT_T_RANGE:
if (me->getVictim())
- if (me->IsInMap(me->getVictim()))
+ if (me->IsInMap(me->getVictim()) && me->InSamePhase(me->getVictim()))
if (me->IsInRange(me->getVictim(), (float)(*i).Event.range.minDist, (float)(*i).Event.range.maxDist))
ProcessEvent(*i);
break;
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 209eb38e13a..893c8f4580e 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -1119,12 +1119,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
- if (!IsUnit(*itr))
- continue;
-
(*itr)->GetPosition(x, y, z, o);
+ x += e.target.x;
+ y += e.target.y;
+ z += e.target.z;
+ o += e.target.o;
if (Creature* summon = GetBaseObject()->SummonCreature(e.action.summonCreature.creature, x, y, z, o, (TempSummonType)e.action.summonCreature.type, e.action.summonCreature.duration))
- if (unit && e.action.summonCreature.attackInvoker)
+ if (e.action.summonCreature.attackInvoker)
summon->AI()->AttackStart((*itr)->ToUnit());
}
@@ -1154,6 +1155,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
continue;
(*itr)->GetPosition(x, y, z, o);
+ x += e.target.x;
+ y += e.target.y;
+ z += e.target.z;
+ o += e.target.o;
GetBaseObject()->SummonGameObject(e.action.summonGO.entry, x, y, z, o, 0, 0, 0, 0, e.action.summonGO.despawnTime);
}
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp
index d82e43ba83b..e604eaf9024 100755
--- a/src/server/game/Combat/ThreatManager.cpp
+++ b/src/server/game/Combat/ThreatManager.cpp
@@ -75,7 +75,7 @@ bool ThreatCalcHelper::isValidProcess(Unit* hatedUnit, Unit* hatingUnit, SpellIn
return false;
// not in same map or phase
- if (!hatedUnit->IsInMap(hatingUnit))
+ if (!hatedUnit->IsInMap(hatingUnit) || !hatedUnit->InSamePhase(hatingUnit))
return false;
// spell not causing threat
@@ -182,6 +182,7 @@ void HostileReference::updateOnlineStatus()
&& (getTarget()->GetTypeId() != TYPEID_PLAYER || !getTarget()->ToPlayer()->isGameMaster())
&& !getTarget()->HasUnitState(UNIT_STATE_IN_FLIGHT)
&& getTarget()->IsInMap(getSourceUnit())
+ && getTarget()->InSamePhase(getSourceUnit())
)
{
Creature* creature = getSourceUnit()->ToCreature();
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index a7b57c7323c..ed89041ff66 100755
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -796,10 +796,12 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry,
//! Need to be called after LoadCreaturesAddon - MOVEMENTFLAG_HOVER is set there
if (HasUnitMovementFlag(MOVEMENTFLAG_HOVER))
+ {
z += GetFloatValue(UNIT_FIELD_HOVERHEIGHT);
- //! Relocate again with updated Z coord
- Relocate(x, y, z, ang);
+ //! Relocate again with updated Z coord
+ Relocate(x, y, z, ang);
+ }
uint32 displayID = GetNativeDisplayId();
CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID);
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 4b5b07fd8a5..f6d03ca38b2 100755
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -507,7 +507,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
if (isPet())
return false;
- return GetCreatureTemplate()->rank == CREATURE_ELITE_WORLDBOSS;
+ return GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_BOSS;
}
bool IsDungeonBoss() const;
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index d96c9052b7a..f58dd6b2e4d 100755
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -1825,6 +1825,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
m_goValue->Building.Health = m_goValue->Building.MaxHealth;
SetGoAnimProgress(255);
}
+ EnableCollision(true);
break;
case GO_DESTRUCTIBLE_DAMAGED:
{
@@ -1881,6 +1882,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
m_goValue->Building.Health = 0;
SetGoAnimProgress(0);
}
+ EnableCollision(false);
break;
}
case GO_DESTRUCTIBLE_REBUILDING:
@@ -1900,6 +1902,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
m_goValue->Building.Health = m_goValue->Building.MaxHealth;
SetGoAnimProgress(255);
}
+ EnableCollision(true);
break;
}
}
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index 39be4d4f529..3693f683b24 100755
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -685,7 +685,7 @@ class WorldObject : public Object, public WorldLocation
bool IsInMap(const WorldObject* obj) const
{
if (obj)
- return IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap()) && InSamePhase(obj);
+ return IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap());
return false;
}
bool IsWithinDist3d(float x, float y, float z, float dist) const
@@ -703,7 +703,7 @@ class WorldObject : public Object, public WorldLocation
}
bool IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D = true) const
{
- return obj && IsInMap(obj) && _IsWithinDist(obj, dist2compare, is3D);
+ return obj && IsInMap(obj) && InSamePhase(obj) && _IsWithinDist(obj, dist2compare, is3D);
}
bool IsWithinLOS(float x, float y, float z) const;
bool IsWithinLOSInMap(const WorldObject* obj) const;
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 141902fbbdc..7c70fe9358e 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -9217,6 +9217,9 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
case 4100: // The Culling of Stratholme
NumberOfFields = 13;
break;
+ case 4273: // Ulduar
+ NumberOfFields = 10;
+ break;
default:
NumberOfFields = 12;
break;
@@ -9761,6 +9764,16 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
data << uint32(3932) << uint32(0); // 13 WORLDSTATE_TIME_GUARDIAN_SHOW
}
break;
+ // Ulduar
+ case 4273:
+ if (instance && mapid == 603)
+ instance->FillInitialWorldStates(data);
+ else
+ {
+ data << uint32(4132) << uint32(0); // 9 WORLDSTATE_SHOW_CRATES
+ data << uint32(4131) << uint32(0); // 10 WORLDSTATE_CRATES_REVEALED
+ }
+ break;
default:
data << uint32(0x914) << uint32(0x0); // 7
data << uint32(0x913) << uint32(0x0); // 8
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index da23a7ba010..fb91c3fc9f1 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -460,7 +460,7 @@ void Unit::resetAttackTimer(WeaponAttackType type)
bool Unit::IsWithinCombatRange(const Unit* obj, float dist2compare) const
{
- if (!obj || !IsInMap(obj))
+ if (!obj || !IsInMap(obj) || !InSamePhase(obj))
return false;
float dx = GetPositionX() - obj->GetPositionX();
@@ -476,7 +476,7 @@ bool Unit::IsWithinCombatRange(const Unit* obj, float dist2compare) const
bool Unit::IsWithinMeleeRange(const Unit* obj, float dist) const
{
- if (!obj || !IsInMap(obj))
+ if (!obj || !IsInMap(obj) || !InSamePhase(obj))
return false;
float dx = GetPositionX() - obj->GetPositionX();
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index ec79db769da..e81822e72be 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -1287,7 +1287,7 @@ namespace Trinity
AllWorldObjectsInRange(const WorldObject* object, float maxRange) : m_pObject(object), m_fRange(maxRange) {}
bool operator() (WorldObject* go)
{
- return m_pObject->IsWithinDist(go, m_fRange, false);
+ return m_pObject->IsWithinDist(go, m_fRange, false) && m_pObject->InSamePhase(go);
}
private:
const WorldObject* m_pObject;
diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
index 40b3863679b..e3cda4dd76d 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
@@ -251,9 +251,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(PlayerMapType &m)
return;
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->getSource()))
+ i_objects.push_back(itr->getSource());
}
template<class Check>
@@ -263,9 +262,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(CreatureMapType &m)
return;
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->getSource()))
+ i_objects.push_back(itr->getSource());
}
template<class Check>
@@ -275,9 +273,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(CorpseMapType &m)
return;
for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->getSource()))
+ i_objects.push_back(itr->getSource());
}
template<class Check>
@@ -287,9 +284,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(GameObjectMapType &m)
return;
for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->getSource()))
+ i_objects.push_back(itr->getSource());
}
template<class Check>
@@ -299,9 +295,8 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(DynamicObjectMapType &m)
return;
for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
- if (itr->getSource()->InSamePhase(i_phaseMask))
- if (i_check(itr->getSource()))
- i_objects.push_back(itr->getSource());
+ if (i_check(itr->getSource()))
+ i_objects.push_back(itr->getSource());
}
// Gameobject searchers
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 766e3d23f93..6ba08646f25 100755
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -228,7 +228,7 @@ enum LevelRequirementVsMode
#define MAX_HEIGHT 100000.0f // can be use for find ground height at surface
#define INVALID_HEIGHT -100000.0f // for check, must be equal to VMAP_INVALID_HEIGHT, real value for unknown height is VMAP_INVALID_HEIGHT_VALUE
#define MAX_FALL_DISTANCE 250000.0f // "unlimited fall" to find VMap ground if it is available, just larger than MAX_HEIGHT - INVALID_HEIGHT
-#define DEFAULT_HEIGHT_SEARCH 10.0f // default search distance to find height at nearby locations
+#define DEFAULT_HEIGHT_SEARCH 50.0f // default search distance to find height at nearby locations
#define MIN_UNLOAD_DELAY 1 // immediate unload
typedef std::map<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType;
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 0386e6b4214..06aca10879d 100755
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -2566,7 +2566,7 @@ enum CreatureTypeFlags
{
CREATURE_TYPEFLAGS_TAMEABLE = 0x00000001, // Tameable by any hunter
CREATURE_TYPEFLAGS_GHOST = 0x00000002, // Creature are also visible for not alive player. Allow gossip interaction if npcflag allow?
- CREATURE_TYPEFLAGS_UNK2 = 0x00000004,
+ CREATURE_TYPEFLAGS_BOSS = 0x00000004,
CREATURE_TYPEFLAGS_UNK3 = 0x00000008,
CREATURE_TYPEFLAGS_UNK4 = 0x00000010,
CREATURE_TYPEFLAGS_UNK5 = 0x00000020,
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index 76c3f1c073c..476b0082617 100755
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -425,6 +425,7 @@ void AddSC_ulduar_teleporter();
void AddSC_boss_mimiron();
void AddSC_boss_hodir();
void AddSC_boss_freya();
+void AddSC_boss_algalon_the_observer();
void AddSC_instance_ulduar();
void AddSC_boss_keleseth(); //Utgarde Keep
void AddSC_boss_skarvald_dalronn();
@@ -1129,6 +1130,7 @@ void AddNorthrendScripts()
AddSC_boss_mimiron();
AddSC_boss_hodir();
AddSC_boss_freya();
+ AddSC_boss_algalon_the_observer();
AddSC_instance_ulduar();
AddSC_boss_keleseth(); //Utgarde Keep
AddSC_boss_skarvald_dalronn();
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index df2b9c35320..f055d669925 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3107,13 +3107,13 @@ void Spell::cast(bool skipCheck)
// should be done before the spell is actually executed
sScriptMgr->OnPlayerSpellCast(playerCaster, this, skipCheck);
- // Let any pets know we've attacked something. As of 3.0.2 pets begin
- // attacking their owner's target immediately
- if (Pet* playerPet = playerCaster->GetPet())
- {
- if (playerPet->isAlive() && playerPet->isControlled() && (m_targets.GetTargetMask() & TARGET_FLAG_UNIT))
- playerPet->AI()->OwnerAttacked(m_targets.GetObjectTarget()->ToUnit());
- }
+ // As of 3.0.2 pets begin attacking their owner's target immediately
+ // Let any pets know we've attacked something. Check DmgClass for harmful spells only
+ // This prevents spells such as Hunter's Mark from triggering pet attack
+ if (this->GetSpellInfo()->DmgClass != SPELL_DAMAGE_CLASS_NONE)
+ if (Pet* playerPet = playerCaster->GetPet())
+ if (playerPet->isAlive() && playerPet->isControlled() && (m_targets.GetTargetMask() & TARGET_FLAG_UNIT))
+ playerPet->AI()->OwnerAttacked(m_targets.GetObjectTarget()->ToUnit());
}
SetExecutedCurrently(true);
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 5078391348f..c72ccbacc3d 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -390,23 +390,6 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
if (!unitTarget->HasAura(27825))
return;
break;
- // Cataclysmic Bolt
- case 38441:
- {
- damage = unitTarget->CountPctFromMaxHealth(50);
- break;
- }
- case 20625: // Ritual of Doom Sacrifice
- case 29142: // Eyesore Blaster
- case 35139: // Throw Boom's Doom
- case 42393: // Brewfest - Attack Keg
- case 55269: // Deathly Stare
- case 56578: // Rapid-Fire Harpoon
- case 62775: // Tympanic Tantrum
- {
- damage = unitTarget->CountPctFromMaxHealth(damage);
- break;
- }
// Gargoyle Strike
case 51963:
{
@@ -666,19 +649,19 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
if (found)
damage += m_spellInfo->Effects[EFFECT_1].CalcValue();
- if (m_caster->GetTypeId() == TYPEID_PLAYER)
+ if (Player* caster = m_caster->ToPlayer())
{
// Add Ammo and Weapon damage plus RAP * 0.1
- Item* item = m_caster->ToPlayer()->GetWeaponForAttack(RANGED_ATTACK);
- if (item)
+ if (Item* item = caster->GetWeaponForAttack(RANGED_ATTACK))
{
- float dmg_min = item->GetTemplate()->Damage->DamageMin;
- float dmg_max = item->GetTemplate()->Damage->DamageMax;
+ ItemTemplate const* weaponTemplate = item->GetTemplate();
+ float dmg_min = weaponTemplate->Damage[0].DamageMin;
+ float dmg_max = weaponTemplate->Damage[0].DamageMax;
if (dmg_max == 0.0f && dmg_min > dmg_max)
damage += int32(dmg_min);
else
damage += irand(int32(dmg_min), int32(dmg_max));
- damage += int32(m_caster->ToPlayer()->GetAmmoDPS()*item->GetTemplate()->Delay*0.001f);
+ damage += int32(caster->GetAmmoDPS() * weaponTemplate->Delay * 0.001f);
}
}
}
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 05431ef0a16..3de87790be9 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3298,6 +3298,19 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetB[1] = TARGET_UNIT_NEARBY_ENTRY;
spellInfo->EffectImplicitTargetB[2] = TARGET_UNIT_NEARBY_ENTRY;
break;
+ case 62301: // Cosmic Smash (Algalon the Observer)
+ spellInfo->MaxAffectedTargets = 1;
+ break;
+ case 64598: // Cosmic Smash (Algalon the Observer)
+ spellInfo->MaxAffectedTargets = 3;
+ break;
+ case 62293: // Cosmic Smash (Algalon the Observer)
+ spellInfo->EffectImplicitTargetB[0] = TARGET_DEST_CASTER;
+ break;
+ case 62311: // Cosmic Smash (Algalon the Observer)
+ case 64596: // Cosmic Smash (Algalon the Observer)
+ spellInfo->rangeIndex = 6; // 100yd
+ break;
// ENDOF ULDUAR SPELLS
//
// TRIAL OF THE CRUSADER SPELLS
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index df1640df1b7..44a2dd4dedb 100755
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -403,7 +403,7 @@ GameObject* SpellScript::GetHitGObj()
return m_spell->gameObjTarget;
}
-WorldLocation const* SpellScript::GetHitDest()
+WorldLocation* SpellScript::GetHitDest()
{
if (!IsInEffectHook())
{
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index e84a56c8dbb..26393040a1e 100755
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -325,7 +325,7 @@ class SpellScript : public _SpellScript
// returns: target of current effect if it was GameObject otherwise NULL
GameObject* GetHitGObj();
// returns: destination of current effect
- WorldLocation const* GetHitDest();
+ WorldLocation* GetHitDest();
// setter/getter for for damage done by spell to target of spell hit
// returns damage calculated before hit, and real dmg done after hit
int32 GetHitDamage();
diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt
index f0136b065e8..792fdeb3e7b 100644
--- a/src/server/scripts/CMakeLists.txt
+++ b/src/server/scripts/CMakeLists.txt
@@ -119,6 +119,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/game/Maps
${CMAKE_SOURCE_DIR}/src/server/game/Movement
${CMAKE_SOURCE_DIR}/src/server/game/Movement/MovementGenerators
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement/Spline
${CMAKE_SOURCE_DIR}/src/server/game/Movement/Waypoints
${CMAKE_SOURCE_DIR}/src/server/game/Opcodes
${CMAKE_SOURCE_DIR}/src/server/game/OutdoorPvP
diff --git a/src/server/scripts/Northrend/CMakeLists.txt b/src/server/scripts/Northrend/CMakeLists.txt
index 31aa924365d..3502e7fb104 100644
--- a/src/server/scripts/Northrend/CMakeLists.txt
+++ b/src/server/scripts/Northrend/CMakeLists.txt
@@ -22,7 +22,7 @@ set(scripts_STAT_SRCS
Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp
Northrend/Ulduar/Ulduar/boss_thorim.cpp
Northrend/Ulduar/Ulduar/boss_ignis.cpp
- Northrend/Ulduar/Ulduar/boss_algalon.cpp
+ Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
Northrend/Ulduar/Ulduar/instance_ulduar.cpp
Northrend/Ulduar/Ulduar/boss_auriaya.cpp
Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index 6f817a6d0eb..a7328b43826 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -515,36 +515,6 @@ public:
};
-class spell_spinning_pain_spike : public SpellScriptLoader
-{
- public:
- spell_spinning_pain_spike() : SpellScriptLoader("spell_spinning_pain_spike") {}
-
- class spell_spinning_pain_spike_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_spinning_pain_spike_SpellScript);
-
- void HandleScript(SpellEffIndex /*eff*/)
- {
- Unit* target = GetHitUnit();
- if (!target)
- return;
-
- if (target->isAlive())
- SetHitDamage(target->CountPctFromMaxHealth(50));
- }
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_spinning_pain_spike_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
- }
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_spinning_pain_spike_SpellScript();
- }
-};
-
void AddSC_boss_jaraxxus()
{
new boss_jaraxxus();
@@ -553,5 +523,4 @@ void AddSC_boss_jaraxxus()
new mob_fel_infernal();
new mob_nether_portal();
new mob_mistress_of_pain();
- new spell_spinning_pain_spike();
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp
deleted file mode 100644
index 2dd13e7ce07..00000000000
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
-#include "ulduar.h"
-
-#define GAMEOBJECT_GIVE_OF_THE_OBSERVER 194821
-
-enum Spells
-{
- SPELL_ASCEND = 64487,
- SPELL_BERSERK = 47008,
- SPELL_BIG_BANG = 64443,
- H_SPELL_BIG_BANG = 64584,
- SPELL_COSMIC_SMASH = 62301,
- H_SPELL_COSMIC_SMASH = 64598,
- SPELL_PHASE_PUNCH = 64412,
- SPELL_QUANTUM_STRIKE = 64395,
- H_SPELL_QUANTUM_STRIKE = 64592,
- SPELL_BLACK_HOLE_EXPLOSION = 64122,
- SPELL_ARCANE_BARAGE = 64599,
- H_SPELL_ARCANE_BARAGE = 64607
-};
-
-enum Creatures
-{
- CREATURE_COLLAPSING_STAR = 32955,
- CREATURE_BLACK_HOLE = 32953,
- CREATURE_LIVING_CONSTELLATION = 33052,
- CREATURE_DARK_MATTER = 33089
-};
-
-enum Yells
-{
- SAY_AGGRO = -1603000,
- SAY_SLAY_1 = -1603001,
- SAY_SLAY_2 = -1603002,
- SAY_ENGADED_FOR_FIRTS_TIME = -1603003,
- SAY_PHASE_2 = -1603004,
- SAY_SUMMON_COLLAPSING_STAR = -1603005,
- SAY_DEATH_1 = -1603006,
- SAY_DEATH_2 = -1603007,
- SAY_DEATH_3 = -1603008,
- SAY_DEATH_4 = -1603009,
- SAY_DEATH_5 = -1603010,
- SAY_BERSERK = -1603011,
- SAY_BIG_BANG_1 = -1603012,
- SAY_BIG_BANG_2 = -1603013,
- SAY_TIMER_1 = -1603014,
- SAY_TIMER_2 = -1603015,
- SAY_TIMER_3 = -1603016,
- SAY_SUMMON_1 = -1603017,
- SAY_SUMMON_2 = -1603018,
- SAY_SUMMON_3 = -1603019,
-};
-
-class boss_algalon : public CreatureScript
-{
-public:
- boss_algalon() : CreatureScript("boss_algalon") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return GetUlduarAI<boss_algalonAI>(creature);
- }
-
- struct boss_algalonAI : public ScriptedAI
- {
- boss_algalonAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- Summon = false; // not in reset. intro speech done only once.
- }
-
- InstanceScript* instance;
-
- std::list<uint64> m_lCollapsingStarGUIDList;
-
- uint32 Phase;
- uint32 Ascend_Timer;
- uint32 Berserk_Timer;
- uint32 BigBang_Timer;
- uint32 CosmicSmash_Timer;
- uint32 PhasePunch_Timer;
- uint32 QuantumStrike_Timer;
- uint32 CollapsingStar_Timer;
- uint32 uiPhase_timer;
- uint32 uiStep;
-
- uint64 BlackHoleGUID;
-
- bool Enrage;
- bool Summon;
-
- void EnterCombat(Unit* who)
- {
- if (Summon)
- {
- DoScriptText(SAY_AGGRO, me);
- me->InterruptSpell(CURRENT_CHANNELED_SPELL);
- DoZoneInCombat(who->ToCreature());
- }
- else
- {
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetReactState(REACT_PASSIVE);
- uiStep = 1;
- }
-
- if (instance)
- instance->SetData(BOSS_ALGALON, IN_PROGRESS);
- }
-
- void KilledUnit(Unit* /*victim*/)
- {
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
- }
-
- void Reset()
- {
- Phase = 1;
-
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- if (instance)
- instance->SetData(BOSS_ALGALON, NOT_STARTED);
-
- BlackHoleGUID = 0;
-
- uiPhase_timer = 0;
- Ascend_Timer = 480000; //8 minutes
- QuantumStrike_Timer = urand(4000, 14000);
- Berserk_Timer = 360000; //6 minutes
- CollapsingStar_Timer = urand(15000, 20000); //Spawns between 15 to 20 seconds
- BigBang_Timer = 90000;
- PhasePunch_Timer = 8000;
- CosmicSmash_Timer = urand(30000, 60000);
- Enrage = false;
- }
-
- void JumpToNextStep(uint32 uiTimer)
- {
- uiPhase_timer = uiTimer;
- ++uiStep;
- }
-
- void DespawnCollapsingStar()
- {
- if (m_lCollapsingStarGUIDList.empty())
- return;
-
- for (std::list<uint64>::const_iterator itr = m_lCollapsingStarGUIDList.begin(); itr != m_lCollapsingStarGUIDList.end(); ++itr)
- {
- if (Creature* temp = Unit::GetCreature(*me, *itr))
- {
- if (temp->isAlive())
- temp->DespawnOrUnsummon();
- }
- }
- m_lCollapsingStarGUIDList.clear();
- }
-
- void JustSummoned(Creature* summoned)
- {
- if (summoned->GetEntry() == CREATURE_COLLAPSING_STAR)
- {
- Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
- if (me->getVictim())
- summoned->AI()->AttackStart(target ? target : me->getVictim());
- m_lCollapsingStarGUIDList.push_back(summoned->GetGUID());
- }
- }
-
- void SummonCollapsingStar(Unit* target)
- {
- DoScriptText(SAY_SUMMON_COLLAPSING_STAR, me);
- me->SummonCreature(CREATURE_COLLAPSING_STAR, target->GetPositionX()+15.0f, target->GetPositionY()+15.0f, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 100000);
- me->SummonCreature(CREATURE_BLACK_HOLE, target->GetPositionX()+15.0f, target->GetPositionY()+15.0f, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 27000);
- }
-
- void UpdateAI(const uint32 diff)
- {
- //Return since we have no target
- if (!UpdateVictim())
- return;
-
- if (Phase == 1 && HealthBelowPct(20))
- {
- Phase = 2;
- DoScriptText(SAY_PHASE_2, me);
- }
-
- if (HealthBelowPct(2))
- {
- me->SummonGameObject(GAMEOBJECT_GIVE_OF_THE_OBSERVER, 1634.258667f, -295.101166f, 417.321381f, 0, 0, 0, 0, 0, 0);
-
- // All of them. or random?
- DoScriptText(SAY_DEATH_1, me);
- DoScriptText(SAY_DEATH_2, me);
- DoScriptText(SAY_DEATH_3, me);
- DoScriptText(SAY_DEATH_4, me);
- DoScriptText(SAY_DEATH_5, me);
-
- me->DisappearAndDie();
-
- if (instance)
- instance->SetData(BOSS_ALGALON, DONE);
-
- return;
- }
-
- if (Phase == 1)
- {
- if (!Summon)
- {
- if (uiPhase_timer <= diff)
- {
- switch (uiStep)
- {
- case 1:
- DoScriptText(SAY_SUMMON_1, me);
- JumpToNextStep(3000);
- break;
- case 2:
- DoScriptText(SAY_SUMMON_2, me);
- JumpToNextStep(3000);
- break;
- case 3:
- DoScriptText(SAY_SUMMON_3, me);
- JumpToNextStep(3000);
- break;
- case 4:
- DoScriptText(SAY_ENGADED_FOR_FIRTS_TIME, me);
- JumpToNextStep(3000);
- break;
- case 5:
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetReactState(REACT_AGGRESSIVE);
- Summon = true;
- break;
- }
- } else uiPhase_timer -= diff;
-
- return;
- }
-
- if (QuantumStrike_Timer <= diff)
- {
- DoCast(me->getVictim(), RAID_MODE(SPELL_QUANTUM_STRIKE, H_SPELL_QUANTUM_STRIKE), true);
-
- QuantumStrike_Timer = urand(4000, 14000);
- } else QuantumStrike_Timer -= diff;
-
- if (BigBang_Timer <= diff)
- {
- DoScriptText(RAND(SAY_BIG_BANG_1, SAY_BIG_BANG_2), me);
- DoCast(me->getVictim(), RAID_MODE(SPELL_BIG_BANG, H_SPELL_BIG_BANG), true);
-
- BigBang_Timer = 90000;
- } else BigBang_Timer -= diff;
-
- if (Ascend_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_ASCEND, true);
-
- Ascend_Timer = 480000;
- } else Ascend_Timer -= diff;
-
- if (PhasePunch_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_PHASE_PUNCH, true);
-
- PhasePunch_Timer = 8000;
- } else PhasePunch_Timer -= diff;
-
- if (CosmicSmash_Timer <= diff)
- {
- DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), RAID_MODE(SPELL_COSMIC_SMASH, H_SPELL_COSMIC_SMASH), true);
-
- CosmicSmash_Timer = urand(30000, 60000);
- } else CosmicSmash_Timer -= diff;
-
- if (Berserk_Timer <= diff)
- {
- DoScriptText(SAY_BERSERK, me);
- DoCast(me->getVictim(), SPELL_BERSERK, true);
-
- Berserk_Timer = 360000;
- } else Berserk_Timer -= diff;
-
- DoMeleeAttackIfReady();
-
- EnterEvadeIfOutOfCombatArea(diff);
- }
-
- if (Phase == 2)
- {
- if (Enrage)
- {
- if (Ascend_Timer <= diff)
- {
- DoCast(me, SPELL_ASCEND);
- DoScriptText(SAY_BERSERK, me);
- Ascend_Timer = urand(360000, 365000);
- Enrage = false;
- } else Ascend_Timer -= diff;
- }
- }
-
- DoMeleeAttackIfReady();
- }
- };
-
-};
-
-//Collapsing Star
-class mob_collapsing_star : public CreatureScript
-{
-public:
- mob_collapsing_star() : CreatureScript("mob_collapsing_star") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_collapsing_starAI(creature);
- }
-
- struct mob_collapsing_starAI : public ScriptedAI
- {
- mob_collapsing_starAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- }
-
- InstanceScript* instance;
-
- uint32 BlackHoleExplosion_Timer;
-
- void Reset()
- {
- BlackHoleExplosion_Timer = 0;
- }
-
- void UpdateAI(const uint32 diff)
- {
- if (!UpdateVictim())
- return;
-
- if (BlackHoleExplosion_Timer <= diff)
- {
- me->CastSpell(me, SPELL_BLACK_HOLE_EXPLOSION, false);
- BlackHoleExplosion_Timer = 0;
- } else BlackHoleExplosion_Timer -= diff;
- }
- };
-
-};
-
-void AddSC_boss_Algalon()
-{
- new boss_algalon();
- new mob_collapsing_star();
-}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
new file mode 100644
index 00000000000..6f87d7fcd2a
--- /dev/null
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
@@ -0,0 +1,1374 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ObjectMgr.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "SpellScript.h"
+#include "PassiveAI.h"
+#include "GameObjectAI.h"
+#include "MapManager.h"
+#include "MoveSplineInit.h"
+#include "ulduar.h"
+
+enum Texts
+{
+ SAY_BRANN_ALGALON_INTRO_1 = 0,
+ SAY_BRANN_ALGALON_INTRO_2 = 1,
+ SAY_BRANN_ALGALON_OUTRO = 2,
+
+ SAY_ALGALON_INTRO_1 = 0,
+ SAY_ALGALON_INTRO_2 = 1,
+ SAY_ALGALON_INTRO_3 = 2,
+ SAY_ALGALON_START_TIMER = 3,
+ SAY_ALGALON_AGGRO = 4,
+ SAY_ALGALON_COLLAPSING_STAR = 5,
+ EMOTE_ALGALON_COLLAPSING_STAR = 6,
+ SAY_ALGALON_BIG_BANG = 7,
+ EMOTE_ALGALON_BIG_BANG = 8,
+ SAY_ALGALON_ASCEND = 9,
+ EMOTE_ALGALON_COSMIC_SMASH = 10,
+ SAY_ALGALON_PHASE_TWO = 11,
+ SAY_ALGALON_OUTRO_1 = 12,
+ SAY_ALGALON_OUTRO_2 = 13,
+ SAY_ALGALON_OUTRO_3 = 14,
+ SAY_ALGALON_OUTRO_4 = 15,
+ SAY_ALGALON_OUTRO_5 = 16,
+ SAY_ALGALON_DESPAWN_1 = 17,
+ SAY_ALGALON_DESPAWN_2 = 18,
+ SAY_ALGALON_DESPAWN_3 = 19,
+ SAY_ALGALON_KILL = 20,
+};
+
+enum Spells
+{
+ // Algalon the Observer
+ SPELL_ARRIVAL = 64997,
+ SPELL_RIDE_THE_LIGHTNING = 64986,
+ SPELL_SUMMON_AZEROTH = 64994,
+ SPELL_REORIGINATION = 64996,
+ SPELL_SUPERMASSIVE_FAIL = 65311,
+ SPELL_QUANTUM_STRIKE = 64395,
+ SPELL_PHASE_PUNCH = 64412,
+ SPELL_BIG_BANG = 64443,
+ SPELL_ASCEND_TO_THE_HEAVENS = 64487,
+ SPELL_COSMIC_SMASH = 62301,
+ SPELL_COSMIC_SMASH_TRIGGERED = 62304,
+ SPELL_COSMIC_SMASH_VISUAL_STATE = 62300,
+ SPELL_SELF_STUN = 65256,
+ SPELL_KILL_CREDIT = 65184,
+ SPELL_TELEPORT = 62940,
+
+ // Algalon Stalker
+ SPELL_TRIGGER_3_ADDS = 62266, // Triggers Living Constellation
+
+ // Living Constellation
+ SPELL_ARCANE_BARRAGE = 64599,
+
+ // Collapsing Star
+ SPELL_COLLAPSE = 62018,
+ SPELL_BLACK_HOLE_SPAWN_VISUAL = 62003,
+ SPELL_SUMMON_BLACK_HOLE = 62189,
+
+ // Black Hole
+ SPELL_BLACK_HOLE_TRIGGER = 62185,
+ SPELL_CONSTELLATION_PHASE_TRIGGER = 65508,
+ SPELL_CONSTELLATION_PHASE_EFFECT = 65509,
+ SPELL_BLACK_HOLE_EXPLOSION = 64122,
+ SPELL_SUMMON_VOID_ZONE_VISUAL = 64470,
+ SPELL_VOID_ZONE_VISUAL = 64469,
+ SPELL_BLACK_HOLE_CREDIT = 65312,
+
+ // Worm Hole
+ SPELL_WORM_HOLE_TRIGGER = 65251,
+ SPELL_SUMMON_UNLEASHED_DARK_MATTER = 64450,
+};
+
+uint32 const PhasePunchAlphaId[5] = {64435, 64434, 64428, 64421, 64417};
+
+enum Events
+{
+ // Celestial Planetarium Access
+ EVENT_DESPAWN_CONSOLE = 1,
+
+ // Brann Bronzebeard
+ EVENT_BRANN_MOVE_INTRO = 2,
+ EVENT_SUMMON_ALGALON = 3,
+ EVENT_BRANN_OUTRO_1 = 4,
+ EVENT_BRANN_OUTRO_2 = 5,
+
+ // Algalon the Observer
+ EVENT_INTRO_1 = 6,
+ EVENT_INTRO_2 = 7,
+ EVENT_INTRO_3 = 8,
+ EVENT_INTRO_FINISH = 9,
+ EVENT_START_COMBAT = 10,
+ EVENT_INTRO_TIMER_DONE = 11,
+ EVENT_QUANTUM_STRIKE = 12,
+ EVENT_PHASE_PUNCH = 13,
+ EVENT_SUMMON_COLLAPSING_STAR = 14,
+ EVENT_BIG_BANG = 15,
+ EVENT_RESUME_UPDATING = 16,
+ EVENT_ASCEND_TO_THE_HEAVENS = 17,
+ EVENT_EVADE = 18,
+ EVENT_COSMIC_SMASH = 19,
+ EVENT_UNLOCK_YELL = 20,
+ EVENT_OUTRO_START = 21,
+ EVENT_OUTRO_1 = 22,
+ EVENT_OUTRO_2 = 23,
+ EVENT_OUTRO_3 = 24,
+ EVENT_OUTRO_4 = 25,
+ EVENT_OUTRO_5 = 26,
+ EVENT_OUTRO_6 = 27,
+ EVENT_OUTRO_7 = 28,
+ EVENT_OUTRO_8 = 29,
+ EVENT_OUTRO_9 = 30,
+ EVENT_OUTRO_10 = 31,
+ EVENT_OUTRO_11 = 32,
+ EVENT_OUTRO_12 = 33,
+ EVENT_OUTRO_13 = 34,
+ EVENT_OUTRO_14 = 35,
+ EVENT_DESPAWN_ALGALON_1 = 36,
+ EVENT_DESPAWN_ALGALON_2 = 37,
+ EVENT_DESPAWN_ALGALON_3 = 38,
+
+ // Living Constellation
+ EVENT_ARCANE_BARRAGE = 39,
+};
+
+enum Actions
+{
+ ACTION_START_INTRO = 0,
+ ACTION_FINISH_INTRO = 1,
+ ACTION_ACTIVATE_STAR = 2,
+ ACTION_BIG_BANG = 3,
+ ACTION_ASCEND = 4,
+ ACTION_OUTRO = 5,
+};
+
+enum Points
+{
+ POINT_BRANN_INTRO = 0,
+ MAX_BRANN_WAYPOINTS_INTRO = 10,
+ POINT_BRANN_OUTRO = 10,
+ POINT_BRANN_OUTRO_END = 11,
+
+ POINT_ALGALON_LAND = 1,
+ POINT_ALGALON_OUTRO = 2,
+};
+
+enum EncounterPhases
+{
+ PHASE_NORMAL = 0,
+ PHASE_ROLE_PLAY = 1,
+ PHASE_BIG_BANG = 2,
+
+ PHASE_MASK_NO_UPDATE = (1 << PHASE_ROLE_PLAY) | (1 << PHASE_BIG_BANG),
+ PHASE_MASK_NO_CAST_CHECK = 1 << PHASE_ROLE_PLAY,
+};
+
+enum AchievmentInfo
+{
+ EVENT_ID_SUPERMASSIVE_START = 21697,
+ DATA_HAS_FED_ON_TEARS = 30043005,
+};
+
+
+Position const BrannIntroSpawnPos = {1676.277f, -162.5308f, 427.3326f, 3.235537f};
+Position const BrannIntroWaypoint[MAX_BRANN_WAYPOINTS_INTRO] =
+{
+ {1642.482f, -164.0812f, 427.2602f, 0.0f},
+ {1635.000f, -169.5145f, 427.2523f, 0.0f},
+ {1632.814f, -173.9334f, 427.2621f, 0.0f},
+ {1632.676f, -190.5927f, 425.8831f, 0.0f},
+ {1631.497f, -214.2221f, 418.1152f, 0.0f},
+ {1624.717f, -224.6876f, 418.1152f, 0.0f},
+ {1631.497f, -214.2221f, 418.1152f, 0.0f},
+ {1632.676f, -190.5927f, 425.8831f, 0.0f},
+ {1632.814f, -173.9334f, 427.2621f, 0.0f},
+ {1635.000f, -169.5145f, 427.2523f, 0.0f},
+};
+Position const AlgalonSummonPos = {1632.531f, -304.8516f, 450.1123f, 1.530165f};
+Position const AlgalonLandPos = {1632.668f, -302.7656f, 417.3211f, 1.530165f};
+
+#define LIVING_CONSTELLATION_COUNT 11
+Position const ConstellationPos[LIVING_CONSTELLATION_COUNT] =
+{
+ {1625.208f, -267.2771f, 446.4296f, 5.044002f},
+ {1658.279f, -262.5490f, 441.9073f, 4.188790f},
+ {1678.677f, -276.3280f, 427.7531f, 3.979351f},
+ {1593.389f, -299.4325f, 432.4636f, 6.073746f},
+ {1685.613f, -300.1219f, 443.2366f, 3.385939f},
+ {1591.706f, -263.8201f, 441.4153f, 5.253441f},
+ {1668.317f, -324.7676f, 457.9394f, 3.211406f},
+ {1592.242f, -325.5323f, 446.9508f, 0.226893f},
+ {1635.821f, -363.3442f, 424.3459f, 1.466077f},
+ {1672.188f, -357.2484f, 436.7337f, 2.338741f},
+ {1615.800f, -348.0065f, 442.9586f, 1.134464f},
+};
+
+#define COLLAPSING_STAR_COUNT 4
+Position const CollapsingStarPos[COLLAPSING_STAR_COUNT] =
+{
+ {1649.438f, -319.8127f, 418.3941f, 1.082104f},
+ {1647.005f, -288.6790f, 417.3955f, 3.490659f},
+ {1622.451f, -321.1563f, 417.6188f, 4.677482f},
+ {1615.060f, -291.6816f, 417.7796f, 3.490659f},
+};
+Position const AlgalonOutroPos = {1633.64f, -317.78f, 417.3211f, 0.0f};
+Position const BrannOutroPos[3] =
+{
+ {1632.023f, -243.7434f, 417.9118f, 0.0f},
+ {1631.986f, -297.7831f, 417.3210f, 0.0f},
+ {1633.832f, -216.2948f, 417.0463f, 0.0f},
+};
+
+class ActivateLivingConstellation : public BasicEvent
+{
+ public:
+ ActivateLivingConstellation(Unit* owner) : _owner(owner), _instance(owner->GetInstanceScript())
+ {
+ }
+
+ bool Execute(uint64 execTime, uint32 /*diff*/)
+ {
+ if (!_instance || _instance->GetBossState(BOSS_ALGALON) != IN_PROGRESS)
+ return true; // delete event
+
+ _owner->CastSpell((Unit*)NULL, SPELL_TRIGGER_3_ADDS, TRIGGERED_FULL_MASK);
+ _owner->m_Events.AddEvent(this, execTime + urand(45000, 50000));
+ return false;
+ }
+
+ private:
+ Unit* _owner;
+ InstanceScript* _instance;
+};
+
+class CosmicSmashDamageEvent : public BasicEvent
+{
+ public:
+ CosmicSmashDamageEvent(Unit* caster) : _caster(caster)
+ {
+ }
+
+ bool Execute(uint64 /*execTime*/, uint32 /*diff*/)
+ {
+ _caster->CastSpell((Unit*)NULL, SPELL_COSMIC_SMASH_TRIGGERED, TRIGGERED_FULL_MASK);
+ return true;
+ }
+
+ private:
+ Unit* _caster;
+};
+
+class SummonUnleashedDarkMatter : public BasicEvent
+{
+ public:
+ SummonUnleashedDarkMatter(Unit* caster) : _caster(caster)
+ {
+ }
+
+ bool Execute(uint64 execTime, uint32 /*diff*/)
+ {
+ _caster->CastSpell((Unit*)NULL, SPELL_SUMMON_UNLEASHED_DARK_MATTER, TRIGGERED_FULL_MASK);
+ _caster->m_Events.AddEvent(this, execTime + 30000);
+ return false;
+ }
+
+ private:
+ Unit* _caster;
+};
+
+class boss_algalon_the_observer : public CreatureScript
+{
+ public:
+ boss_algalon_the_observer() : CreatureScript("boss_algalon_the_observer") {}
+
+ struct boss_algalon_the_observerAI : public BossAI
+ {
+ boss_algalon_the_observerAI(Creature* creature) : BossAI(creature, BOSS_ALGALON)
+ {
+ _firstPull = true;
+ _fedOnTears = false;
+ }
+
+ void Reset()
+ {
+ _Reset();
+ me->SetReactState(REACT_PASSIVE);
+ _phaseTwo = false;
+ _fightWon = false;
+ _hasYelled = false;
+ }
+
+ void KilledUnit(Unit* victim)
+ {
+ if (victim->GetTypeId() == TYPEID_UNIT)
+ {
+ _fedOnTears = true;
+ if (!_hasYelled)
+ {
+ _hasYelled = true;
+ events.ScheduleEvent(EVENT_UNLOCK_YELL, 1000);
+ Talk(SAY_ALGALON_KILL);
+ }
+ }
+ }
+
+ void DoAction(int32 const action)
+ {
+ switch (action)
+ {
+ case ACTION_START_INTRO:
+ {
+ me->SetFlag(UNIT_FIELD_FLAGS_2, 0x20);
+ me->SetDisableGravity(true);
+ DoCast(me, SPELL_ARRIVAL, true);
+ DoCast(me, SPELL_RIDE_THE_LIGHTNING, true);
+ me->GetMotionMaster()->MovePoint(POINT_ALGALON_LAND, AlgalonLandPos);
+ me->SetHomePosition(AlgalonLandPos);
+ Movement::MoveSplineInit init(*me);
+ init.MoveTo(AlgalonLandPos.GetPositionX(), AlgalonLandPos.GetPositionY(), AlgalonLandPos.GetPositionZ());
+ init.SetOrientationFixed(true);
+ init.Launch();
+ events.Reset();
+ events.SetPhase(PHASE_ROLE_PLAY);
+ events.ScheduleEvent(EVENT_INTRO_1, 5000, 0, PHASE_ROLE_PLAY);
+ events.ScheduleEvent(EVENT_INTRO_2, 15000, 0, PHASE_ROLE_PLAY);
+ events.ScheduleEvent(EVENT_INTRO_3, 23000, 0, PHASE_ROLE_PLAY);
+ events.ScheduleEvent(EVENT_INTRO_FINISH, 36000, 0, PHASE_ROLE_PLAY);
+ break;
+ }
+ case ACTION_ASCEND:
+ events.SetPhase(PHASE_BIG_BANG);
+ events.CancelEvent(EVENT_RESUME_UPDATING);
+ events.ScheduleEvent(EVENT_ASCEND_TO_THE_HEAVENS, 1500);
+ break;
+ case EVENT_DESPAWN_ALGALON:
+ events.Reset();
+ events.SetPhase(PHASE_ROLE_PLAY);
+ if (me->isInCombat())
+ events.ScheduleEvent(EVENT_ASCEND_TO_THE_HEAVENS, 1);
+ events.ScheduleEvent(EVENT_DESPAWN_ALGALON_1, 5000);
+ events.ScheduleEvent(EVENT_DESPAWN_ALGALON_2, 17000);
+ events.ScheduleEvent(EVENT_DESPAWN_ALGALON_3, 26000);
+ me->DespawnOrUnsummon(34000);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_NPC);
+ break;
+ case ACTION_INIT_ALGALON:
+ _firstPull = false;
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ break;;
+ }
+ }
+
+ uint32 GetData(uint32 type)
+ {
+ return type == DATA_HAS_FED_ON_TEARS ? _fedOnTears : 1;
+ }
+
+ void EnterCombat(Unit* /*target*/)
+ {
+ uint32 introDelay = 0;
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_NPC);
+ events.Reset();
+ events.SetPhase(PHASE_ROLE_PLAY);
+
+ if (!_firstPull)
+ {
+ Talk(SAY_ALGALON_AGGRO);
+ _EnterCombat();
+ introDelay = 8000;
+ }
+ else
+ {
+ _firstPull = false;
+ Talk(SAY_ALGALON_START_TIMER);
+ if (Creature* brann = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BRANN_BRONZEBEARD_ALG)))
+ brann->AI()->DoAction(ACTION_FINISH_INTRO);
+
+ me->setActive(true);
+ DoZoneInCombat();
+ introDelay = 26000;
+ summons.DespawnEntry(NPC_AZEROTH);
+ instance->SetData(EVENT_DESPAWN_ALGALON, 0);
+ events.ScheduleEvent(EVENT_START_COMBAT, 18000);
+ }
+
+ events.ScheduleEvent(EVENT_INTRO_TIMER_DONE, introDelay);
+ events.ScheduleEvent(EVENT_QUANTUM_STRIKE, 3500 + introDelay);
+ events.ScheduleEvent(EVENT_PHASE_PUNCH, 15500 + introDelay);
+ events.ScheduleEvent(EVENT_SUMMON_COLLAPSING_STAR, 18000 + introDelay);
+ events.ScheduleEvent(EVENT_BIG_BANG, 90000 + introDelay);
+ events.ScheduleEvent(EVENT_ASCEND_TO_THE_HEAVENS, 360000 + introDelay);
+ events.ScheduleEvent(EVENT_COSMIC_SMASH, 25000 + introDelay);
+
+ std::list<Creature*> stalkers;
+ me->GetCreatureListWithEntryInGrid(stalkers, NPC_ALGALON_STALKER, 200.0f);
+ for (std::list<Creature*>::iterator itr = stalkers.begin(); itr != stalkers.end(); ++itr)
+ (*itr)->m_Events.KillAllEvents(true);
+ }
+
+ void MovementInform(uint32 movementType, uint32 pointId)
+ {
+ if (movementType != POINT_MOTION_TYPE)
+ return;
+
+ if (pointId == POINT_ALGALON_LAND)
+ me->SetDisableGravity(false);
+ else if (pointId == POINT_ALGALON_OUTRO)
+ {
+ me->SetFacingTo(1.605703f);
+ events.ScheduleEvent(EVENT_OUTRO_3, 1200);
+ events.ScheduleEvent(EVENT_OUTRO_4, 2400);
+ events.ScheduleEvent(EVENT_OUTRO_5, 8500);
+ events.ScheduleEvent(EVENT_OUTRO_6, 15500);
+ events.ScheduleEvent(EVENT_OUTRO_7, 55500);
+ events.ScheduleEvent(EVENT_OUTRO_8, 73500);
+ events.ScheduleEvent(EVENT_OUTRO_9, 85500);
+ events.ScheduleEvent(EVENT_OUTRO_10, 108500);
+ events.ScheduleEvent(EVENT_OUTRO_11, 123500);
+ }
+ }
+
+ void JustSummoned(Creature* summon)
+ {
+ summons.Summon(summon);
+ switch (summon->GetEntry())
+ {
+ case NPC_AZEROTH:
+ DoCastAOE(SPELL_REORIGINATION, true);
+ break;
+ case NPC_COLLAPSING_STAR:
+ summon->SetReactState(REACT_PASSIVE);
+ summon->GetMotionMaster()->MoveRandom(20.0f);
+ summon->CastSpell(summon, SPELL_COLLAPSE, TRIGGERED_FULL_MASK);
+ break;
+ case NPC_BLACK_HOLE:
+ summon->SetReactState(REACT_PASSIVE);
+ summon->CastSpell((Unit*)NULL, SPELL_BLACK_HOLE_TRIGGER, TRIGGERED_FULL_MASK);
+ summon->CastSpell(summon, SPELL_CONSTELLATION_PHASE_TRIGGER, TRIGGERED_FULL_MASK);
+ summon->CastSpell((Unit*)NULL, SPELL_BLACK_HOLE_EXPLOSION);
+ summon->CastSpell(summon, SPELL_SUMMON_VOID_ZONE_VISUAL, TRIGGERED_FULL_MASK);
+ break;
+ case NPC_ALGALON_VOID_ZONE_VISUAL_STALKER:
+ summon->CastSpell(summon, SPELL_VOID_ZONE_VISUAL, TRIGGERED_FULL_MASK);
+ break;
+ case NPC_ALGALON_STALKER_ASTEROID_TARGET_01:
+ summon->CastSpell(summon, SPELL_COSMIC_SMASH_VISUAL_STATE, TRIGGERED_FULL_MASK);
+ break;
+ case NPC_ALGALON_STALKER_ASTEROID_TARGET_02:
+ summon->m_Events.AddEvent(new CosmicSmashDamageEvent(summon), summon->m_Events.CalculateTime(3250));
+ break;
+ case NPC_WORM_HOLE:
+ summon->SetReactState(REACT_PASSIVE);
+ summon->CastSpell(summon, SPELL_WORM_HOLE_TRIGGER, TRIGGERED_FULL_MASK);
+ summon->CastSpell(summon, SPELL_SUMMON_VOID_ZONE_VISUAL, TRIGGERED_FULL_MASK);
+ break;
+ case NPC_UNLEASHED_DARK_MATTER:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
+ if (summon->Attack(target, true))
+ summon->GetMotionMaster()->MoveChase(target);
+ break;
+ }
+ }
+
+ void EnterEvadeMode()
+ {
+ instance->SetBossState(BOSS_ALGALON, FAIL);
+ BossAI::EnterEvadeMode();
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ me->SetSheath(SHEATH_STATE_UNARMED);
+ }
+
+ void DamageTaken(Unit* /*attacker*/, uint32& damage)
+ {
+ if (_fightWon)
+ {
+ damage = 0;
+ return;
+ }
+
+ if (!_phaseTwo && me->HealthBelowPctDamaged(20, damage))
+ {
+ _phaseTwo = true;
+ Talk(SAY_ALGALON_PHASE_TWO);
+ summons.DespawnEntry(NPC_LIVING_CONSTELLATION);
+ summons.DespawnEntry(NPC_COLLAPSING_STAR);
+ summons.DespawnEntry(NPC_BLACK_HOLE);
+ summons.DespawnEntry(NPC_ALGALON_VOID_ZONE_VISUAL_STALKER);
+ events.CancelEvent(EVENT_SUMMON_COLLAPSING_STAR);
+ std::list<Creature*> stalkers;
+ me->GetCreatureListWithEntryInGrid(stalkers, NPC_ALGALON_STALKER, 200.0f);
+ for (std::list<Creature*>::iterator itr = stalkers.begin(); itr != stalkers.end(); ++itr)
+ (*itr)->m_Events.KillAllEvents(true);
+ for (uint32 i = 0; i < COLLAPSING_STAR_COUNT; ++i)
+ if (Creature* wormHole = DoSummon(NPC_WORM_HOLE, CollapsingStarPos[i], TEMPSUMMON_MANUAL_DESPAWN))
+ wormHole->m_Events.AddEvent(new SummonUnleashedDarkMatter(wormHole), wormHole->m_Events.CalculateTime(i >= 2 ? 8000 : 6000));
+ }
+ else if ((int32(me->GetHealth()) - int32(damage)) < CalculatePctF<int32>(int32(me->GetMaxHealth()), 2.5f) && !_fightWon)
+ {
+ _fightWon = true;
+ damage = 0;
+ me->SetReactState(REACT_PASSIVE);
+ me->AttackStop();
+ me->setFaction(35);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ DoCast(me, SPELL_SELF_STUN);
+ events.Reset();
+ summons.DespawnAll();
+ events.SetPhase(PHASE_ROLE_PLAY);
+ events.ScheduleEvent(EVENT_OUTRO_START, 1500);
+ events.ScheduleEvent(EVENT_OUTRO_1, 7200);
+ events.ScheduleEvent(EVENT_OUTRO_2, 8700);
+ }
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if ((!(events.GetPhaseMask() & PHASE_MASK_NO_UPDATE) && !UpdateVictim()) || !CheckInRoom())
+ return;
+
+ events.Update(diff);
+
+ if (!(events.GetPhaseMask() & PHASE_MASK_NO_CAST_CHECK))
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_INTRO_1:
+ me->RemoveAurasDueToSpell(SPELL_RIDE_THE_LIGHTNING);
+ Talk(SAY_ALGALON_INTRO_1);
+ break;
+ case EVENT_INTRO_2:
+ DoCastAOE(SPELL_SUMMON_AZEROTH, true);
+ Talk(SAY_ALGALON_INTRO_2);
+ break;
+ case EVENT_INTRO_3:
+ Talk(SAY_ALGALON_INTRO_3);
+ break;
+ case EVENT_INTRO_FINISH:
+ events.Reset();
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ break;
+ case EVENT_START_COMBAT:
+ instance->SetBossState(BOSS_ALGALON, IN_PROGRESS);
+ break;
+ case EVENT_INTRO_TIMER_DONE:
+ {
+ events.SetPhase(PHASE_NORMAL);
+ me->SetSheath(SHEATH_STATE_MELEE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_NPC);
+ me->SetReactState(REACT_DEFENSIVE);
+ DoCastAOE(SPELL_SUPERMASSIVE_FAIL, true);
+ //! Workaround for Creature::_IsTargetAcceptable returning false
+ //! for creatures that start combat in REACT_PASSIVE and UNIT_FLAG_NOT_SELECTABLE
+ //! causing them to immediately evade
+ if (!me->getThreatManager().isThreatListEmpty())
+ AttackStart(me->getThreatManager().getHostilTarget());
+ for (uint32 i = 0; i < LIVING_CONSTELLATION_COUNT; ++i)
+ if (Creature* summon = DoSummon(NPC_LIVING_CONSTELLATION, ConstellationPos[i], 0, TEMPSUMMON_DEAD_DESPAWN))
+ summon->SetReactState(REACT_PASSIVE);
+
+ std::list<Creature*> stalkers;
+ me->GetCreatureListWithEntryInGrid(stalkers, NPC_ALGALON_STALKER, 200.0f);
+ if (!stalkers.empty())
+ {
+ Unit* stalker = Trinity::Containers::SelectRandomContainerElement(stalkers);
+ stalker->m_Events.AddEvent(new ActivateLivingConstellation(stalker), stalker->m_Events.CalculateTime(urand(45000, 50000)));
+ }
+ break;
+ }
+ case EVENT_QUANTUM_STRIKE:
+ DoCastVictim(SPELL_QUANTUM_STRIKE);
+ events.ScheduleEvent(EVENT_QUANTUM_STRIKE, urand(3000, 5000));
+ break;
+ case EVENT_PHASE_PUNCH:
+ DoCastVictim(SPELL_PHASE_PUNCH);
+ events.ScheduleEvent(EVENT_PHASE_PUNCH, 15500);
+ break;
+ case EVENT_SUMMON_COLLAPSING_STAR:
+ Talk(SAY_ALGALON_COLLAPSING_STAR);
+ Talk(EMOTE_ALGALON_COLLAPSING_STAR);
+ for (uint32 i = 0; i < COLLAPSING_STAR_COUNT; ++i)
+ me->SummonCreature(NPC_COLLAPSING_STAR, CollapsingStarPos[i], TEMPSUMMON_CORPSE_DESPAWN);
+ events.ScheduleEvent(EVENT_SUMMON_COLLAPSING_STAR, 60000);
+ break;
+ case EVENT_BIG_BANG:
+ {
+ Talk(SAY_ALGALON_BIG_BANG);
+ Talk(EMOTE_ALGALON_BIG_BANG);
+ events.SetPhase(PHASE_BIG_BANG);
+ std::list<Creature*> constellations;
+ me->GetCreatureListWithEntryInGrid(constellations, NPC_LIVING_CONSTELLATION, 200.0f);
+ for (std::list<Creature*>::iterator itr = constellations.begin(); itr != constellations.end(); ++itr)
+ (*itr)->AI()->DoAction(ACTION_BIG_BANG);
+ DoCastAOE(SPELL_BIG_BANG);
+ events.ScheduleEvent(EVENT_BIG_BANG, 90500);
+ events.ScheduleEvent(EVENT_RESUME_UPDATING, 9500);
+ break;
+ }
+ case EVENT_RESUME_UPDATING:
+ events.SetPhase(0);
+ break;
+ case EVENT_ASCEND_TO_THE_HEAVENS:
+ Talk(SAY_ALGALON_ASCEND);
+ DoCastAOE(SPELL_ASCEND_TO_THE_HEAVENS);
+ events.ScheduleEvent(EVENT_EVADE, 2500);
+ break;
+ case EVENT_EVADE:
+ EnterEvadeMode();
+ break;
+ case EVENT_COSMIC_SMASH:
+ Talk(EMOTE_ALGALON_COSMIC_SMASH);
+ DoCastAOE(SPELL_COSMIC_SMASH);
+ events.ScheduleEvent(EVENT_COSMIC_SMASH, 25500);
+ break;
+ case EVENT_UNLOCK_YELL:
+ _hasYelled = false;
+ break;
+ case EVENT_OUTRO_START:
+ instance->SetBossState(BOSS_ALGALON, DONE);
+ break;
+ case EVENT_OUTRO_1:
+ me->RemoveAllAuras();
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_RENAME);
+ break;
+ case EVENT_OUTRO_2:
+ _EnterEvadeMode();
+ me->AddUnitState(UNIT_STATE_EVADE);
+ me->GetMotionMaster()->MovePoint(POINT_ALGALON_OUTRO, AlgalonOutroPos);
+ break;
+ case EVENT_OUTRO_3:
+ DoCastAOE(SPELL_KILL_CREDIT);
+ break;
+ case EVENT_OUTRO_4:
+ DoCastAOE(SPELL_SUPERMASSIVE_FAIL);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ break;
+ case EVENT_OUTRO_5:
+ if (Creature* brann = DoSummon(NPC_BRANN_BRONZBEARD_ALG, BrannOutroPos[0], 131500, TEMPSUMMON_TIMED_DESPAWN))
+ brann->AI()->DoAction(ACTION_OUTRO);
+ break;
+ case EVENT_OUTRO_6:
+ Talk(SAY_ALGALON_OUTRO_1);
+ me->SetStandState(UNIT_STAND_STATE_KNEEL);
+ break;
+ case EVENT_OUTRO_7:
+ Talk(SAY_ALGALON_OUTRO_2);
+ break;
+ case EVENT_OUTRO_8:
+ Talk(SAY_ALGALON_OUTRO_3);
+ break;
+ case EVENT_OUTRO_9:
+ Talk(SAY_ALGALON_OUTRO_4);
+ break;
+ case EVENT_OUTRO_10:
+ Talk(SAY_ALGALON_OUTRO_5);
+ break;
+ case EVENT_OUTRO_11:
+ me->SetStandState(UNIT_STAND_STATE_STAND);
+ DoCast(me, SPELL_TELEPORT);
+ me->DespawnOrUnsummon(1500);
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ bool _firstPull;
+ bool _fedOnTears;
+ bool _phaseTwo;
+ bool _fightWon;
+ bool _hasYelled;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return GetUlduarAI<boss_algalon_the_observerAI>(creature);
+ }
+};
+
+class npc_living_constellation : public CreatureScript
+{
+ public:
+ npc_living_constellation() : CreatureScript("npc_living_constellation") { }
+
+ struct npc_living_constellationAI : public CreatureAI
+ {
+ npc_living_constellationAI(Creature* creature) : CreatureAI(creature)
+ {
+ }
+
+ void Reset()
+ {
+ _events.Reset();
+ _events.ScheduleEvent(EVENT_ARCANE_BARRAGE, 2500);
+ _isActive = false;
+ }
+
+ uint32 GetData(uint32 /*type*/)
+ {
+ return _isActive ? 1 : 0;
+ }
+
+ void DoAction(int32 const action)
+ {
+ switch (action)
+ {
+ case ACTION_ACTIVATE_STAR:
+ if (Creature* algalon = me->FindNearestCreature(NPC_ALGALON, 200.0f))
+ {
+ if (Unit* target = algalon->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(algalon)))
+ {
+ me->SetReactState(REACT_AGGRESSIVE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ AttackStart(target);
+ DoZoneInCombat();
+ _isActive = true;
+ }
+ }
+ break;
+ case ACTION_BIG_BANG:
+ _events.SetPhase(PHASE_BIG_BANG);
+ _events.DelayEvents(9500);
+ _events.ScheduleEvent(EVENT_RESUME_UPDATING, 9500);
+ break;
+ }
+ }
+
+ void SpellHit(Unit* caster, SpellInfo const* spell)
+ {
+ if (spell->Id != SPELL_CONSTELLATION_PHASE_EFFECT || caster->GetTypeId() != TYPEID_UNIT)
+ return;
+
+ me->DespawnOrUnsummon(1);
+ if (InstanceScript* instance = me->GetInstanceScript())
+ instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_ID_SUPERMASSIVE_START);
+ caster->CastSpell((Unit*)NULL, SPELL_BLACK_HOLE_CREDIT, TRIGGERED_FULL_MASK);
+ caster->ToCreature()->DespawnOrUnsummon(1);
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if (!(_events.GetPhaseMask() & PHASE_MASK_NO_UPDATE) && !UpdateVictim())
+ return;
+
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_ARCANE_BARRAGE:
+ DoCastAOE(SPELL_ARCANE_BARRAGE);
+ _events.ScheduleEvent(EVENT_ARCANE_BARRAGE, 2500);
+ break;
+ case EVENT_RESUME_UPDATING:
+ _events.SetPhase(0);
+ break;
+ }
+ }
+ }
+
+ private:
+ EventMap _events;
+ bool _isActive;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return GetUlduarAI<npc_living_constellationAI>(creature);
+ }
+};
+
+class npc_collapsing_star : public CreatureScript
+{
+ public:
+ npc_collapsing_star() : CreatureScript("npc_collapsing_star") { }
+
+ struct npc_collapsing_starAI : public PassiveAI
+ {
+ npc_collapsing_starAI(Creature* creature) : PassiveAI(creature)
+ {
+ _dying = false;
+ }
+
+ void JustSummoned(Creature* summon)
+ {
+ if (summon->GetEntry() != NPC_BLACK_HOLE)
+ return;
+
+ if (TempSummon* summ = me->ToTempSummon())
+ if (Creature* algalon = ObjectAccessor::GetCreature(*me, summ->GetSummonerGUID()))
+ algalon->AI()->JustSummoned(summon);
+
+ me->DespawnOrUnsummon(1);
+ }
+
+ void DamageTaken(Unit* /*attacker*/, uint32& damage)
+ {
+ if (_dying)
+ {
+ damage = 0;
+ return;
+ }
+
+ if (damage >= me->GetHealth())
+ {
+ _dying = true;
+ damage = 0;
+ DoCast(me, SPELL_BLACK_HOLE_SPAWN_VISUAL, true);
+ DoCast(me, SPELL_SUMMON_BLACK_HOLE, true);
+ }
+ }
+
+ bool _dying;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return GetUlduarAI<npc_collapsing_starAI>(creature);
+ }
+};
+
+class npc_brann_bronzebeard_algalon : public CreatureScript
+{
+ public:
+ npc_brann_bronzebeard_algalon() : CreatureScript("npc_brann_bronzebeard_algalon") { }
+
+ struct npc_brann_bronzebeard_algalonAI : public CreatureAI
+ {
+ npc_brann_bronzebeard_algalonAI(Creature* creature) : CreatureAI(creature)
+ {
+ }
+
+ void DoAction(int32 const action)
+ {
+ switch (action)
+ {
+ case ACTION_START_INTRO:
+ _currentPoint = 0;
+ _events.Reset();
+ me->SetWalk(false);
+ _events.ScheduleEvent(EVENT_BRANN_MOVE_INTRO, 1);
+ break;
+ case ACTION_FINISH_INTRO:
+ Talk(SAY_BRANN_ALGALON_INTRO_2);
+ _events.ScheduleEvent(EVENT_BRANN_MOVE_INTRO, 1);
+ break;
+ case ACTION_OUTRO:
+ me->GetMotionMaster()->MovePoint(POINT_BRANN_OUTRO, BrannOutroPos[1]);
+ _events.ScheduleEvent(EVENT_BRANN_OUTRO_1, 89500);
+ _events.ScheduleEvent(EVENT_BRANN_OUTRO_2, 116500);
+ break;
+ }
+ }
+
+ void MovementInform(uint32 movementType, uint32 pointId)
+ {
+ if (movementType != POINT_MOTION_TYPE)
+ return;
+
+ uint32 delay = 1;
+ _currentPoint = pointId + 1;
+ switch (pointId)
+ {
+ case 2:
+ delay = 8000;
+ me->SetWalk(true);
+ break;
+ case 5:
+ me->SetWalk(false);
+ Talk(SAY_BRANN_ALGALON_INTRO_1);
+ _events.ScheduleEvent(EVENT_SUMMON_ALGALON, 7500);
+ return;
+ case 9:
+ me->DespawnOrUnsummon(1);
+ return;
+ case POINT_BRANN_OUTRO:
+ case POINT_BRANN_OUTRO_END:
+ return;
+ }
+
+ _events.ScheduleEvent(EVENT_BRANN_MOVE_INTRO, delay);
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ UpdateVictim();
+
+ if (_events.Empty())
+ return;
+
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_BRANN_MOVE_INTRO:
+ if (_currentPoint < MAX_BRANN_WAYPOINTS_INTRO)
+ me->GetMotionMaster()->MovePoint(_currentPoint, BrannIntroWaypoint[_currentPoint]);
+ break;
+ case EVENT_SUMMON_ALGALON:
+ if (Creature* algalon = me->GetMap()->SummonCreature(NPC_ALGALON, AlgalonSummonPos))
+ algalon->AI()->DoAction(ACTION_START_INTRO);
+ break;
+ case EVENT_BRANN_OUTRO_1:
+ Talk(SAY_BRANN_ALGALON_OUTRO);
+ break;
+ case EVENT_BRANN_OUTRO_2:
+ me->GetMotionMaster()->MovePoint(POINT_BRANN_OUTRO_END, BrannOutroPos[2]);
+ break;
+ }
+ }
+ }
+
+ private:
+ EventMap _events;
+ uint32 _currentPoint;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return GetUlduarAI<npc_brann_bronzebeard_algalonAI>(creature);
+ }
+};
+
+class go_celestial_planetarium_access : public GameObjectScript
+{
+ public:
+ go_celestial_planetarium_access() : GameObjectScript("go_celestial_planetarium_access") {}
+
+ struct go_celestial_planetarium_accessAI : public GameObjectAI
+ {
+ go_celestial_planetarium_accessAI(GameObject* go) : GameObjectAI(go)
+ {
+ }
+
+ bool GossipHello(Player* player)
+ {
+ bool hasKey = true;
+ if (LockEntry const* lock = sLockStore.LookupEntry(go->GetGOInfo()->goober.lockId))
+ {
+ hasKey = false;
+ for (uint32 i = 0; i < MAX_LOCK_CASE; ++i)
+ {
+ if (!lock->Index[i])
+ continue;
+
+ if (player->HasItemCount(lock->Index[i], 1))
+ {
+ hasKey = true;
+ break;
+ }
+ }
+ }
+
+ if (!hasKey)
+ return false;
+
+ // Start Algalon event
+ go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
+ _events.ScheduleEvent(EVENT_DESPAWN_CONSOLE, 5000);
+ if (Creature* brann = go->SummonCreature(NPC_BRANN_BRONZBEARD_ALG, BrannIntroSpawnPos))
+ brann->AI()->DoAction(ACTION_START_INTRO);
+
+ if (InstanceScript* instance = go->GetInstanceScript())
+ {
+ instance->SetData(DATA_ALGALON_SUMMON_STATE, 1);
+ if (GameObject* sigil = ObjectAccessor::GetGameObject(*go, instance->GetData64(DATA_SIGILDOOR_01)))
+ sigil->SetGoState(GO_STATE_ACTIVE);
+
+ if (GameObject* sigil = ObjectAccessor::GetGameObject(*go, instance->GetData64(DATA_SIGILDOOR_02)))
+ sigil->SetGoState(GO_STATE_ACTIVE);
+ }
+
+ return false;
+ }
+
+ void UpdateAI(uint32 diff)
+ {
+ if (_events.Empty())
+ return;
+
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_DESPAWN_CONSOLE:
+ go->Delete();
+ break;
+ }
+ }
+ }
+
+ EventMap _events;
+ };
+
+ GameObjectAI* GetAI(GameObject* go) const
+ {
+ return GetUlduarAI<go_celestial_planetarium_accessAI>(go);
+ }
+};
+
+class spell_algalon_phase_punch : public SpellScriptLoader
+{
+ public:
+ spell_algalon_phase_punch() : SpellScriptLoader("spell_algalon_phase_punch") { }
+
+ class spell_algalon_phase_punch_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_algalon_phase_punch_AuraScript);
+
+ void HandlePeriodic(AuraEffect const* aurEff)
+ {
+ PreventDefaultAction();
+ if (GetStackAmount() != 1)
+ GetTarget()->RemoveAurasDueToSpell(PhasePunchAlphaId[GetStackAmount() - 2]);
+ GetTarget()->CastSpell(GetTarget(), PhasePunchAlphaId[GetStackAmount() - 1], TRIGGERED_FULL_MASK);
+ if (GetStackAmount() == 5)
+ Remove(AURA_REMOVE_BY_DEFAULT);
+ }
+
+ void OnRemove(AuraEffect const*, AuraEffectHandleModes)
+ {
+ if (GetStackAmount() != 5)
+ GetTarget()->RemoveAurasDueToSpell(PhasePunchAlphaId[GetStackAmount() - 1]);
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_algalon_phase_punch_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ OnEffectRemove += AuraEffectRemoveFn(spell_algalon_phase_punch_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_algalon_phase_punch_AuraScript();
+ }
+};
+
+class NotVictimFilter
+{
+ public:
+ NotVictimFilter(Unit* caster) : _victim(caster->getVictim())
+ {
+ }
+
+ bool operator()(Unit* target)
+ {
+ return target != _victim;
+ }
+
+ private:
+ Unit* _victim;
+};
+
+class spell_algalon_arcane_barrage : public SpellScriptLoader
+{
+ public:
+ spell_algalon_arcane_barrage() : SpellScriptLoader("spell_algalon_arcane_barrage") { }
+
+ class spell_algalon_arcane_barrage_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_algalon_arcane_barrage_SpellScript);
+
+ void SelectTarget(std::list<Unit*>& targets)
+ {
+ targets.remove_if(NotVictimFilter(GetCaster()));
+ }
+
+ void Register()
+ {
+ OnUnitTargetSelect += SpellUnitTargetFn(spell_algalon_arcane_barrage_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_algalon_arcane_barrage_SpellScript();
+ }
+};
+
+class ActiveConstellationFilter
+{
+ public:
+ bool operator()(Unit* target) const
+ {
+ return target->GetAI()->GetData(0);
+ }
+};
+
+class spell_algalon_trigger_3_adds : public SpellScriptLoader
+{
+ public:
+ spell_algalon_trigger_3_adds() : SpellScriptLoader("spell_algalon_trigger_3_adds") { }
+
+ class spell_algalon_trigger_3_adds_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_algalon_trigger_3_adds_SpellScript);
+
+ void SelectTarget(std::list<Unit*>& targets)
+ {
+ targets.remove_if(ActiveConstellationFilter());
+ }
+
+ void HandleDummy(SpellEffIndex effIndex)
+ {
+ PreventHitDefaultEffect(effIndex);
+ Creature* target = GetHitCreature();
+ if (!target)
+ return;
+
+ target->AI()->DoAction(ACTION_ACTIVATE_STAR);
+ }
+
+ void Register()
+ {
+ OnUnitTargetSelect += SpellUnitTargetFn(spell_algalon_trigger_3_adds_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_algalon_trigger_3_adds_SpellScript();
+ }
+};
+
+class spell_algalon_collapse : public SpellScriptLoader
+{
+ public:
+ spell_algalon_collapse() : SpellScriptLoader("spell_algalon_collapse") { }
+
+ class spell_algalon_collapse_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_algalon_collapse_AuraScript);
+
+ void HandlePeriodic(AuraEffect const* /*aurEff*/)
+ {
+ PreventDefaultAction();
+ GetTarget()->DealDamage(GetTarget(), GetTarget()->CountPctFromMaxHealth(1), NULL, NODAMAGE);
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_algalon_collapse_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_algalon_collapse_AuraScript();
+ }
+};
+
+class spell_algalon_big_bang : public SpellScriptLoader
+{
+ public:
+ spell_algalon_big_bang() : SpellScriptLoader("spell_algalon_big_bang") { }
+
+ class spell_algalon_big_bang_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_algalon_big_bang_SpellScript);
+
+ bool Load()
+ {
+ _targetCount = 0;
+ return true;
+ }
+
+ void CountTargets(std::list<Unit*>& targets)
+ {
+ _targetCount = targets.size();
+ }
+
+ void CheckTargets()
+ {
+ if (!_targetCount)
+ GetCaster()->GetAI()->DoAction(ACTION_ASCEND);
+ }
+
+ void Register()
+ {
+ OnUnitTargetSelect += SpellUnitTargetFn(spell_algalon_big_bang_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
+ AfterCast += SpellCastFn(spell_algalon_big_bang_SpellScript::CheckTargets);
+ }
+
+ uint32 _targetCount;
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_algalon_big_bang_SpellScript();
+ }
+};
+
+class spell_algalon_remove_phase : public SpellScriptLoader
+{
+ public:
+ spell_algalon_remove_phase() : SpellScriptLoader("spell_algalon_remove_phase") { }
+
+ class spell_algalon_remove_phase_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_algalon_remove_phase_AuraScript);
+
+ void HandlePeriodic(AuraEffect const* /*aurEff*/)
+ {
+ PreventDefaultAction();
+ GetTarget()->RemoveAurasByType(SPELL_AURA_PHASE);
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_algalon_remove_phase_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_algalon_remove_phase_AuraScript();
+ }
+};
+
+class spell_algalon_cosmic_smash : public SpellScriptLoader
+{
+ public:
+ spell_algalon_cosmic_smash() : SpellScriptLoader("spell_algalon_cosmic_smash") { }
+
+ class spell_algalon_cosmic_smash_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_algalon_cosmic_smash_SpellScript);
+
+ void ModDestHeight(SpellEffIndex /*effIndex*/)
+ {
+ Position offset = {0.0f, 0.0f, 65.0f, 0.0f};
+ const_cast<WorldLocation*>(GetTargetDest())->RelocateOffset(offset);
+ GetHitDest()->RelocateOffset(offset);
+ }
+
+ void Register()
+ {
+ OnEffectLaunch += SpellEffectFn(spell_algalon_cosmic_smash_SpellScript::ModDestHeight, EFFECT_0, SPELL_EFFECT_SUMMON);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_algalon_cosmic_smash_SpellScript();
+ }
+};
+
+class spell_algalon_cosmic_smash_damage : public SpellScriptLoader
+{
+ public:
+ spell_algalon_cosmic_smash_damage() : SpellScriptLoader("spell_algalon_cosmic_smash_damage") { }
+
+ class spell_algalon_cosmic_smash_damage_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_algalon_cosmic_smash_damage_SpellScript);
+
+ void RecalculateDamage()
+ {
+ if (!GetTargetDest() || !GetHitUnit())
+ return;
+
+ float distance = GetHitUnit()->GetDistance2d(GetTargetDest()->GetPositionX(), GetTargetDest()->GetPositionY());
+ if (distance > 6.0f)
+ SetHitDamage(int32(float(GetHitDamage()) / distance) * 2);
+ }
+
+ void Register()
+ {
+ OnHit += SpellHitFn(spell_algalon_cosmic_smash_damage_SpellScript::RecalculateDamage);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_algalon_cosmic_smash_damage_SpellScript();
+ }
+};
+
+class spell_algalon_supermassive_fail : public SpellScriptLoader
+{
+ public:
+ spell_algalon_supermassive_fail() : SpellScriptLoader("spell_algalon_supermassive_fail") { }
+
+ class spell_algalon_supermassive_fail_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_algalon_supermassive_fail_SpellScript);
+
+ void RecalculateDamage()
+ {
+ if (!GetHitPlayer())
+ return;
+
+ GetHitPlayer()->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACHIEVEMENT_CRITERIA_CONDITION_NO_SPELL_HIT, GetSpellInfo()->Id, true);
+ }
+
+ void Register()
+ {
+ OnHit += SpellHitFn(spell_algalon_supermassive_fail_SpellScript::RecalculateDamage);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_algalon_supermassive_fail_SpellScript();
+ }
+};
+
+class achievement_he_feeds_on_your_tears : public AchievementCriteriaScript
+{
+ public:
+ achievement_he_feeds_on_your_tears() : AchievementCriteriaScript("achievement_he_feeds_on_your_tears") { }
+
+ bool OnCheck(Player* /*source*/, Unit* target)
+ {
+ return !target->GetAI()->GetData(DATA_HAS_FED_ON_TEARS);
+ }
+};
+
+void AddSC_boss_algalon_the_observer()
+{
+ new boss_algalon_the_observer();
+ new npc_living_constellation();
+ new npc_collapsing_star();
+ new npc_brann_bronzebeard_algalon();
+ new go_celestial_planetarium_access();
+ new spell_algalon_phase_punch();
+ new spell_algalon_arcane_barrage();
+ new spell_algalon_trigger_3_adds();
+ new spell_algalon_collapse();
+ new spell_algalon_big_bang();
+ new spell_algalon_remove_phase();
+ new spell_algalon_cosmic_smash();
+ new spell_algalon_cosmic_smash_damage();
+ new spell_algalon_supermassive_fail();
+ new achievement_he_feeds_on_your_tears();
+}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
index 727f40aef81..c7091b42c5a 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
@@ -947,13 +947,19 @@ class spell_xt002_tympanic_tantrum : public SpellScriptLoader
void FilterTargets(std::list<Unit*>& unitList)
{
- unitList.remove_if (PlayerOrPetCheck());
+ unitList.remove_if(PlayerOrPetCheck());
+ }
+
+ void RecalculateDamage()
+ {
+ SetHitDamage(GetHitUnit()->CountPctFromMaxHealth(GetHitDamage()));
}
void Register()
{
OnUnitTargetSelect += SpellUnitTargetFn(spell_xt002_tympanic_tantrum_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnUnitTargetSelect += SpellUnitTargetFn(spell_xt002_tympanic_tantrum_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
+ OnHit += SpellHitFn(spell_xt002_tympanic_tantrum_SpellScript::RecalculateDamage);
}
};
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index 22858cf69e5..654d763ddbc 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
@@ -22,9 +22,14 @@
static DoorData const doorData[] =
{
- { GO_LEVIATHAN_DOOR, BOSS_LEVIATHAN, DOOR_TYPE_ROOM, BOUNDARY_S },
- { GO_XT_002_DOOR, BOSS_XT002, DOOR_TYPE_ROOM, BOUNDARY_S },
- { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE },
+ {GO_LEVIATHAN_DOOR, BOSS_LEVIATHAN, DOOR_TYPE_ROOM, BOUNDARY_S },
+ {GO_XT_002_DOOR, BOSS_XT002, DOOR_TYPE_ROOM, BOUNDARY_S },
+ {GO_DOODAD_UL_SIGILDOOR_03, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_W },
+ {GO_DOODAD_UL_UNIVERSEFLOOR_01, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_NONE },
+ {GO_DOODAD_UL_UNIVERSEFLOOR_02, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
+ {GO_DOODAD_UL_UNIVERSEGLOBE01, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
+ {GO_DOODAD_UL_ULDUAR_TRAPDOOR_03, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
+ {0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE },
};
class instance_ulduar : public InstanceMapScript
@@ -36,7 +41,6 @@ class instance_ulduar : public InstanceMapScript
{
instance_ulduar_InstanceMapScript(InstanceMap* map) : InstanceScript(map) { }
- uint32 Encounter[MAX_ENCOUNTER];
std::string m_strInstData;
// Creatures
@@ -72,6 +76,12 @@ class instance_ulduar : public InstanceMapScript
uint64 HodirDoorGUID;
uint64 HodirIceDoorGUID;
uint64 ArchivumDoorGUID;
+ uint64 AlgalonSigilDoorGUID[3];
+ uint64 AlgalonFloorGUID[2];
+ uint64 AlgalonUniverseGUID;
+ uint64 AlgalonTrapdoorGUID;
+ uint64 BrannBronzebeardAlgGUID;
+ uint64 GiftOfTheObserverGUID;
// Miscellaneous
uint32 TeamInInstance;
@@ -111,35 +121,49 @@ class instance_ulduar : public InstanceMapScript
HodirDoorGUID = 0;
HodirIceDoorGUID = 0;
ArchivumDoorGUID = 0;
+ AlgalonUniverseGUID = 0;
+ AlgalonTrapdoorGUID = 0;
+ BrannBronzebeardAlgGUID = 0;
+ GiftOfTheObserverGUID = 0;
+ _algalonTimer = 61;
+ _maxArmorItemLevel = 0;
+ _maxWeaponItemLevel = 0;
TeamInInstance = 0;
HodirRareCacheData = 0;
ColossusData = 0;
elderCount = 0;
conSpeedAtory = false;
Unbroken = true;
+ _summonAlgalon = false;
- memset(Encounter, 0, sizeof(Encounter));
+ memset(AlgalonSigilDoorGUID, 0, sizeof(AlgalonSigilDoorGUID));
+ memset(AlgalonFloorGUID, 0, sizeof(AlgalonFloorGUID));
memset(XTToyPileGUIDs, 0, sizeof(XTToyPileGUIDs));
memset(AssemblyGUIDs, 0, sizeof(AssemblyGUIDs));
memset(RazorHarpoonGUIDs, 0, sizeof(RazorHarpoonGUIDs));
memset(KeeperGUIDs, 0, sizeof(KeeperGUIDs));
}
- bool IsEncounterInProgress() const
+ void FillInitialWorldStates(WorldPacket& packet)
{
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- {
- if (Encounter[i] == IN_PROGRESS)
- return true;
- }
-
- return false;
+ packet << uint32(WORLD_STATE_ALGALON_TIMER_ENABLED) << uint32(_algalonTimer && _algalonTimer <= 60);
+ packet << uint32(WORLD_STATE_ALGALON_DESPAWN_TIMER) << uint32(std::min<uint32>(_algalonTimer, 60));
}
void OnPlayerEnter(Player* player)
{
if (!TeamInInstance)
TeamInInstance = player->GetTeam();
+
+ if (_summonAlgalon)
+ {
+ _summonAlgalon = false;
+ TempSummon* algalon = instance->SummonCreature(NPC_ALGALON, AlgalonLandPos);
+ if (_algalonTimer && _algalonTimer <= 60)
+ algalon->AI()->DoAction(ACTION_INIT_ALGALON);
+ else
+ algalon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ }
}
void OnCreatureCreate(Creature* creature)
@@ -267,9 +291,32 @@ class instance_ulduar : public InstanceMapScript
if (TeamInInstance == HORDE)
creature->UpdateEntry(NPC_BATTLE_PRIEST_GINA, HORDE);
break;
+ case NPC_BRANN_BRONZBEARD_ALG:
+ BrannBronzebeardAlgGUID = creature->GetGUID();
+ break;
+ //! These creatures are summoned by something else than Algalon
+ //! but need to be controlled/despawned by him - so they need to be
+ //! registered in his summon list
+ case NPC_ALGALON_VOID_ZONE_VISUAL_STALKER:
+ case NPC_ALGALON_STALKER_ASTEROID_TARGET_01:
+ case NPC_ALGALON_STALKER_ASTEROID_TARGET_02:
+ case NPC_UNLEASHED_DARK_MATTER:
+ if (Creature* algalon = instance->GetCreature(AlgalonGUID))
+ algalon->AI()->JustSummoned(creature);
+ break;
}
+ }
- }
+ void OnCreatureRemove(Creature* creature)
+ {
+ switch (creature->GetEntry())
+ {
+ case NPC_BRANN_BRONZBEARD_ALG:
+ if (BrannBronzebeardAlgGUID == creature->GetGUID())
+ BrannBronzebeardAlgGUID = 0;
+ break;
+ }
+ }
void OnGameObjectCreate(GameObject* gameObject)
{
@@ -340,6 +387,45 @@ class instance_ulduar : public InstanceMapScript
if (GetBossState(BOSS_ASSEMBLY_OF_IRON) != DONE)
HandleGameObject(ArchivumDoorGUID, false);
break;
+ case GO_CELESTIAL_PLANETARIUM_ACCESS_10:
+ case GO_CELESTIAL_PLANETARIUM_ACCESS_25:
+ if (_algalonSummoned)
+ gameObject->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
+ break;
+ case GO_DOODAD_UL_SIGILDOOR_01:
+ AlgalonSigilDoorGUID[0] = gameObject->GetGUID();
+ if (_algalonSummoned)
+ gameObject->SetGoState(GO_STATE_ACTIVE);
+ break;
+ case GO_DOODAD_UL_SIGILDOOR_02:
+ AlgalonSigilDoorGUID[1] = gameObject->GetGUID();
+ if (_algalonSummoned)
+ gameObject->SetGoState(GO_STATE_ACTIVE);
+ break;
+ case GO_DOODAD_UL_SIGILDOOR_03:
+ AlgalonSigilDoorGUID[2] = gameObject->GetGUID();
+ AddDoor(gameObject, true);
+ break;
+ case GO_DOODAD_UL_UNIVERSEFLOOR_01:
+ AlgalonFloorGUID[0] = gameObject->GetGUID();
+ AddDoor(gameObject, true);
+ break;
+ case GO_DOODAD_UL_UNIVERSEFLOOR_02:
+ AlgalonFloorGUID[1] = gameObject->GetGUID();
+ AddDoor(gameObject, true);
+ break;
+ case GO_DOODAD_UL_UNIVERSEGLOBE01:
+ AlgalonUniverseGUID = gameObject->GetGUID();
+ AddDoor(gameObject, true);
+ break;
+ case GO_DOODAD_UL_ULDUAR_TRAPDOOR_03:
+ AlgalonTrapdoorGUID = gameObject->GetGUID();
+ AddDoor(gameObject, true);
+ break;
+ case GO_GIFT_OF_THE_OBSERVER_10:
+ case GO_GIFT_OF_THE_OBSERVER_25:
+ GiftOfTheObserverGUID = gameObject->GetGUID();
+ break;
}
}
@@ -348,10 +434,14 @@ class instance_ulduar : public InstanceMapScript
switch (gameObject->GetEntry())
{
case GO_LEVIATHAN_DOOR:
- AddDoor(gameObject, false);
- break;
case GO_XT_002_DOOR:
+ case GO_DOODAD_UL_SIGILDOOR_03:
+ case GO_DOODAD_UL_UNIVERSEFLOOR_01:
+ case GO_DOODAD_UL_UNIVERSEFLOOR_02:
+ case GO_DOODAD_UL_UNIVERSEGLOBE01:
+ case GO_DOODAD_UL_ULDUAR_TRAPDOOR_03:
AddDoor(gameObject, false);
+ break;
default:
break;
}
@@ -389,6 +479,7 @@ class instance_ulduar : public InstanceMapScript
// Flame Leviathan's Tower Event triggers
Creature* FlameLeviathan = instance->GetCreature(LeviathanGUID);
if (FlameLeviathan && FlameLeviathan->isAlive()) // No leviathan, no event triggering ;)
+ {
switch (eventId)
{
case EVENT_TOWER_OF_STORM_DESTROYED:
@@ -404,6 +495,7 @@ class instance_ulduar : public InstanceMapScript
FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_LIFE_DESTROYED);
break;
}
+ }
}
@@ -464,6 +556,52 @@ class instance_ulduar : public InstanceMapScript
if (GameObject* gameObject = instance->GetGameObject(ThorimChestGUID))
gameObject->SetRespawnTime(gameObject->GetRespawnDelay());
break;
+ case BOSS_ALGALON:
+ if (state == DONE)
+ {
+ _events.CancelEvent(EVENT_UPDATE_ALGALON_TIMER);
+ _events.CancelEvent(EVENT_DESPAWN_ALGALON);
+ DoUpdateWorldState(WORLD_STATE_ALGALON_TIMER_ENABLED, 0);
+ _algalonTimer = 61;
+ if (GameObject* gameObject = instance->GetGameObject(GiftOfTheObserverGUID))
+ gameObject->SetRespawnTime(gameObject->GetRespawnDelay());
+ // get item level (recheck weapons)
+ Map::PlayerList const& players = instance->GetPlayers();
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ if (Player* player = itr->getSource())
+ for (uint8 slot = EQUIPMENT_SLOT_MAINHAND; slot <= EQUIPMENT_SLOT_RANGED; ++slot)
+ if (Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
+ if (item->GetTemplate()->ItemLevel > _maxWeaponItemLevel)
+ _maxWeaponItemLevel = item->GetTemplate()->ItemLevel;
+ }
+ else if (state == IN_PROGRESS)
+ {
+ // get item level (armor cannot be swapped in combat)
+ Map::PlayerList const& players = instance->GetPlayers();
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ {
+ if (Player* player = itr->getSource())
+ {
+ for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
+ {
+ if (slot == EQUIPMENT_SLOT_TABARD || slot == EQUIPMENT_SLOT_BODY)
+ continue;
+
+ if (Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
+ {
+ if (slot >= EQUIPMENT_SLOT_MAINHAND && slot <= EQUIPMENT_SLOT_RANGED)
+ {
+ if (item->GetTemplate()->ItemLevel > _maxWeaponItemLevel)
+ _maxWeaponItemLevel = item->GetTemplate()->ItemLevel;
+ }
+ else if (item->GetTemplate()->ItemLevel > _maxArmorItemLevel)
+ _maxArmorItemLevel = item->GetTemplate()->ItemLevel;
+ }
+ }
+ }
+ }
+ }
+ break;
}
return true;
@@ -496,6 +634,16 @@ class instance_ulduar : public InstanceMapScript
case DATA_UNBROKEN:
Unbroken = bool(data);
break;
+ case EVENT_DESPAWN_ALGALON:
+ DoUpdateWorldState(WORLD_STATE_ALGALON_TIMER_ENABLED, 1);
+ DoUpdateWorldState(WORLD_STATE_ALGALON_DESPAWN_TIMER, 60);
+ _algalonTimer = 60;
+ _events.ScheduleEvent(EVENT_DESPAWN_ALGALON, 3600000);
+ _events.ScheduleEvent(EVENT_UPDATE_ALGALON_TIMER, 60000);
+ break;
+ case DATA_ALGALON_SUMMON_STATE:
+ _algalonSummoned = true;
+ break;
default:
break;
}
@@ -570,6 +718,22 @@ class instance_ulduar : public InstanceMapScript
return KeeperGUIDs[1];
case BOSS_STONEBARK:
return KeeperGUIDs[2];
+ case DATA_SIGILDOOR_01:
+ return AlgalonSigilDoorGUID[0];
+ case DATA_SIGILDOOR_02:
+ return AlgalonSigilDoorGUID[1];
+ case DATA_SIGILDOOR_03:
+ return AlgalonSigilDoorGUID[2];
+ case DATA_UNIVERSE_FLOOR_01:
+ return AlgalonFloorGUID[0];
+ case DATA_UNIVERSE_FLOOR_02:
+ return AlgalonFloorGUID[1];
+ case DATA_UNIVERSE_GLOBE:
+ return AlgalonUniverseGUID;
+ case DATA_ALGALON_TRAPDOOR:
+ return AlgalonTrapdoorGUID;
+ case DATA_BRANN_BRONZEBEARD_ALG:
+ return BrannBronzebeardAlgGUID;
}
return 0;
@@ -592,12 +756,23 @@ class instance_ulduar : public InstanceMapScript
return 0;
}
+ bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* , Unit const* /* = NULL */, uint32 /* = 0 */)
+ {
+ switch (criteriaId)
+ {
+ case CRITERIA_HERALD_OF_TITANS:
+ return _maxArmorItemLevel <= MAX_HERALD_ARMOR_ITEMLEVEL && _maxWeaponItemLevel <= MAX_HERALD_WEAPON_ITEMLEVEL;
+ }
+
+ return false;
+ }
+
std::string GetSaveData()
{
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
- saveStream << "U U " << GetBossSaveData() << GetData(DATA_COLOSSUS);
+ saveStream << "U U " << GetBossSaveData() << GetData(DATA_COLOSSUS) << ' ' << _algalonTimer << ' ' << (_algalonSummoned ? 1 : 0);
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
@@ -627,15 +802,68 @@ class instance_ulduar : public InstanceMapScript
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
- if (i == DATA_COLOSSUS)
- SetData(i, tmpState);
- else
- SetBossState(i, EncounterState(tmpState));
+ SetBossState(i, EncounterState(tmpState));
+ }
+
+ uint32 tempState;
+ loadStream >> tempState;
+ if (tempState == IN_PROGRESS || tempState > SPECIAL)
+ tempState = NOT_STARTED;
+ SetData(DATA_COLOSSUS, tempState);
+
+ loadStream >> _algalonTimer;
+ loadStream >> tempState;
+ _algalonSummoned = tempState != 0;
+ if (_algalonSummoned && GetBossState(BOSS_ALGALON) != DONE)
+ {
+ _summonAlgalon = true;
+ if (_algalonTimer && _algalonTimer <= 60)
+ {
+ _events.ScheduleEvent(EVENT_UPDATE_ALGALON_TIMER, 60000);
+ DoUpdateWorldState(WORLD_STATE_ALGALON_TIMER_ENABLED, 1);
+ DoUpdateWorldState(WORLD_STATE_ALGALON_DESPAWN_TIMER, _algalonTimer);
+ }
}
}
OUT_LOAD_INST_DATA_COMPLETE;
}
+
+ void Update(uint32 diff)
+ {
+ if (_events.Empty())
+ return;
+
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_UPDATE_ALGALON_TIMER:
+ SaveToDB();
+ DoUpdateWorldState(WORLD_STATE_ALGALON_DESPAWN_TIMER, --_algalonTimer);
+ if (_algalonTimer)
+ _events.ScheduleEvent(EVENT_UPDATE_ALGALON_TIMER, 60000);
+ else
+ {
+ DoUpdateWorldState(WORLD_STATE_ALGALON_TIMER_ENABLED, 0);
+ _events.CancelEvent(EVENT_UPDATE_ALGALON_TIMER);
+ if (Creature* algalon = instance->GetCreature(AlgalonGUID))
+ algalon->AI()->DoAction(EVENT_DESPAWN_ALGALON);
+ }
+ break;
+ }
+ }
+ }
+
+ private:
+ EventMap _events;
+ uint32 _algalonTimer;
+ bool _summonAlgalon;
+ bool _algalonSummoned;
+ uint32 _maxArmorItemLevel;
+ uint32 _maxWeaponItemLevel;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
index a31954b8a16..d35f0559080 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
@@ -21,6 +21,8 @@
#include "ObjectMgr.h"
#define UlduarScriptName "instance_ulduar"
+extern Position const AlgalonLandPos;
+
enum UlduarBosses
{
MAX_ENCOUNTER = 20,
@@ -50,98 +52,124 @@ enum UlduarBosses
enum UlduarNPCs
{
// General
- NPC_LEVIATHAN = 33113,
- NPC_SALVAGED_DEMOLISHER = 33109,
- NPC_SALVAGED_SIEGE_ENGINE = 33060,
- NPC_IGNIS = 33118,
- NPC_RAZORSCALE = 33186,
- NPC_RAZORSCALE_CONTROLLER = 33233,
- NPC_STEELFORGED_DEFFENDER = 33236,
- NPC_EXPEDITION_COMMANDER = 33210,
- NPC_XT002 = 33293,
- NPC_XT_TOY_PILE = 33337,
- NPC_STEELBREAKER = 32867,
- NPC_MOLGEIM = 32927,
- NPC_BRUNDIR = 32857,
- NPC_KOLOGARN = 32930,
- NPC_FOCUSED_EYEBEAM = 33632,
- NPC_FOCUSED_EYEBEAM_RIGHT = 33802,
- NPC_LEFT_ARM = 32933,
- NPC_RIGHT_ARM = 32934,
- NPC_RUBBLE = 33768,
- NPC_AURIAYA = 33515,
- NPC_MIMIRON = 33350,
- NPC_HODIR = 32845,
- NPC_THORIM = 32865,
- NPC_FREYA = 32906,
- NPC_VEZAX = 33271,
- NPC_YOGGSARON = 33288,
- NPC_ALGALON = 32871,
+ NPC_LEVIATHAN = 33113,
+ NPC_SALVAGED_DEMOLISHER = 33109,
+ NPC_SALVAGED_SIEGE_ENGINE = 33060,
+ NPC_IGNIS = 33118,
+ NPC_RAZORSCALE = 33186,
+ NPC_RAZORSCALE_CONTROLLER = 33233,
+ NPC_STEELFORGED_DEFFENDER = 33236,
+ NPC_EXPEDITION_COMMANDER = 33210,
+ NPC_XT002 = 33293,
+ NPC_XT_TOY_PILE = 33337,
+ NPC_STEELBREAKER = 32867,
+ NPC_MOLGEIM = 32927,
+ NPC_BRUNDIR = 32857,
+ NPC_KOLOGARN = 32930,
+ NPC_FOCUSED_EYEBEAM = 33632,
+ NPC_FOCUSED_EYEBEAM_RIGHT = 33802,
+ NPC_LEFT_ARM = 32933,
+ NPC_RIGHT_ARM = 32934,
+ NPC_RUBBLE = 33768,
+ NPC_AURIAYA = 33515,
+ NPC_MIMIRON = 33350,
+ NPC_HODIR = 32845,
+ NPC_THORIM = 32865,
+ NPC_FREYA = 32906,
+ NPC_VEZAX = 33271,
+ NPC_YOGGSARON = 33288,
+ NPC_ALGALON = 32871,
// Mimiron
- NPC_LEVIATHAN_MKII = 33432,
- NPC_VX_001 = 33651,
- NPC_AERIAL_COMMAND_UNIT = 33670,
+ NPC_LEVIATHAN_MKII = 33432,
+ NPC_VX_001 = 33651,
+ NPC_AERIAL_COMMAND_UNIT = 33670,
// Freya's Keepers
- NPC_IRONBRANCH = 32913,
- NPC_BRIGHTLEAF = 32915,
- NPC_STONEBARK = 32914,
+ NPC_IRONBRANCH = 32913,
+ NPC_BRIGHTLEAF = 32915,
+ NPC_STONEBARK = 32914,
// Hodir's Helper NPCs
- NPC_TOR_GREYCLOUD = 32941,
- NPC_KAR_GREYCLOUD = 33333,
- NPC_EIVI_NIGHTFEATHER = 33325,
- NPC_ELLIE_NIGHTFEATHER = 32901,
- NPC_SPIRITWALKER_TARA = 33332,
- NPC_SPIRITWALKER_YONA = 32950,
- NPC_ELEMENTALIST_MAHFUUN = 33328,
- NPC_ELEMENTALIST_AVUUN = 32900,
- NPC_AMIRA_BLAZEWEAVER = 33331,
- NPC_VEESHA_BLAZEWEAVER = 32946,
- NPC_MISSY_FLAMECUFFS = 32893,
- NPC_SISSY_FLAMECUFFS = 33327,
- NPC_BATTLE_PRIEST_ELIZA = 32948,
- NPC_BATTLE_PRIEST_GINA = 33330,
- NPC_FIELD_MEDIC_PENNY = 32897,
- NPC_FIELD_MEDIC_JESSI = 33326,
+ NPC_TOR_GREYCLOUD = 32941,
+ NPC_KAR_GREYCLOUD = 33333,
+ NPC_EIVI_NIGHTFEATHER = 33325,
+ NPC_ELLIE_NIGHTFEATHER = 32901,
+ NPC_SPIRITWALKER_TARA = 33332,
+ NPC_SPIRITWALKER_YONA = 32950,
+ NPC_ELEMENTALIST_MAHFUUN = 33328,
+ NPC_ELEMENTALIST_AVUUN = 32900,
+ NPC_AMIRA_BLAZEWEAVER = 33331,
+ NPC_VEESHA_BLAZEWEAVER = 32946,
+ NPC_MISSY_FLAMECUFFS = 32893,
+ NPC_SISSY_FLAMECUFFS = 33327,
+ NPC_BATTLE_PRIEST_ELIZA = 32948,
+ NPC_BATTLE_PRIEST_GINA = 33330,
+ NPC_FIELD_MEDIC_PENNY = 32897,
+ NPC_FIELD_MEDIC_JESSI = 33326,
// Freya's trash NPCs
- NPC_CORRUPTED_SERVITOR = 33354,
- NPC_MISGUIDED_NYMPH = 33355,
- NPC_GUARDIAN_LASHER = 33430,
- NPC_FOREST_SWARMER = 33431,
- NPC_MANGROVE_ENT = 33525,
- NPC_IRONROOT_LASHER = 33526,
- NPC_NATURES_BLADE = 33527,
- NPC_GUARDIAN_OF_LIFE = 33528,
+ NPC_CORRUPTED_SERVITOR = 33354,
+ NPC_MISGUIDED_NYMPH = 33355,
+ NPC_GUARDIAN_LASHER = 33430,
+ NPC_FOREST_SWARMER = 33431,
+ NPC_MANGROVE_ENT = 33525,
+ NPC_IRONROOT_LASHER = 33526,
+ NPC_NATURES_BLADE = 33527,
+ NPC_GUARDIAN_OF_LIFE = 33528,
+
+ // Algalon the Observer
+ NPC_BRANN_BRONZBEARD_ALG = 34064,
+ NPC_AZEROTH = 34246,
+ NPC_LIVING_CONSTELLATION = 33052,
+ NPC_ALGALON_STALKER = 33086,
+ NPC_COLLAPSING_STAR = 32955,
+ NPC_BLACK_HOLE = 32953,
+ NPC_WORM_HOLE = 34099,
+ NPC_ALGALON_VOID_ZONE_VISUAL_STALKER = 34100,
+ NPC_ALGALON_STALKER_ASTEROID_TARGET_01 = 33104,
+ NPC_ALGALON_STALKER_ASTEROID_TARGET_02 = 33105,
+ NPC_UNLEASHED_DARK_MATTER = 34097,
};
enum UlduarGameObjects
{
- GO_KOLOGARN_CHEST_HERO = 195047,
- GO_KOLOGARN_CHEST = 195046,
- GO_KOLOGARN_BRIDGE = 194232,
- GO_KOLOGARN_DOOR = 194553,
- GO_THORIM_CHEST_HERO = 194315,
- GO_THORIM_CHEST = 194314,
- GO_HODIR_RARE_CACHE_OF_WINTER = 194200,
- GO_HODIR_RARE_CACHE_OF_WINTER_HERO = 194201,
- GO_HODIR_CHEST_HERO = 194308,
- GO_HODIR_CHEST = 194307,
- GO_LEVIATHAN_DOOR = 194905,
- GO_LEVIATHAN_GATE = 194630,
- GO_XT_002_DOOR = 194631,
- GO_VEZAX_DOOR = 194750,
- GO_MOLE_MACHINE = 194316,
- GO_RAZOR_HARPOON_1 = 194542,
- GO_RAZOR_HARPOON_2 = 194541,
- GO_RAZOR_HARPOON_3 = 194543,
- GO_RAZOR_HARPOON_4 = 194519,
- GO_RAZOR_BROKEN_HARPOON = 194565,
- GO_HODIR_DOOR = 194634,
- GO_HODIR_ICE_DOOR = 194441,
- GO_ARCHIVUM_DOOR = 194556,
+ GO_KOLOGARN_CHEST_HERO = 195047,
+ GO_KOLOGARN_CHEST = 195046,
+ GO_KOLOGARN_BRIDGE = 194232,
+ GO_KOLOGARN_DOOR = 194553,
+ GO_THORIM_CHEST_HERO = 194315,
+ GO_THORIM_CHEST = 194314,
+ GO_HODIR_RARE_CACHE_OF_WINTER = 194200,
+ GO_HODIR_RARE_CACHE_OF_WINTER_HERO = 194201,
+ GO_HODIR_CHEST_HERO = 194308,
+ GO_HODIR_CHEST = 194307,
+ GO_LEVIATHAN_DOOR = 194905,
+ GO_LEVIATHAN_GATE = 194630,
+ GO_XT_002_DOOR = 194631,
+ GO_VEZAX_DOOR = 194750,
+ GO_MOLE_MACHINE = 194316,
+ GO_RAZOR_HARPOON_1 = 194542,
+ GO_RAZOR_HARPOON_2 = 194541,
+ GO_RAZOR_HARPOON_3 = 194543,
+ GO_RAZOR_HARPOON_4 = 194519,
+ GO_RAZOR_BROKEN_HARPOON = 194565,
+ GO_HODIR_DOOR = 194634,
+ GO_HODIR_ICE_DOOR = 194441,
+ GO_ARCHIVUM_DOOR = 194556,
+
+ // Algalon the Observer
+ GO_CELESTIAL_PLANETARIUM_ACCESS_10 = 194628,
+ GO_CELESTIAL_PLANETARIUM_ACCESS_25 = 194752,
+ GO_DOODAD_UL_SIGILDOOR_01 = 194767,
+ GO_DOODAD_UL_SIGILDOOR_02 = 194911,
+ GO_DOODAD_UL_SIGILDOOR_03 = 194910,
+ GO_DOODAD_UL_UNIVERSEFLOOR_01 = 194715,
+ GO_DOODAD_UL_UNIVERSEFLOOR_02 = 194716,
+ GO_DOODAD_UL_UNIVERSEGLOBE01 = 194148,
+ GO_DOODAD_UL_ULDUAR_TRAPDOOR_03 = 194253,
+ GO_GIFT_OF_THE_OBSERVER_10 = 194821,
+ GO_GIFT_OF_THE_OBSERVER_25 = 194822,
};
enum LeviathanData
@@ -161,6 +189,7 @@ enum UlduarAchievementCriteriaIds
{
CRITERIA_CON_SPEED_ATORY = 21597,
CRITERIA_DISARMED = 21687,
+ CRITERIA_HERALD_OF_TITANS = 10678,
};
enum UlduarData
@@ -180,12 +209,38 @@ enum UlduarData
// Hodir
DATA_HODIR_RARE_CACHE,
+
+ // Algalon the Observer
+ DATA_ALGALON_SUMMON_STATE,
+ DATA_SIGILDOOR_01,
+ DATA_SIGILDOOR_02,
+ DATA_SIGILDOOR_03,
+ DATA_UNIVERSE_FLOOR_01,
+ DATA_UNIVERSE_FLOOR_02,
+ DATA_UNIVERSE_GLOBE,
+ DATA_ALGALON_TRAPDOOR,
+ DATA_BRANN_BRONZEBEARD_ALG,
+};
+
+enum UlduarWorldStates
+{
+ WORLD_STATE_ALGALON_DESPAWN_TIMER = 4131,
+ WORLD_STATE_ALGALON_TIMER_ENABLED = 4132,
};
enum UlduarAchievementData
{
// FL Achievement boolean
DATA_UNBROKEN = 29052906, // 2905, 2906 are achievement IDs,
+ MAX_HERALD_ARMOR_ITEMLEVEL = 226,
+ MAX_HERALD_WEAPON_ITEMLEVEL = 232,
+};
+
+enum UlduarEvents
+{
+ EVENT_DESPAWN_ALGALON = 1,
+ EVENT_UPDATE_ALGALON_TIMER = 2,
+ ACTION_INIT_ALGALON = 6,
};
template<class AI>
@@ -199,6 +254,17 @@ CreatureAI* GetUlduarAI(Creature* creature)
return NULL;
}
+template<class AI>
+GameObjectAI* GetUlduarAI(GameObject* go)
+{
+ if (InstanceMap* instance = go->GetMap()->ToInstanceMap())
+ if (instance->GetInstanceScript())
+ if (instance->GetScriptId() == sObjectMgr->GetScriptId(UlduarScriptName))
+ return new AI(go);
+
+ return NULL;
+}
+
class PlayerOrPetCheck
{
public:
diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
index 147d2d60359..a213713ae1a 100644
--- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
+++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
@@ -31,15 +31,15 @@ enum Texts
enum Spells
{
- SPELL_SHADOWVOLLEY = 32963,
+ SPELL_SHADOW_VOLLEY = 32963,
SPELL_CLEAVE = 31779,
SPELL_THUNDERCLAP = 36706,
- SPELL_VOIDBOLT = 39329,
- SPELL_MARKOFKAZZAK = 32960,
- SPELL_MARKOFKAZZAK_DAMAGE = 32961,
+ SPELL_VOID_BOLT = 39329,
+ SPELL_MARK_OF_KAZZAK = 32960,
SPELL_ENRAGE = 32964,
- SPELL_CAPTURESOUL = 32966,
- SPELL_TWISTEDREFLECTION = 21063
+ SPELL_CAPTURE_SOUL = 32966,
+ SPELL_TWISTED_REFLECTION = 21063,
+ SPELL_BERSERK = 32965,
};
enum Events
@@ -47,10 +47,11 @@ enum Events
EVENT_SHADOW_VOLLEY = 1,
EVENT_CLEAVE = 2,
EVENT_THUNDERCLAP = 3,
- EVENT_VOIDBOLT = 4,
+ EVENT_VOID_BOLT = 4,
EVENT_MARK_OF_KAZZAK = 5,
EVENT_ENRAGE = 6,
- EVENT_TWISTED_REFLECTION = 7
+ EVENT_TWISTED_REFLECTION = 7,
+ EVENT_BERSERK = 8
};
class boss_doomlord_kazzak : public CreatureScript
@@ -70,10 +71,11 @@ class boss_doomlord_kazzak : public CreatureScript
_events.ScheduleEvent(EVENT_SHADOW_VOLLEY, urand(6000, 10000));
_events.ScheduleEvent(EVENT_CLEAVE, 7000);
_events.ScheduleEvent(EVENT_THUNDERCLAP, urand(14000, 18000));
- _events.ScheduleEvent(EVENT_VOIDBOLT, 30000);
+ _events.ScheduleEvent(EVENT_VOID_BOLT, 30000);
_events.ScheduleEvent(EVENT_MARK_OF_KAZZAK, 25000);
_events.ScheduleEvent(EVENT_ENRAGE, 60000);
_events.ScheduleEvent(EVENT_TWISTED_REFLECTION, 33000);
+ _events.ScheduleEvent(EVENT_BERSERK, 180000);
}
void JustRespawned()
@@ -92,7 +94,7 @@ class boss_doomlord_kazzak : public CreatureScript
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
- DoCast(me, SPELL_CAPTURESOUL);
+ DoCast(me, SPELL_CAPTURE_SOUL);
Talk(SAY_KILL);
}
@@ -118,7 +120,7 @@ class boss_doomlord_kazzak : public CreatureScript
switch (eventId)
{
case EVENT_SHADOW_VOLLEY:
- DoCastVictim(SPELL_SHADOWVOLLEY);
+ DoCastVictim(SPELL_SHADOW_VOLLEY);
_events.ScheduleEvent(EVENT_SHADOW_VOLLEY, urand(4000, 6000));
break;
case EVENT_CLEAVE:
@@ -129,13 +131,13 @@ class boss_doomlord_kazzak : public CreatureScript
DoCastVictim(SPELL_THUNDERCLAP);
_events.ScheduleEvent(EVENT_THUNDERCLAP, urand(10000, 14000));
break;
- case EVENT_VOIDBOLT:
- DoCastVictim(SPELL_VOIDBOLT);
- _events.ScheduleEvent(EVENT_VOIDBOLT, urand(15000, 18000));
+ case EVENT_VOID_BOLT:
+ DoCastVictim(SPELL_VOID_BOLT);
+ _events.ScheduleEvent(EVENT_VOID_BOLT, urand(15000, 18000));
break;
case EVENT_MARK_OF_KAZZAK:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
- DoCast(target, SPELL_MARKOFKAZZAK);
+ DoCast(target, SPELL_MARK_OF_KAZZAK);
_events.ScheduleEvent(EVENT_MARK_OF_KAZZAK, 20000);
break;
case EVENT_ENRAGE:
@@ -145,9 +147,12 @@ class boss_doomlord_kazzak : public CreatureScript
break;
case EVENT_TWISTED_REFLECTION:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
- DoCast(target, SPELL_TWISTEDREFLECTION);
+ DoCast(target, SPELL_TWISTED_REFLECTION);
_events.ScheduleEvent(EVENT_TWISTED_REFLECTION, 15000);
break;
+ case EVENT_BERSERK:
+ DoCast(me, SPELL_BERSERK);
+ break;
default:
break;
}
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 035f9ec98b2..2d431331691 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -2618,6 +2618,44 @@ class spell_gen_wg_water : public SpellScriptLoader
}
};
+class spell_gen_count_pct_from_max_hp : public SpellScriptLoader
+{
+ public:
+ spell_gen_count_pct_from_max_hp(char const* name, int32 damagePct = 0) : SpellScriptLoader(name), _damagePct(damagePct) { }
+
+ class spell_gen_count_pct_from_max_hp_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_gen_count_pct_from_max_hp_SpellScript)
+
+ public:
+ spell_gen_count_pct_from_max_hp_SpellScript(int32 damagePct) : SpellScript(), _damagePct(damagePct) { }
+
+ void RecalculateDamage()
+ {
+ if (!_damagePct)
+ _damagePct = GetHitDamage();
+
+ SetHitDamage(GetHitUnit()->CountPctFromMaxHealth(_damagePct));
+ }
+
+ void Register()
+ {
+ OnHit += SpellHitFn(spell_gen_count_pct_from_max_hp_SpellScript::RecalculateDamage);
+ }
+
+ private:
+ int32 _damagePct;
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_gen_count_pct_from_max_hp_SpellScript(_damagePct);
+ }
+
+ private:
+ int32 _damagePct;
+};
+
void AddSC_generic_spell_scripts()
{
new spell_gen_absorb0_hitlimit1();
@@ -2669,4 +2707,6 @@ void AddSC_generic_spell_scripts()
new spell_gen_chaos_blast();
new spell_gen_ds_flush_knockback();
new spell_gen_wg_water();
+ new spell_gen_count_pct_from_max_hp("spell_gen_default_count_pct_from_max_hp");
+ new spell_gen_count_pct_from_max_hp("spell_gen_50pct_count_pct_from_max_hp", 50);
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 61b997bba35..e1cfd077444 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -2530,172 +2530,6 @@ public:
};
/*######
-## npc_tabard_vendor
-######*/
-
-enum
-{
- QUEST_TRUE_MASTERS_OF_LIGHT = 9737,
- QUEST_THE_UNWRITTEN_PROPHECY = 9762,
- QUEST_INTO_THE_BREACH = 10259,
- QUEST_BATTLE_OF_THE_CRIMSON_WATCH = 10781,
- QUEST_SHARDS_OF_AHUNE = 11972,
-
- ACHIEVEMENT_EXPLORE_NORTHREND = 45,
- ACHIEVEMENT_TWENTYFIVE_TABARDS = 1021,
- ACHIEVEMENT_THE_LOREMASTER_A = 1681,
- ACHIEVEMENT_THE_LOREMASTER_H = 1682,
-
- ITEM_TABARD_OF_THE_HAND = 24344,
- ITEM_TABARD_OF_THE_BLOOD_KNIGHT = 25549,
- ITEM_TABARD_OF_THE_PROTECTOR = 28788,
- ITEM_OFFERING_OF_THE_SHATAR = 31408,
- ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI = 31404,
- ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI = 31405,
- ITEM_TABARD_OF_THE_SUMMER_SKIES = 35279,
- ITEM_TABARD_OF_THE_SUMMER_FLAMES = 35280,
- ITEM_TABARD_OF_THE_ACHIEVER = 40643,
- ITEM_LOREMASTERS_COLORS = 43300,
- ITEM_TABARD_OF_THE_EXPLORER = 43348,
-
- SPELL_TABARD_OF_THE_BLOOD_KNIGHT = 54974,
- SPELL_TABARD_OF_THE_HAND = 54976,
- SPELL_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI = 54977,
- SPELL_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI = 54982,
- SPELL_TABARD_OF_THE_ACHIEVER = 55006,
- SPELL_TABARD_OF_THE_PROTECTOR = 55008,
- SPELL_LOREMASTERS_COLORS = 58194,
- SPELL_TABARD_OF_THE_EXPLORER = 58224,
- SPELL_TABARD_OF_SUMMER_SKIES = 62768,
- SPELL_TABARD_OF_SUMMER_FLAMES = 62769
-};
-
-#define GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT "I've lost my Tabard of Blood Knight."
-#define GOSSIP_LOST_TABARD_OF_THE_HAND "I've lost my Tabard of the Hand."
-#define GOSSIP_LOST_TABARD_OF_THE_PROTECTOR "I've lost my Tabard of the Protector."
-#define GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI "I've lost my Green Trophy Tabard of the Illidari."
-#define GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI "I've lost my Purple Trophy Tabard of the Illidari."
-#define GOSSIP_LOST_TABARD_OF_SUMMER_SKIES "I've lost my Tabard of Summer Skies."
-#define GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES "I've lost my Tabard of Summer Flames."
-#define GOSSIP_LOST_LOREMASTERS_COLORS "I've lost my Loremaster's Colors."
-#define GOSSIP_LOST_TABARD_OF_THE_EXPLORER "I've lost my Tabard of the Explorer."
-#define GOSSIP_LOST_TABARD_OF_THE_ACHIEVER "I've lost my Tabard of the Achiever."
-
-class npc_tabard_vendor : public CreatureScript
-{
-public:
- npc_tabard_vendor() : CreatureScript("npc_tabard_vendor") { }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- bool lostBloodKnight = false;
- bool lostHand = false;
- bool lostProtector = false;
- bool lostIllidari = false;
- bool lostSummer = false;
-
- //Tabard of the Blood Knight
- if (player->GetQuestRewardStatus(QUEST_TRUE_MASTERS_OF_LIGHT) && !player->HasItemCount(ITEM_TABARD_OF_THE_BLOOD_KNIGHT, 1, true))
- lostBloodKnight = true;
-
- //Tabard of the Hand
- if (player->GetQuestRewardStatus(QUEST_THE_UNWRITTEN_PROPHECY) && !player->HasItemCount(ITEM_TABARD_OF_THE_HAND, 1, true))
- lostHand = true;
-
- //Tabard of the Protector
- if (player->GetQuestRewardStatus(QUEST_INTO_THE_BREACH) && !player->HasItemCount(ITEM_TABARD_OF_THE_PROTECTOR, 1, true))
- lostProtector = true;
-
- //Green Trophy Tabard of the Illidari
- //Purple Trophy Tabard of the Illidari
- if (player->GetQuestRewardStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) &&
- (!player->HasItemCount(ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) &&
- !player->HasItemCount(ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) &&
- !player->HasItemCount(ITEM_OFFERING_OF_THE_SHATAR, 1, true)))
- lostIllidari = true;
-
- //Tabard of Summer Skies
- //Tabard of Summer Flames
- if (player->GetQuestRewardStatus(QUEST_SHARDS_OF_AHUNE) &&
- !player->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_SKIES, 1, true) &&
- !player->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_FLAMES, 1, true))
- lostSummer = true;
-
- if (lostBloodKnight || lostHand || lostProtector || lostIllidari || lostSummer)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
-
- if (lostBloodKnight)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
-
- if (lostHand)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_HAND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
-
- if (lostProtector)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_PROTECTOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
-
- if (lostIllidari)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
- }
-
- if (lostSummer)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_SKIES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
- }
-
- player->SEND_GOSSIP_MENU(13583, creature->GetGUID());
- }
- else
- player->GetSession()->SendListInventory(creature->GetGUID());
-
- return true;
- }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
- {
- player->PlayerTalkClass->ClearMenus();
- switch (action)
- {
- case GOSSIP_ACTION_TRADE:
- player->GetSession()->SendListInventory(creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF + 1:
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, SPELL_TABARD_OF_THE_BLOOD_KNIGHT, false);
- break;
- case GOSSIP_ACTION_INFO_DEF + 2:
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, SPELL_TABARD_OF_THE_HAND, false);
- break;
- case GOSSIP_ACTION_INFO_DEF + 3:
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, SPELL_TABARD_OF_THE_PROTECTOR, false);
- break;
- case GOSSIP_ACTION_INFO_DEF + 4:
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, SPELL_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, false);
- break;
- case GOSSIP_ACTION_INFO_DEF + 5:
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, SPELL_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, false);
- break;
- case GOSSIP_ACTION_INFO_DEF + 6:
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, SPELL_TABARD_OF_SUMMER_SKIES, false);
- break;
- case GOSSIP_ACTION_INFO_DEF + 7:
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, SPELL_TABARD_OF_SUMMER_FLAMES, false);
- break;
- }
- return true;
- }
-};
-
-/*######
## npc_experience
######*/
@@ -3158,7 +2992,6 @@ void AddSC_npcs_special()
new npc_wormhole();
new npc_pet_trainer();
new npc_locksmith();
- new npc_tabard_vendor();
new npc_experience();
new npc_fire_elemental();
new npc_earth_elemental();
diff --git a/src/server/shared/Debugging/WheatyExceptionReport.cpp b/src/server/shared/Debugging/WheatyExceptionReport.cpp
index 63648f66e29..febc5ef3573 100644
--- a/src/server/shared/Debugging/WheatyExceptionReport.cpp
+++ b/src/server/shared/Debugging/WheatyExceptionReport.cpp
@@ -195,7 +195,23 @@ BOOL WheatyExceptionReport::_GetWindowsVersion(TCHAR* szVersion, DWORD cntMax)
case VER_PLATFORM_WIN32_NT:
// Test for the specific product family.
if (osvi.dwMajorVersion == 6)
- _tcsncat(szVersion, _T("Windows Vista or Windows Server 2008 "), cntMax);
+ {
+ #if WINVER < 0x0500
+ if (osvi.wReserved[1] == VER_NT_WORKSTATION)
+ #else
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ #endif // WINVER < 0x0500
+ {
+ if (osvi.dwMinorVersion == 1)
+ _tcsncat(szVersion, _T("Windows 7 "), cntMax);
+ else
+ _tcsncat(szVersion, _T("Windows Vista "), cntMax);
+ }
+ else if (osvi.dwMinorVersion == 1)
+ _tcsncat(szVersion, _T("Windows Server 2008 R2 "), cntMax);
+ else
+ _tcsncat(szVersion, _T("Windows Server 2008 "), cntMax);
+ }
if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2)
_tcsncat(szVersion, _T("Microsoft Windows Server 2003 "), cntMax);
if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1)