aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/6.x/2016_05_13_00_world.sql736
-rw-r--r--src/server/game/Battlefield/Battlefield.h4
-rw-r--r--src/server/game/Battlefield/BattlefieldMgr.cpp4
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldTB.cpp869
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldTB.h728
-rw-r--r--src/server/game/Entities/Player/Player.cpp28
-rw-r--r--src/server/game/Spells/SpellMgr.cpp4
-rw-r--r--src/server/game/World/World.cpp10
-rw-r--r--src/server/game/World/World.h8
-rw-r--r--src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_tol_barad.cpp131
-rw-r--r--src/server/worldserver/worldserver.conf.dist58
12 files changed, 2577 insertions, 5 deletions
diff --git a/sql/updates/world/6.x/2016_05_13_00_world.sql b/sql/updates/world/6.x/2016_05_13_00_world.sql
new file mode 100644
index 00000000000..8a2581c86c1
--- /dev/null
+++ b/sql/updates/world/6.x/2016_05_13_00_world.sql
@@ -0,0 +1,736 @@
+-- Tol Barad --
+
+-- Spawns are located half way down
+SET @CGUID := 250970; -- 214 creature entries
+SET @OGUID := 233475; -- 111 gameobject entries
+
+-- CORRECTIONS --
+-- Creatures 45069, 45070, 45071, 45072, 45077 should have same flags just like others, 45068 or 45074.
+UPDATE `creature_template` SET `npcflag` = 32769, `unit_flags` = 2147484480 WHERE `entry` IN (45069, 45070, 45071, 45072, 45077);
+-- (not needed since it's not handled anyway, missing on retail on 5.1.0a (16357))
+-- UPDATE `gameobject_template` SET `Data4` = 26204, `Data5` = 26205 WHERE `entry` = 205103;
+-- UPDATE `gameobject_template` SET `Data22` = 1 WHERE `entry` = 205138;
+
+-- ADDONS --
+DELETE FROM `creature_template_addon` WHERE `entry` IN (50167, 50173, 47550, 48066, 48039, 48061, 48074, 48069, 48062, 48070, 48071);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
+-- Rhagha (50167), Maven Zara (50173)
+(50167, 0, 0, 0, 0, 0, '32783'),
+(50173, 0, 0, 0, 0, 0, '32783'),
+-- Questgivers
+(48066, 0, 17703, 50331648, 1, 0, ''),
+(48039, 0, 17703, 50331648, 1, 0, ''),
+(48061, 0, 17703, 50331648, 1, 0, ''),
+(48074, 0, 17703, 50331648, 1, 0, ''),
+(48069, 0, 17719, 50331648, 1, 0, ''),
+(48062, 0, 17719, 50331648, 1, 0, ''),
+(48070, 0, 17719, 50331648, 1, 0, ''),
+(48071, 0, 17719, 50331648, 1, 0, '');
+
+-- VEHICLES AND TRIGGERS --
+-- Abandoned Siege Engine (45344)
+SET @NPC = 45344;
+UPDATE `creature_template` SET `npcflag` = 16777216, `RegenHealth` = 0, `mechanic_immune_mask` = 344276858 WHERE `entry` = @NPC;
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (@NPC);
+INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
+(@NPC, 84754, 1, 0);
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC);
+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
+(@NPC, 0, 0, 0, 27, 0, 100, 0, 0, 0, 0, 0, 28, 95330, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Abandoned Siege Engine - On Passenger Enter - Remove Thick Layer of Rust');
+
+-- Siege Engine Turret (45564)
+SET @NPC = 45564;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC);
+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
+(@NPC, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 11, 85167, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Siege Engine Turret - On Spawn - Cast Siege Cannon on self');
+
+-- Tower Range Finder (45492), Tower Cannon Target (45561)
+UPDATE `creature_template` SET `InhabitType` = 7, `flags_extra` = 128 WHERE `entry` IN (45492, 45561);
+
+-- SPELLS --
+-- Tower Range Finder (84979)
+SET @SPELL = 84979;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` IN (@SPELL);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, @SPELL, 0, 0, 35, 0, 1, 60, 4, 0, 0, 0, '', 'Tower Range Finder''s targets must be within 60 yards'),
+(13, 1, @SPELL, 0, 0, 31, 0, 3, 45344, 0, 0, 0, 0, '', 'Tower Range Finder targets NPC_ABANDONED_SIEGE_ENGINE');
+
+-- Siege Cannon (85123) missile
+SET @SPELL = 85123;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` IN (85122, @SPELL);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 3, @SPELL, 0, 0, 31, 0, 3, 45561, 0, 0, 0, 0, '', 'Siege Cannon targets NPC_TOWER_CANNON_TARGET');
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (85122, @SPELL);
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(@SPELL, 'spell_siege_cannon');
+
+-- SMART AI --
+-- Problim (47593)
+SET @NPC = 47593;
+DELETE FROM `creature_template_addon` WHERE `entry` IN (@NPC);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
+(@NPC, 0, 0, 0, 1, 0, '88361');
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 10000, 10000, 10000, 20000, 11, 88421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Problim - IC Update - Cast Log Smash'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 15000, 10000, 20000, 11, 80146, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Problim - IC Update - Cast Bonk on victim');
+
+-- Baradin Crocolisk (47591)
+SET @NPC = 47591;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 5000, 10000, 20000, 20000, 11, 3604, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Baradin Crocolisk - IC Update - Cast Tendon Rip on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 15000, 10000, 20000, 11, 13445, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Baradin Crocolisk - IC Update - Cast Rend on victim');
+
+-- Ghastly Convict (47590)
+SET @NPC = 47590;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 0, 5000, 10000, 15000, 11, 37685, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Captive Spirit - IC Update - Cast Backstab on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 15000, 20000, 11, 80576, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Captive Spirit - IC Update - Cast Shadowstep on victim');
+
+-- Captive Spirit (47531)
+SET @NPC = 47531;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 0, 5000, 10000, 15000, 11, 81193, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Captive Spirit - IC Update - Cast Unrelenting Anguish on victim');
+
+-- Cellblock Ooze (47534)
+SET @NPC = 47534;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 5000, 10000, 15000, 20000, 11, 9459, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cellblock Ooze - IC Update - Cast Corrosive Ooze on victim');
+
+-- Archmage Galus (47537)
+SET @NPC = 47537;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 3000, 3000, 5000, 10000, 11, 79859, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Archmage Galus - IC Update - Cast Ice Lance on victim');
+
+-- Shivarra Destroyer (47540)
+SET @NPC = 47540;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 3000, 3000, 10000, 15000, 11, 37629, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Shivarra Destroyer - IC Update - Cast Melt Flesh on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 15000, 20000, 11, 36040, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Shivarra Destroyer - IC Update - Cast Fel Flamestrike on random hostile'),
+(@NPC, 0, 2, 0, 0, 0, 100, 0, 10000, 15000, 15000, 20000, 11, 34017, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Shivarra Destroyer - IC Update - Cast Rain of Chaos on random hostile');
+
+-- Cell Watcher (47542)
+SET @NPC = 47542;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 3000, 3000, 10000, 15000, 11, 36398, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cell Watcher - IC Update - Cast Tongue Lash on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 15000, 20000, 11, 36414, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cell Watcher - IC Update - Cast Focused Bursts on victim');
+
+-- Jailed Wrathguard (47548)
+-- Has no abilities??
+
+-- Imprisoned Imp (47549)
+UPDATE `creature_template` SET `spell1` = 36227, `AIName` = 'CasterAI' WHERE `entry` IN (47549);
+
+-- Svarnos (47544)
+SET @NPC = 47544;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 3000, 3000, 8000, 10000, 11, 84426, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Svarnos - IC Update - Cast Felbreath on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 15000, 20000, 11, 81173, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Svarnos - IC Update - Cast Pierce Frenzy on self');
+
+-- Imprisoned Worker (47550)
+SET @NPC = 47550;
+DELETE FROM `creature_template_addon` WHERE `entry` IN (@NPC);
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
+(@NPC, 0, 0, 0, 1, 233, '');
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 0, 0, 9000, 9000, 11, 38557, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Imprisoned Worker - IC Update - Cast Throw on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 15000, 20000, 11, 6016, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Imprisoned Worker - IC Update - Cast Pierce Armor on victim');
+
+-- Exiled Mage (47552)
+SET @NPC = 47552;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 3000, 15000, 15000, 20000, 11, 79880, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Exiled Mage - IC Update - Cast Slow on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 3000, 10000, 10000, 15000, 11, 22938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Exiled Mage - IC Update - Cast Arcane Explosion'),
+(@NPC, 0, 2, 0, 0, 0, 100, 0, 0, 5000, 5000, 10000, 11, 79869, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Exiled Mage - IC Update - Cast Arcane Missiles on victim');
+
+-- Warden Guard (47561)
+SET @NPC = 47561;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 0, 0, 30000, 30000, 11, 78710, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warden Guard - IC Update - Cast Threatening Shout on self'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 2000, 2000, 7000, 7000, 11, 85240, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Warden Guard - IC Update - Cast Sundering Cleave on victim');
+
+-- Warden Silva (48036)
+SET @NPC = 48036;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 7000, 7000, 15000, 20000, 11, 81219, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warden Silva - IC Update - Cast Battle Shout on self'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 7000, 7000, 7000, 7000, 11, 79878, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Warden Guard - IC Update - Cast Bloodthirst on victim'),
+(@NPC, 0, 2, 0, 0, 0, 100, 0, 8000, 8000, 15000, 20000, 11, 11977, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Warden Silva - IC Update - Cast Rend on victim');
+
+-- Alliance Hunter Infantry (47595)
+SET @NPC = 47595;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 5000, 5000, 15000, 20000, 11, 22910, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Alliance Hunter Infantry - IC Update - Cast Immolation Trap on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 1000, 1000, 15000, 20000, 11, 80009, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Alliance Hunter Infantry - IC Update - Cast Serpent Sting on victim'),
+(@NPC, 0, 2, 0, 0, 0, 100, 0, 0, 0, 2000, 2000, 11, 6660, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Alliance Hunter Infantry - IC Update - Cast Shoot on victim');
+
+-- Alliance Mage Infantry (47598) - casting Arcane Charge 36032??
+SET @NPC = 47598;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 0, 0, 6000, 6000, 11, 79868, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Alliance Mage Infantry - IC Update - Cast Arcane Blast on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 2500, 2500, 12000, 12000, 11, 22938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Mage Infantry - IC Update - Cast Arcane Explosion'),
+(@NPC, 0, 2, 0, 0, 0, 100, 0, 4000, 4000, 20000, 20000, 11, 21655, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Mage Infantry - IC Update - Cast Blink on self');
+
+-- Alliance Warrior Infantry (47599)
+SET @NPC = 47599;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 4, 0, 0, 100, 0, 0, 0, 0, 0, 11, 22120, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Alliance Warrior Infantry - On Aggro - Cast Charge on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 0, 0, 120000, 120000, 11, 80983, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Warrior Infantry - IC Update - Cast Commanding Shout on self'),
+(@NPC, 0, 2, 0, 0, 0, 100, 0, 1000, 5000, 5000, 10000, 11, 11971, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Alliance Warrior Infantry - IC Update - Cast Sunder Armor on victim'),
+(@NPC, 0, 3, 0, 0, 0, 100, 0, 5000, 10000, 10000, 20000, 11, 8078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Warrior Infantry - IC Update - Cast Thunderclap');
+
+-- Alliance Paladin Infantry (47600)
+SET @NPC = 47600;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 4, 0, 0, 100, 0, 0, 0, 0, 0, 11, 79968, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alliance Paladin Infantry - On Aggro - Cast Blessing of Kings on self'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 3000, 5000, 10000, 15000, 11, 79965, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Alliance Paladin Infantry - IC Update - Cast Avenger''s Shield on victim'),
+(@NPC, 0, 2, 0, 0, 0, 100, 0, 5000, 10000, 15000, 20000, 11, 79966, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Paladin Infantry - IC Update - Cast Consecration');
+
+-- Horde Druid Infantry (47607)
+SET @NPC = 47607;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 0, 5000, 1000, 15000, 11, 78907, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Horde Druid Infantry - IC Update - Cast Starfire on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 15000, 20000, 11, 79825, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Horde Druid Infantry - IC Update - Cast Summon Unstable Mushroom on random hostile');
+
+-- Horde Mage Infantry (47608)
+SET @NPC = 47608;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 0, 0, 3000, 3000, 11, 79854, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Horde Mage Infantry - IC Update - Cast FireBall on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 15000, 20000, 11, 79856, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Horde Mage Infantry - IC Update - Cast Flamestrike on random hostile'),
+(@NPC, 0, 2, 0, 0, 0, 100, 0, 10000, 15000, 15000, 20000, 11, 79857, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Mage Infantry - IC Update - Cast Blast Wave');
+
+-- Horde Rogue Infantry (47609)
+SET @NPC = 47609;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 7000, 7000, 15000, 20000, 11, 79851, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Rogue Infantry - IC Update - Cast Fan of Knives'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 15000, 15000, 15000, 20000, 11, 79853, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Horde Rogue Infantry - IC Update - Cast Evasion on self');
+
+-- Horde Shaman Infantry (47610)
+SET @NPC = 47610;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 0, 3000, 10000, 15000, 11, 79884, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Horde Shaman Infantry - IC Update - Cast Lightning Bolt on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 3000, 5000, 15000, 20000, 11, 79890, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Horde Shaman Infantry - IC Update - Cast Flame Shock on victim'),
+(@NPC, 0, 2, 0, 0, 0, 100, 0, 5000, 10000, 15000, 20000, 11, 79886, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Horde Shaman Infantry - IC Update - Cast Lava Burst on victim');
+
+-- Baradin Guard (51165)
+SET @NPC = 51165;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 5000, 10000, 10000, 20000, 11, 79878, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Baradin Guard - IC Update - Cast Bloodthirst on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 5000, 10000, 11, 15496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Baradin Guard - IC Update - Cast Cleave on victim');
+
+-- Hellscreams Sentry (51166)
+SET @NPC = 51166;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC);
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC;
+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
+(@NPC, 0, 0, 0, 0, 0, 100, 0, 5000, 10000, 10000, 20000, 11, 79878, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Hellscreams Sentry - IC Update - Cast Bloodthirst on victim'),
+(@NPC, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 5000, 10000, 11, 15496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Hellscreams Sentry - IC Update - Cast Cleave on victim');
+
+-- TEXTS --
+DELETE FROM `creature_text` WHERE `entry` IN (43679, 47324, 47335);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `TextRange`, `comment`) VALUES
+(43679, 1, 0, 'The East Spire has been heavily damaged!', 41, 0, 100, 0, 0, 0, 45453, 2, ''),
+(43679, 2, 0, 'The East Spire has been destroyed!', 41, 0, 100, 0, 0, 0, 45454, 2, ''),
+(43679, 3, 0, 'The West Spire has been heavily damaged!', 41, 0, 100, 0, 0, 0, 45456, 2, ''),
+(43679, 4, 0, 'The West Spire has been destroyed!', 41, 0, 100, 0, 0, 0, 45457, 2, ''),
+(43679, 5, 0, 'The South Spire has been heavily damaged!', 41, 0, 100, 0, 0, 0, 45458, 2, ''),
+(43679, 6, 0, 'The South Spire has been destroyed!', 41, 0, 100, 0, 0, 0, 45459, 2, ''),
+(43679, 7, 0, 'The Alliance has gained control of the Ironclad Garrison!', 41, 0, 100, 0, 0, 0, 45463, 2, ''),
+(43679, 8, 0, 'The Alliance has lost control of the Ironclad Garrison!', 41, 0, 100, 0, 0, 0, 45462, 2, ''),
+(43679, 9, 0, 'The Horde has taken the Ironclad Garrison!', 41, 0, 100, 0, 0, 0, 45464, 2, ''),
+(43679, 10, 0, 'The Horde has lost the Ironclad Garrison!', 41, 0, 100, 0, 0, 0, 45465, 2, ''),
+(43679, 11, 0, 'The Alliance has gained control of the Slagworks!', 41, 0, 100, 0, 0, 0, 45467, 2, ''),
+(43679, 12, 0, 'The Alliance has lost control of the Slagworks!', 41, 0, 100, 0, 0, 0, 45466, 2, ''),
+(43679, 13, 0, 'The Horde has taken the Slagworks!', 41, 0, 100, 0, 0, 0, 45468, 2, ''),
+(43679, 14, 0, 'The Horde has lost the Slagworks!', 41, 0, 100, 0, 0, 0, 45469, 2, ''),
+(43679, 15, 0, 'The Alliance has gained control of Warden''s Vigil!', 41, 0, 100, 0, 0, 0, 45471, 2, ''),
+(43679, 16, 0, 'The Alliance has lost control of Warden''s Vigil!', 41, 0, 100, 0, 0, 0, 45470, 2, ''),
+(43679, 17, 0, 'The Horde has taken Warden''s Vigil!', 41, 0, 100, 0, 0, 0, 45472, 2, ''),
+(43679, 18, 0, 'The Horde has lost Warden''s Vigil!', 41, 0, 100, 0, 0, 0, 45473, 2, ''),
+(43679, 19, 0, 'The Alliance has successfully defended Tol Barad!', 41, 0, 100, 0, 0, 8455, 45174, 2, ''),
+(43679, 20, 0, 'The Horde has successfully defended Tol Barad!', 41, 0, 100, 0, 0, 8454, 45188, 2, ''),
+(43679, 21, 0, 'The Alliance has successfully taken Tol Barad!', 41, 0, 100, 0, 0, 8455, 45189, 2, ''),
+(43679, 22, 0, 'The Horde has successfully taken Tol Barad!', 41, 0, 100, 0, 0, 8454, 45190, 2, ''),
+(43679, 23, 0, 'Warning: This vehicle is not permitted to operate outside of Tol Barad. Turn back now.', 41, 0, 100, 0, 0, 0, 45526, 0, ''),
+(43679, 24, 0, 'Preparations for Tol Barad will begin in 5 minutes!', 41, 0, 100, 0, 0, 0, 50887, 2, ''),
+(43679, 25, 0, 'Preparations for Tol Barad will begin in 2 minutes!', 41, 0, 100, 0, 0, 0, 50888, 2, ''),
+(43679, 26, 0, 'Preparations for Tol Barad will begin in 1 minute!', 41, 0, 100, 0, 0, 0, 50889, 2, ''),
+(47324, 1, 0, 'Victory in Tol Barad is ours! While the Horde offensive is crippled, we need your immediate efforts to gather resources and secure the island!', 41, 0, 100, 0, 0, 8455, 50894, 0, ''),
+(47335, 1, 0, 'Victory in Tol Barad is ours! While the Alliance offensive is crippled, we need your immediate efforts to gather resources and secure the island!', 41, 0, 100, 0, 0, 8455, 50895, 0, '');
+
+-- GRAVEYARDS --
+-- Spirit Guides (45066 - 45079)
+UPDATE `creature_template` SET `gossip_menu_id` = 45068, `ScriptName` = 'npc_tb_spirit_guide' WHERE `entry` IN (45068, 45074);
+UPDATE `creature_template` SET `gossip_menu_id` = 45069, `ScriptName` = 'npc_tb_spirit_guide' WHERE `entry` IN (45069, 45075);
+UPDATE `creature_template` SET `gossip_menu_id` = 45070, `ScriptName` = 'npc_tb_spirit_guide' WHERE `entry` IN (45070, 45078);
+UPDATE `creature_template` SET `gossip_menu_id` = 45071, `ScriptName` = 'npc_tb_spirit_guide' WHERE `entry` IN (45071, 45079);
+UPDATE `creature_template` SET `gossip_menu_id` = 45072, `ScriptName` = 'npc_tb_spirit_guide' WHERE `entry` IN (45072, 45077);
+UPDATE `creature_template` SET `gossip_menu_id` = 45073, `ScriptName` = 'npc_tb_spirit_guide' WHERE `entry` IN (45073, 45076);
+
+DELETE FROM `gossip_menu` WHERE `entry` IN (45068, 45069, 45070, 45071, 45072, 45073, 45074, 45075, 45076, 45077, 45078, 45079);
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
+(45068, 14063), (45069, 14063), (45070, 14063), (45071, 14063), (45072, 14063), (45073, 14063),
+(45074, 14063), (45075, 14063), (45076, 14063), (45077, 14063), (45078, 14063), (45079, 14063);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (45068, 45069, 45070, 45071, 45072, 45073);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES
+(45068, 0, 0, 'Take me to the Slagworks.', 45327, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45068, 2, 0, 'Take me to the Warden''s Vigil.', 45330, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45068, 3, 0, 'Take me to the East Spire.', 45331, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45068, 4, 0, 'Take me to the West Spire.', 45332, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45068, 5, 0, 'Take me to the South Spire.', 45333, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45069, 0, 0, 'Take me to the Slagworks.', 45327, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45069, 1, 0, 'Take me to the Ironclad Garrison.', 45328, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45069, 3, 0, 'Take me to the East Spire.', 45331, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45069, 4, 0, 'Take me to the West Spire.', 45332, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45069, 5, 0, 'Take me to the South Spire.', 45333, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45070, 0, 0, 'Take me to the Slagworks.', 45327, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45070, 1, 0, 'Take me to the Ironclad Garrison.', 45328, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45070, 2, 0, 'Take me to the Warden''s Vigil.', 45330, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45070, 4, 0, 'Take me to the West Spire.', 45332, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45070, 5, 0, 'Take me to the South Spire.', 45333, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45071, 0, 0, 'Take me to the Slagworks.', 45327, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45071, 1, 0, 'Take me to the Ironclad Garrison.', 45328, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45071, 2, 0, 'Take me to the Warden''s Vigil.', 45330, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45071, 3, 0, 'Take me to the East Spire.', 45331, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45071, 4, 0, 'Take me to the West Spire.', 45332, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45072, 0, 0, 'Take me to the Slagworks.', 45327, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45072, 1, 0, 'Take me to the Ironclad Garrison.', 45328, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45072, 2, 0, 'Take me to the Warden''s Vigil.', 45330, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45072, 3, 0, 'Take me to the East Spire.', 45331, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45072, 5, 0, 'Take me to the South Spire.', 45333, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45073, 1, 0, 'Take me to the Ironclad Garrison.', 45328, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45073, 2, 0, 'Take me to the Warden''s Vigil.', 45330, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45073, 3, 0, 'Take me to the East Spire.', 45331, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45073, 4, 0, 'Take me to the West Spire.', 45332, 1, 32769, 0, 0, 0, 0, NULL, 0),
+(45073, 5, 0, 'Take me to the South Spire.', 45333, 1, 32769, 0, 0, 0, 0, NULL, 0);
+
+-- SPAWNS --
+DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+213;
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseId`, `modelid`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES
+-- Cursed Depths area
+-- Archmage Galus (47537)
+(@CGUID+0, 47537, 732, 1, 1, 0, -1296.08, 875.828, 89.61353, 4.642576, 120, 0, 0), -- 47537 (Area: 5399) (Auras: 79865 - 79865) (possible waypoints or random movement)
+-- Cellblock Ooze (47534)
+(@CGUID+1, 47534, 732, 1, 1, 0, -1212.986, 837.8921, 89.57125, 0.1021679, 120, 5, 1), -- 47534 (Area: 0) (Auras: 3338 - 3338) (possible waypoints or random movement)
+(@CGUID+2, 47534, 732, 1, 1, 0, -1239.17, 830.924, 89.5302, 3.068859, 120, 5, 1), -- 47534 (Area: 0) (Auras: 3338 - 3338) (possible waypoints or random movement)
+(@CGUID+3, 47534, 732, 1, 1, 0, -1252.255, 788.9242, 89.56779, 1.396156, 120, 5, 1), -- 47534 (Area: 0) (Auras: 3338 - 3338)
+(@CGUID+4, 47534, 732, 1, 1, 0, -1255.302, 814.4387, 89.52995, 1.56135, 120, 5, 1), -- 47534 (Area: 5400) (Auras: 3338 - 3338) (possible waypoints or random movement)
+(@CGUID+5, 47534, 732, 1, 1, 0, -1263.07, 841.099, 89.55086, 4.601085, 120, 5, 1), -- 47534 (Area: 0) (Auras: 3338 - 3338) (possible waypoints or random movement)
+-- (@CGUID+6, 47534, 732, 1, 1, 0, -1294.2, 856.8137, 89.52145, 1.342058, 120, 5, 1), -- 47534 (Area: 0) (Auras: 3338 - 3338)
+(@CGUID+7, 47534, 732, 1, 1, 0, -1299.99, 858.802, 89.52593, 1.648581, 120, 5, 1), -- 47534 (Area: 0) (Auras: 3338 - 3338) (possible waypoints or random movement)
+(@CGUID+8, 47534, 732, 1, 1, 0, -1218.347, 775.1534, 120.4299, 1.073848, 120, 5, 1), -- 47534 (Area: 5658) (Auras: 3338 - 3338) (possible waypoints or random movement)
+(@CGUID+9, 47534, 732, 1, 1, 0, -1220.804, 799.319, 119.9041, 5.722214, 120, 5, 1), -- 47534 (Area: 0) (Auras: 3338 - 3338) (possible waypoints or random movement)
+(@CGUID+10, 47534, 732, 1, 1, 0, -1232.599, 822.4125, 120.0886, 5.952512, 120, 5, 1), -- 47534 (Area: 0) (Auras: 3338 - 3338)
+-- (@CGUID+11, 47534, 732, 1, 1, 0, -1240.221, 795.0685, 119.5391, 0.7272077, 120, 5, 1), -- duplicate
+-- (@CGUID+12, 47534, 732, 1, 1, 0, -1242.709, 887.5302, 121.1437, 1.570796, 120, 5, 1), -- too far
+(@CGUID+13, 47534, 732, 1, 1, 0, -1253.01, 790.9824, 120.6883, 1.1471, 120, 5, 1), -- 47534 (Area: 0) (Auras: 3338 - 3338) (possible waypoints or random movement)
+(@CGUID+14, 47534, 732, 1, 1, 0, -1278.251, 787.2203, 121.4854, 0.1371973, 120, 5, 1), -- 47534 (Area: 5658) (Auras: 3338 - 3338) (possible waypoints or random movement)
+-- Ghastly Convict (47590)
+(@CGUID+15, 47590, 732, 1, 1, 0, -1195.389, 848.7443, 89.52411, 2.124159, 120, 5, 1), -- 47590 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+16, 47590, 732, 1, 1, 0, -1209.06, 793.809, 120.9663, 0, 120, 5, 1), -- 47590 (Area: 5658) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+17, 47590, 732, 1, 1, 0, -1209.049, 818.7425, 89.52, 4.151368, 120, 5, 1), -- 47590 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+18, 47590, 732, 1, 1, 0, -1222.843, 847.0756, 89.52644, 0.2871247, 120, 5, 1), -- 47590 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+-- (@CGUID+19, 47590, 732, 1, 1, 0, -1232.744, 825.5822, 120.3064, 3.545129, 120, 5, 1), -- duplicate
+-- (@CGUID+20, 47590, 732, 1, 1, 0, -1236.111, 940.8, 119.7449, 1.929726, 120, 5, 1), -- too far
+(@CGUID+21, 47590, 732, 1, 1, 0, -1238.51, 792.644, 89.60033, 0, 120, 5, 1), -- 47590 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+22, 47590, 732, 1, 1, 0, -1238.363, 790.1481, 89.53228, 4.054383, 120, 5, 1), -- 47590 (Area: 5400) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+23, 47590, 732, 1, 1, 0, -1238.99, 815.033, 120.1563, 0, 120, 5, 1), -- 47590 (Area: 5658) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+24, 47590, 732, 1, 1, 0, -1261.99, 786.42, 122.1203, 0, 120, 5, 1), -- 47590 (Area: 5658) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+25, 47590, 732, 1, 1, 0, -1266.856, 809.337, 89.51785, 6.238548, 120, 5, 1), -- 47590 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+26, 47590, 732, 1, 1, 0, -1280.313, 854.2625, 89.52263, 0.7536047, 120, 5, 1), -- 47590 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+27, 47590, 732, 1, 1, 0, -1285.851, 765.2222, 120.4499, 2.486316, 120, 5, 1), -- 47590 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+28, 47590, 732, 1, 1, 0, -1296.935, 857.2167, 89.52328, 4.994988, 120, 5, 1), -- 47590 (Area: 0) (Auras: 33900 - 33900)
+(@CGUID+29, 47590, 732, 1, 1, 0, -1311.856, 838.0829, 89.51924, 2.179301, 120, 5, 1), -- 47590 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+-- Captive Spirit (47531)
+(@CGUID+30, 47531, 732, 1, 1, 0, -1206.231, 831.345, 89.57715, 6.075672, 120, 5, 1), -- 47531 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+-- (@CGUID+31, 47531, 732, 1, 1, 0, -1213.282, 813.0681, 122.3386, 6.169728, 120, 5, 1), -- 47531 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+32, 47531, 732, 1, 1, 0, -1216.019, 773.1226, 120.6793, 2.570909, 120, 5, 1), -- 47531 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+33, 47531, 732, 1, 1, 0, -1216.65, 813.479, 122.2273, 0, 120, 5, 1), -- 47531 (Area: 5658) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+34, 47531, 732, 1, 1, 0, -1230.179, 773.1282, 132.0358, 0.1385303, 120, 5, 1), -- 47531 (Area: 5400) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+35, 47531, 732, 1, 1, 0, -1235.488, 831.7879, 89.52909, 5.159039, 120, 5, 1), -- 47531 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+36, 47531, 732, 1, 1, 0, -1236.23, 794.142, 119.5113, 0, 120, 5, 1), -- 47531 (Area: 5658) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+37, 47531, 732, 1, 1, 0, -1248.584, 777.0118, 120.92, 5.73749, 120, 5, 1), -- 47531 (Area: 5400) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+38, 47531, 732, 1, 1, 0, -1251.9, 810.561, 89.61324, 0, 120, 5, 1), -- 47531 (Area: 0) (Auras: 33900 - 33900)
+(@CGUID+39, 47531, 732, 1, 1, 0, -1252.42, 787.99, 89.61294, 0, 120, 5, 1), -- 47531 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+40, 47531, 732, 1, 1, 0, -1262.59, 800.538, 121.1983, 0.8446221, 120, 5, 1), -- 47531 (Area: 5658) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+41, 47531, 732, 1, 1, 0, -1270.18, 834.712, 89.57574, 0, 120, 5, 1), -- 47531 (Area: 5658) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+42, 47531, 732, 1, 1, 0, -1295.02, 836.314, 89.59794, 0, 120, 5, 1), -- 47531 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+-- (@CGUID+43, 47531, 732, 1, 1, 0, -1294.654, 837.9826, 89.52651, 2.373157, 120, 5, 1), -- 47531 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+(@CGUID+44, 47531, 732, 1, 1, 0, -1296.075, 856.1942, 89.52232, 4.353926, 120, 5, 1), -- 47531 (Area: 0) (Auras: 33900 - 33900) (possible waypoints or random movement)
+
+-- D-Block area
+-- Svarnos (47544)
+(@CGUID+45, 47544, 732, 1, 1, 0, -973.3292, 1037.769, 84.58276, 4.374927, 120, 5, 1), -- 47544 (Area: 5657) (Auras: ) (possible waypoints or random movement)
+-- Shivarra Destroyer (47540)
+(@CGUID+46, 47540, 732, 1, 1, 0, -932.2653, 1211.319, 84.58222, 3.457197, 120, 5, 1), -- 47540 (Area: 5406) (possible waypoints or random movement)
+(@CGUID+47, 47540, 732, 1, 1, 0, -950.8999, 1124.927, 84.58222, 0.4037961, 120, 5, 1), -- 47540 (Area: 0) (possible waypoints or random movement)
+(@CGUID+48, 47540, 732, 1, 1, 0, -967.2576, 1215.213, 84.75766, 1.372793, 120, 5, 1), -- 47540 (Area: 0) (possible waypoints or random movement)
+(@CGUID+49, 47540, 732, 1, 1, 0, -970.5422, 1090.48, 84.58208, 1.221984, 120, 5, 1), -- 47540 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+50, 47540, 732, 1, 1, 0, -975.3828, 1166.215, 84.63705, 3.473249, 120, 5, 1), -- 47540 (Area: 0) (possible waypoints or random movement)
+(@CGUID+51, 47540, 732, 1, 1, 0, -1001.356, 1125.125, 84.53617, 3.382725, 120, 5, 1), -- 47540 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+52, 47540, 732, 1, 1, 0, -1090.846, 1173.593, 121.2136, 0.5052633, 120, 5, 1), -- 47540 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+53, 47540, 732, 1, 1, 0, -1095.88, 1130.87, 120.6383, 1.682269, 120, 5, 1), -- 47540 (Area: 5657) (Auras: ) (possible waypoints or random movement)
+-- Jailed Wrathguard (47548)
+(@CGUID+54, 47548, 732, 1, 1, 0, -924.803, 1126.199, 84.55935, 4.808213, 120, 5, 1), -- 47548 (Area: 0) (possible waypoints or random movement)
+(@CGUID+55, 47548, 732, 1, 1, 0, -951.2297, 1217.013, 84.58209, 3.485332, 120, 5, 1), -- 47548 (Area: 0) (possible waypoints or random movement)
+(@CGUID+56, 47548, 732, 1, 1, 0, -967.3814, 1189.272, 84.58223, 4.157693, 120, 5, 1), -- 47548 (Area: 0) (possible waypoints or random movement)
+(@CGUID+57, 47548, 732, 1, 1, 0, -968.6911, 1143.253, 84.58223, 5.573256, 120, 5, 1), -- 47548 (Area: 0) (possible waypoints or random movement)
+(@CGUID+58, 47548, 732, 1, 1, 0, -969.1525, 1074.581, 84.57933, 5.755729, 120, 5, 1), -- 47548 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+59, 47548, 732, 1, 1, 0, -972.2754, 1112.392, 84.7422, 4.607996, 120, 5, 1), -- 47548 (Area: 0) (possible waypoints or random movement)
+-- (@CGUID+60, 47548, 732, 1, 1, 0, -973.6989, 1145.936, 84.58223, 3.13332, 120, 5, 1), -- duplicate
+(@CGUID+61, 47548, 732, 1, 1, 0, -998.4377, 1216.844, 84.58224, 3.164948, 120, 5, 1), -- 47548 (Area: 0) (possible waypoints or random movement)
+(@CGUID+62, 47548, 732, 1, 1, 0, -1074.634, 1193.721, 123.774, 5.227451, 120, 5, 1), -- 47548 (Area: 0) (possible waypoints or random movement)
+(@CGUID+63, 47548, 732, 1, 1, 0, -1087.493, 1104.478, 123.0007, 3.280739, 120, 5, 1), -- 47548 (Area: 0) (possible waypoints or random movement)
+(@CGUID+64, 47548, 732, 1, 1, 0, -1090.991, 1153.383, 120.6032, 0.1978158, 120, 5, 1), -- 47548 (Area: 0) (possible waypoints or random movement)
+-- Imprisoned Imp (47549)
+(@CGUID+65, 47549, 732, 1, 1, 0, -985.267, 1087.6, 84.66553, 0, 120, 5, 1), -- 47549 (Area: 5401) (possible waypoints or random movement)
+(@CGUID+66, 47549, 732, 1, 1, 0, -985.707, 1072.09, 84.66544, 0, 120, 5, 1), -- 47549 (Area: 5401) (possible waypoints or random movement)
+(@CGUID+67, 47549, 732, 1, 1, 0, -981.2574, 1169.884, 84.54282, 0.5450748, 120, 5, 1), -- 47549 (Area: 0) (possible waypoints or random movement)
+(@CGUID+68, 47549, 732, 1, 1, 0, -952.9392, 1183.216, 84.58692, 0.6595569, 120, 5, 1), -- 47549 (Area: 0) (possible waypoints or random movement)
+(@CGUID+69, 47549, 732, 1, 1, 0, -913.6049, 1138.662, 84.53633, 0.7554819, 120, 5, 1), -- 47549 (Area: 5406) (possible waypoints or random movement)
+(@CGUID+70, 47549, 732, 1, 1, 0, -1057.171, 1188.644, 121.549, 0.09086681, 120, 5, 1), -- 47549 (Area: 0) (possible waypoints or random movement)
+(@CGUID+71, 47549, 732, 1, 1, 0, -1069.791, 1173.958, 121.0715, 0.8833641, 120, 5, 1), -- 47549 (Area: 0) (possible waypoints or random movement)
+(@CGUID+72, 47549, 732, 1, 1, 0, -1086.976, 1198.488, 124.8398, 1.662733, 120, 5, 1), -- 47549 (Area: 0) (possible waypoints or random movement)
+(@CGUID+73, 47549, 732, 1, 1, 0, -1087.82, 1089.06, 124.5697, 1.437385, 120, 5, 1), -- 47549 (Area: 0) (possible waypoints or random movement)
+(@CGUID+74, 47549, 732, 1, 1, 0, -1111.004, 1107.139, 121.0572, 0, 120, 5, 1), -- 47549 (Area: 5657) (possible waypoints or random movement)
+-- Cell Watcher (47542)
+(@CGUID+75, 47542, 732, 1, 1, 0, -949.13, 1209.23, 84.58218, 6.052577, 120, 5, 1), -- 47542 (Area: 0) (possible waypoints or random movement)
+(@CGUID+76, 47542, 732, 1, 1, 0, -966.1711, 1163.418, 84.58683, 4.411592, 120, 5, 1), -- 47542 (Area: 0) (possible waypoints or random movement)
+(@CGUID+77, 47542, 732, 1, 1, 0, -967.286, 1089.59, 84.58218, 5.101334, 120, 5, 1), -- 47542 (Area: 0) (Auras: 36414 - 36414) (possible waypoints or random movement)
+(@CGUID+78, 47542, 732, 1, 1, 0, -969.722, 1196.15, 84.58218, 1.34372, 120, 5, 1), -- 47542 (Area: 0) (possible waypoints or random movement)
+(@CGUID+79, 47542, 732, 1, 1, 0, -977.5602, 1213.567, 84.58195, 6.146002, 120, 5, 1), -- 47542 (Area: 0) (possible waypoints or random movement)
+(@CGUID+80, 47542, 732, 1, 1, 0, -978.3185, 1114.742, 84.58222, 5.203272, 120, 5, 1), -- 47542 (Area: 0) (possible waypoints or random movement)
+(@CGUID+81, 47542, 732, 1, 1, 0, -1097.13, 1120.07, 122.2209, 1.902061, 120, 5, 1), -- 47542 (Area: 0) (possible waypoints or random movement)
+(@CGUID+82, 47542, 732, 1, 1, 0, -1102.26, 1151.38, 119.1974, 4.665674, 120, 5, 1), -- 47542 (Area: 0) (possible waypoints or random movement)
+(@CGUID+83, 47542, 732, 1, 1, 0, -1068.836, 1101.926, 122.1348, 3.073104, 120, 5, 1), -- 47542 (Area: 5657) (Auras: 36414 - 36414) (possible waypoints or random movement)
+(@CGUID+84, 47542, 732, 1, 1, 0, -1080.14, 1184.08, 122.3486, 3.137954, 120, 5, 1), -- 47542 (Area: 5657) (Auras: 36414 - 36414) (possible waypoints or random movement)
+
+-- The Hole area
+-- Warden Silva (48036)
+(@CGUID+85, 48036, 732, 1, 1, 0, -1514.1, 1257.47, 102.9563, 3.054326, 120, 0, 0), -- 48036 (Area: 5402)
+-- Warden Guard (47561)
+(@CGUID+86, 47561, 732, 1, 1, 0, -1604.98, 1212.27, 95.09824, 4.694936, 120, 0, 0), -- 47561 (Area: 5402)
+(@CGUID+87, 47561, 732, 1, 1, 0, -1614.9, 1212.5, 95.09814, 4.694936, 120, 5, 1), -- 47561 (Area: 5659) (Auras: 78710 - 78710) (possible waypoints or random movement)
+(@CGUID+88, 47561, 732, 1, 1, 0, -1604.63, 1240.18, 101.8843, 4.625123, 120, 0, 0), -- 47561 (Area: 5402)
+(@CGUID+89, 47561, 732, 1, 1, 0, -1614.49, 1240.22, 101.8843, 4.625123, 120, 0, 0), -- 47561 (Area: 5402)
+(@CGUID+90, 47561, 732, 1, 1, 0, -1596.49, 1252.69, 101.8843, 3.054326, 120, 0, 0), -- 47561 (Area: 5402)
+(@CGUID+91, 47561, 732, 1, 1, 0, -1596.36, 1264.09, 101.8843, 3.054326, 120, 0, 0), -- 47561 (Area: 5402)
+(@CGUID+92, 47561, 732, 1, 1, 0, -1534.83, 1263.74, 101.8843, 3.717551, 120, 0, 0), -- 47561 (Area: 5402)
+(@CGUID+93, 47561, 732, 1, 1, 0, -1535.16, 1251.46, 101.8843, 2.565634, 120, 0, 0), -- 47561 (Area: 5402)
+-- Imprisoned Worker (47550)
+(@CGUID+94, 47550, 732, 1, 1, 0, -1486.66, 1137, 126.0763, 3.612832, 120, 0, 0), -- 47550 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+95, 47550, 732, 1, 1, 0, -1492.63, 1131.12, 139.1213, 2.199115, 120, 0, 0), -- 47550 (Area: 0)
+(@CGUID+96, 47550, 732, 1, 1, 0, -1462.88, 1139.46, 125.5793, 0.8552113, 120, 0, 0), -- 47550 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+97, 47550, 732, 1, 1, 0, -1467.73, 1110.03, 124.1633, 5.305801, 120, 0, 0), -- 47550 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+98, 47550, 732, 1, 1, 0, -1497.92, 1152.61, 134.1723, 3.909538, 120, 0, 0), -- 47550 (Area: 0)
+(@CGUID+99, 47550, 732, 1, 1, 0, -1495.45, 1098.02, 132.6423, 3.298672, 120, 0, 0), -- 47550 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+100, 47550, 732, 1, 1, 0, -1576.9, 1139.34, 95.09843, 4.014257, 120, 0, 0), -- 47550 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+101, 47550, 732, 1, 1, 0, -1591.41, 1149.89, 95.09814, 1.850049, 120, 0, 0), -- 47550 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+102, 47550, 732, 1, 1, 0, -1599.95, 1177.28, 95.09814, 5.77704, 120, 0, 0), -- 47550 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+103, 47550, 732, 1, 1, 0, -1600.2, 1188.39, 95.09814, 5.445427, 120, 0, 0), -- 47550 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+104, 47550, 732, 1, 1, 0, -1608.69, 1147.13, 95.09814, 3.403392, 120, 0, 0), -- 47550 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+105, 47550, 732, 1, 1, 0, -1611.36, 1097.49, 95.09814, 5.270895, 120, 0, 0), -- 47550 (Area: 5659)
+(@CGUID+106, 47550, 732, 1, 1, 0, -1614.6, 1120.97, 95.09814, 4.572762, 120, 0, 0), -- 47550 (Area: 5659)
+(@CGUID+107, 47550, 732, 1, 1, 0, -1616.38, 1198.68, 95.09814, 2.373648, 120, 0, 0), -- 47550 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+108, 47550, 732, 1, 1, 0, -1636.61, 1192.85, 95.09853, 2.478368, 120, 0, 0), -- 47550 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+109, 47550, 732, 1, 1, 0, -1641.03, 1075.81, 95.09814, 0.08726646, 120, 0, 0), -- 47550 (Area: 5659)
+(@CGUID+110, 47550, 732, 1, 1, 0, -1668.52, 1083.85, 95.09814, 3.001966, 120, 0, 0), -- 47550 (Area: 5659)
+-- Exiled Mage (47552)
+(@CGUID+111, 47552, 732, 1, 1, 0, -1464.64, 1123.72, 123.5763, 0, 120, 15, 1), -- 47552 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+112, 47552, 732, 1, 1, 0, -1478.82, 1119.3, 124.9303, 0, 120, 15, 1), -- 47552 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+113, 47552, 732, 1, 1, 0, -1487.452, 1123.936, 124.8323, 4.674941, 120, 15, 1), -- 47552 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+114, 47552, 732, 1, 1, 0, -1491.67, 1099.97, 130.3373, 0, 120, 15, 1), -- 47552 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+115, 47552, 732, 1, 1, 0, -1495.36, 1157.36, 134.5704, 2.12216, 120, 15, 1), -- 47552 (Area: 5402) (possible waypoints or random movement)
+(@CGUID+116, 47552, 732, 1, 1, 0, -1496.16, 1163.27, 134.6324, 1.70535, 120, 15, 1), -- 47552 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+117, 47552, 732, 1, 1, 0, -1506.25, 1122.917, 138.2912, 3.347771, 120, 15, 1), -- 47552 (Area: 0) (possible waypoints or random movement)
+(@CGUID+118, 47552, 732, 1, 1, 0, -1531.87, 1257.65, 101.8012, 6.250657, 120, 5, 1), -- 47552 (Area: 5402) (possible waypoints or random movement)
+(@CGUID+119, 47552, 732, 1, 1, 0, -1550.74, 1257.81, 101.801, 3.133104, 120, 5, 1), -- 47552 (Area: 5402) (possible waypoints or random movement)
+(@CGUID+120, 47552, 732, 1, 1, 0, -1566.16, 1144.98, 95.19754, 6.218648, 120, 5, 1), -- 47552 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+121, 47552, 732, 1, 1, 0, -1564.804, 1257.772, 101.8013, 3.144281, 120, 5, 1), -- 47552 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+122, 47552, 732, 1, 1, 0, -1581.21, 1145.461, 95.12469, 3.109612, 120, 5, 1), -- 47552 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+123, 47552, 732, 1, 1, 0, -1609.95, 1204.91, 95.09814, 0, 120, 5, 1), -- 47552 (Area: 5659) (possible waypoints or random movement)
+(@CGUID+124, 47552, 732, 1, 1, 0, -1610.475, 1259.285, 101.7939, 2.673294, 120, 5, 1), -- 47552 (Area: 5402) (possible waypoints or random movement)
+-- (@CGUID+125, 47552, 732, 1, 1, 0, -1612.502, 1258.028, 101.7787, 4.163522, 120, 5, 1), -- 47552 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+126, 47552, 732, 1, 1, 0, -1612.47, 1133.11, 95.04543, 0.8622312, 120, 5, 1), -- 47552 (Area: 5659) (possible waypoints or random movement)
+-- (@CGUID+127, 47552, 732, 1, 1, 0, -1613.311, 1260.801, 101.7723, 3.952588, 120, 5, 1), -- 47552 (Area: 5402) (possible waypoints or random movement)
+(@CGUID+128, 47552, 732, 1, 1, 0, -1615.86, 1188.13, 95.01479, 6.259611, 120, 5, 1), -- 47552 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+(@CGUID+129, 47552, 732, 1, 1, 0, -1693.102, 1188.787, 101.7058, 0.2347284, 120, 5, 1), -- 47552 (Area: 5659) (Auras: ) (possible waypoints or random movement)
+
+
+-- Critters, general
+-- Baradin Fox Kit (48630)
+(@CGUID+130, 48630, 732, 1, 1, 0, -912.768, 1117.728, 123.24, 6.011789, 120, 15, 1), -- 48630 (Area: 5406)
+(@CGUID+131, 48630, 732, 1, 1, 0, -956.3405, 625.0203, 148.449, 0.7650959, 120, 15, 1), -- 48630 (Area: 5403)
+(@CGUID+132, 48630, 732, 1, 1, 0, -1022.936, 913.9849, 124.215, 5.792886, 120, 15, 1), -- 48630 (Area: 0)
+(@CGUID+133, 48630, 732, 1, 1, 0, -1058.411, 558.5327, 149.1433, 6.089482, 120, 15, 1), -- 48630 (Area: 0)
+(@CGUID+134, 48630, 732, 1, 1, 0, -1098.219, 1226.92, 123.4584, 0.2466834, 120, 15, 1), -- 48630 (Area: 0)
+(@CGUID+135, 48630, 732, 1, 1, 0, -1113.232, 873.2027, 119.7208, 5.30129, 120, 15, 1), -- 48630 (Area: 5399)
+(@CGUID+136, 48630, 732, 1, 1, 0, -1113.244, 1033.672, 120.8223, 0.8740791, 120, 15, 1), -- 48630 (Area: 5399)
+(@CGUID+137, 48630, 732, 1, 1, 0, -1220.485, 853.8242, 119.8953, 1.261872, 120, 15, 1), -- 48630 (Area: 0)
+(@CGUID+138, 48630, 732, 1, 1, 0, -1247.064, 1350.98, 125.4886, 6.267562, 120, 15, 1), -- 48630 (Area: 0)
+(@CGUID+139, 48630, 732, 1, 1, 0, -1316.931, 787.0962, 121.6236, 1.740777, 120, 15, 1), -- 48630 (Area: 5399)
+(@CGUID+140, 48630, 732, 1, 1, 0, -1321.675, 658.7206, 121.8752, 0.7052379, 120, 15, 1), -- 48630 (Area: 0)
+(@CGUID+141, 48630, 732, 1, 1, 0, -1386.296, 789.6034, 123.7091, 4.959026, 120, 15, 1), -- 48630 (Area: 0)
+(@CGUID+142, 48630, 732, 1, 1, 0, -1391.811, 1057.938, 119.4652, 1.366293, 120, 15, 1), -- 48630 (Area: 0)
+(@CGUID+143, 48630, 732, 1, 1, 0, -1441.078, 1191.825, 135.3289, 0.0703339, 120, 15, 1), -- 48630 (Area: 5402)
+-- Prison Rat (48537)
+(@CGUID+144, 48537, 732, 1, 1, 0, -924.951, 1120.53, 84.57797, 3.503213, 120, 5, 1), -- 48537 (Area: 5657)
+(@CGUID+145, 48537, 732, 1, 1, 0, -952.55, 1181.728, 84.58473, 4.78621, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+146, 48537, 732, 1, 1, 0, -962.4899, 1151.187, 84.58222, 1.711781, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+147, 48537, 732, 1, 1, 0, -978.771, 1147.39, 84.58223, 0.5032376, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+148, 48537, 732, 1, 1, 0, -968.233, 1066.449, 84.57329, 4.395472, 120, 5, 1), -- 48537 (Area: 5401)
+(@CGUID+149, 48537, 732, 1, 1, 0, -961.5362, 1177.174, 84.5821, 4.670433, 120, 5, 1), -- 48537 (Area: 5401)
+(@CGUID+150, 48537, 732, 1, 1, 0, -971.0977, 1113.327, 84.69003, 0.6035722, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+151, 48537, 732, 1, 1, 0, -983.4948, 1166.894, 84.54896, 4.713494, 120, 5, 1), -- 48537 (Area: 5401)
+(@CGUID+152, 48537, 732, 1, 1, 0, -981.4542, 1041.834, 84.58301, 0.6022658, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+153, 48537, 732, 1, 1, 0, -985.347, 1073.299, 84.58225, 0.1821429, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+154, 48537, 732, 1, 1, 0, -1002.32, 1132.832, 84.53664, 1.879077, 120, 5, 1), -- 48537 (Area: 5401)
+(@CGUID+155, 48537, 732, 1, 1, 0, -1209.662, 817.3049, 89.52376, 3.652127, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+156, 48537, 732, 1, 1, 0, -1218.69, 839.863, 89.57114, 3.197569, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+157, 48537, 732, 1, 1, 0, -1224.097, 850.6351, 89.52282, 5.871431, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+158, 48537, 732, 1, 1, 0, -1242.541, 825.1813, 89.5302, 2.514852, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+159, 48537, 732, 1, 1, 0, -1257.722, 798.7971, 89.51856, 1.649774, 120, 5, 1), -- 48537 (Area: 5399)
+(@CGUID+160, 48537, 732, 1, 1, 0, -1288.181, 870.2686, 89.5302, 1.18401, 120, 5, 1), -- 48537 (Area: 0)
+(@CGUID+161, 48537, 732, 1, 1, 0, -1315.615, 837.4722, 89.52902, 1.516951, 120, 5, 1), -- 48537 (Area: 5399)
+(@CGUID+162, 48537, 732, 1, 1, 0, -1527.536, 1270.957, 101.8012, 4.627024, 120, 5, 1), -- 48537 (Area: 5402)
+-- Snake (2914)
+(@CGUID+163, 2914, 732, 1, 1, 0, -1033.652, 801.1771, 122.8753, 3.927414, 120, 5, 1), -- 2914 (Area: 0) (possible waypoints or random movement)
+(@CGUID+164, 2914, 732, 1, 1, 0, -1155.343, 1271.034, 121.115, 2.354961, 120, 5, 1), -- 2914 (Area: 0) (possible waypoints or random movement)
+(@CGUID+165, 2914, 732, 1, 1, 0, -1056.713, 657.7767, 141.2766, 4.508464, 120, 5, 1), -- 2914 (Area: 0) (possible waypoints or random movement)
+(@CGUID+166, 2914, 732, 1, 1, 0, -1167.115, 1132.512, 121.86, 4.459611, 120, 0, 0), -- 2914 (Area: 0)
+(@CGUID+167, 2914, 732, 1, 1, 0, -1175.037, 1341.338, 124.6742, 3.705594, 120, 5, 1), -- 2914 (Area: 0) (possible waypoints or random movement)
+(@CGUID+168, 2914, 732, 1, 1, 0, -1196.711, 921.5072, 119.7452, 0.1245318, 120, 5, 1), -- 2914 (Area: 5399) (possible waypoints or random movement)
+(@CGUID+169, 2914, 732, 1, 1, 0, -1229.551, 1053.999, 119.6496, 2.009046, 120, 5, 1), -- 2914 (Area: 5399) (possible waypoints or random movement)
+(@CGUID+170, 2914, 732, 1, 1, 0, -1282.493, 1185.489, 120.8472, 2.076537, 120, 5, 1), -- 2914 (Area: 0) (possible waypoints or random movement)
+(@CGUID+171, 2914, 732, 1, 1, 0, -1316.819, 1286.664, 128.5771, 2.335887, 120, 5, 1), -- 2914 (Area: 0) (possible waypoints or random movement)
+(@CGUID+172, 2914, 732, 1, 1, 0, -1322.526, 905.7576, 119.9727, 1.427795, 120, 5, 1), -- 2914 (Area: 0) (possible waypoints or random movement)
+(@CGUID+173, 2914, 732, 1, 1, 0, -1322.229, 1276.019, 128.076, 3.908045, 120, 5, 1), -- 2914 (Area: 0) (possible waypoints or random movement)
+(@CGUID+174, 2914, 732, 1, 1, 0, -1387.825, 1279.255, 135.1817, 0.2294089, 120, 5, 1), -- 2914 (Area: 0) (possible waypoints or random movement)
+(@CGUID+175, 2914, 732, 1, 1, 0, -1403.362, 938.0353, 118.6887, 0.7460266, 120, 0, 0), -- 2914 (Area: 0)
+(@CGUID+176, 2914, 732, 1, 1, 0, -1504.755, 769.7535, 124.5964, 5.682231, 120, 5, 1), -- 2914 (Area: 5400) (possible waypoints or random movement)
+-- Baradin Crocolisk (47591)
+(@CGUID+177, 47591, 732, 1, 1, 0, -1099.271, 1227.937, 123.4584, 1.089231, 120, 15, 1), -- 47591 (Area: 0) (possible waypoints or random movement)
+(@CGUID+178, 47591, 732, 1, 1, 0, -1136.39, 1103.76, 118.8463, 0, 120, 15, 1), -- 47591 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+179, 47591, 732, 1, 1, 0, -1144.989, 1202.163, 120.7522, 4.369532, 120, 15, 1), -- 47591 (Area: 0) (possible waypoints or random movement)
+(@CGUID+180, 47591, 732, 1, 1, 0, -1163.222, 1140.002, 121.7983, 0.2406246, 120, 15, 1), -- 47591 (Area: 0) (Auras: )
+(@CGUID+181, 47591, 732, 1, 1, 0, -1183.716, 1307.183, 119.6709, 4.973243, 120, 15, 1), -- 47591 (Area: 0) (possible waypoints or random movement)
+(@CGUID+182, 47591, 732, 1, 1, 0, -1183.25, 1232.32, 119.6923, 0, 120, 15, 1), -- 47591 (Area: 5399) (possible waypoints or random movement)
+-- (@CGUID+183, 47591, 732, 1, 1, 0, -1198.97, 1224.732, 118.9178, 2.886917, 120, 15, 1), -- duplicate
+-- (@CGUID+184, 47591, 732, 1, 1, 0, -1204.302, 1309.922, 122.1487, 0.407713, 120, 15, 1), -- duplicate
+(@CGUID+185, 47591, 732, 1, 1, 0, -1215.161, 1194.385, 120.847, 4.482553, 120, 15, 1), -- 47591 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+186, 47591, 732, 1, 1, 0, -1223.21, 1257.42, 121.1063, 0, 120, 15, 1), -- 47591 (Area: 0) (possible waypoints or random movement)
+(@CGUID+187, 47591, 732, 1, 1, 0, -1233.366, 1143.409, 119.9837, 0.7349917, 120, 15, 1), -- 47591 (Area: 5399)
+(@CGUID+188, 47591, 732, 1, 1, 0, -1246.8, 1303.09, 119.2313, 0, 120, 15, 1), -- 47591 (Area: 0) (Auras: ) (possible waypoints or random movement)
+-- (@CGUID+189, 47591, 732, 1, 1, 0, -1264.328, 1168.115, 119.8141, 0.4148644, 120, 15, 1), -- duplicate
+(@CGUID+190, 47591, 732, 1, 1, 0, -1265.58, 1241.87, 121.5823, 0, 120, 15, 1), -- 47591 (Area: 0) (possible waypoints or random movement)
+(@CGUID+191, 47591, 732, 1, 1, 0, -1274.22, 1167.16, 120.8103, 0, 120, 15, 1), -- 47591 (Area: 0) (Auras: ) (possible waypoints or random movement)
+(@CGUID+192, 47591, 732, 1, 1, 0, -1300.003, 1110.957, 121.0026, 0.2005581, 120, 15, 1), -- 47591 (Area: 5399)
+-- (@CGUID+193, 47591, 732, 1, 1, 0, -1314.573, 1182.476, 119.0194, 4.270839, 120, 15, 1), -- duplicate
+(@CGUID+194, 47591, 732, 1, 1, 0, -1305.82, 1200.89, 119.9623, 0, 120, 15, 1),
+(@CGUID+195, 47591, 732, 1, 1, 0, -1305.22, 1262.41, 119.4313, 0, 120, 15, 1), -- 47591 (Area: 0) (possible waypoints or random movement)
+-- (@CGUID+196, 47591, 732, 1, 1, 0, -1318.213, 1121.961, 119.4406, 1.919687, 120, 15, 1), -- duplicate
+-- Problim (47593) waypoints needed
+(@CGUID+197, 47593, 732, 1, 1, 0, -1344.739, 971.6679, 123.2955, 1.409069, 120, 5, 1), -- 47593 (Area: 0) (Auras: 88361 - 88361) (possible waypoints or random movement)
+-- Tower Range Finder (45492)
+(@CGUID+198, 45492, 732, 1, 1, 0, -951.21, 1469.55, 180.1893, 0, 120, 0, 0), -- 45492 (Area: 5546) (Auras: 85671 - 85671)
+(@CGUID+199, 45492, 732, 1, 1, 0, -1234.6, 981.535, 155.5083, 5.51524, 120, 0, 0), -- 45492 (Area: 0)
+(@CGUID+200, 45492, 732, 1, 1, 0, -1618.77, 953.587, 170.8923, 0, 120, 0, 0), -- 45492 (Area: 0) (Auras: 85671 - 85671)
+-- Tower Cannon Target (45561)
+(@CGUID+201, 45561, 732, 1, 1, 0, -937.667, 1462.98, 220.7583, 0, 120, 0, 0), -- 45561 (Area: 5546)
+(@CGUID+202, 45561, 732, 1, 1, 0, -947.561, 1455.89, 233.0193, 0, 120, 0, 0), -- 45561 (Area: 0)
+(@CGUID+203, 45561, 732, 1, 1, 0, -957.146, 1458.86, 242.6593, 0, 120, 0, 0), -- 45561 (Area: 0)
+(@CGUID+204, 45561, 732, 1, 1, 0, -962.634, 1462.2, 220.7673, 0, 120, 0, 0), -- 45561 (Area: 0)
+(@CGUID+205, 45561, 732, 1, 1, 0, -962.757, 1476.2, 235.8503, 0, 120, 0, 0), -- 45561 (Area: 0)
+(@CGUID+206, 45561, 732, 1, 1, 0, -1000.18, 535.003, 196.6233, 0, 120, 0, 0), -- 45561 (Area: 0)
+(@CGUID+207, 45561, 732, 1, 1, 0, -1010.87, 543.755, 203.4993, 0, 120, 0, 0), -- 45561 (Area: 0)
+(@CGUID+208, 45561, 732, 1, 1, 0, -1025.64, 529.823, 208.0163, 0, 120, 0, 0), -- 45561 (Area: 5400)
+(@CGUID+209, 45561, 732, 1, 1, 0, -1025.04, 536.807, 193.5913, 0, 120, 0, 0), -- 45561 (Area: 0)
+(@CGUID+210, 45561, 732, 1, 1, 0, -1606.37, 948.302, 220.3123, 0, 120, 0, 0), -- 45561 (Area: 0)
+(@CGUID+211, 45561, 732, 1, 1, 0, -1607.12, 961.814, 228.2583, 0, 120, 0, 0), -- 45561 (Area: 0)
+(@CGUID+212, 45561, 732, 1, 1, 0, -1615.86, 966.875, 215.6943, 0, 120, 0, 0), -- 45561 (Area: 0)
+(@CGUID+213, 45561, 732, 1, 1, 0, -1618.73, 940.462, 231.6113, 0, 120, 0, 0); -- 45561 (Area: 0)
+
+DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+110;
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseId`, `phaseGroup`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+-- Doodad_TolBarad_Gates_01
+(@OGUID+0, 206598, 732, 1, 1, 0, -834.201, 1188.167, 114.1249, 4.694937, 0, 0, -0.7132504, 0.7009093, 120, 255, 0), -- 206598 (Area: 5399)
+-- Doodad_TolBarad_Door_01
+(@OGUID+1, 206576, 732, 1, 1, 0, -1204.353, 1075.035, 123.6819, 0.02617911, 0, 0, 0.01308961, 0.9999143, 120, 255, 1), -- 206576 (Area: 5399)
+-- Cursed Depths Gate
+(@OGUID+2, 206843, 732, 1, 1, 0, -1233.36, 783.5536, 125.2064, 6.274459, 0, 0, -0.004363197, 0.9999905, 120, 255, 1), -- 206843 (Area: 5399)
+-- D-Block gate
+(@OGUID+3, 206844, 732, 1, 1, 0, -1087.148, 1150.346, 125.7371, 1.535887, 0, 0, 0.6946582, 0.71934, 120, 255, 1), -- 206844 (Area: 5399)
+-- Gate to The Hole
+(@OGUID+4, 206845, 732, 1, 1, 0, -1491.677, 1125.159, 130.985, 4.703663, 0, 0, -0.7101853, 0.7040147, 120, 255, 1), -- 206845 (Area: 5399)
+-- Meeting Stone
+(@OGUID+5, 206668, 732, 1, 1, 0, -1182.851, 1091.25, 120.216, 4.668757, 0, 0, 0, 1, 120, 255, 1), -- 206668 (Area: 0)
+-- Forge
+(@OGUID+6, 207705, 732, 1, 1, 0, -610.4271, 1379.63, 22.0371, 3.647738, 0, 0, 0, 1, 120, 255, 1), -- 207705 (Area: 0)
+-- Anvil
+(@OGUID+7, 207706, 732, 1, 1, 0, -605.5816, 1380.351, 21.9965, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 207706 (Area: 0)
+-- Cauldron
+(@OGUID+8, 206883, 732, 1, 1, 0, -602.8611, 1433.04, 22.0059, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 206883 (Area: 0)
+-- Campfire
+(@OGUID+9, 206045, 732, 1, 1, 0, -832.0087, 1032.271, 121.441, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 206045 (Area: 5401)
+(@OGUID+10, 205963, 732, 1, 1, 0, -1417.37, 1295.899, 133.583, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 205963 (Area: 0)
+(@OGUID+11, 205965, 732, 1, 1, 0, -1493.95, 1401.92, 133.593, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 205965 (Area: 5402)
+(@OGUID+12, 206044, 732, 1, 1, 0, -830.5833, 921.0851, 121.441, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 206044 (Area: 5401)
+(@OGUID+13, 207702, 732, 1, 1, 0, -565.7518, 1221.899, 92.6479, 4.01722, 0, 0, 0, 1, 120, 255, 1), -- 207702 (Area: 5406)
+-- Bonfire
+(@OGUID+14, 206043, 732, 1, 1, 0, -820.7292, 979.4618, 121.441, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 206043 (Area: 5401)
+(@OGUID+15, 205964, 732, 1, 1, 0, -1490.5, 1238.67, 133.585, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 205964 (Area: 5402)
+(@OGUID+16, 206884, 732, 1, 1, 0, -600.8108, 1402.189, 19.7069, 4.860743, 0, 0, 0, 1, 120, 255, 1), -- 206884 (Area: 0)
+-- Questing: Dusty Prison Journal
+(@OGUID+17, 206890, 732, 1, 1, 0, -1303.52, 881.998, 90.4816, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 5399)
+(@OGUID+18, 206890, 732, 1, 1, 0, -1240.25, 857.958, 89.5302, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 5399)
+(@OGUID+19, 206890, 732, 1, 1, 0, -1315.7, 835.108, 89.5292, 0.4537851, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+20, 206890, 732, 1, 1, 0, -1303.66, 851.564, 89.5258, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+21, 206890, 732, 1, 1, 0, -1286.26, 866.469, 90.67, 2.216565, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+22, 206890, 732, 1, 1, 0, -1288.63, 827.722, 89.5248, 0.3141584, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+23, 206890, 732, 1, 1, 0, -1277.78, 849.804, 89.5293, 2.321287, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+24, 206890, 732, 1, 1, 0, -1262.86, 820.609, 89.5674, 4.956738, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+25, 206890, 732, 1, 1, 0, -1276.8, 841.606, 89.5575, 2.35619, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+26, 206890, 732, 1, 1, 0, -1263.14, 852.521, 89.5343, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+27, 206890, 732, 1, 1, 0, -1233.98, 827.444, 89.5299, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+28, 206890, 732, 1, 1, 0, -1245.08, 810.75, 89.5278, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+29, 206890, 732, 1, 1, 0, -1247.1, 826.832, 89.5302, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+30, 206890, 732, 1, 1, 0, -1221.62, 852.878, 89.5287, 3.228859, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+31, 206890, 732, 1, 1, 0, -1213.19, 815.349, 89.5289, 4.991644, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+32, 206890, 732, 1, 1, 0, -1211.48, 840.946, 89.5804, 2.897245, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+33, 206890, 732, 1, 1, 0, -1197.37, 827.153, 89.5301, 0.5934101, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+(@OGUID+34, 206890, 732, 1, 1, 0, -1193.25, 847.568, 89.5307, 3.926996, 0, 0, 0, 1, 120, 255, 1), -- 206890 (Area: 0)
+-- Questing: Cursed Shackles
+(@OGUID+35, 206905, 732, 1, 1, 0, -912.163, 1143.02, 84.5428, 4.502952, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5406)
+(@OGUID+36, 206905, 732, 1, 1, 0, -924.967, 1119.15, 84.5719, 3.525572, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+37, 206905, 732, 1, 1, 0, -925.073, 1226.1, 84.5822, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+38, 206905, 732, 1, 1, 0, -937.924, 1198.69, 84.5822, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+39, 206905, 732, 1, 1, 0, -939.785, 1132.5, 84.5778, 4.485497, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+40, 206905, 732, 1, 1, 0, -951.566, 1183.99, 84.5765, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+41, 206905, 732, 1, 1, 0, -956.759, 1041.07, 84.5822, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5657)
+(@OGUID+42, 206905, 732, 1, 1, 0, -962.658, 1170.07, 84.5822, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5657)
+(@OGUID+43, 206905, 732, 1, 1, 0, -963.444, 1129.26, 84.5822, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+44, 206905, 732, 1, 1, 0, -965.076, 1085.41, 84.5822, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5657)
+(@OGUID+45, 206905, 732, 1, 1, 0, -966.325, 1018.27, 84.8929, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5657)
+(@OGUID+46, 206905, 732, 1, 1, 0, -972.693, 1222.21, 84.5819, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+47, 206905, 732, 1, 1, 0, -974.483, 1192, 84.5823, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5657)
+(@OGUID+48, 206905, 732, 1, 1, 0, -978.684, 1066.77, 84.5818, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5657)
+(@OGUID+49, 206905, 732, 1, 1, 0, -983.701, 1111.76, 84.5822, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+50, 206905, 732, 1, 1, 0, -984.778, 1016.91, 84.8929, 4.398232, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5657)
+(@OGUID+51, 206905, 732, 1, 1, 0, -986.189, 1170.42, 84.5459, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+52, 206905, 732, 1, 1, 0, -988.533, 1085.73, 84.5822, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5657)
+(@OGUID+53, 206905, 732, 1, 1, 0, -988.764, 1033.74, 84.5822, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5657)
+(@OGUID+54, 206905, 732, 1, 1, 0, -989.524, 1074.96, 84.5822, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 5657)
+(@OGUID+55, 206905, 732, 1, 1, 0, -991.146, 1224.99, 84.5823, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+56, 206905, 732, 1, 1, 0, -996.352, 1134.94, 84.5368, 4.084071, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+57, 206905, 732, 1, 1, 0, -1003.33, 1122.25, 84.5362, 5.375615, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+(@OGUID+58, 206905, 732, 1, 1, 0, -1008.34, 1208.42, 84.5822, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 206905 (Area: 0)
+-- Questing: Crate of Cellblock Rations
+(@OGUID+59, 206996, 732, 1, 1, 0, -1588.94, 1138.56, 95.015, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+60, 206996, 732, 1, 1, 0, -1597.82, 1191.46, 95.0148, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+61, 206996, 732, 1, 1, 0, -1613.9, 1103.97, 95.0239, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+62, 206996, 732, 1, 1, 0, -1523.62, 1231.59, 101.797, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+63, 206996, 732, 1, 1, 0, -1610.42, 1125.81, 95.018, 5.951575, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+64, 206996, 732, 1, 1, 0, -1623.51, 1169.6, 94.9933, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+65, 206996, 732, 1, 1, 0, -1604.43, 1207.97, 95.0148, 5.218536, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+66, 206996, 732, 1, 1, 0, -1609.68, 1151.18, 95.0145, 5.427975, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+67, 206996, 732, 1, 1, 0, -1635.49, 1115.49, 95.0341, 5.480334, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+68, 206996, 732, 1, 1, 0, -1640.91, 1083.95, 95.0148, 4.991644, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+69, 206996, 732, 1, 1, 0, -1642, 1191.56, 95.0151, 5.218536, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+70, 206996, 732, 1, 1, 0, -1668.66, 1181.9, 101.801, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+71, 206996, 732, 1, 1, 0, -1635.05, 1061.26, 95.0515, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+72, 206996, 732, 1, 1, 0, -1675.7, 1102.37, 95.0475, 4.991644, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+73, 206996, 732, 1, 1, 0, -1603.85, 1245.88, 101.801, 5.218536, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+74, 206996, 732, 1, 1, 0, -1569.25, 1252.27, 101.801, 5.218536, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+75, 206996, 732, 1, 1, 0, -1622.11, 1263.69, 101.801, 5.218536, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+76, 206996, 732, 1, 1, 0, -1571.29, 1275.41, 101.801, 5.218536, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+77, 206996, 732, 1, 1, 0, -1561.1, 1275.22, 101.801, 5.218536, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+78, 206996, 732, 1, 1, 0, -1543.24, 1263.87, 101.801, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 206996 (Area: 5659)
+(@OGUID+79, 206996, 732, 1, 1, 0, -1522.96, 1283.4, 101.797, 5.550147, 0, 0, 0, 1, 120, 255, 1); -- 206996 (Area: 5659)
+/* To-do, missing spawns
+-- Herbs: Cinderbloom (6/22 spawns)
+-- (@OGUID+, 202747, 732, 1, 1, 0, -49.71007, 1948.488, 14.03951, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 5535)
+-- (@OGUID+, 202747, 732, 1, 1, 0, -416.1076, 1589.439, 23.65213, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 5542)
+-- (@OGUID+, 202747, 732, 1, 1, 0, -495.7483, 1318.233, 14.84083, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 0)
+-- (@OGUID+, 202747, 732, 1, 1, 0, -544.9774, 1169.057, 89.61136, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 5406)
+-- (@OGUID+, 202747, 732, 1, 1, 0, -606.9063, 1251.231, 85.83726, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 5546)
+(@OGUID+80, 202747, 732, 1, 1, 0, -900.1805, 1123.745, 123.4317, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 5406)
+(@OGUID+81, 202747, 732, 1, 1, 0, -1162.219, 889.8802, 121.3724, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 5399)
+(@OGUID+82, 202747, 732, 1, 1, 0, -1322.17, 915.7604, 119.4951, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 5399)
+(@OGUID+83, 202747, 732, 1, 1, 0, -1363.74, 613.9965, 126.0347, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 5400)
+(@OGUID+84, 202747, 732, 1, 1, 0, -1381.306, 1229.365, 135.604, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 0)
+(@OGUID+85, 202747, 732, 1, 1, 0, -1528.958, 1190.191, 139.3284, 0, 0, 0, 0, 1, 120, 255, 1), -- 202747 (Area: 0)
+-- Herbs: Whiptail (15/19 spawns)
+(@OGUID+86, 202752, 732, 1, 1, 0, -1102.552, 1274.609, 120.007, 0, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+87, 202752, 732, 1, 1, 0, -1108.129, 1096.498, 122.7865, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+88, 202752, 732, 1, 1, 0, -1232.319, 1140.254, 120.0816, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+89, 202752, 732, 1, 1, 0, -1132.92, 1132.563, 120.4844, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+90, 202752, 732, 1, 1, 0, -1139.731, 1304.658, 120.4041, 0, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+91, 202752, 732, 1, 1, 0, -1188.135, 1229.25, 119.3753, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 5399)
+(@OGUID+92, 202752, 732, 1, 1, 0, -1207.754, 1193.16, 119.875, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+93, 202752, 732, 1, 1, 0, -1218.727, 1295.231, 119.3646, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+94, 202752, 732, 1, 1, 0, -1228.863, 1326.564, 126.1719, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+95, 202752, 732, 1, 1, 0, -1232.319, 1140.254, 120.0816, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+96, 202752, 732, 1, 1, 0, -1251.938, 1104.16, 120.9601, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 5399)
+(@OGUID+97, 202752, 732, 1, 1, 0, -1267.78, 1199.09, 118.9367, 5.811947, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 5399)
+(@OGUID+98, 202752, 732, 1, 1, 0, -1274.689, 1289.168, 119.1615, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+99, 202752, 732, 1, 1, 0, -1291.691, 1221.736, 119.4794, 5.811947, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+(@OGUID+100, 202752, 732, 1, 1, 0, -1313.983, 1166.955, 119.0399, 5.811947, 0, 0, 0, 1, 120, 255, 1), -- 202752 (Area: 0)
+-- Mining: Rich Elementium Vein, Rich Pyrite Deposit, Elementium Vein (10/22 spawns)
+-- (@OGUID+, 202738, 732, 1, 1, 0, -535.4896, 1142.139, 89.60479, 0, 0, 0, 0, 1, 120, 255, 1), -- 202738 (Area: 0)
+-- (@OGUID+, 202738, 732, 1, 1, 0, -541.8698, 1354.247, 24.02083, 0, 0, 0, 0, 1, 120, 255, 1), -- 202738 (Area: 5546)
+(@OGUID+101, 202741, 732, 1, 1, 0, -953.9479, 1136.99, 125.4949, 0, 0, 0, 0, 1, 120, 255, 1), -- 43.3 29.1
+(@OGUID+102, 202740, 732, 1, 1, 0, -956.7795, 1279.313, 131.099, 0, 0, 0, 0, 1, 120, 255, 1), -- 202740 (Area: 0)
+(@OGUID+103, 202738, 732, 1, 1, 0, -1002.42, 1138.372, 124.6493, 5.009095, 0, 0, 0, 1, 120, 255, 1), -- 202738 (Area: 0)
+(@OGUID+104, 202738, 732, 1, 1, 0, -1032.792, 1078.299, 125.4842, 0, 0, 0, 0, 1, 120, 255, 1), -- 202738 (Area: 0)
+(@OGUID+105, 202738, 732, 1, 1, 0, -1234.997, 1431.396, 126.5013, 0, 0, 0, 0, 1, 120, 255, 1), -- 202738 (Area: 0)
+(@OGUID+106, 202740, 732, 1, 1, 0, -1291.189, 1370.056, 130.3137, 0, 0, 0, 0, 1, 120, 255, 1), -- 202740 (Area: 0)
+(@OGUID+107, 202738, 732, 1, 1, 0, -1341.788, 1337.564, 134.5677, 5.724681, 0, 0, 0, 1, 120, 255, 1), -- 33.4 58
+(@OGUID+108, 202740, 732, 1, 1, 0, -1357.306, 1088.785, 123.8459, 0, 0, 0, 0, 1, 120, 255, 1), -- 202740 (Area: 5399)
+(@OGUID+109, 202741, 732, 1, 1, 0, -1368.493, 603.5156, 127.235, 0, 0, 0, 0, 1, 120, 255, 1), -- 69.7 60.1
+(@OGUID+110, 202741, 732, 1, 1, 0, -1425.139, 1038.675, 121.9771, 0, 0, 0, 0, 1, 120, 255, 1); -- 202741 (Area: 5399)
+*/
diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h
index 172e1f9246c..eb0c3895c8c 100644
--- a/src/server/game/Battlefield/Battlefield.h
+++ b/src/server/game/Battlefield/Battlefield.h
@@ -107,14 +107,14 @@ class TC_GAME_API BfCapturePoint
virtual void SendChangePhase();
bool SetCapturePointData(GameObject* capturePoint);
+ bool DelCapturePoint();
GameObject* GetCapturePointGo();
uint32 GetCapturePointEntry() const { return m_capturePointEntry; }
TeamId GetTeamId() const { return m_team; }
+ BattlefieldObjectiveStates GetObjectiveState() const { return m_State; }
protected:
- bool DelCapturePoint();
-
// active Players in the area of the objective, 0 - alliance, 1 - horde
GuidSet m_activePlayers[BG_TEAMS_COUNT];
diff --git a/src/server/game/Battlefield/BattlefieldMgr.cpp b/src/server/game/Battlefield/BattlefieldMgr.cpp
index b92b2e64318..b4b4e269b28 100644
--- a/src/server/game/Battlefield/BattlefieldMgr.cpp
+++ b/src/server/game/Battlefield/BattlefieldMgr.cpp
@@ -17,6 +17,7 @@
#include "BattlefieldMgr.h"
#include "BattlefieldWG.h"
+#include "BattlefieldTB.h"
#include "Player.h"
BattlefieldMgr::BattlefieldMgr()
@@ -53,8 +54,6 @@ void BattlefieldMgr::InitBattlefield()
TC_LOG_INFO("bg.battlefield", "Battlefield: Wintergrasp successfully initiated.");
}
- /*
- For Cataclysm: Tol Barad
Battlefield* tb = new BattlefieldTB;
// respawn, init variables
if (!tb->SetupBattlefield())
@@ -67,7 +66,6 @@ void BattlefieldMgr::InitBattlefield()
_battlefieldSet.push_back(tb);
TC_LOG_DEBUG("bg.battlefield", "Battlefield: Tol Barad successfully initiated.");
}
- */
}
void BattlefieldMgr::AddZone(uint32 zoneId, Battlefield* bf)
diff --git a/src/server/game/Battlefield/Zones/BattlefieldTB.cpp b/src/server/game/Battlefield/Zones/BattlefieldTB.cpp
new file mode 100644
index 00000000000..affc1e0db47
--- /dev/null
+++ b/src/server/game/Battlefield/Zones/BattlefieldTB.cpp
@@ -0,0 +1,869 @@
+/*
+* Copyright (C) 2008-2016 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/>.
+*/
+
+// TO-DO:
+// - Implement proper support for vehicles (Player::VehicleSpellInitialize())
+// - Siege Engine Turret (45564) crashing server (Auras: Unknown Shapeshift Type: 24)
+// - Graveyard spirit phasing, ressurection, Spiritual Immunity aura for players nearby
+// - Warn and teleport players out of the Baradin Hold instance (need sniffs; spell 94964?)
+// - Not sure, but players should probably be able to ressurect from guide spirits when there's no battle
+// - Check and script achievements
+
+#include "BattlefieldTB.h"
+#include "AchievementMgr.h"
+#include "CreatureTextMgr.h"
+#include "Battleground.h"
+#include "MapManager.h"
+#include "ObjectMgr.h"
+#include "Opcodes.h"
+#include "Player.h"
+#include "SpellAuras.h"
+#include "TemporarySummon.h"
+#include "WorldSession.h"
+
+BattlefieldTB::~BattlefieldTB() { }
+
+bool BattlefieldTB::SetupBattlefield()
+{
+ m_TypeId = BATTLEFIELD_TB; // See enum BattlefieldTypes
+ m_BattleId = BATTLEFIELD_BATTLEID_TB;
+ m_ZoneId = BATTLEFIELD_TB_ZONEID;
+ m_MapId = BATTLEFIELD_TB_MAPID;
+ m_Map = sMapMgr->CreateBaseMap(m_MapId);
+
+ InitStalker(NPC_DEBUG_ANNOUNCER, TolBaradDebugAnnouncerPos);
+
+ m_MaxPlayer = sWorld->getIntConfig(CONFIG_TOLBARAD_PLR_MAX);
+ m_IsEnabled = sWorld->getBoolConfig(CONFIG_TOLBARAD_ENABLE);
+ m_MinPlayer = sWorld->getIntConfig(CONFIG_TOLBARAD_PLR_MIN);
+ m_MinLevel = sWorld->getIntConfig(CONFIG_TOLBARAD_PLR_MIN_LVL);
+ m_BattleTime = sWorld->getIntConfig(CONFIG_TOLBARAD_BATTLETIME) * MINUTE * IN_MILLISECONDS;
+ m_BonusTime = sWorld->getIntConfig(CONFIG_TOLBARAD_BONUSTIME) * MINUTE * IN_MILLISECONDS;
+ m_NoWarBattleTime = sWorld->getIntConfig(CONFIG_TOLBARAD_NOBATTLETIME) * MINUTE * IN_MILLISECONDS;
+ m_RestartAfterCrash = sWorld->getIntConfig(CONFIG_TOLBARAD_RESTART_AFTER_CRASH) * MINUTE * IN_MILLISECONDS;
+
+ m_TimeForAcceptInvite = 20;
+ m_StartGroupingTimer = 15 * MINUTE * IN_MILLISECONDS;
+ m_StartGrouping = false;
+ m_isActive = false;
+
+ KickPosition.Relocate(-605.5f, 1181.31f, 95.96f, 6.177155f);
+ KickPosition.m_mapId = m_MapId;
+
+ RegisterZone(m_ZoneId);
+
+ m_Data32.resize(BATTLEFIELD_TB_DATA_MAX);
+
+ m_saveTimer = 5 * MINUTE * IN_MILLISECONDS;
+
+ updatedNPCAndObjects = true;
+ m_updateObjectsTimer = 0;
+
+ // Was there a battle going on or time isn't set yet? Then use m_RestartAfterCrash
+ if (sWorld->getWorldState(TB_WS_STATE_BATTLE) == 1 || sWorld->getWorldState(TB_WS_TIME_NEXT_BATTLE) == 0)
+ sWorld->setWorldState(TB_WS_TIME_NEXT_BATTLE, m_RestartAfterCrash);
+
+ // Set timer
+ m_Timer = sWorld->getWorldState(TB_WS_TIME_NEXT_BATTLE);
+
+ // Defending team isn't set yet? Choose randomly.
+ if (sWorld->getWorldState(TB_WS_FACTION_CONTROLLING) == 0)
+ sWorld->setWorldState(TB_WS_FACTION_CONTROLLING, uint64(urand(1, 2)));
+
+ // Set defender team
+ SetDefenderTeam(TeamId(sWorld->getWorldState(TB_WS_FACTION_CONTROLLING) - 1));
+
+ // Just to save world states
+ SendInitWorldStatesToAll();
+
+ // Create capture points
+ for (uint8 i = 0; i < TB_BASE_COUNT; i++)
+ {
+ TolBaradCapturePoint* capturePoint = new TolBaradCapturePoint(this, GetDefenderTeam());
+
+ //Spawn flag pole
+ if (GameObject* go = SpawnGameObject(TBCapturePoints[i].entryFlagPole[GetDefenderTeam()], TBCapturePoints[i].x, TBCapturePoints[i].y, TBCapturePoints[i].z, TBCapturePoints[i].o))
+ {
+ go->SetGoArtKit(GetDefenderTeam() == TEAM_ALLIANCE ? TB_GO_ARTKIT_FLAG_ALLIANCE : TB_GO_ARTKIT_FLAG_HORDE);
+ capturePoint->SetCapturePointData(go);
+ }
+ AddCapturePoint(capturePoint);
+ }
+
+ // Spawn towers
+ for (uint8 i = 0; i < TB_TOWERS_COUNT; i++)
+ if (GameObject* go = SpawnGameObject(TBTowers[i].entry, TBTowers[i].x, TBTowers[i].y, TBTowers[i].z, TBTowers[i].o))
+ Towers.insert(go->GetGUID());
+
+ // Init Graveyards
+ SetGraveyardNumber(BATTLEFIELD_TB_GRAVEYARD_MAX);
+
+ // Graveyards
+ for (uint8 i = 0; i < BATTLEFIELD_TB_GRAVEYARD_MAX; i++)
+ {
+ BfGraveyard* graveyard = new BfGraveyard(this);
+
+ // When between games, the graveyard is controlled by the defending team
+ graveyard->Initialize(GetDefenderTeam(), TBGraveyards[i].gyid);
+
+ // Spawn spirits
+ for (uint8 team = 0; team < 2; team++)
+ if (Creature* creature = SpawnCreature(TBGraveyards[i].spiritEntry[team], TBGraveyards[i].x, TBGraveyards[i].y, TBGraveyards[i].z, TBGraveyards[i].o, TeamId(team)))
+ graveyard->SetSpirit(creature, TeamId(team));
+
+ m_GraveyardList[i] = graveyard;
+ }
+
+ // Time warning vars
+ warnedFiveMinutes = false;
+ warnedTwoMinutes = false;
+ warnedOneMinute = false;
+
+ UpdateNPCsAndGameObjects();
+
+ return true;
+}
+
+bool BattlefieldTB::Update(uint32 diff)
+{
+ bool m_return = Battlefield::Update(diff);
+
+ // Minutes till battle preparation warnings
+ if (GetState() == BATTLEFIELD_INACTIVE)
+ {
+ if (m_Timer <= 5 * MINUTE * IN_MILLISECONDS + m_StartGroupingTimer && !warnedFiveMinutes)
+ {
+ warnedFiveMinutes = true;
+ SendWarning(TB_TEXT_PREPARATIONS_IN_5_MIN);
+ }
+
+ if (m_Timer <= 2 * MINUTE * IN_MILLISECONDS + m_StartGroupingTimer && !warnedTwoMinutes)
+ {
+ warnedTwoMinutes = true;
+ SendWarning(TB_TEXT_PREPARATIONS_IN_2_MIN);
+ }
+
+ if (m_Timer <= 1 * MINUTE * IN_MILLISECONDS + m_StartGroupingTimer && !warnedOneMinute)
+ {
+ warnedOneMinute = true;
+ SendWarning(TB_TEXT_PREPARATIONS_IN_1_MIN);
+ }
+ }
+
+ if (!updatedNPCAndObjects)
+ {
+ if (m_updateObjectsTimer <= diff)
+ {
+ UpdateNPCsAndGameObjects();
+ updatedNPCAndObjects = true;
+ }
+ else
+ m_updateObjectsTimer -= diff;
+ }
+
+ if (m_saveTimer <= diff)
+ {
+ if (!IsWarTime())
+ sWorld->setWorldState(TB_WS_TIME_NEXT_BATTLE, m_Timer);
+ m_saveTimer = 60 * IN_MILLISECONDS;
+ }
+ else
+ m_saveTimer -= diff;
+
+ return m_return;
+}
+
+void BattlefieldTB::OnPlayerEnterZone(Player* player)
+{
+ if (!m_isActive)
+ RemoveAurasFromPlayer(player);
+
+ SendInitWorldStatesTo(player);
+}
+
+void BattlefieldTB::OnPlayerLeaveZone(Player* player)
+{
+ if (!m_isActive)
+ RemoveAurasFromPlayer(player);
+}
+
+void BattlefieldTB::OnPlayerJoinWar(Player* player)
+{
+ RemoveAurasFromPlayer(player);
+
+ player->SetPvP(true);
+
+ // Bonus damage buff for attackers
+ if (player->GetTeam() == GetAttackerTeam() && GetData(BATTLEFIELD_TB_DATA_TOWERS_DESTROYED) > 0)
+ player->CastCustomSpell(SPELL_TOWER_ATTACK_BONUS, SPELLVALUE_AURA_STACK, GetData(BATTLEFIELD_TB_DATA_TOWERS_DESTROYED), player, TRIGGERED_FULL_MASK);
+}
+
+
+void BattlefieldTB::OnPlayerLeaveWar(Player* player)
+{
+ RemoveAurasFromPlayer(player);
+}
+
+void BattlefieldTB::RemoveAurasFromPlayer(Player* player)
+{
+ player->RemoveAurasDueToSpell(SPELL_TB_SLOW_FALL);
+ player->RemoveAurasDueToSpell(SPELL_TB_VETERAN);
+ player->RemoveAurasDueToSpell(SPELL_TOWER_ATTACK_BONUS);
+ player->RemoveAurasDueToSpell(SPELL_TB_SPIRITUAL_IMMUNITY);
+}
+
+// 62 fields, [7]-[68]
+void BattlefieldTB::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
+{
+ packet.Worldstates.emplace_back(uint32(TB_WS_ALLIANCE_ATTACKING_SHOW), int32(IsWarTime() && GetAttackerTeam() == TEAM_ALLIANCE ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TB_WS_HORDE_ATTACKING_SHOW), int32(IsWarTime() && GetAttackerTeam() == TEAM_HORDE ? 1 : 0));
+
+ // Not sure if TB
+ //packet.Worldstates.emplace_back(uint32(TB_WS_9_UNKNOWN), int32(1));
+
+ packet.Worldstates.emplace_back(uint32(TB_WS_SOUTH_DAMAGED_NEUTRAL), int32(0));
+ packet.Worldstates.emplace_back(uint32(TB_WS_SOUTH_INTACT_NEUTRAL), int32(0));
+
+ packet.Worldstates.emplace_back(uint32(TB_WS_PROGRESS_SHOW), int32(0));
+
+ // Buildings/bases
+ for (BfCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ {
+ uint8 i = TB_BASE_COUNT;
+ switch (itr->second->GetCapturePointEntry())
+ {
+ case GO_CAPTURE_POINT_NORTH_A_DEFENDING:
+ case GO_CAPTURE_POINT_NORTH_H_DEFENDING:
+ i = TB_BASE_IRONCLAD_GARRISON;
+ break;
+ case GO_CAPTURE_POINT_EAST_A_DEFENDING:
+ case GO_CAPTURE_POINT_EAST_H_DEFENDING:
+ i = TB_BASE_SLAGWORKS;
+ break;
+ case GO_CAPTURE_POINT_WEST_A_DEFENDING:
+ case GO_CAPTURE_POINT_WEST_H_DEFENDING:
+ i = TB_BASE_WARDENS_VIGIL;
+ break;
+ default:
+ continue;
+ }
+
+ TeamId team = TEAM_NEUTRAL;
+ bool controlled = false;
+ bool capturing = false;
+
+ switch (itr->second->GetObjectiveState())
+ {
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_ALLIANCE:
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_HORDE:
+ controlled = true;
+ team = itr->second->GetTeamId();
+ break;
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE:
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
+ team = TEAM_ALLIANCE;
+ capturing = true;
+ break;
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE:
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE:
+ team = TEAM_HORDE;
+ capturing = true;
+ break;
+ default:
+ team = TEAM_NEUTRAL;
+ break;
+ }
+
+ packet.Worldstates.emplace_back(uint32(TBCapturePoints[i].wsControlled[TEAM_ALLIANCE]), int32(team == TEAM_ALLIANCE && controlled ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TBCapturePoints[i].wsCapturing[TEAM_ALLIANCE]), int32(team == TEAM_ALLIANCE && capturing ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TBCapturePoints[i].wsNeutral), int32(team == TEAM_NEUTRAL ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TBCapturePoints[i].wsCapturing[TEAM_HORDE]), int32(team == TEAM_HORDE && capturing ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TBCapturePoints[i].wsControlled[TEAM_HORDE]), int32(team == TEAM_HORDE && controlled ? 1 : 0));
+ }
+
+ packet.Worldstates.emplace_back(uint32(TB_WS_TOWERS_DESTROYED_SHOW), int32(GetData(BATTLEFIELD_TB_DATA_TOWERS_DESTROYED)));
+ packet.Worldstates.emplace_back(uint32(TB_WS_BUILDINGS_CAPTURED_SHOW), int32(IsWarTime() ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TB_WS_BUILDINGS_CAPTURED), int32(GetData(BATTLEFIELD_TB_DATA_BUILDINGS_CAPTURED)));
+ packet.Worldstates.emplace_back(uint32(TB_WS_TOWERS_DESTROYED), int32(0));
+
+ packet.Worldstates.emplace_back(uint32(TB_WS_TIME_BATTLE_END_SHOW), int32(IsWarTime() ? 1 : 0));
+
+ packet.Worldstates.emplace_back(uint32(TB_WS_STATE_BATTLE), int32(IsWarTime() ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TB_WS_STATE_PREPARATIONS), int32(GetState() == BATTLEFIELD_WARMUP ? 1 : 0));
+
+ // Not sure if TB
+ //packet.Worldstates.emplace_back(uint32(TB_WS_35_UNKNOWN), int32(0));
+ //packet.Worldstates.emplace_back(uint32(TB_WS_36_UNKNOWN), int32(0));
+ //packet.Worldstates.emplace_back(uint32(TB_WS_37_UNKNOWN), int32(0));
+
+ // Unused tower icons
+ packet.Worldstates.emplace_back(uint32(TB_WS_WEST_DAMAGED_NEUTRAL), int32(0));
+ packet.Worldstates.emplace_back(uint32(TB_WS_WEST_INTACT_NEUTRAL), int32(0));
+ packet.Worldstates.emplace_back(uint32(TB_WS_EAST_DAMAGED_NEUTRAL), int32(0));
+ packet.Worldstates.emplace_back(uint32(TB_WS_EAST_INTACT_NEUTRAL), int32(0));
+
+ // Towers/spires
+ for (uint8 i = 0; i < TB_TOWERS_COUNT; i++)
+ {
+ // Find gameobject
+ for (ObjectGuid guid : Towers)
+ {
+ GameObject* tower = GetGameObject(guid);
+ if (!tower || tower->GetEntry() != TBTowers[i].entry)
+ continue;
+
+ TeamId team = GetDefenderTeam(); // 0-false -> alliance; 1-true -> horde
+ bool intact = tower->GetDestructibleState() == GO_DESTRUCTIBLE_INTACT;
+ bool damaged = tower->GetDestructibleState() == GO_DESTRUCTIBLE_DAMAGED;
+ bool destroyed = tower->GetDestructibleState() == GO_DESTRUCTIBLE_DESTROYED;
+
+ packet.Worldstates.emplace_back(uint32(TBTowers[i].wsIntact[TEAM_ALLIANCE]), int32(!team && intact ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TBTowers[i].wsDamaged[TEAM_ALLIANCE]), int32(!team && damaged ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TBTowers[i].wsDestroyed), int32(destroyed ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TBTowers[i].wsDamaged[TEAM_HORDE]), int32(team && damaged ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TBTowers[i].wsIntact[TEAM_HORDE]), int32(team && intact ? 1 : 0));
+ }
+ }
+
+ packet.Worldstates.emplace_back(uint32(TB_WS_TIME_NEXT_BATTLE_SHOW), int32(!IsWarTime() ? 1 : 0));
+
+ packet.Worldstates.emplace_back(uint32(TB_WS_ALLIANCE_CONTROLS_SHOW), int32(!IsWarTime() && GetDefenderTeam() == TEAM_ALLIANCE ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TB_WS_HORDE_CONTROLS_SHOW), int32(!IsWarTime() && GetDefenderTeam() == TEAM_HORDE ? 1 : 0));
+
+ packet.Worldstates.emplace_back(uint32(TB_WS_TIME_BATTLE_END), int32(IsWarTime() ? time(NULL) + (m_Timer / 1000) : 0));
+ packet.Worldstates.emplace_back(uint32(TB_WS_TIME_NEXT_BATTLE), int32(!IsWarTime() ? time(NULL) + (m_Timer / 1000) : 0));
+
+ // Not sure if TB
+ //packet.Worldstates.emplace_back(uint32(TB_WS_65_UNKNOWN), int32(0));
+ //packet.Worldstates.emplace_back(uint32(TB_WS_66_UNKNOWN), int32(0));
+
+ packet.Worldstates.emplace_back(uint32(TB_WS_KEEP_ALLIANCE), int32(GetDefenderTeam() == TEAM_ALLIANCE ? 1 : 0));
+ packet.Worldstates.emplace_back(uint32(TB_WS_KEEP_HORDE), int32(GetDefenderTeam() == TEAM_HORDE ? 1 : 0));
+}
+
+void BattlefieldTB::SendInitWorldStatesTo(Player* player)
+{
+ WorldPackets::WorldState::InitWorldStates packet;
+ packet.AreaID = m_ZoneId;
+ packet.MapID = m_MapId;
+ packet.SubareaID = 0;
+
+ FillInitialWorldStates(packet);
+
+ player->SendDirectMessage(packet.Write());
+}
+
+void BattlefieldTB::SendInitWorldStatesToAll()
+{
+ // Save
+ sWorld->setWorldState(TB_WS_STATE_BATTLE, uint64(IsWarTime() ? 1 : 0));
+ sWorld->setWorldState(TB_WS_ALLIANCE_CONTROLS_SHOW, uint64(!IsWarTime() && GetDefenderTeam() == TEAM_ALLIANCE ? 1 : 0));
+ sWorld->setWorldState(TB_WS_HORDE_CONTROLS_SHOW, uint64(!IsWarTime() && GetDefenderTeam() == TEAM_HORDE ? 1 : 0));
+ sWorld->setWorldState(TB_WS_ALLIANCE_ATTACKING_SHOW, uint64(IsWarTime() && GetAttackerTeam() == TEAM_ALLIANCE ? 1 : 0));
+ sWorld->setWorldState(TB_WS_HORDE_ATTACKING_SHOW, uint64(IsWarTime() && GetAttackerTeam() == TEAM_HORDE ? 1 : 0));
+ sWorld->setWorldState(TB_WS_TIME_NEXT_BATTLE, uint64(!IsWarTime() ? m_Timer : 0));
+ sWorld->setWorldState(TB_WS_TIME_NEXT_BATTLE_SHOW, uint64(!IsWarTime() ? 1 : 0));
+
+ // Tol Barad
+ for (uint8 team = 0; team < 2; team++)
+ for (GuidSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
+ if (Player* player = ObjectAccessor::FindPlayer(*itr))
+ SendInitWorldStatesTo(player);
+
+ // Tol Barad Peninsula
+ Map::PlayerList const& players = m_Map->GetPlayers();
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ if (Player* player = itr->GetSource()->ToPlayer())
+ if (player->GetZoneId() == 5389) // ZONE_TOL_BARAD_PENINSULA
+ player->SendInitWorldStates(5389, player->GetAreaId());
+}
+
+void BattlefieldTB::OnStartGrouping()
+{
+ UpdateNPCsAndGameObjects();
+
+ SendUpdateWorldState(TB_WS_STATE_PREPARATIONS, uint32(1));
+
+ // Teleport players out of questing area
+ for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team)
+ for (GuidSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
+ if (Player* player = ObjectAccessor::FindPlayer(*itr))
+ if (player->GetAreaId() == TBQuestAreas[m_iCellblockRandom].entry)
+ player->CastSpell(player, TBQuestAreas[m_iCellblockRandom].teleportSpell, true);
+
+ // Should we also teleport players out of Baradin Hold underground area?
+};
+
+void BattlefieldTB::OnBattleStart()
+{
+ SetData(BATTLEFIELD_TB_DATA_BUILDINGS_CAPTURED, uint32(0));
+ SetData(BATTLEFIELD_TB_DATA_TOWERS_INTACT, uint32(3));
+ SetData(BATTLEFIELD_TB_DATA_TOWERS_DESTROYED, uint32(0));
+
+ UpdateNPCsAndGameObjects();
+
+ SendInitWorldStatesToAll();
+};
+
+void BattlefieldTB::OnBattleEnd(bool endByTimer)
+{
+ if (!endByTimer) // Attackers win (but now they are defenders already)
+ SendWarning(GetDefenderTeam() == TEAM_ALLIANCE ? TB_TEXT_FORTRESS_CAPTURE_ALLIANCE : TB_TEXT_FORTRESS_CAPTURE_HORDE);
+ else // Defenders win
+ SendWarning(GetDefenderTeam() == TEAM_ALLIANCE ? TB_TEXT_FORTRESS_DEFEND_ALLIANCE : TB_TEXT_FORTRESS_DEFEND_HORDE);
+
+ // UpdateNPCsAndGameObjects() must be called 1 minute after battle ends
+ m_updateObjectsTimer = 1 * MINUTE * IN_MILLISECONDS;
+ updatedNPCAndObjects = false;
+
+ // Complete quest
+ TeamCastSpell(GetDefenderTeam(), GetDefenderTeam() == TEAM_ALLIANCE ? SPELL_VICTORY_ALLIANCE : SPELL_VICTORY_HORDE);
+
+ // Rewards
+ TeamCastSpell(GetDefenderTeam(), GetDefenderTeam() == TEAM_ALLIANCE ? SPELL_REWARD_VICTORY_ALLIANCE : SPELL_REWARD_VICTORY_HORDE);
+ for (uint32 i = 0; i < GetData(BATTLEFIELD_TB_DATA_TOWERS_INTACT); i++) // Unsure, for each intact tower or only once for having any tower intact?
+ TeamCastSpell(GetDefenderTeam(), SPELL_REWARD_TOWER_INTACT);
+ TeamCastSpell(GetAttackerTeam(), SPELL_REWARD_DEFEAT);
+
+ for (uint8 team = 0; team < 2; ++team)
+ {
+ for (GuidSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)
+ if (Player* player = ObjectAccessor::FindPlayer(*itr))
+ RemoveAurasFromPlayer(player);
+
+ m_PlayersInWar[team].clear();
+ }
+
+ // Reset time warning vars
+ warnedFiveMinutes = false;
+ warnedTwoMinutes = false;
+ warnedOneMinute = false;
+};
+
+void BattlefieldTB::UpdateNPCsAndGameObjects()
+{
+ for (ObjectGuid guid : BattleInactiveNPCs)
+ if (Creature* creature = GetCreature(guid))
+ HideNpc(creature);
+
+ for (ObjectGuid guid : BattleInactiveGOs)
+ if (GameObject* gameobject = GetGameObject(guid))
+ gameobject->SetRespawnTime(RESPAWN_ONE_DAY);
+
+ for (ObjectGuid guid : TemporaryNPCs)
+ if (Creature* creature = GetCreature(guid))
+ creature->RemoveFromWorld();
+ TemporaryNPCs.clear();
+
+ for (ObjectGuid guid : TemporaryGOs)
+ if (GameObject* gameobject = GetGameObject(guid))
+ gameobject->Delete();
+ TemporaryGOs.clear();
+
+ // Tol Barad gates - closed during warmup
+ if (GameObject* gates = GetGameObject(TBGatesGUID))
+ gates->SetGoState(GetState() == BATTLEFIELD_WARMUP ? GO_STATE_READY : GO_STATE_ACTIVE);
+
+ // Baradin Hold door - open when inactive
+ if (GameObject* door = GetGameObject(TBDoorGUID))
+ door->SetGoState(GetState() == BATTLEFIELD_INACTIVE ? GO_STATE_ACTIVE : GO_STATE_READY);
+
+ // Decide which cellblock and questgiver will be active.
+ m_iCellblockRandom = GetState() == BATTLEFIELD_INACTIVE ? urand(0, CELLBLOCK_MAX - 1) : CELLBLOCK_NONE;
+
+ // To The Hole gate
+ if (GameObject* door = GetGameObject(m_gateToTheHoleGUID))
+ door->SetGoState(m_iCellblockRandom == CELLBLOCK_THE_HOLE ? GO_STATE_ACTIVE : GO_STATE_READY);
+
+ // D-Block gate
+ if (GameObject* door = GetGameObject(m_gateDBlockGUID))
+ door->SetGoState(m_iCellblockRandom == CELLBLOCK_D_BLOCK ? GO_STATE_ACTIVE : GO_STATE_READY);
+
+ // Cursed Depths gate
+ if (GameObject* door = GetGameObject(m_gateCursedDepthsGUID))
+ door->SetGoState(m_iCellblockRandom == CELLBLOCK_CURSED_DEPTHS ? GO_STATE_ACTIVE : GO_STATE_READY);
+
+ if (GetState() == BATTLEFIELD_INACTIVE)
+ {
+ // Delete capture points
+ for (BfCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ itr->second->DelCapturePoint();
+ m_capturePoints.clear();
+
+ // Create capture points
+ for (uint8 i = 0; i < TB_BASE_COUNT; i++)
+ {
+ TolBaradCapturePoint* capturePoint = new TolBaradCapturePoint(this, GetDefenderTeam());
+
+ //Spawn flag pole
+ if (GameObject* go = SpawnGameObject(TBCapturePoints[i].entryFlagPole[GetDefenderTeam()], TBCapturePoints[i].x, TBCapturePoints[i].y, TBCapturePoints[i].z, TBCapturePoints[i].o))
+ {
+ go->SetGoArtKit(GetDefenderTeam() == TEAM_ALLIANCE ? TB_GO_ARTKIT_FLAG_ALLIANCE : TB_GO_ARTKIT_FLAG_HORDE);
+ capturePoint->SetCapturePointData(go);
+ }
+
+ AddCapturePoint(capturePoint);
+ }
+
+ for (ObjectGuid guid : BattleInactiveNPCs)
+ if (Creature* creature = GetCreature(guid))
+ ShowNpc(creature, true);
+
+ for (ObjectGuid guid : BattleInactiveGOs)
+ if (GameObject* gameobject = GetGameObject(guid))
+ gameobject->SetRespawnTime(RESPAWN_IMMEDIATELY);
+
+ for (uint8 i = 0; i < TB_QUEST_INFANTRY_MAX; i++)
+ {
+ uint32 entry = TB_QUEST_INFANTRY[GetDefenderTeam()][urand(0,3)];
+ if (Creature* creature = SpawnCreature(entry, TBQuestInfantrySpawnData[i], GetDefenderTeam()))
+ TemporaryNPCs.insert(creature->GetGUID());
+ }
+
+ for (uint8 i = 0; i < TB_GUARDS_MAX; i++)
+ if (Creature* creature = SpawnCreature(GetDefenderTeam() == TEAM_ALLIANCE ? NPC_BARADIN_GUARD : NPC_HELLSCREAMS_SENTRY, GuardNPCSpawns[i], GetDefenderTeam()))
+ TemporaryNPCs.insert(creature->GetGUID());
+
+ for (uint8 i = 0; i < TB_FACTION_NPC_MAX; i++)
+ if (Creature* creature = SpawnCreature(GetDefenderTeam() == TEAM_ALLIANCE ? FactionNPCSpawns[i].entryAlliance : FactionNPCSpawns[i].entryHorde, FactionNPCSpawns[i].x, FactionNPCSpawns[i].y, FactionNPCSpawns[i].z, FactionNPCSpawns[i].o, GetDefenderTeam()))
+ TemporaryNPCs.insert(creature->GetGUID());
+
+ if (Creature* creature = SpawnCreature(RandomQuestgivers[GetDefenderTeam()][m_iCellblockRandom], RandomQuestgiverPos, GetDefenderTeam()))
+ TemporaryNPCs.insert(creature->GetGUID());
+
+ // Spawn portals
+ for (uint8 i = 0; i < TB_PORTAL_MAX; i++)
+ if (GameObject* go = SpawnGameObject(TBPortalEntry[GetDefenderTeam()], TBPortals[i].GetPositionX(), TBPortals[i].GetPositionY(), TBPortals[i].GetPositionZ(), TBPortals[i].GetOrientation()))
+ TemporaryGOs.insert(go->GetGUID());
+
+ // Update towers
+ for (ObjectGuid guid : Towers)
+ if (GameObject* go = GetGameObject(guid))
+ go->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING);
+ }
+ else if (GetState() == BATTLEFIELD_IN_PROGRESS)
+ {
+ for (uint8 i = 0; i < TB_ABANDONED_SIEGE_ENGINE_COUNT; i++)
+ if (Creature* creature = SpawnCreature(NPC_ABANDONED_SIEGE_ENGINE, TBAbandonedSiegeEngineSpawnData[i], GetDefenderTeam()))
+ TemporaryNPCs.insert(creature->GetGUID());
+
+ for (ObjectGuid guid : Towers)
+ {
+ if (GameObject* go = GetGameObject(guid))
+ {
+ go->SetDestructibleState(GO_DESTRUCTIBLE_INTACT);
+ go->ModifyHealth(go->GetGOValue()->Building.MaxHealth);
+ }
+ }
+ }
+
+ // Spawn banners
+ for (uint8 i = 0; i < TB_BANNER_MAX; i++)
+ if (GameObject* go = SpawnGameObject(TBBannerEntry[GetDefenderTeam()], TBBanners[i].GetPositionX(), TBBanners[i].GetPositionY(), TBBanners[i].GetPositionZ(), TBBanners[i].GetOrientation()))
+ TemporaryGOs.insert(go->GetGUID());
+
+ // Set graveyard controls
+ for (uint8 i = 0; i < BATTLEFIELD_TB_GRAVEYARD_MAX; i++)
+ if (BfGraveyard* graveyard = GetGraveyardById(i))
+ graveyard->GiveControlTo(!IsWarTime() || TBGraveyards[i].defenderControls ? GetDefenderTeam() : GetAttackerTeam());
+};
+
+void BattlefieldTB::OnCreatureCreate(Creature* creature)
+{
+ switch (creature->GetEntry())
+ {
+ // Store NPCs that need visibility toggling
+ case NPC_TOLBARAD_CAPTIVE_SPIRIT:
+ case NPC_TOLBARAD_CELLBLOCK_OOZE:
+ case NPC_TOLBARAD_ARCHMAGE_GALUS:
+ case NPC_TOLBARAD_GHASTLY_CONVICT:
+ case NPC_TOLBARAD_SHIVARRA_DESTROYER:
+ case NPC_TOLBARAD_CELL_WATCHER:
+ case NPC_TOLBARAD_SVARNOS:
+ case NPC_TOLBARAD_JAILED_WRATHGUARD:
+ case NPC_TOLBARAD_IMPRISONED_IMP:
+ case NPC_TOLBARAD_WARDEN_SILVA:
+ case NPC_TOLBARAD_WARDEN_GUARD:
+ case NPC_TOLBARAD_IMPRISONED_WORKER:
+ case NPC_TOLBARAD_EXILED_MAGE:
+ case NPC_CROCOLISK:
+ case NPC_PROBLIM:
+ BattleInactiveNPCs.insert(creature->GetGUID());
+ if (GetState() == BATTLEFIELD_WARMUP) // If battle is about to start, we must hide these.
+ HideNpc(creature);
+ break;
+ case NPC_ABANDONED_SIEGE_ENGINE:
+ creature->setFaction(TBFactions[GetDefenderTeam()]);
+ creature->CastSpell(creature, SPELL_THICK_LAYER_OF_RUST, true);
+ break;
+ case NPC_SIEGE_ENGINE_TURRET:
+ if (Unit* vehiclebase = creature->GetCharmerOrOwner()->GetVehicleBase())
+ creature->EnterVehicle(vehiclebase);
+ break;
+ case NPC_TOWER_RANGE_FINDER:
+ creature->CastSpell(creature, SPELL_TOWER_RANGE_FINDER_PERIODIC, true);
+ break;
+ case NPC_TB_GY_SPIRIT_BARADIN_HOLD_A:
+ case NPC_TB_GY_SPIRIT_BARADIN_HOLD_H:
+ case NPC_TB_GY_SPIRIT_IRONCLAD_GARRISON_A:
+ case NPC_TB_GY_SPIRIT_WARDENS_VIGIL_A:
+ case NPC_TB_GY_SPIRIT_EAST_SPIRE_A:
+ case NPC_TB_GY_SPIRIT_SOUTH_SPIRE_A:
+ case NPC_TB_GY_SPIRIT_WEST_SPIRE_A:
+ case NPC_TB_GY_SPIRIT_SLAGWORKS_A:
+ case NPC_TB_GY_SPIRIT_IRONCLAD_GARRISON_H:
+ case NPC_TB_GY_SPIRIT_WARDENS_VIGIL_H:
+ case NPC_TB_GY_SPIRIT_SLAGWORKS_H:
+ case NPC_TB_GY_SPIRIT_WEST_SPIRE_H:
+ case NPC_TB_GY_SPIRIT_EAST_SPIRE_H:
+ case NPC_TB_GY_SPIRIT_SOUTH_SPIRE_H:
+ creature->CastSpell(creature, SPELL_TB_SPIRITUAL_IMMUNITY, true);
+ creature->CastSpell(creature, SPELL_TB_SPIRIT_HEAL_CHANNEL, true);
+ break;
+ default:
+ break;
+ }
+};
+
+void BattlefieldTB::OnGameObjectCreate(GameObject* go)
+{
+ switch (go->GetEntry())
+ {
+ case GO_TOLBARAD_GATES:
+ TBGatesGUID = go->GetGUID();
+ go->SetGoState(GetState() == BATTLEFIELD_WARMUP ? GO_STATE_READY : GO_STATE_ACTIVE);
+ break;
+ case GO_TOLBARAD_DOOR:
+ TBDoorGUID = go->GetGUID();
+ go->SetGoState(GetState() == BATTLEFIELD_INACTIVE ? GO_STATE_ACTIVE : GO_STATE_READY);
+ break;
+ case GO_GATE_TO_THE_HOLE:
+ m_gateToTheHoleGUID = go->GetGUID();
+ go->SetGoState(m_iCellblockRandom == CELLBLOCK_THE_HOLE ? GO_STATE_ACTIVE : GO_STATE_READY);
+ break;
+ case GO_GATE_D_BLOCK:
+ m_gateDBlockGUID = go->GetGUID();
+ go->SetGoState(m_iCellblockRandom == CELLBLOCK_D_BLOCK ? GO_STATE_ACTIVE : GO_STATE_READY);
+ break;
+ case GO_CURSED_DEPTHS_GATE:
+ m_gateCursedDepthsGUID = go->GetGUID();
+ go->SetGoState(m_iCellblockRandom == CELLBLOCK_CURSED_DEPTHS ? GO_STATE_ACTIVE : GO_STATE_READY);
+ break;
+ case GO_CRATE_OF_CELLBLOCK_RATIONS:
+ case GO_CURSED_SHACKLES:
+ case GO_DUSTY_PRISON_JOURNAL:
+ case GO_TB_MEETING_STONE:
+ case GO_TB_INSTANCE_VISUAL_1:
+ case GO_TB_INSTANCE_VISUAL_2:
+ case GO_TB_INSTANCE_VISUAL_3:
+ case GO_TB_INSTANCE_VISUAL_4:
+ BattleInactiveGOs.insert(go->GetGUID());
+ if (GetState() == BATTLEFIELD_WARMUP) // If battle is about to start, we must hide these.
+ go->SetRespawnTime(RESPAWN_ONE_DAY);
+ break;
+ default:
+ break;
+ }
+};
+
+void BattlefieldTB::ProcessEvent(WorldObject* obj, uint32 eventId)
+{
+ if (!IsWarTime())
+ return;
+
+ if (eventId == EVENT_COUNT_CAPTURED_BASE)
+ {
+ UpdateCapturedBaseCount();
+ return;
+ }
+
+ if (!obj)
+ return;
+
+ GameObject* go = obj->ToGameObject();
+ if (!go)
+ return;
+
+ TBTowerId towerId;
+ switch (go->GetEntry())
+ {
+ case GO_WEST_SPIRE:
+ towerId = TB_TOWER_WEST_SPIRE;
+ break;
+ case GO_EAST_SPIRE:
+ towerId = TB_TOWER_EAST_SPIRE;
+ break;
+ case GO_SOUTH_SPIRE:
+ towerId = TB_TOWER_SOUTH_SPIRE;
+ break;
+ default:
+ return;
+ }
+
+ if (go->GetDestructibleState() == GO_DESTRUCTIBLE_DAMAGED)
+ TowerDamaged(towerId);
+ else if (go->GetDestructibleState() == GO_DESTRUCTIBLE_DESTROYED)
+ TowerDestroyed(towerId);
+}
+
+void BattlefieldTB::TowerDamaged(TBTowerId tbTowerId)
+{
+ if (!IsWarTime())
+ return;
+
+ SendWarning(TBTowers[tbTowerId].textDamaged);
+
+ SetData(BATTLEFIELD_TB_DATA_TOWERS_INTACT, GetData(BATTLEFIELD_TB_DATA_TOWERS_INTACT) - 1);
+
+ SendUpdateWorldState(uint32(TBTowers[tbTowerId].wsIntact[GetDefenderTeam()]), int32(0));
+ SendUpdateWorldState(uint32(TBTowers[tbTowerId].wsDamaged[GetDefenderTeam()]), int32(1));
+
+ TeamCastSpell(GetAttackerTeam(), SPELL_REWARD_TOWER_DAMAGED);
+}
+
+void BattlefieldTB::TowerDestroyed(TBTowerId tbTowerId)
+{
+ if (!IsWarTime())
+ return;
+
+ // Add 5 minute bonus time
+ m_Timer += m_BonusTime;
+
+ SendUpdateWorldState(TB_WS_TIME_BATTLE_END, uint32(time(NULL) + (m_Timer / 1000)));
+
+ SendWarning(TBTowers[tbTowerId].textDamaged);
+
+ SetData(BATTLEFIELD_TB_DATA_TOWERS_DESTROYED, GetData(BATTLEFIELD_TB_DATA_TOWERS_DESTROYED) + 1);
+ SendUpdateWorldState(uint32(TB_WS_TOWERS_DESTROYED), int32(GetData(BATTLEFIELD_TB_DATA_TOWERS_DESTROYED)));
+
+ SendUpdateWorldState(uint32(TBTowers[tbTowerId].wsDamaged[GetDefenderTeam()]), int32(0));
+ SendUpdateWorldState(uint32(TBTowers[tbTowerId].wsDestroyed), int32(1));
+
+ // Attack bonus buff
+ for (GuidSet::const_iterator itr = m_PlayersInWar[GetAttackerTeam()].begin(); itr != m_PlayersInWar[GetAttackerTeam()].end(); ++itr)
+ if (Player* player = ObjectAccessor::FindPlayer(*itr))
+ player->CastCustomSpell(SPELL_TOWER_ATTACK_BONUS, SPELLVALUE_AURA_STACK, GetData(BATTLEFIELD_TB_DATA_TOWERS_DESTROYED), player, TRIGGERED_FULL_MASK);
+
+ // Honor reward
+ TeamCastSpell(GetAttackerTeam(), SPELL_REWARD_TOWER_DESTROYED);
+}
+
+void BattlefieldTB::UpdateCapturedBaseCount()
+{
+ uint32 numCapturedBases = 0; // How many bases attacker has captured
+
+ for (BfCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ if (itr->second->GetTeamId() == GetAttackerTeam())
+ numCapturedBases += 1;
+
+ SetData(BATTLEFIELD_TB_DATA_BUILDINGS_CAPTURED, numCapturedBases);
+ SendUpdateWorldState(TB_WS_BUILDINGS_CAPTURED, uint32(numCapturedBases));
+
+ // Check if attackers won
+ if (numCapturedBases == TB_BASE_COUNT)
+ EndBattle(false);
+}
+
+// Called when player kill a unit in wg zone
+void BattlefieldTB::HandleKill(Player* killer, Unit* victim)
+{
+ if (killer == victim || victim->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ TeamId killerTeam = killer->GetTeamId();
+ for (GuidSet::const_iterator itr = m_PlayersInWar[killerTeam].begin(); itr != m_PlayersInWar[killerTeam].end(); ++itr)
+ if (Player* player = ObjectAccessor::FindPlayer(*itr))
+ if (player->GetDistance2d(killer) < 40.0f)
+ PromotePlayer(player);
+}
+
+void BattlefieldTB::PromotePlayer(Player* killer)
+{
+ if (!m_isActive || killer->HasAura(SPELL_TB_VETERAN))
+ return;
+
+ killer->CastSpell(killer, SPELL_TB_VETERAN, true);
+}
+
+TolBaradCapturePoint::TolBaradCapturePoint(BattlefieldTB* battlefield, TeamId teamInControl) : BfCapturePoint(battlefield)
+{
+ m_Bf = battlefield;
+ m_team = teamInControl;
+ m_value = teamInControl == TEAM_ALLIANCE ? m_maxValue : -m_maxValue;
+ m_State = teamInControl == TEAM_ALLIANCE ? BF_CAPTUREPOINT_OBJECTIVESTATE_ALLIANCE : BF_CAPTUREPOINT_OBJECTIVESTATE_HORDE;
+}
+
+void TolBaradCapturePoint::ChangeTeam(TeamId /*oldTeam*/)
+{
+ // Find out index
+ uint8 iBase = TB_BASE_COUNT;
+ for (uint8 i = 0; i < TB_BASE_COUNT; i++)
+ if (GetCapturePointEntry() == TBCapturePoints[i].entryFlagPole[m_Bf->GetDefenderTeam()])
+ iBase = i;
+
+ if (iBase == TB_BASE_COUNT)
+ return;
+
+ // Turn off previous world state icon
+ switch (m_OldState)
+ {
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_ALLIANCE:
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_HORDE:
+ SendUpdateWorldState(TBCapturePoints[iBase].wsControlled[GetTeamId()], uint32(0));
+ break;
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE:
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
+ SendUpdateWorldState(TBCapturePoints[iBase].wsCapturing[TEAM_ALLIANCE], uint32(0));
+ break;
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE:
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE:
+ SendUpdateWorldState(TBCapturePoints[iBase].wsCapturing[TEAM_HORDE], uint32(0));
+ break;
+ default:
+ break;
+ }
+
+ // Turn on new world state icon and send warning
+ switch (m_State)
+ {
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_ALLIANCE:
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_HORDE:
+ m_Bf->SendWarning(TBCapturePoints[iBase].textGained[GetTeamId()]);
+ SendUpdateWorldState(TBCapturePoints[iBase].wsControlled[GetTeamId()], uint32(1));
+ GetCapturePointGo()->SetGoArtKit(GetTeamId() == TEAM_ALLIANCE ? TB_GO_ARTKIT_FLAG_ALLIANCE : TB_GO_ARTKIT_FLAG_HORDE);
+ break;
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE:
+ m_Bf->SendWarning(TBCapturePoints[iBase].textLost[TEAM_HORDE]);
+ //no break here!
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
+ SendUpdateWorldState(TBCapturePoints[iBase].wsCapturing[TEAM_ALLIANCE], uint32(1));
+ GetCapturePointGo()->SetGoArtKit(TB_GO_ARTKIT_FLAG_NONE);
+ break;
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE:
+ m_Bf->SendWarning(TBCapturePoints[iBase].textLost[TEAM_ALLIANCE]);
+ //no break here!
+ case BF_CAPTUREPOINT_OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE:
+ SendUpdateWorldState(TBCapturePoints[iBase].wsCapturing[TEAM_HORDE], uint32(1));
+ GetCapturePointGo()->SetGoArtKit(TB_GO_ARTKIT_FLAG_NONE);
+ break;
+ default:
+ break;
+ }
+
+ // Update counter
+ m_Bf->ProcessEvent(NULL, EVENT_COUNT_CAPTURED_BASE);
+}
diff --git a/src/server/game/Battlefield/Zones/BattlefieldTB.h b/src/server/game/Battlefield/Zones/BattlefieldTB.h
new file mode 100644
index 00000000000..06182c78e61
--- /dev/null
+++ b/src/server/game/Battlefield/Zones/BattlefieldTB.h
@@ -0,0 +1,728 @@
+/*
+* Copyright (C) 2008-2016 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/>.
+*/
+
+#ifndef BATTLEFIELD_TB_
+#define BATTLEFIELD_TB_
+
+#include "Battlefield.h"
+
+class BattlefieldTB;
+class TolBaradCapturePoint;
+
+enum TolBaradInfo
+{
+ BATTLEFIELD_TB_MAPID = 732, // Tol Barad
+ BATTLEFIELD_TB_ZONEID = 5095, // Tol Barad
+};
+
+enum TolBaradData
+{
+ BATTLEFIELD_TB_DATA_BUILDINGS_CAPTURED,
+ BATTLEFIELD_TB_DATA_TOWERS_INTACT,
+ BATTLEFIELD_TB_DATA_TOWERS_DESTROYED,
+ BATTLEFIELD_TB_DATA_MAX,
+};
+
+enum TolBaradSpells
+{
+ // Quest completion
+ SPELL_VICTORY_ALLIANCE = 94665,
+ SPELL_VICTORY_HORDE = 94763,
+
+ // Rewards
+ SPELL_REWARD_VICTORY_ALLIANCE = 89789,
+ SPELL_REWARD_VICTORY_HORDE = 89791,
+ SPELL_REWARD_DEFEAT = 89793,
+
+ SPELL_REWARD_TOWER_INTACT = 89794,
+ SPELL_REWARD_TOWER_DAMAGED = 89795,
+ SPELL_REWARD_TOWER_DESTROYED = 89796,
+
+ // Player buffs
+ SPELL_TB_SLOW_FALL = 88473,
+ SPELL_TB_VETERAN = 84655,
+ SPELL_TOWER_ATTACK_BONUS = 82629,
+ SPELL_TB_SPIRIT_HEAL_CHANNEL = 22011, // this spell replaces m_LastResurrectTimer in Battlefield.cpp?
+ SPELL_TB_SPIRITUAL_IMMUNITY = 95332,
+
+ // Vehicle
+ SPELL_THICK_LAYER_OF_RUST = 95330,
+ SPELL_RIDE_TOL_BARAD_VEHICLE = 84754,
+ SPELL_DEPLOY_SIEGE_MODE = 84974,
+ SPELL_SIEGE_CANNON_AURA = 85167, // aura, periodically triggers spell 85122
+// SPELL_SIEGE_CANNON_EFFECT = 85122, // targets random
+// SPELL_SIEGE_CANNON_DAMAGE = 85125,
+ SPELL_LEAVE_SIEGE_MODE = 85078,
+
+ SPELL_TOWER_RANGE_FINDER_PERIODIC = 85671,
+ SPELL_TOWER_RANGE_FINDER = 84979,
+
+ // Teleportation spells
+ SPELL_TB_THE_HOLE_TELEPORT = 89035,
+ SPELL_TB_D_BLOCK_TELEPORT = 89037,
+ SPELL_TB_CURSED_DEPTHS_TELEPORT = 89038,
+};
+
+enum TolBaradNpcs
+{
+ // Cursed Depths area
+ NPC_TOLBARAD_CAPTIVE_SPIRIT = 47531,
+ NPC_TOLBARAD_CELLBLOCK_OOZE = 47534,
+ NPC_TOLBARAD_ARCHMAGE_GALUS = 47537,
+ NPC_TOLBARAD_GHASTLY_CONVICT = 47590,
+
+ // D-Block area
+ NPC_TOLBARAD_SHIVARRA_DESTROYER = 47540,
+ NPC_TOLBARAD_CELL_WATCHER = 47542,
+ NPC_TOLBARAD_SVARNOS = 47544,
+ NPC_TOLBARAD_JAILED_WRATHGUARD = 47548,
+ NPC_TOLBARAD_IMPRISONED_IMP = 47549,
+
+ // The Hole area
+ NPC_TOLBARAD_WARDEN_SILVA = 48036,
+ NPC_TOLBARAD_WARDEN_GUARD = 47561,
+ NPC_TOLBARAD_IMPRISONED_WORKER = 47550,
+ NPC_TOLBARAD_EXILED_MAGE = 47552,
+
+ // Other
+ NPC_CROCOLISK = 47591,
+ NPC_PROBLIM = 47593,
+
+ // Graveyard spirits
+ NPC_TB_GY_SPIRIT_BARADIN_HOLD_A = 45066,
+ NPC_TB_GY_SPIRIT_BARADIN_HOLD_H = 45067,
+ NPC_TB_GY_SPIRIT_IRONCLAD_GARRISON_A = 45068,
+ NPC_TB_GY_SPIRIT_WARDENS_VIGIL_A = 45069,
+ NPC_TB_GY_SPIRIT_EAST_SPIRE_A = 45070,
+ NPC_TB_GY_SPIRIT_SOUTH_SPIRE_A = 45071,
+ NPC_TB_GY_SPIRIT_WEST_SPIRE_A = 45072,
+ NPC_TB_GY_SPIRIT_SLAGWORKS_A = 45073,
+ NPC_TB_GY_SPIRIT_IRONCLAD_GARRISON_H = 45074,
+ NPC_TB_GY_SPIRIT_WARDENS_VIGIL_H = 45075,
+ NPC_TB_GY_SPIRIT_SLAGWORKS_H = 45076,
+ NPC_TB_GY_SPIRIT_WEST_SPIRE_H = 45077,
+ NPC_TB_GY_SPIRIT_EAST_SPIRE_H = 45078,
+ NPC_TB_GY_SPIRIT_SOUTH_SPIRE_H = 45079,
+
+ // Stalker, dummies
+ NPC_DEBUG_ANNOUNCER = 43679,
+ NPC_TOWER_RANGE_FINDER = 45492,
+ NPC_TOWER_CANNON_TARGET = 45561,
+ NPC_SIEGE_ENGINE_TURRET = 45564,
+};
+
+enum TolBaradGOs
+{
+ // Towers
+ GO_WEST_SPIRE = 204588,
+ GO_EAST_SPIRE = 204589,
+ GO_SOUTH_SPIRE = 204590,
+
+ GO_CAPTURE_POINT_NORTH_A_DEFENDING = 205068,
+ GO_CAPTURE_POINT_NORTH_H_DEFENDING = 205096,
+ GO_CAPTURE_POINT_EAST_A_DEFENDING = 205138,
+ GO_CAPTURE_POINT_EAST_H_DEFENDING = 205139,
+ GO_CAPTURE_POINT_WEST_A_DEFENDING = 205101,
+ GO_CAPTURE_POINT_WEST_H_DEFENDING = 205103,
+
+ // Entrance gates and instance door
+ GO_TOLBARAD_GATES = 206598,
+ GO_TOLBARAD_DOOR = 206576,
+
+ // Other
+ GO_TB_MEETING_STONE = 206668,
+
+ GO_TB_INSTANCE_VISUAL_1 = 207746,
+ GO_TB_INSTANCE_VISUAL_2 = 207747,
+ GO_TB_INSTANCE_VISUAL_3 = 210114,
+ GO_TB_INSTANCE_VISUAL_4 = 210115,
+};
+
+enum TolBaradGOArtKit
+{
+ TB_GO_ARTKIT_FLAG_NONE = 0,
+ TB_GO_ARTKIT_FLAG_HORDE = 1,
+ TB_GO_ARTKIT_FLAG_ALLIANCE = 2,
+};
+
+enum TolBaradWorldStates
+{
+ TB_WS_ALLIANCE_CONTROLS_SHOW = 5385,
+ TB_WS_HORDE_CONTROLS_SHOW = 5384,
+ TB_WS_ALLIANCE_ATTACKING_SHOW = 5546,
+ TB_WS_HORDE_ATTACKING_SHOW = 5547,
+
+ TB_WS_BUILDINGS_CAPTURED = 5348,
+ TB_WS_BUILDINGS_CAPTURED_SHOW = 5349,
+ TB_WS_TOWERS_DESTROYED = 5347,
+ TB_WS_TOWERS_DESTROYED_SHOW = 5350,
+
+ TB_WS_FACTION_CONTROLLING = 5334, // 1 -> Alliance, 2 -> Horde
+
+ TB_WS_TIME_NEXT_BATTLE = 5332,
+ TB_WS_TIME_NEXT_BATTLE_SHOW = 5387,
+ TB_WS_TIME_BATTLE_END = 5333,
+ TB_WS_TIME_BATTLE_END_SHOW = 5346,
+
+ TB_WS_STATE_PREPARATIONS = 5684,
+ TB_WS_STATE_BATTLE = 5344,
+
+ /* Not Sure if TB
+ TB_WS_0_UNKNOWN = 5587,
+ TB_WS_9_UNKNOWN = 5508,
+ TB_WS_35_UNKNOWN = 5679,
+ TB_WS_36_UNKNOWN = 5678,
+ TB_WS_37_UNKNOWN = 5677,
+ TB_WS_60_UNKNOWN = 5361,
+ TB_WS_61_UNKNOWN = 5360,
+ TB_WS_65_UNKNOWN = 5195,
+ TB_WS_66_UNKNOWN = 5193,
+ */
+
+ TB_WS_PROGRESS_SHOW = 5376,
+ TB_WS_PROGRESS = 5377, // 0 horde, 100 alliance
+ TB_WS_PROGRESS_PERCENT_GREY = 5378,
+
+ TB_WS_KEEP_HORDE = 5469,
+ TB_WS_KEEP_ALLIANCE = 5470,
+
+ TB_WS_GARRISON_HORDE_CONTROLLED = 5418,
+ TB_WS_GARRISON_HORDE_CAPTURING = 5419,
+ TB_WS_GARRISON_NEUTRAL = 5420, // unused
+ TB_WS_GARRISON_ALLIANCE_CAPTURING = 5421,
+ TB_WS_GARRISON_ALLIANCE_CONTROLLED = 5422,
+
+ TB_WS_VIGIL_HORDE_CONTROLLED = 5423,
+ TB_WS_VIGIL_HORDE_CAPTURING = 5424,
+ TB_WS_VIGIL_NEUTRAL = 5425, // unused
+ TB_WS_VIGIL_ALLIANCE_CAPTURING = 5426,
+ TB_WS_VIGIL_ALLIANCE_CONTROLLED = 5427,
+
+ TB_WS_SLAGWORKS_HORDE_CONTROLLED = 5428,
+ TB_WS_SLAGWORKS_HORDE_CAPTURING = 5429,
+ TB_WS_SLAGWORKS_NEUTRAL = 5430, // unused
+ TB_WS_SLAGWORKS_ALLIANCE_CAPTURING = 5431,
+ TB_WS_SLAGWORKS_ALLIANCE_CONTROLLED = 5432,
+
+ TB_WS_WEST_INTACT_HORDE = 5433,
+ TB_WS_WEST_DAMAGED_HORDE = 5434,
+ TB_WS_WEST_DESTROYED_NEUTRAL = 5435,
+ TB_WS_WEST_INTACT_ALLIANCE = 5436,
+ TB_WS_WEST_DAMAGED_ALLIANCE = 5437,
+ TB_WS_WEST_INTACT_NEUTRAL = 5453, // unused
+ TB_WS_WEST_DAMAGED_NEUTRAL = 5454, // unused
+
+ TB_WS_SOUTH_INTACT_HORDE = 5438,
+ TB_WS_SOUTH_DAMAGED_HORDE = 5439,
+ TB_WS_SOUTH_DESTROYED_NEUTRAL = 5440,
+ TB_WS_SOUTH_INTACT_ALLIANCE = 5441,
+ TB_WS_SOUTH_DAMAGED_ALLIANCE = 5442,
+ TB_WS_SOUTH_INTACT_NEUTRAL = 5455, // unused
+ TB_WS_SOUTH_DAMAGED_NEUTRAL = 5456, // unused
+
+ TB_WS_EAST_INTACT_HORDE = 5443,
+ TB_WS_EAST_DAMAGED_HORDE = 5444,
+ TB_WS_EAST_DESTROYED_NEUTRAL = 5445,
+ TB_WS_EAST_INTACT_ALLIANCE = 5446,
+ TB_WS_EAST_DAMAGED_ALLIANCE = 5447,
+ TB_WS_EAST_INTACT_NEUTRAL = 5451,
+ TB_WS_EAST_DAMAGED_NEUTRAL = 5452,
+};
+
+enum TolBaradText
+{
+ // DEBUG Announcer
+ TB_TEXT_EAST_SPIRE_DAMAGED = 1,
+ TB_TEXT_EAST_SPIRE_DESTROYED = 2,
+ TB_TEXT_WEST_SPIRE_DAMAGED = 3,
+ TB_TEXT_WEST_SPIRE_DESTROYED = 4,
+ TB_TEXT_SOUTH_SPIRE_DAMAGED = 5,
+ TB_TEXT_SOUTH_SPIRE_DESTROYED = 6,
+ TB_TEXT_GARRISON_ALLIANCE_GAINED = 7,
+ TB_TEXT_GARRISON_ALLIANCE_LOST = 8,
+ TB_TEXT_GARRISON_HORDE_GAINED = 9,
+ TB_TEXT_GARRISON_HORDE_LOST = 10,
+ TB_TEXT_VIGIL_ALLIANCE_GAINED = 11,
+ TB_TEXT_VIGIL_ALLIANCE_LOST = 12,
+ TB_TEXT_VIGIL_HORDE_GAINED = 13,
+ TB_TEXT_VIGIL_HORDE_LOST = 14,
+ TB_TEXT_SLAGWORKS_ALLIANCE_GAINED = 15,
+ TB_TEXT_SLAGWORKS_ALLIANCE_LOST = 16,
+ TB_TEXT_SLAGWORKS_HORDE_GAINED = 17,
+ TB_TEXT_SLAGWORKS_HORDE_LOST = 18,
+ TB_TEXT_FORTRESS_DEFEND_ALLIANCE = 19,
+ TB_TEXT_FORTRESS_DEFEND_HORDE = 20,
+ TB_TEXT_FORTRESS_CAPTURE_ALLIANCE = 21,
+ TB_TEXT_FORTRESS_CAPTURE_HORDE = 22,
+ TB_TEXT_VEHICLE_OUTSIDE_WARNING = 23,
+ TB_TEXT_PREPARATIONS_IN_5_MIN = 24,
+ TB_TEXT_PREPARATIONS_IN_2_MIN = 25,
+ TB_TEXT_PREPARATIONS_IN_1_MIN = 26,
+};
+
+enum TolBaradEvent
+{
+ EVENT_COUNT_CAPTURED_BASE = 1,
+};
+
+const uint32 TBFactions[BG_TEAMS_COUNT] = { 1610, 1732 };
+
+// Stalker
+Position const TolBaradDebugAnnouncerPos = { -1234.25f, 961.903f, 159.4913f, 0.0f };
+
+// Quest Infantry NPCs
+enum TBQuestInfantryEntry
+{
+ NPC_ALLIANCE_WARRIOR_INFANTRY = 47599,
+ NPC_ALLIANCE_PALADIN_INFANTRY = 47600,
+ NPC_ALLIANCE_HUNTER_INFANTRY = 47595,
+ NPC_ALLIANCE_MAGE_INFANTRY = 47598,
+
+ NPC_HORDE_DRUID_INFANTRY = 47607,
+ NPC_HORDE_MAGE_INFANTRY = 47608,
+ NPC_HORDE_ROGUE_INFANTRY = 47609,
+ NPC_HORDE_SHAMAN_INFANTRY = 47610,
+};
+
+uint32 const TB_QUEST_INFANTRY[BG_TEAMS_COUNT][4] =
+{
+ { NPC_HORDE_DRUID_INFANTRY, NPC_HORDE_MAGE_INFANTRY, NPC_HORDE_ROGUE_INFANTRY, NPC_HORDE_SHAMAN_INFANTRY },
+ { NPC_ALLIANCE_WARRIOR_INFANTRY, NPC_ALLIANCE_PALADIN_INFANTRY, NPC_ALLIANCE_HUNTER_INFANTRY, NPC_ALLIANCE_MAGE_INFANTRY },
+};
+
+uint8 const TB_QUEST_INFANTRY_MAX = 37;
+Position const TBQuestInfantrySpawnData[TB_QUEST_INFANTRY_MAX] =
+{
+ { -930.4685f, 1020.178f, 121.5658f, 0.1537642f },
+ { -831.5157f, 975.816f, 121.5255f, 5.022717f },
+ { -837.0773f, 943.9008f, 121.5055f, 5.461119f },
+ { -839.1646f, 1024.046f, 121.5505f, 4.782219f },
+ { -881.283f, 1033.25f, 121.5243f, 0.0f },
+ { -883.038f, 924.955f, 121.5243f, 0.0f },
+ { -883.913f, 978.059f, 121.5243f, 3.388291f },
+ { -883.6224f, 950.8459f, 121.5122f, 0.8307042f },
+ { -895.181f, 1015.2f, 121.5505f, 2.652318f },
+ { -943.4023f, 961.7462f, 121.5658f, 5.258394f },
+ { -958.649f, 926.877f, 121.5243f, 0.0f },
+ { -959.743f, 1029.09f, 121.5243f, 0.0f },
+ { -964.6652f, 978.5373f, 121.5257f, 0.02025719f },
+ { -1407.14f, 721.42f, 123.5033f, 0.0f },
+ { -1414.46f, 671.66f, 123.5043f, 0.0f },
+ { -1431.7f, 623.073f, 123.5043f, 0.0f },
+ { -1434.162f, 655.8566f, 123.5051f, 4.84886f },
+ { -1445.19f, 739.729f, 123.5457f, 5.767949f },
+ { -1460.954f, 718.418f, 123.6453f, 5.178094f },
+ { -1462.48f, 694.378f, 123.5463f, 0.3441857f },
+ { -1372.23f, 683.707f, 123.5043f, 0.0f },
+ { -1479.46f, 635.799f, 123.5043f, 0.0f },
+ { -1491.259f, 734.5692f, 123.4525f, 1.529741f },
+ { -1509.024f, 688.8625f, 123.5463f, 6.243045f },
+ { -1419.311f, 1310.25f, 133.8389f, 0.0f },
+ { -1444.24f, 1266.439f, 133.8229f, 0.0f },
+ { -1450.569f, 1337.351f, 133.914f, 0.0f },
+ { -1479.819f, 1331.34f, 153.2f, 0.0f },
+ { -1497.62f, 1276.429f, 133.6676f, 3.147845f },
+ { -1498.37f, 1379.689f, 133.827f, 0.0f },
+ { -1499.97f, 1232.87f, 133.8239f, 0.0f },
+ { -1505.7f, 1261.99f, 133.7089f, 0.6167698f },
+ { -1531.84f, 1316.569f, 153.2f, 0.0f },
+ { -1533.141f, 1267.66f, 133.836f, 0.0f },
+ { -1547.59f, 1300.21f, 133.7094f, 1.908187f },
+ { -1563.3f, 1325.79f, 133.6673f, 0.0f },
+};
+
+// Guard NPCs
+enum TBGuardEntry
+{
+ NPC_BARADIN_GUARD = 51165,
+ NPC_HELLSCREAMS_SENTRY = 51166,
+};
+
+uint8 const TB_GUARDS_MAX = 8;
+Position const GuardNPCSpawns[TB_GUARDS_MAX] =
+{
+// { -837.3768f, 1196.082f, 114.2994f, 3.036873f },
+// { -762.118f, 1195.259f, 107.2007f, 3.036873f },
+// { -837.809f, 1179.842f, 114.1356f, 3.159046f },
+// { -762.5504f, 1179.019f, 107.2137f, 3.159046f },
+ { -1272.951f, 964.8854f, 119.5782f, 3.193953f },
+ { -1274.394f, 997.6511f, 119.5743f, 3.193953f },
+ { -1248.226f, 1018.476f, 119.8113f, 1.605703f },
+ { -1218.948f, 943.5695f, 119.5994f, 4.625123f },
+ { -1195.417f, 965.5364f, 119.8113f, 0.0f },
+ { -1220.832f, 1018.497f, 119.8113f, 1.605703f },
+ { -1196.151f, 999.5121f, 119.5966f, 0.0f },
+ { -1249.304f, 942.9063f, 119.5782f, 4.625123f },
+};
+
+enum TBFactionNPCEntry
+{
+ // Guards
+ NPC_BARADIN_GUARD_1 = 47324,
+ NPC_BARADIN_GUARD_2 = 47325,
+ NPC_BARADIN_GRUNT_1 = 47335,
+ NPC_BARADIN_GRUNT_2 = 47336,
+
+ // Questgivers
+ NPC_SERGEANT_PARKER = 48066, // Everytime
+ NPC_COMMANDER_STEVENS = 48039, // One of these three
+ NPC_2ND_LIEUTENANT_WANSWORTH = 48061,
+ NPC_MARSHAL_FALLOWS = 48074,
+
+ NPC_COMMANDER_ZANOTH = 48069, // Everytime!
+ NPC_STAFF_SERGEANT_LAZGAR = 48062, // One of these three
+ NPC_DRILLMASTER_RAZGOTH = 48070,
+ NPC_PRIVATE_GARNOTH = 48071,
+
+ // Portal summoners
+ NPC_MAVEN_ZARA = 50173,
+ NPC_RHAGHA = 50167,
+};
+
+struct TBFactionNPCInfo
+{
+ float x;
+ float y;
+ float z;
+ float o;
+ uint32 entryAlliance;
+ uint32 entryHorde;
+};
+
+uint8 const TB_FACTION_NPC_MAX = 4;
+TBFactionNPCInfo const FactionNPCSpawns[TB_FACTION_NPC_MAX] =
+{
+ { -1259.356f, 1057.108f, 107.0786f, 4.956735f, NPC_BARADIN_GUARD_1, NPC_BARADIN_GRUNT_1 },
+ { -1254.174f, 1061.094f, 107.0772f, 5.445427f, NPC_BARADIN_GUARD_2, NPC_BARADIN_GRUNT_2 },
+ { -1256.365f, 1058.47f, 107.0776f, 2.216568f, NPC_MAVEN_ZARA, NPC_RHAGHA },
+ { -1231.38f, 985.681f, 121.2403f, 0.6108652f, NPC_SERGEANT_PARKER, NPC_COMMANDER_ZANOTH },
+};
+
+// Questing
+enum TBQuesting
+{
+ CELLBLOCK_THE_HOLE = 0, // The Hole area
+ CELLBLOCK_D_BLOCK = 1, // D-Block area
+ CELLBLOCK_CURSED_DEPTHS = 2, // Cursed Depths area
+ CELLBLOCK_MAX = 3,
+ CELLBLOCK_NONE,
+
+ AREA_THE_HOLE = 5659,
+ AREA_D_BLOCK = 5657,
+ AREA_CURSED_DEPTHS = 5658,
+
+ GO_GATE_TO_THE_HOLE = 206845,
+ GO_GATE_D_BLOCK = 206844,
+ GO_CURSED_DEPTHS_GATE = 206843,
+
+ GO_CRATE_OF_CELLBLOCK_RATIONS = 206996,
+ GO_CURSED_SHACKLES = 206905,
+ GO_DUSTY_PRISON_JOURNAL = 206890,
+};
+
+Position const RandomQuestgiverPos = { -1228.93f, 975.038f, 121.7153f, 5.969026f };
+
+struct TBQuestAreaInfo
+{
+ uint32 entry;
+ uint32 teleportSpell;
+};
+TBQuestAreaInfo const TBQuestAreas[CELLBLOCK_MAX] =
+{
+ { AREA_THE_HOLE, SPELL_TB_THE_HOLE_TELEPORT },
+ { AREA_D_BLOCK, SPELL_TB_D_BLOCK_TELEPORT },
+ { AREA_CURSED_DEPTHS, SPELL_TB_CURSED_DEPTHS_TELEPORT },
+};
+uint32 const RandomQuestgivers[BG_TEAMS_COUNT][CELLBLOCK_MAX] =
+{
+ { NPC_MARSHAL_FALLOWS, NPC_2ND_LIEUTENANT_WANSWORTH, NPC_COMMANDER_STEVENS },
+ { NPC_DRILLMASTER_RAZGOTH, NPC_STAFF_SERGEANT_LAZGAR, NPC_PRIVATE_GARNOTH },
+};
+
+// Capture Points
+enum TBCapturePointId
+{
+ TB_BASE_IRONCLAD_GARRISON = 0,
+ TB_BASE_WARDENS_VIGIL = 1,
+ TB_BASE_SLAGWORKS = 2,
+ TB_BASE_COUNT = 3,
+};
+
+struct TBCapturePointSpawnData
+{
+ float x;
+ float y;
+ float z;
+ float o;
+ TBCapturePointId id;
+ uint32 entryFlagPole[2];
+ uint32 wsControlled[2];
+ uint32 wsCapturing[2];
+ uint32 wsNeutral;
+ uint32 textGained[2];
+ uint32 textLost[2];
+};
+
+TBCapturePointSpawnData const TBCapturePoints[TB_BASE_COUNT] =
+{
+ { -896.96f, 979.497f, 121.441f, 3.124123f, TB_BASE_IRONCLAD_GARRISON, { GO_CAPTURE_POINT_NORTH_A_DEFENDING, GO_CAPTURE_POINT_NORTH_H_DEFENDING }, { TB_WS_GARRISON_ALLIANCE_CONTROLLED, TB_WS_GARRISON_HORDE_CONTROLLED }, { TB_WS_GARRISON_ALLIANCE_CAPTURING, TB_WS_GARRISON_HORDE_CAPTURING }, TB_WS_GARRISON_NEUTRAL, { TB_TEXT_GARRISON_ALLIANCE_GAINED, TB_TEXT_GARRISON_HORDE_GAINED }, { TB_TEXT_GARRISON_ALLIANCE_LOST, TB_TEXT_GARRISON_HORDE_LOST } },
+ { -1492.34f, 1309.87f, 152.961f, 5.462882f, TB_BASE_WARDENS_VIGIL, { GO_CAPTURE_POINT_WEST_A_DEFENDING, GO_CAPTURE_POINT_WEST_H_DEFENDING }, { TB_WS_VIGIL_ALLIANCE_CONTROLLED, TB_WS_VIGIL_HORDE_CONTROLLED }, { TB_WS_VIGIL_ALLIANCE_CAPTURING, TB_WS_VIGIL_HORDE_CAPTURING }, TB_WS_VIGIL_NEUTRAL, { TB_TEXT_VIGIL_ALLIANCE_GAINED, TB_TEXT_VIGIL_HORDE_GAINED }, { TB_TEXT_VIGIL_ALLIANCE_LOST, TB_TEXT_VIGIL_HORDE_LOST } },
+ { -1437.f, 685.556f, 123.421f, 0.802851f, TB_BASE_SLAGWORKS, { GO_CAPTURE_POINT_EAST_A_DEFENDING, GO_CAPTURE_POINT_EAST_H_DEFENDING }, { TB_WS_SLAGWORKS_ALLIANCE_CONTROLLED, TB_WS_SLAGWORKS_HORDE_CONTROLLED }, { TB_WS_SLAGWORKS_ALLIANCE_CAPTURING, TB_WS_SLAGWORKS_HORDE_CAPTURING }, TB_WS_SLAGWORKS_NEUTRAL, { TB_TEXT_SLAGWORKS_ALLIANCE_GAINED, TB_TEXT_SLAGWORKS_HORDE_GAINED }, { TB_TEXT_SLAGWORKS_ALLIANCE_LOST, TB_TEXT_SLAGWORKS_HORDE_LOST } },
+};
+
+// Towers
+enum TBTowerId
+{
+ TB_TOWER_EAST_SPIRE = 0,
+ TB_TOWER_SOUTH_SPIRE = 1,
+ TB_TOWER_WEST_SPIRE = 2,
+ TB_TOWERS_COUNT = 3,
+};
+
+struct TBTowerInfo
+{
+ float x;
+ float y;
+ float z;
+ float o;
+ uint32 entry;
+ uint32 textDamaged;
+ uint32 textDestroyed;
+ uint32 wsIntact[BG_TEAMS_COUNT];
+ uint32 wsDamaged[BG_TEAMS_COUNT];
+ uint32 wsDestroyed;
+};
+
+TBTowerInfo const TBTowers[TB_TOWERS_COUNT] =
+{
+ { -1013.279f, 529.5382f, 146.427f, 1.97222f, GO_EAST_SPIRE, TB_TEXT_EAST_SPIRE_DAMAGED, TB_TEXT_EAST_SPIRE_DESTROYED, { TB_WS_EAST_INTACT_ALLIANCE, TB_WS_EAST_INTACT_HORDE }, { TB_WS_EAST_DAMAGED_ALLIANCE, TB_WS_EAST_DAMAGED_HORDE }, TB_WS_EAST_DESTROYED_NEUTRAL },
+ { -1618.91f, 954.5417f, 168.601f, 0.06981169f, GO_SOUTH_SPIRE, TB_TEXT_SOUTH_SPIRE_DAMAGED, TB_TEXT_SOUTH_SPIRE_DESTROYED, { TB_WS_SOUTH_INTACT_ALLIANCE, TB_WS_SOUTH_INTACT_HORDE }, { TB_WS_SOUTH_DAMAGED_ALLIANCE, TB_WS_SOUTH_DAMAGED_HORDE }, TB_WS_SOUTH_DESTROYED_NEUTRAL },
+ { -950.4097f, 1469.101f, 176.596f, 4.180066f, GO_WEST_SPIRE, TB_TEXT_WEST_SPIRE_DAMAGED, TB_TEXT_WEST_SPIRE_DESTROYED, { TB_WS_WEST_INTACT_ALLIANCE, TB_WS_WEST_INTACT_HORDE }, { TB_WS_WEST_DAMAGED_ALLIANCE, TB_WS_WEST_DAMAGED_HORDE }, TB_WS_WEST_DESTROYED_NEUTRAL },
+};
+
+// Vehicles
+enum TBVehicles
+{
+ NPC_ABANDONED_SIEGE_ENGINE = 45344,
+};
+
+int8 const TB_ABANDONED_SIEGE_ENGINE_COUNT = 6;
+Position const TBAbandonedSiegeEngineSpawnData[TB_ABANDONED_SIEGE_ENGINE_COUNT] =
+{
+ { -1106.57f, 1196.34f, 121.8023f, 0.4014257f },
+ { -1108.52f, 1111.33f, 121.2783f, 1.37881f },
+ { -1213.01f, 782.236f, 121.4473f, 1.675516f },
+ { -1258.26f, 780.497f, 122.4413f, 1.48353f },
+ { -1438.3f, 1095.24f, 121.1363f, 5.288348f },
+ { -1442.3f, 1141.07f, 123.6323f, 4.24115f },
+};
+
+// Banners
+enum TBFactionBannerEntry
+{
+ GO_BARADINS_WARDEN_BANNER = 207391, // Alliance banner
+ GO_HELLSCREAM_REACH_BANNER = 207400, // Horde banner
+};
+
+uint32 const TBBannerEntry[BG_TEAMS_COUNT] = { GO_BARADINS_WARDEN_BANNER, GO_HELLSCREAM_REACH_BANNER };
+
+uint8 const TB_BANNER_MAX = 23;
+Position const TBBanners[TB_BANNER_MAX] =
+{
+ { -987.6129f, 963.9861f, 121.4506f, 2.617989f },
+ { -988.118f, 993.0087f, 121.6746f, 3.612838f },
+ { -1195.941f, 964.342f, 119.728f, 0.8901166f },
+ { -1196.892f, 1000.957f, 119.8211f, 5.445428f },
+ { -1198.236f, 1081.898f, 120.2007f, 1.06465f },
+ { -1089.337f, 1157.161f, 120.2749f, 3.036838f },
+ { -1090.033f, 1143.476f, 120.2656f, 3.036838f },
+ { -1217.495f, 944.0261f, 119.4949f, 1.989672f },
+ { -1219.226f, 1018.168f, 119.728f, 2.251473f },
+ { -1210.319f, 1081.885f, 120.2396f, 2.007128f },
+ { -1226.903f, 786.7656f, 119.4592f, 1.553341f },
+ { -1228.464f, 979.7379f, 119.3814f, 0.03490625f },
+ { -1239.668f, 786.7899f, 119.4271f, 1.553341f },
+ { -1250.262f, 1017.887f, 119.728f, 0.8377575f },
+ { -1250.693f, 943.4496f, 119.4949f, 5.305802f },
+ { -1272.29f, 963.5208f, 119.4949f, 2.617989f },
+ { -1273.997f, 998.7934f, 119.4884f, 3.665196f },
+ { -1378.363f, 725.0087f, 124.2978f, 1.326448f },
+ { -1401.97f, 747.0972f, 123.2302f, 0.2443456f },
+ { -1421.953f, 1263.559f, 133.6141f, 5.009095f },
+ { -1446.497f, 1238.964f, 133.7601f, 5.969027f },
+ { -1488.908f, 1118.747f, 124.9255f, 6.248279f },
+ { -1488.533f, 1131.608f, 124.6363f, 6.248279f },
+};
+
+// Portals
+enum TBPortalEntry
+{
+ TB_PORTAL_ALLIANCE = 208227, // Portal to Stormwind
+ TB_PORTAL_HORDE = 208226, // Portal to Orgrimmar
+};
+
+uint32 const TBPortalEntry[BG_TEAMS_COUNT] = { TB_PORTAL_ALLIANCE, TB_PORTAL_HORDE };
+
+uint8 const TB_PORTAL_MAX = 2;
+Position const TBPortals[TB_PORTAL_MAX] =
+{
+ { -598.7656f, 1377.974f, 21.91898f, 0.0f },
+ { -1257.729f, 1060.365f, 106.9938f, 5.462882f },
+};
+
+/* ################### *
+ * Tol Barad graveyard *
+ * ################### */
+
+enum TBGraveyardAreaId
+{
+ // Tol Barad
+ TB_GY_BARADIN_HOLD = 1789,
+ TB_GY_IRONCLAD_GARRISON = 1783,
+ TB_GY_WARDENS_VIGIL = 1785,
+ TB_GY_SLAGWORKS = 1787,
+ TB_GY_WEST_SPIRE = 1784,
+ TB_GY_SOUTH_SPIRE = 1786,
+ TB_GY_EAST_SPIRE = 1788,
+ BATTLEFIELD_TB_GRAVEYARD_MAX = 7,
+
+ // Tol Barad Peninsula
+ TBP_GY_ALLIANCE_DAILY = 1808,
+ TBP_GY_HORDE_DAILY = 1807,
+};
+
+struct TBGraveyardInfo
+{
+ float x;
+ float y;
+ float z;
+ float o;
+ uint32 phaseId;
+ uint32 gyid;
+ uint32 spiritEntry[BG_TEAMS_COUNT];
+ bool defenderControls;
+};
+
+TBGraveyardInfo const TBGraveyards[BATTLEFIELD_TB_GRAVEYARD_MAX] =
+{
+ { -1247.42f, 981.25f, 155.35f, 6.28f, 128, TB_GY_BARADIN_HOLD, { NPC_TB_GY_SPIRIT_BARADIN_HOLD_A, NPC_TB_GY_SPIRIT_BARADIN_HOLD_H }, true },
+ { -974.28f, 1089.47f, 132.99f, 5.90f, 64, TB_GY_IRONCLAD_GARRISON, { NPC_TB_GY_SPIRIT_IRONCLAD_GARRISON_A, NPC_TB_GY_SPIRIT_IRONCLAD_GARRISON_H }, false },
+ { -1570.44f, 1167.57f, 159.50f, 2.20f, 64, TB_GY_WARDENS_VIGIL, { NPC_TB_GY_SPIRIT_WARDENS_VIGIL_A, NPC_TB_GY_SPIRIT_WARDENS_VIGIL_H }, false },
+ { -1343.32f, 565.24f, 139.04f, 1.66f, 64, TB_GY_SLAGWORKS, { NPC_TB_GY_SPIRIT_SLAGWORKS_A, NPC_TB_GY_SPIRIT_SLAGWORKS_H }, false },
+ { -1052.02f, 1494.05f, 191.41f, 4.13f, 64, TB_GY_WEST_SPIRE, { NPC_TB_GY_SPIRIT_WEST_SPIRE_A, NPC_TB_GY_SPIRIT_WEST_SPIRE_H }, false },
+ { -1603.34f, 874.29f, 193.69f, 5.27f, 64, TB_GY_SOUTH_SPIRE, { NPC_TB_GY_SPIRIT_SOUTH_SPIRE_A, NPC_TB_GY_SPIRIT_SOUTH_SPIRE_H }, false },
+ { -943.66f, 572.36f, 157.54f, 1.74f, 64, TB_GY_EAST_SPIRE, { NPC_TB_GY_SPIRIT_EAST_SPIRE_A, NPC_TB_GY_SPIRIT_EAST_SPIRE_H }, false },
+};
+
+/* ####################### *
+ * Tol Barad capture point *
+ * ####################### */
+
+class TolBaradCapturePoint : public BfCapturePoint
+{
+ public:
+ TolBaradCapturePoint(BattlefieldTB* battlefield, TeamId teamInControl);
+
+ void ChangeTeam(TeamId /*oldteam*/) override;
+};
+
+/* ##################### *
+ * Tol Barad battlefield *
+ * ##################### */
+
+class TC_GAME_API BattlefieldTB : public Battlefield
+{
+ public:
+ ~BattlefieldTB();
+
+ void OnStartGrouping() override;
+ void OnBattleStart() override;
+ void OnBattleEnd(bool endByTimer) override;
+
+ void OnPlayerEnterZone(Player* player) override;
+ void OnPlayerLeaveZone(Player* player) override;
+
+ void OnPlayerJoinWar(Player* player) override;
+ void OnPlayerLeaveWar(Player* player) override;
+
+ bool Update(uint32 diff) override;
+
+ void OnCreatureCreate(Creature* creature) override;
+ //void OnCreatureRemove(Creature* creature) override;
+
+ void OnGameObjectCreate(GameObject* go) override;
+
+ void UpdateCapturedBaseCount();
+ //void UpdatedDestroyedTowerCount(TeamId team);
+
+ //void DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 incrementNumber = 1) override;
+
+ bool SetupBattlefield() override;
+
+ void SendInitWorldStatesTo(Player* player);
+ void SendInitWorldStatesToAll() override;
+ void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
+ void UpdateWorldStates();
+
+ void HandleKill(Player* killer, Unit* victim) override;
+ //void OnUnitDeath(Unit* unit) override;
+ void PromotePlayer(Player* killer);
+ void RemoveAurasFromPlayer(Player* player);
+
+ void ProcessEvent(WorldObject* obj, uint32 eventId) override;
+
+ void TowerDamaged(TBTowerId tbTowerId);
+ void TowerDestroyed(TBTowerId tbTowerId);
+
+ // returns the graveyardId in the specified area.
+ //uint8 GetSpiritGraveyardId(uint32 areaId) const;
+
+ void UpdateNPCsAndGameObjects();
+ void CreateCapturePoints();
+
+ protected:
+ // Minutes till battle preparation warnings
+ bool warnedFiveMinutes;
+ bool warnedTwoMinutes;
+ bool warnedOneMinute;
+
+ uint32 m_saveTimer;
+
+ bool updatedNPCAndObjects;
+ uint32 m_updateObjectsTimer;
+
+ uint32 m_BonusTime;
+
+ GuidSet BattleInactiveNPCs;
+ GuidSet BattleInactiveGOs;
+
+ GuidSet TemporaryNPCs;
+ GuidSet TemporaryGOs;
+
+ GuidSet Towers;
+
+ uint8 m_iCellblockRandom;
+
+ ObjectGuid TBGatesGUID;
+ ObjectGuid TBDoorGUID;
+
+ ObjectGuid m_gateToTheHoleGUID;
+ ObjectGuid m_gateDBlockGUID;
+ ObjectGuid m_gateCursedDepthsGUID;
+};
+
+#endif
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 59584744a2a..0c71134359e 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -24,6 +24,7 @@
#include "Battlefield.h"
#include "BattlefieldMgr.h"
#include "BattlefieldWG.h"
+#include "BattlefieldTB.h"
#include "Battleground.h"
#include "BattlegroundMgr.h"
#include "BattlegroundScore.h"
@@ -8946,6 +8947,22 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
if (bg && bg->GetTypeID(true) == BATTLEGROUND_BFG)
bg->FillInitialWorldStates(packet);
break;
+ // Tol Barad Peninsula
+ case 5389:
+ if (sWorld->getBoolConfig(CONFIG_TOLBARAD_ENABLE))
+ {
+ packet.Worldstates.emplace_back(5385, sWorld->getWorldState(5385)); // TB_WS_ALLIANCE_CONTROLS_SHOW
+ packet.Worldstates.emplace_back(5384, sWorld->getWorldState(5384)); // TB_WS_HORDE_CONTROLS_SHOW
+ packet.Worldstates.emplace_back(5387, sWorld->getWorldState(5387)); // TB_WS_TIME_NEXT_BATTLE_SHOW
+ packet.Worldstates.emplace_back(5546, sWorld->getWorldState(5546)); // TB_WS_ALLIANCE_ATTACKING_SHOW
+ packet.Worldstates.emplace_back(5547, sWorld->getWorldState(5547)); // TB_WS_HORDE_ATTACKING_SHOW
+ }
+ break;
+ // Tol Barad
+ case 5095:
+ if (bf && bf->GetTypeId() == BATTLEFIELD_TB)
+ bf->FillInitialWorldStates(packet);
+ break;
// Wintergrasp
case 4197:
if (bf && bf->GetTypeId() == BATTLEFIELD_WG)
@@ -8991,6 +9008,17 @@ void Player::SendBattlefieldWorldStates() const
SendUpdateWorldState(ClockWorldState[1], uint32(time(nullptr) + timer));
}
}
+
+ if (sWorld->getBoolConfig(CONFIG_TOLBARAD_ENABLE))
+ {
+ if (Battlefield* tb = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_TB))
+ {
+ SendUpdateWorldState(TB_WS_FACTION_CONTROLLING, uint32(tb->GetDefenderTeam() + 1));
+ uint32 timer = tb->GetTimer() / 1000;
+ SendUpdateWorldState(TB_WS_TIME_BATTLE_END, uint32(tb->IsWarTime() ? uint32(time(nullptr) + timer) : 0));
+ SendUpdateWorldState(TB_WS_TIME_NEXT_BATTLE, uint32(!tb->IsWarTime() ? uint32(time(nullptr) + timer) : 0));
+ }
+ }
}
uint32 Player::GetXPRestBonus(uint32 xp)
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 6768eb10b46..dc785f3bddf 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3111,6 +3111,10 @@ void SpellMgr::LoadSpellInfoCorrections()
//! HACK: This spell break quest complete for alliance and on retail not used °_O
const_cast<SpellEffectInfo*>(spellInfo->GetEffect(EFFECT_0))->Effect = 0;
break;
+ case 85123: // Siege Cannon (Tol Barad)
+ const_cast<SpellEffectInfo*>(spellInfo->GetEffect(EFFECT_0))->RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
+ const_cast<SpellEffectInfo*>(spellInfo->GetEffect(EFFECT_0))->TargetA = SpellImplicitTargetInfo(TARGET_UNIT_SRC_AREA_ENTRY);
+ break;
// VIOLET HOLD SPELLS
//
case 54258: // Water Globule (Ichoron)
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 5513c8e94dd..37d35e5b46d 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1413,6 +1413,16 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_WINTERGRASP_NOBATTLETIME] = sConfigMgr->GetIntDefault("Wintergrasp.NoBattleTimer", 150);
m_int_configs[CONFIG_WINTERGRASP_RESTART_AFTER_CRASH] = sConfigMgr->GetIntDefault("Wintergrasp.CrashRestartTimer", 10);
+ // Tol Barad battlefield
+ m_bool_configs[CONFIG_TOLBARAD_ENABLE] = sConfigMgr->GetBoolDefault("TolBarad.Enable", true);
+ m_int_configs[CONFIG_TOLBARAD_PLR_MAX] = sConfigMgr->GetIntDefault("TolBarad.PlayerMax", 100);
+ m_int_configs[CONFIG_TOLBARAD_PLR_MIN] = sConfigMgr->GetIntDefault("TolBarad.PlayerMin", 0);
+ m_int_configs[CONFIG_TOLBARAD_PLR_MIN_LVL] = sConfigMgr->GetIntDefault("TolBarad.PlayerMinLvl", 85);
+ m_int_configs[CONFIG_TOLBARAD_BATTLETIME] = sConfigMgr->GetIntDefault("TolBarad.BattleTimer", 15);
+ m_int_configs[CONFIG_TOLBARAD_BONUSTIME] = sConfigMgr->GetIntDefault("TolBarad.BonusTime", 5);
+ m_int_configs[CONFIG_TOLBARAD_NOBATTLETIME] = sConfigMgr->GetIntDefault("TolBarad.NoBattleTimer", 150);
+ m_int_configs[CONFIG_TOLBARAD_RESTART_AFTER_CRASH] = sConfigMgr->GetIntDefault("TolBarad.CrashRestartTimer", 10);
+
// Stats limits
m_bool_configs[CONFIG_STATS_LIMITS_ENABLE] = sConfigMgr->GetBoolDefault("Stats.Limits.Enable", false);
m_float_configs[CONFIG_STATS_LIMITS_DODGE] = sConfigMgr->GetFloatDefault("Stats.Limits.Dodge", 95.0f);
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 1cbcb747279..ef8668f2aa7 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -167,6 +167,7 @@ enum WorldBoolConfigs
CONFIG_WARDEN_ENABLED,
CONFIG_ENABLE_MMAPS,
CONFIG_WINTERGRASP_ENABLE,
+ CONFIG_TOLBARAD_ENABLE,
CONFIG_UI_QUESTLEVELS_IN_DIALOGS, // Should we add quest levels to the title in the NPC dialogs?
CONFIG_EVENT_ANNOUNCE,
CONFIG_STATS_LIMITS_ENABLE,
@@ -363,6 +364,13 @@ enum WorldIntConfigs
CONFIG_WINTERGRASP_BATTLETIME,
CONFIG_WINTERGRASP_NOBATTLETIME,
CONFIG_WINTERGRASP_RESTART_AFTER_CRASH,
+ CONFIG_TOLBARAD_PLR_MAX,
+ CONFIG_TOLBARAD_PLR_MIN,
+ CONFIG_TOLBARAD_PLR_MIN_LVL,
+ CONFIG_TOLBARAD_BATTLETIME,
+ CONFIG_TOLBARAD_BONUSTIME,
+ CONFIG_TOLBARAD_NOBATTLETIME,
+ CONFIG_TOLBARAD_RESTART_AFTER_CRASH,
CONFIG_GUILD_SAVE_INTERVAL,
CONFIG_GUILD_UNDELETABLE_LEVEL,
CONFIG_PACKET_SPOOF_POLICY,
diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
index adf7219d2a3..123d4102794 100644
--- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
+++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp
@@ -193,6 +193,7 @@ void AddSC_stormwind_city();
void AddSC_stranglethorn_vale();
void AddSC_swamp_of_sorrows();
void AddSC_tirisfal_glades();
+void AddSC_tol_barad();
void AddSC_undercity();
void AddSC_western_plaguelands();
void AddSC_wetlands();
@@ -379,6 +380,7 @@ void AddEasternKingdomsScripts()
AddSC_stranglethorn_vale();
AddSC_swamp_of_sorrows();
AddSC_tirisfal_glades();
+ AddSC_tol_barad();
AddSC_undercity();
AddSC_western_plaguelands();
AddSC_wetlands();
diff --git a/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp b/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp
new file mode 100644
index 00000000000..54534a3d301
--- /dev/null
+++ b/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2008-2016 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 "BattlefieldMgr.h"
+#include "BattlefieldTB.h"
+#include "Battlefield.h"
+#include "ScriptSystem.h"
+#include "WorldSession.h"
+#include "ScriptedCreature.h"
+#include "ScriptedGossip.h"
+#include "SpellScript.h"
+#include "Player.h"
+
+enum TBSpiritGuide
+{
+ SPELL_CHANNEL_SPIRIT_HEAL = 22011,
+
+ GOSSIP_OPTION_ID_SLAGWORKS = 0,
+ GOSSIP_OPTION_ID_IRONCLAD_GARRISON = 1,
+ GOSSIP_OPTION_ID_WARDENS_VIGIL = 2,
+ GOSSIP_OPTION_ID_EAST_SPIRE = 3,
+ GOSSIP_OPTION_ID_WEST_SPIRE = 4,
+ GOSSIP_OPTION_ID_SOUTH_SPIRE = 5,
+};
+
+class npc_tb_spirit_guide : public CreatureScript
+{
+ public:
+ npc_tb_spirit_guide() : CreatureScript("npc_tb_spirit_guide") { }
+
+ struct npc_tb_spirit_guideAI : public ScriptedAI
+ {
+ npc_tb_spirit_guideAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void UpdateAI(uint32 /*diff*/) override
+ {
+ if (!me->HasUnitState(UNIT_STATE_CASTING))
+ DoCast(me, SPELL_CHANNEL_SPIRIT_HEAL);
+ }
+
+ void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
+ {
+ player->PlayerTalkClass->SendCloseGossip();
+
+ uint32 areaId = 0;
+ switch (gossipListId)
+ {
+ case GOSSIP_OPTION_ID_SLAGWORKS:
+ areaId = TB_GY_SLAGWORKS;
+ break;
+ case GOSSIP_OPTION_ID_IRONCLAD_GARRISON:
+ areaId = TB_GY_IRONCLAD_GARRISON;
+ break;
+ case GOSSIP_OPTION_ID_WARDENS_VIGIL:
+ areaId = TB_GY_WARDENS_VIGIL;
+ break;
+ case GOSSIP_OPTION_ID_EAST_SPIRE:
+ areaId = TB_GY_EAST_SPIRE;
+ break;
+ case GOSSIP_OPTION_ID_WEST_SPIRE:
+ areaId = TB_GY_WEST_SPIRE;
+ break;
+ case GOSSIP_OPTION_ID_SOUTH_SPIRE:
+ areaId = TB_GY_SOUTH_SPIRE;
+ break;
+ default:
+ return;
+ }
+
+ if (WorldSafeLocsEntry const* safeLoc = sWorldSafeLocsStore.LookupEntry(areaId))
+ player->TeleportTo(safeLoc->MapID, safeLoc->Loc.X, safeLoc->Loc.Y, safeLoc->Loc.Z, 0);
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const override
+ {
+ return new npc_tb_spirit_guideAI(creature);
+ }
+};
+
+// 85123 - Siege Cannon - selects random target
+class spell_siege_cannon : public SpellScriptLoader
+{
+public:
+ spell_siege_cannon() : SpellScriptLoader("spell_siege_cannon") { }
+
+ class spell_siege_cannon_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_siege_cannon_SpellScript);
+
+ void SelectRandomTarget(std::list<WorldObject*>& targets)
+ {
+ if (targets.empty())
+ return;
+
+ WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
+ targets.clear();
+ targets.push_back(target);
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_siege_cannon_SpellScript::SelectRandomTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_siege_cannon_SpellScript();
+ }
+};
+
+void AddSC_tol_barad()
+{
+ new npc_tb_spirit_guide();
+ new spell_siege_cannon();
+}
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index eeb2be26a23..20de1aac57f 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -2532,6 +2532,64 @@ Wintergrasp.NoBattleTimer = 150
Wintergrasp.CrashRestartTimer = 10
#
+# TolBarad.Enable
+# Description: Enable the Tol Barad battlefield.
+# Default: 0 - (Disabled)
+# 1 - (Enabled, Experimental as in incomplete, bugged and with crashes)
+
+TolBarad.Enable = 0
+
+#
+# TolBarad.PlayerMax
+# Description: Maximum number of players allowed in Tol Barad.
+# Default: 100
+
+TolBarad.PlayerMax = 100
+
+#
+# TolBarad.PlayerMin
+# Description: Minimum number of players required for Tol Barad.
+# Default: 0
+
+TolBarad.PlayerMin = 0
+
+#
+# TolBarad.PlayerMinLvl
+# Description: Required character level for the Tol Barad battle.
+# Default: 85
+
+TolBarad.PlayerMinLvl = 85
+
+#
+# TolBarad.BattleTimer
+# Description: Time (in minutes) for the Tol Barad battle to last.
+# Default: 15
+
+TolBarad.BattleTimer = 15
+
+#
+# TolBarad.BonusTime
+# Description: Bonus time (in minutes) for each tower destroyed in Tol Barad battle.
+# Default: 5
+
+TolBarad.BonusTime = 5
+
+#
+# TolBarad.NoBattleTimer
+# Description: Time (in minutes) between TolBarad battles.
+# Default: 150
+
+TolBarad.NoBattleTimer = 150
+
+#
+# TolBarad.CrashRestartTimer
+# Description: Time (in minutes) to delay the restart of TolBarad if the world server
+# crashed during a running battle.
+# Default: 10
+
+TolBarad.CrashRestartTimer = 10
+
+#
###################################################################################################
###################################################################################################