aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_01_22_02_world_creature_addon.sql2
-rw-r--r--sql/updates/world/2012_01_23_00_world_sai.sql110
-rw-r--r--sql/updates/world/2012_01_23_01_world_creature_script_names.sql2
-rw-r--r--sql/updates/world/2012_01_23_02_world_disables.sql1
-rw-r--r--sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql3
-rw-r--r--sql/updates/world/2012_01_23_04_world_creature_text.sql9
-rw-r--r--sql/updates/world/2012_01_23_05_world_spell_script_names.sql3
-rw-r--r--sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql3
-rw-r--r--sql/updates/world/2012_01_23_07_world_creature_text.sql5
-rw-r--r--sql/updates/world/2012_01_24_00_world_misc.sql18
-rw-r--r--sql/updates/world/2012_01_24_00_world_spell_script_names.sql4
-rw-r--r--sql/updates/world/2012_01_26_00_world_sai.sql45
-rw-r--r--sql/updates/world/2012_01_27_00_player_factionchange_items.sql4
-rw-r--r--sql/updates/world/2012_01_28_world_conditions.sql16
-rw-r--r--sql/updates/world/2012_01_29_00_world_spell_dbc.sql4
-rw-r--r--sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql3
-rw-r--r--sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql3
-rwxr-xr-xsrc/server/authserver/Server/AuthSocket.cpp37
-rwxr-xr-xsrc/server/authserver/Server/RealmSocket.cpp14
-rwxr-xr-xsrc/server/authserver/Server/RealmSocket.h7
-rw-r--r--src/server/game/AI/CoreAI/GameObjectAI.h2
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp2
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.cpp18
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.h4
-rw-r--r--src/server/game/CMakeLists.txt4
-rwxr-xr-xsrc/server/game/Chat/Commands/Level2.cpp4
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp12
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp2
-rwxr-xr-xsrc/server/game/Entities/Player/Player.h2
-rwxr-xr-xsrc/server/game/Handlers/AddonHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/AddonHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/AddonHandler.h (renamed from src/server/game/Server/Protocol/Handlers/AddonHandler.h)0
-rwxr-xr-xsrc/server/game/Handlers/ArenaTeamHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/AuctionHouseHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/AuthHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/AuthHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/BattleGroundHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/CalendarHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/ChannelHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp)0
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/ChatHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/ChatHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/CombatHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/CombatHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/DuelHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/DuelHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/GroupHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/GroupHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/GuildHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/GuildHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/ItemHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/ItemHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/LFGHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/LFGHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/LootHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/LootHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/MailHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/MailHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/MiscHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/MiscHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/MovementHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/MovementHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/NPCHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/NPCHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/NPCHandler.h (renamed from src/server/game/Server/Protocol/Handlers/NPCHandler.h)0
-rwxr-xr-xsrc/server/game/Handlers/PetHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/PetHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/PetitionsHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/QueryHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/QueryHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/QuestHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/QuestHandler.cpp)0
-rw-r--r--src/server/game/Handlers/ReferAFriendHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/ReferAFriendHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/SkillHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/SkillHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/SpellHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/SpellHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/TaxiHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/TicketHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/TicketHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/TradeHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/TradeHandler.cpp)0
-rw-r--r--src/server/game/Handlers/VehicleHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp)0
-rwxr-xr-xsrc/server/game/Handlers/VoiceChatHandler.cpp (renamed from src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp)0
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp1
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp1
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp1
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h1
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInit.cpp1
-rw-r--r--src/server/scripts/CMakeLists.txt2
-rw-r--r--src/server/scripts/Commands/cs_gm.cpp3
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp7
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp3
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp3
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp17
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp91
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp25
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp71
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp80
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp25
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp162
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp49
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp188
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h19
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp47
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp15
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp15
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp25
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp163
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp40
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp21
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp21
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp23
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp30
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp4
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp5
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp427
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp6
-rw-r--r--src/server/scripts/Northrend/icecrown.cpp93
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp3
-rw-r--r--src/server/scripts/Spells/spell_item.cpp46
-rwxr-xr-xsrc/server/shared/Cryptography/HMACSHA1.cpp1
-rw-r--r--src/server/worldserver/CMakeLists.txt2
113 files changed, 1263 insertions, 996 deletions
diff --git a/sql/updates/world/2012_01_22_02_world_creature_addon.sql b/sql/updates/world/2012_01_22_02_world_creature_addon.sql
index 874f229c3a2..808d728610e 100644
--- a/sql/updates/world/2012_01_22_02_world_creature_addon.sql
+++ b/sql/updates/world/2012_01_22_02_world_creature_addon.sql
@@ -1,2 +1,2 @@
-- cleanups
-DELETE FROM`creature_addon` WHERE `guid` in (133434,1 33435);
+DELETE FROM `creature_addon` WHERE `guid` in (133434,133435);
diff --git a/sql/updates/world/2012_01_23_00_world_sai.sql b/sql/updates/world/2012_01_23_00_world_sai.sql
new file mode 100644
index 00000000000..d73561b6cd6
--- /dev/null
+++ b/sql/updates/world/2012_01_23_00_world_sai.sql
@@ -0,0 +1,110 @@
+-- Windle Sparkshine SAI
+SET @ENTRY := 29261;
+SET @SPELL_LIGHT_LAMP := 60535;
+UPDATE `gameobject` SET `state`=1 WHERE `id` IN (191444,192086,192085,192084,192087,192089,192088,192067,191445,192850,192853,192854,192852,192083,191440,192070,192069,192117,192116,192119,191665);
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,68,0,100,0,25,0,0,0,53,0,@ENTRY,0,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - Game Event 25 Start - Start WP"),
+(@ENTRY,0,1,0,40,0,100,0,1,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 1 - Run Script"),
+(@ENTRY,0,2,0,40,0,100,0,5,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 5 - Run Script"),
+(@ENTRY,0,3,0,40,0,100,0,8,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 8 - Run Script"),
+(@ENTRY,0,4,0,40,0,100,0,12,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 12 - Run Script"),
+(@ENTRY,0,5,0,40,0,100,0,16,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 16 - Run Script"),
+(@ENTRY,0,6,0,40,0,100,0,20,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 20 - Run Script"),
+(@ENTRY,0,7,0,40,0,100,0,24,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 24 - Run Script"),
+(@ENTRY,0,8,0,40,0,100,0,29,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 29 - Run Script"),
+(@ENTRY,0,9,0,40,0,100,0,33,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 33 - Run Script"),
+(@ENTRY,0,10,0,40,0,100,0,36,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 36 - Run Script"),
+(@ENTRY,0,11,0,40,0,100,0,38,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 38 - Run Script"),
+(@ENTRY,0,12,0,40,0,100,0,45,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 45 - Run Script"),
+(@ENTRY,0,13,0,40,0,100,0,48,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 48 - Run Script"),
+(@ENTRY,0,14,0,40,0,100,0,53,@ENTRY,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - At WP 53 - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,54,3500,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - On Script - Pause WP"),
+(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,0,0,11,@SPELL_LIGHT_LAMP,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windle Sparkshine - On Script - Cast Light Lamp"),
+(@ENTRY,0,15,0,40,0,100,0,1,@ENTRY,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.654867,"Windle Sparkshine - At WP 56 - Set Orientation");
+
+-- Waypoints
+DELETE FROM `waypoints` WHERE `entry`=@ENTRY;
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@ENTRY,1,5747.069,685.3748,643.8239,'Windle Sparkshine'), -- Lamp 1
+(@ENTRY,2,5749.971,682.7211,643.4057,'Windle Sparkshine'),
+(@ENTRY,3,5760.647,698.313,642.3947,'Windle Sparkshine'),
+(@ENTRY,4,5770.979,712.3667,641.5851,'Windle Sparkshine'),
+(@ENTRY,5,5771.641,718.9518,641.9728,'Windle Sparkshine'), -- Lamp 2
+(@ENTRY,6,5793.795,719.567,640.5906,'Windle Sparkshine'),
+(@ENTRY,7,5806.629,718.5358,640.7841,'Windle Sparkshine'),
+(@ENTRY,8,5807.11,723.0623,641.0547,'Windle Sparkshine'), -- Lamp 3
+(@ENTRY,9,5812.014,718.6132,640.9974,'Windle Sparkshine'),
+(@ENTRY,10,5825.027,714.0911,640.9233,'Windle Sparkshine'),
+(@ENTRY,11,5836.411,706.2252,641.2604,'Windle Sparkshine'),
+(@ENTRY,12,5838.926,710.4177,641.3674,'Windle Sparkshine'), -- Lamp 4
+(@ENTRY,13,5836.411,706.2252,641.2604,'Windle Sparkshine'),
+(@ENTRY,14,5850.628,692.9323,642.3394,'Windle Sparkshine'),
+(@ENTRY,15,5871.261,679.3507,643.1625,'Windle Sparkshine'),
+(@ENTRY,16,5889.708,676.6304,643.6068,'Windle Sparkshine'), -- Lamp 5
+(@ENTRY,17,5885.975,668.9486,643.8263,'Windle Sparkshine'),
+(@ENTRY,18,5894.604,656.5289,644.8455,'Windle Sparkshine'),
+(@ENTRY,19,5893.215,644.1390,645.6358,'Windle Sparkshine'),
+(@ENTRY,20,5891.531,635.5212,647.5772,'Windle Sparkshine'), -- Lamp 6
+(@ENTRY,21,5885.393,639.2025,646.5132,'Windle Sparkshine'),
+(@ENTRY,22,5878.637,630.1852,647.6648,'Windle Sparkshine'),
+(@ENTRY,23,5865.146,615.7023,650.0197,'Windle Sparkshine'),
+(@ENTRY,24,5867.964,613.0705,650.4550,'Windle Sparkshine'), -- Lamp 7
+(@ENTRY,25,5865.146,615.7023,650.0197,'Windle Sparkshine'),
+(@ENTRY,26,5854.076,607.8509,650.7210,'Windle Sparkshine'),
+(@ENTRY,27,5840.764,590.5446,650.6240,'Windle Sparkshine'),
+(@ENTRY,28,5837.371,583.0912,650.7756,'Windle Sparkshine'),
+(@ENTRY,29,5840.763,580.3890,651.8137,'Windle Sparkshine'), -- Lamp 8
+(@ENTRY,30,5837.371,583.0912,650.7756,'Windle Sparkshine'),
+(@ENTRY,31,5822.904,570.0418,650.1446,'Windle Sparkshine'),
+(@ENTRY,32,5805.871,564.1931,650.1898,'Windle Sparkshine'),
+(@ENTRY,33,5796.087,561.1876,650.6658,'Windle Sparkshine'), -- Lamp 9
+(@ENTRY,34,5796.753,566.2323,650.1285,'Windle Sparkshine'),
+(@ENTRY,35,5772.444,583.8340,649.8836,'Windle Sparkshine'),
+(@ENTRY,36,5767.615,579.1342,650.2487,'Windle Sparkshine'), -- Lamp 10
+(@ENTRY,37,5761.446,588.7081,649.6515,'Windle Sparkshine'),
+(@ENTRY,38,5750.556,591.0724,649.8145,'Windle Sparkshine'), -- Lamp 11
+(@ENTRY,39,5749.783,599.296,649.0384,'Windle Sparkshine'),
+(@ENTRY,40,5737.969,611.5457,647.9193,'Windle Sparkshine'),
+(@ENTRY,41,5726.467,621.8894,646.9294,'Windle Sparkshine'),
+(@ENTRY,42,5714.581,625.4625,646.4603,'Windle Sparkshine'),
+(@ENTRY,43,5702.122,627.8116,646.3648,'Windle Sparkshine'),
+(@ENTRY,44,5693.323,629.3795,646.5901,'Windle Sparkshine'),
+(@ENTRY,45,5687.516,629.6511,647.1143,'Windle Sparkshine'), -- Lamp 12
+(@ENTRY,46,5692.803,651.879,646.5027,'Windle Sparkshine'),
+(@ENTRY,47,5696.018,667.5477,645.7817,'Windle Sparkshine'),
+(@ENTRY,48,5695.917,678.2612,646.0887,'Windle Sparkshine'), -- Lamp 13
+(@ENTRY,49,5700.438,674.0465,645.4587,'Windle Sparkshine'),
+(@ENTRY,50,5714.589,662.3508,645.9952,'Windle Sparkshine'),
+(@ENTRY,51,5723.479,658.3279,646.0461,'Windle Sparkshine'),
+(@ENTRY,52,5728.87,666.1133,645.8447,'Windle Sparkshine'),
+(@ENTRY,53,5726.601,666.7487,645.8505,'Windle Sparkshine'), -- Lamp 14
+(@ENTRY,54,5736.254,665.7919,644.9579,'Windle Sparkshine'),
+(@ENTRY,55,5744.996,676.1825,644.0975,'Windle Sparkshine'),
+(@ENTRY,56,5744.94,681.546,644.136,'Windle Sparkshine'); -- Homeposition
+
+-- Conditions for spell 'Light Lamp'
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_LIGHT_LAMP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,191444,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192086,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192085,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192084,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192087,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192089,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192088,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192067,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,191445,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192850,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192853,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192854,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192852,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192083,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,191440,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192070,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192069,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192117,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192116,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,192119,0,0,'',NULL),
+(13,0,@SPELL_LIGHT_LAMP,0,18,0,191665,0,0,'',NULL);
diff --git a/sql/updates/world/2012_01_23_01_world_creature_script_names.sql b/sql/updates/world/2012_01_23_01_world_creature_script_names.sql
new file mode 100644
index 00000000000..d7c2b22725e
--- /dev/null
+++ b/sql/updates/world/2012_01_23_01_world_creature_script_names.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_template` SET `ScriptName`='npc_frost_tomb' WHERE `entry`=23965;
+UPDATE `creature_template` SET `ScriptName`='npc_vrykul_skeleton' WHERE `entry`=23970;
diff --git a/sql/updates/world/2012_01_23_02_world_disables.sql b/sql/updates/world/2012_01_23_02_world_disables.sql
new file mode 100644
index 00000000000..0a1be704dac
--- /dev/null
+++ b/sql/updates/world/2012_01_23_02_world_disables.sql
@@ -0,0 +1 @@
+DELETE FROM `disables` WHERE `entry`=7231 AND `sourceType`=4;
diff --git a/sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql b/sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql
new file mode 100644
index 00000000000..4d1f4536455
--- /dev/null
+++ b/sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql
@@ -0,0 +1,3 @@
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7231;
+INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `ScriptName`) VALUES
+(7231,11,'achievement_on_the_rocks');
diff --git a/sql/updates/world/2012_01_23_04_world_creature_text.sql b/sql/updates/world/2012_01_23_04_world_creature_text.sql
new file mode 100644
index 00000000000..f505a86b16c
--- /dev/null
+++ b/sql/updates/world/2012_01_23_04_world_creature_text.sql
@@ -0,0 +1,9 @@
+DELETE FROM `script_texts` WHERE `entry` IN (-1574000,-1574001,-1574002,-1574003,-1574004);
+
+DELETE FROM `creature_text` WHERE `entry`=23953;
+INSERT INTO `creature_text` (`entry`, `groupid`, `text`, `sound`, `emote`, `type`) VALUES
+(23953,1,'Your blood is mine!',13221,7,14),
+(23953,2,'Aranal, ledel! Their fate shall be yours!',13224,0,14),
+(23953,3,'Not so fast.',13222,0,14),
+(23953,4,'%s casts Frost Tomb on $n.',0,0,41),
+(23953,5,'I join... the night.',13225,0,14);
diff --git a/sql/updates/world/2012_01_23_05_world_spell_script_names.sql b/sql/updates/world/2012_01_23_05_world_spell_script_names.sql
new file mode 100644
index 00000000000..6f3b4907e5b
--- /dev/null
+++ b/sql/updates/world/2012_01_23_05_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=48400;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(48400,'spell_frost_tomb');
diff --git a/sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql b/sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql
new file mode 100644
index 00000000000..33899c3f512
--- /dev/null
+++ b/sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql
@@ -0,0 +1,3 @@
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7231 AND `type`=12;
+INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
+(7231,12,1,0,'');
diff --git a/sql/updates/world/2012_01_23_07_world_creature_text.sql b/sql/updates/world/2012_01_23_07_world_creature_text.sql
new file mode 100644
index 00000000000..90ac11e363c
--- /dev/null
+++ b/sql/updates/world/2012_01_23_07_world_creature_text.sql
@@ -0,0 +1,5 @@
+UPDATE `creature_text` SET `comment`='Prince Keleseth - SAY_DEATH' WHERE `groupid`=5 AND `entry`=23953;
+UPDATE `creature_text` SET `comment`='Prince Keleseth - SAY_FROST_TOMB_EMOTE' WHERE `groupid`=4 AND `entry`=23953;
+UPDATE `creature_text` SET `comment`='Prince Keleseth - SAY_FROST_TOMB' WHERE `groupid`=3 AND `entry`=23953;
+UPDATE `creature_text` SET `comment`='Prince Keleseth - SAY_SUMMON_SKELETONS' WHERE `groupid`=2 AND `entry`=23953;
+UPDATE `creature_text` SET `comment`='Prince Keleseth - SAY_START_COMBAT' WHERE `groupid`=1 AND `entry`=23953;
diff --git a/sql/updates/world/2012_01_24_00_world_misc.sql b/sql/updates/world/2012_01_24_00_world_misc.sql
new file mode 100644
index 00000000000..8703cd7aa42
--- /dev/null
+++ b/sql/updates/world/2012_01_24_00_world_misc.sql
@@ -0,0 +1,18 @@
+-- Make Dame Evniki Kapsalis show vendor gossip option only to players with Crusader title
+UPDATE `creature_template` SET `AIName` = 'SmartAI',`ScriptName` = '' WHERE `entry` = 34885;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10598;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`COMMENT`) VALUES
+(15,10598,0,0,17,2816,0,0,0,'',"Evniki Kapsalis should only sell to Crusaders"),
+(15,10598,0,1,17,2817,0,0,0,'',"Evniki Kapsalis should only sell to Crusaders");
+
+SET @SPELL_CHAIN = 68341;
+SET @NPC_FJOLA_LIGHTBANE = 36065;
+SET @NPC_EYDIS_DARKBANE = 36066;
+SET @NPC_PRIESTESS_ALORAH = 36101;
+SET @NPC_PRIEST_GRIMMIN = 36102;
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN(@NPC_PRIESTESS_ALORAH,@NPC_PRIEST_GRIMMIN);
+DELETE FROM `smart_scripts` WHERE (`entryorguid` IN(@NPC_PRIESTESS_ALORAH,@NPC_PRIEST_GRIMMIN) AND `source_type`=0);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@NPC_PRIESTESS_ALORAH,0,0,0,1,0,100,1,100,100,0,0,11,@SPELL_CHAIN,0,0,0,0,0,19,@NPC_EYDIS_DARKBANE,0,0,0,0,0,0,'Priestess Alorah - Cast chain on Eydis Darkbane'),
+(@NPC_PRIEST_GRIMMIN,0,0,0,1,0,100,1,100,100,0,0,11,@SPELL_CHAIN,0,0,0,0,0,19,@NPC_FJOLA_LIGHTBANE,0,0,0,0,0,0,'Priestess Grimmin - Cast chain on Fjola Lightbane');
diff --git a/sql/updates/world/2012_01_24_00_world_spell_script_names.sql b/sql/updates/world/2012_01_24_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..0e772c3c200
--- /dev/null
+++ b/sql/updates/world/2012_01_24_00_world_spell_script_names.sql
@@ -0,0 +1,4 @@
+-- Scriptname for Refocus spell
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_item_refocus';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(24531,'spell_item_refocus');
diff --git a/sql/updates/world/2012_01_26_00_world_sai.sql b/sql/updates/world/2012_01_26_00_world_sai.sql
new file mode 100644
index 00000000000..ee69e263e2e
--- /dev/null
+++ b/sql/updates/world/2012_01_26_00_world_sai.sql
@@ -0,0 +1,45 @@
+-- Quest Elven Legends (7481, 7482)
+-- Skeletal Remains of Kariel Winthalus SAI
+SET @ENTRY := 179544; -- GO entry
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI',`ScriptName`='' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,1,0,0,62,0,100,0,5743,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Skeletal Remains of Kariel Winthalus - On Gossip option select - run script'),
+(@ENTRY,1,1,0,62,0,100,0,5743,1,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Skeletal Remains of Kariel Winthalus - On Gossip option select - run script'),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Skeletal Remains of Kariel Winthalus - Script - Close Gossip'),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Skeletal Remains of Kariel Winthalus - Script - Store target'),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,11,14368,30,0,0,0,0,0, 'Skeletal Remains of Kariel Winthalus - Script - Send target'),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,45,0,1,0,0,0,0,11,14368,30,0,0,0,0,0,'Skeletal Remains of Kariel Winthalus - Script - Set data 0 1 for entry 14368'),
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,9,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Skeletal Remains of Kariel Winthalus - Script - Deactivate self'),
+(@ENTRY*100,9,5,0,0,0,100,0,28000,28000,28000,28000,32,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Skeletal Remains of Kariel Winthalus - Script - Activate self');
+-- Lorekeeper Lydros SAI
+SET @ENTRY := 14368; -- NPC entry
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,38,0,100,0,0,1,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Lorekeeper Lydros - On dataset - run script'),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lorekeeper Lydros - Script - set data 0 0'),
+(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,1000,1000,66,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'Lorekeeper Lydros - Script - turn to player'),
+(@ENTRY*100,9,2,0,0,0,100,0,1000,1000,1000,1000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lorekeeper Lydros - Script - Say 0'),
+(@ENTRY*100,9,3,0,0,0,100,0,4000,4000,4000,4000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lorekeeper Lydros - Script - Say 1'),
+(@ENTRY*100,9,4,0,0,0,100,0,8000,8000,8000,8000,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lorekeeper Lydros - Script - Say 2'),
+(@ENTRY*100,9,5,0,0,0,100,0,11000,11000,11000,11000,15,7481,0,0,0,0,0,12,1,0,0,0,0,0,0,'Lorekeeper Lydros - Script - quest credit'),
+(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,15,7482,0,0,0,0,0,12,1,0,0,0,0,0,0,'Lorekeeper Lydros - Script - quest credit'),
+(@ENTRY*100,9,7,0,0,0,100,0,2000,2000,2000,2000,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lorekeeper Lydros - Script - reset orientation');
+-- NPC talk text insert
+DELETE FROM `creature_text` WHERE `entry`=14368;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(14368,0,0, 'I very much doubt that he will have anything to say, stranger...',12,0,100,1,0,0, 'Lorekeeper Lydros'),
+(14368,1,0, 'I personally did not mind him. It was the Prince who took exception to a high elf in his domain. Alas, I am not one to question the Prince. In his defense, he did not incinerate Master Winthalus immediately.',12,0,100,1,0,0, 'Lorekeeper Lydros'),
+(14368,2,0, 'We most definitely do not need anymore attention drawn to us, stranger. Return to those that sent you in search of the lost master and tell them that nothing could be found. When this is done - and I will know when it is so - return and I shall reveal the secrets of the deceased.',12,0,100,1,0,0, 'Lorekeeper Lydros');
+-- Gossip Fix from nelegalno
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=5743;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
+(5743,0,0,"Mourn the great loss.",1,1,0,0,0,0,NULL), -- A gossip
+(5743,1,0,"Mourn the great loss.",1,1,0,0,0,0,NULL); -- H gossip
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId`=15 AND `SourceGroup`=5743);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,5743,0,0,9,7482,0,0,0,'',"Display gossip option when on Elven Legends A quest"),
+(15,5743,1,0,9,7481,0,0,0,'',"Display gossip option when on Elven Legends H quest");
diff --git a/sql/updates/world/2012_01_27_00_player_factionchange_items.sql b/sql/updates/world/2012_01_27_00_player_factionchange_items.sql
new file mode 100644
index 00000000000..1dc2749807e
--- /dev/null
+++ b/sql/updates/world/2012_01_27_00_player_factionchange_items.sql
@@ -0,0 +1,4 @@
+-- DB/Faction change: Add some missing items
+DELETE FROM `player_factionchange_items` WHERE `alliance_id` IN (47711) AND horde_id IN (47870);
+INSERT INTO `player_factionchange_items` (`race_A`,`alliance_id`,`commentA`,`race_H`,`horde_id`,`commentH`) VALUES
+(0,47711, 'Girdle of the Nether Champion',0,47870, 'Belt of the Nether Championt');
diff --git a/sql/updates/world/2012_01_28_world_conditions.sql b/sql/updates/world/2012_01_28_world_conditions.sql
new file mode 100644
index 00000000000..8d087af7e88
--- /dev/null
+++ b/sql/updates/world/2012_01_28_world_conditions.sql
@@ -0,0 +1,16 @@
+-- Class Condition update to use flags
+UPDATE `conditions` SET `ConditionValue1`=8 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=21194 AND `ConditionTypeOrReference`=15;
+UPDATE `conditions` SET `ConditionValue1`=128 WHERE `SourceTypeOrReferenceId` IN (14,15) AND`SourceGroup`=4486 AND `ConditionTypeOrReference`=15;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `SourceEntry` IN (13104,13105) AND `ConditionTypeOrReference`=15;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(20,0,13104,1,15,1503,0,0,0,'','Show quest 13104 if player is not a Death Knight'),
+(20,0,13105,1,15,32,0,0,0,'','Show quest 13105 if player is a Death Knight');
+-- Race Condition update to use flags
+UPDATE `conditions` SET `ConditionValue1`=128 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24101 AND `ConditionTypeOrReference`=16;
+UPDATE `conditions` SET `ConditionValue1`=32 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24102 AND `ConditionTypeOrReference`=16;
+UPDATE `conditions` SET `ConditionValue1`=16 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24103 AND `ConditionTypeOrReference`=16;
+UPDATE `conditions` SET `ConditionValue1`=64 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24106 AND `ConditionTypeOrReference`=16;
+UPDATE `conditions` SET `ConditionValue1`=4 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24107 AND `ConditionTypeOrReference`=16;
+UPDATE `conditions` SET `ConditionValue1`=8 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=24108 AND `ConditionTypeOrReference`=16;
+UPDATE `conditions` SET `ConditionValue1`=512 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=69530 AND `ConditionTypeOrReference`=16;
+UPDATE `conditions` SET `ConditionValue1`=1024 WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=69533 AND `ConditionTypeOrReference`=16; \ No newline at end of file
diff --git a/sql/updates/world/2012_01_29_00_world_spell_dbc.sql b/sql/updates/world/2012_01_29_00_world_spell_dbc.sql
new file mode 100644
index 00000000000..bbde43e3313
--- /dev/null
+++ b/sql/updates/world/2012_01_29_00_world_spell_dbc.sql
@@ -0,0 +1,4 @@
+-- Gushing Wound Removal spell
+DELETE FROM `spell_dbc` WHERE `id`=30023;
+INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES
+(30023,0,0,256,0,0,0,0,0,0,0,0,0,0,1,0,0,101,0,0,0,0,26,1,0,-1,0,0,164,164,164,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35321,38363,39215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,"Gushing Wound Removal");
diff --git a/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql b/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql
new file mode 100644
index 00000000000..d31489b8fce
--- /dev/null
+++ b/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_bonus_data` WHERE `entry` = 63544;
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+(63544, -1, -1, 0, 0, 'Priest - Empowered Renew');
diff --git a/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql b/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql
new file mode 100644
index 00000000000..13f9380c950
--- /dev/null
+++ b/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 57908 AND `spell_effect` = 57915;
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(57908,57915,0,'q13129 - Give quest item');
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index 1f85cb6bc5b..6d295a0bbee 100755
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -209,7 +209,7 @@ AuthSocket::~AuthSocket(void) {}
// Accept the connection and set the s random value for SRP6
void AuthSocket::OnAccept(void)
{
- sLog->outBasic("Accepting connection from '%s'", socket().get_remote_address().c_str());
+ sLog->outBasic("'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort());
}
void AuthSocket::OnClose(void)
@@ -247,7 +247,7 @@ void AuthSocket::OnRead()
// Report unknown packets in the error log
if (i == AUTH_TOTAL_COMMANDS)
{
- sLog->outError("[Auth] got unknown packet from '%s'", socket().get_remote_address().c_str());
+ sLog->outError("[Auth] got unknown packet from '%s'", socket().getRemoteAddress().c_str());
socket().shutdown();
return;
}
@@ -350,14 +350,14 @@ bool AuthSocket::_HandleLogonChallenge()
// Verify that this IP is not in the ip_banned table
LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS));
- const std::string& ip_address = socket().get_remote_address();
+ const std::string& ip_address = socket().getRemoteAddress();
PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP_BANNED);
stmt->setString(0, ip_address);
PreparedQueryResult result = LoginDatabase.Query(stmt);
if (result)
{
pkt << (uint8)WOW_FAIL_BANNED;
- sLog->outBasic("[AuthChallenge] Banned ip %s tried to login!", ip_address.c_str());
+ sLog->outBasic("'%s:%d' [AuthChallenge] Banned ip tries to login!",socket().getRemoteAddress().c_str(), socket().getRemotePort());
}
else
{
@@ -404,12 +404,12 @@ bool AuthSocket::_HandleLogonChallenge()
if ((*banresult)[0].GetUInt64() == (*banresult)[1].GetUInt64())
{
pkt << (uint8)WOW_FAIL_BANNED;
- sLog->outBasic("[AuthChallenge] Banned account %s tried to login!", _login.c_str());
+ sLog->outBasic("'%s:%d' [AuthChallenge] Banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
}
else
{
pkt << (uint8)WOW_FAIL_SUSPENDED;
- sLog->outBasic("[AuthChallenge] Temporarily banned account %s tried to login!", _login.c_str());
+ sLog->outBasic("'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
}
}
else
@@ -480,7 +480,9 @@ bool AuthSocket::_HandleLogonChallenge()
for (int i = 0; i < 4; ++i)
_localizationName[i] = ch->country[4-i-1];
- sLog->outBasic("[AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", _login.c_str (), ch->country[3], ch->country[2], ch->country[1], ch->country[0], GetLocaleByName(_localizationName));
+ sLog->outBasic("'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", socket().getRemoteAddress().c_str(), socket().getRemotePort(),
+ _login.c_str (), ch->country[3], ch->country[2], ch->country[1], ch->country[0], GetLocaleByName(_localizationName)
+ );
}
}
}
@@ -590,7 +592,7 @@ bool AuthSocket::_HandleLogonProof()
// Check if SRP6 results match (password is correct), else send an error
if (!memcmp(M.AsByteArray(), lp.M1, 20))
{
- sLog->outBasic("User '%s' successfully authenticated", _login.c_str());
+ sLog->outBasic("'%s:%d' User '%s' successfully authenticated", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
// Update the sessionkey, last_ip, last login time and reset number of failed logins in the account table for this account
// No SQL injection (escaped user name) and IP address as received by socket
@@ -598,7 +600,7 @@ bool AuthSocket::_HandleLogonProof()
PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_LOGONPROOF);
stmt->setString(0, K_hex);
- stmt->setString(1, socket().get_remote_address().c_str());
+ stmt->setString(1, socket().getRemoteAddress().c_str());
stmt->setUInt32(2, GetLocaleByName(_localizationName));
stmt->setString(3, _login);
LoginDatabase.Execute(stmt);
@@ -638,7 +640,7 @@ bool AuthSocket::_HandleLogonProof()
char data[4] = { AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT, 3, 0 };
socket().send(data, sizeof(data));
- sLog->outBasic("[AuthChallenge] account %s tried to login with wrong password!", _login.c_str());
+ sLog->outBasic("'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
uint32 MaxWrongPassCount = ConfigMgr::GetIntDefault("WrongPass.MaxCount", 0);
if (MaxWrongPassCount > 0)
@@ -668,17 +670,18 @@ bool AuthSocket::_HandleLogonProof()
stmt->setUInt32(1, WrongPassBanTime);
LoginDatabase.Execute(stmt);
- sLog->outBasic("[AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times",
- _login.c_str(), WrongPassBanTime, failed_logins);
+ sLog->outBasic("'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times",
+ socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str(), WrongPassBanTime, failed_logins);
}
else
{
stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_IP_AUTO_BANNED);
- stmt->setString(0, socket().get_remote_address());
+ stmt->setString(0, socket().getRemoteAddress());
stmt->setUInt32(1, WrongPassBanTime);
LoginDatabase.Execute(stmt);
- sLog->outBasic("[AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times", socket().get_remote_address().c_str(), WrongPassBanTime, _login.c_str(), failed_logins);
+ sLog->outBasic("'%s:%d' [AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times",
+ socket().getRemoteAddress().c_str(), socket().getRemotePort(), socket().getRemoteAddress().c_str(), WrongPassBanTime, _login.c_str(), failed_logins);
}
}
}
@@ -730,7 +733,7 @@ bool AuthSocket::_HandleReconnectChallenge()
// Stop if the account is not found
if (!result)
{
- sLog->outError("[ERROR] user %s tried to login and we cannot find his session key in the database.", _login.c_str());
+ sLog->outError("'%s:%d' [ERROR] user %s tried to login and we cannot find his session key in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
socket().shutdown();
return false;
}
@@ -790,7 +793,7 @@ bool AuthSocket::_HandleReconnectProof()
}
else
{
- sLog->outError("[ERROR] user %s tried to login, but session invalid.", _login.c_str());
+ sLog->outError("'%s:%d' [ERROR] user %s tried to login, but session is invalid.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
socket().shutdown();
return false;
}
@@ -812,7 +815,7 @@ bool AuthSocket::_HandleRealmList()
PreparedQueryResult result = LoginDatabase.Query(stmt);
if (!result)
{
- sLog->outError("[ERROR] user %s tried to login and we cannot find him in the database.", _login.c_str());
+ sLog->outError("'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
socket().shutdown();
return false;
}
diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp
index a796daae17d..72c36fc6646 100755
--- a/src/server/authserver/Server/RealmSocket.cpp
+++ b/src/server/authserver/Server/RealmSocket.cpp
@@ -31,7 +31,7 @@ RealmSocket::Session::Session(void) {}
RealmSocket::Session::~Session(void) { }
-RealmSocket::RealmSocket(void) : input_buffer_(4096), session_(NULL), remote_address_()
+RealmSocket::RealmSocket(void) : input_buffer_(4096), session_(NULL), _remoteAddress()
{
reference_counting_policy().value(ACE_Event_Handler::Reference_Counting_Policy::ENABLED);
@@ -63,7 +63,8 @@ int RealmSocket::open(void * arg)
return -1;
}
- remote_address_ = addr.get_host_addr();
+ _remoteAddress = addr.get_host_addr();
+ _remotePort = addr.get_port_number();
// Register with ACE Reactor
if (Base::open(arg) == -1)
@@ -89,9 +90,14 @@ int RealmSocket::close(int)
return 0;
}
-const std::string& RealmSocket::get_remote_address(void) const
+const std::string& RealmSocket::getRemoteAddress(void) const
{
- return remote_address_;
+ return _remoteAddress;
+}
+
+const uint16 RealmSocket::getRemotePort(void) const
+{
+ return _remotePort;
}
size_t RealmSocket::recv_len(void) const
diff --git a/src/server/authserver/Server/RealmSocket.h b/src/server/authserver/Server/RealmSocket.h
index c532f016dcb..9682b5e4559 100755
--- a/src/server/authserver/Server/RealmSocket.h
+++ b/src/server/authserver/Server/RealmSocket.h
@@ -52,7 +52,9 @@ public:
bool send(const char *buf, size_t len);
- const std::string& get_remote_address(void) const;
+ const std::string& getRemoteAddress(void) const;
+
+ const uint16 getRemotePort(void) const;
virtual int open(void *);
@@ -70,7 +72,8 @@ private:
ACE_Message_Block input_buffer_;
Session* session_;
- std::string remote_address_;
+ std::string _remoteAddress;
+ uint16 _remotePort;
};
#endif /* __REALMSOCKET_H__ */
diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h
index bfdd887de3e..b9d385ba675 100644
--- a/src/server/game/AI/CoreAI/GameObjectAI.h
+++ b/src/server/game/AI/CoreAI/GameObjectAI.h
@@ -50,7 +50,7 @@ class GameObjectAI
virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) {}
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) {}
- virtual void OnStateChanged(uint32 state, Unit* unit) { }
+ virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) { }
};
class NullGameObjectAI : public GameObjectAI
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 79fe3df7ff7..d4b2a9746be 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -89,7 +89,7 @@ void SmartAI::UpdateDespawn(const uint32 diff)
void SmartAI::Reset()
{
if (!HasEscortState(SMART_ESCORT_ESCORTING))//dont mess up escort movement after combat
- SetRun(true);
+ SetRun(mRun);
GetScript()->OnReset();
}
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 6a758695116..5d121869f54 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -771,6 +771,7 @@ void Battleground::EndBattleground(uint32 winner)
}
}
+ uint8 aliveWinners = GetAlivePlayersCountByTeam(winner);
for (BattlegroundPlayerMap::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
uint32 team = itr->second.Team;
@@ -796,6 +797,10 @@ void Battleground::EndBattleground(uint32 winner)
if (player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
+ // Last standing - Rated 5v5 arena & be solely alive player
+ if (team == winner && isArena() && isRated() && GetArenaType() == ARENA_TYPE_5v5 && aliveWinners == 1 && player->isAlive())
+ player->CastSpell(player, SPELL_THE_LAST_STANDING, true);
+
if (!player->isAlive())
{
player->ResurrectPlayer(1.0f);
@@ -895,19 +900,6 @@ uint32 Battleground::GetBonusHonorFromKill(uint32 kills) const
return Trinity::Honor::hk_honor_at_level(maxLevel, float(kills));
}
-uint32 Battleground::GetBattlemasterEntry() const
-{
- switch (GetTypeID(true))
- {
- case BATTLEGROUND_AV: return 15972;
- case BATTLEGROUND_WS: return 14623;
- case BATTLEGROUND_AB: return 14879;
- case BATTLEGROUND_EY: return 22516;
- case BATTLEGROUND_NA: return 20200;
- default: return 0;
- }
-}
-
void Battleground::BlockMovement(Player* player)
{
player->SetClientControl(player, 0); // movement disabled NOTE: the effect will be automatically removed by client when the player is teleported from the battleground, so no need to send with uint8(1) in RemovePlayerAtLeave()
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index fcfc0c48cb4..6eb64a2caba 100755
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -98,7 +98,8 @@ enum BattlegroundSpells
SPELL_RECENTLY_DROPPED_FLAG = 42792, // Recently Dropped Flag
SPELL_AURA_PLAYER_INACTIVE = 43681, // Inactive
SPELL_HONORABLE_DEFENDER_25Y = 68652, // +50% honor when standing at a capture point that you control, 25yards radius (added in 3.2)
- SPELL_HONORABLE_DEFENDER_60Y = 66157 // +50% honor when standing at a capture point that you control, 60yards radius (added in 3.2), probably for 40+ player battlegrounds
+ SPELL_HONORABLE_DEFENDER_60Y = 66157, // +50% honor when standing at a capture point that you control, 60yards radius (added in 3.2), probably for 40+ player battlegrounds
+ SPELL_THE_LAST_STANDING = 26549, // Arena achievement related
};
enum BattlegroundTimeIntervals
@@ -360,7 +361,6 @@ class Battleground
uint8 GetArenaType() const { return m_ArenaType; }
uint8 GetWinner() const { return m_Winner; }
uint32 GetScriptId() const { return ScriptId; }
- uint32 GetBattlemasterEntry() const;
uint32 GetBonusHonorFromKill(uint32 kills) const;
bool IsRandom() const { return m_IsRandom; }
diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt
index 658e9a15cc8..e97b8961554 100644
--- a/src/server/game/CMakeLists.txt
+++ b/src/server/game/CMakeLists.txt
@@ -30,6 +30,7 @@ file(GLOB_RECURSE sources_Globals Globals/*.cpp Globals/*.h)
file(GLOB_RECURSE sources_Grids Grids/*.cpp Grids/*.h)
file(GLOB_RECURSE sources_Groups Groups/*.cpp Groups/*.h)
file(GLOB_RECURSE sources_Guilds Guilds/*.cpp Guilds/*.h)
+file(GLOB_RECURSE sources_Handlers Handlers/*.cpp Server/*.h)
file(GLOB_RECURSE sources_Instances Instances/*.cpp Instances/*.h)
file(GLOB_RECURSE sources_Loot Loot/*.cpp Loot/*.h)
file(GLOB_RECURSE sources_Mails Mails/*.cpp Mails/*.h)
@@ -79,6 +80,7 @@ set(game_STAT_SRCS
${sources_Grids}
${sources_Groups}
${sources_Guilds}
+ ${sources_Handlers}
${sources_Instances}
${sources_Loot}
${sources_Mails}
@@ -165,6 +167,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/Grids
${CMAKE_CURRENT_SOURCE_DIR}/Groups
${CMAKE_CURRENT_SOURCE_DIR}/Guilds
+ ${CMAKE_CURRENT_SOURCE_DIR}/Handlers
${CMAKE_CURRENT_SOURCE_DIR}/Instances
${CMAKE_CURRENT_SOURCE_DIR}/Loot
${CMAKE_CURRENT_SOURCE_DIR}/Mails
@@ -181,7 +184,6 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/Reputation
${CMAKE_CURRENT_SOURCE_DIR}/Scripting
${CMAKE_CURRENT_SOURCE_DIR}/Server/Protocol
- ${CMAKE_CURRENT_SOURCE_DIR}/Server/Protocol/Handlers
${CMAKE_CURRENT_SOURCE_DIR}/Server
${CMAKE_CURRENT_SOURCE_DIR}/Skills
${CMAKE_CURRENT_SOURCE_DIR}/Spells
diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp
index 31942d9e2fa..68961b9de61 100755
--- a/src/server/game/Chat/Commands/Level2.cpp
+++ b/src/server/game/Chat/Commands/Level2.cpp
@@ -332,8 +332,8 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel, a.email, a.last_ip, a.last_login, a.mutetime "
"FROM account a "
"LEFT JOIN account_access aa "
- "ON (a.id = aa.id) "
- "WHERE a.id = '%u'", accId);
+ "ON (a.id = aa.id AND (aa.RealmID = -1 OR aa.RealmID = %u)) "
+ "WHERE a.id = '%u'", realmID, accId);
if (result)
{
Field* fields = result->Fetch();
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 49b5d4cba65..dd46898a0c6 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -73,10 +73,10 @@ bool Condition::Meets(Player* player, Unit* invoker)
condMeets = player->GetTeam() == mConditionValue1;
break;
case CONDITION_CLASS:
- condMeets = player->getClass() == mConditionValue1;
+ condMeets = player->getClassMask() & mConditionValue1;
break;
case CONDITION_RACE:
- condMeets = player->getRace() == mConditionValue1;
+ condMeets = player->getRaceMask() & mConditionValue1;
break;
case CONDITION_SKILL:
condMeets = player->HasSkill(mConditionValue1) && player->GetBaseSkillValue(mConditionValue1) >= mConditionValue2;
@@ -1180,9 +1180,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_CLASS:
{
- if (cond->mConditionValue1 >= MAX_CLASSES)
+ if (!(cond->mConditionValue1 & CLASSMASK_ALL_PLAYABLE))
{
- sLog->outErrorDb("Class condition has non existing class (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Class condition has non existing classmask (%u), skipped", cond->mConditionValue1 & ~CLASSMASK_ALL_PLAYABLE);
return false;
}
@@ -1192,9 +1192,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_RACE:
{
- if (cond->mConditionValue1 >= MAX_RACES)
+ if (!(cond->mConditionValue1 & RACEMASK_ALL_PLAYABLE))
{
- sLog->outErrorDb("Race condition has non existing race (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Race condition has non existing racemask (%u), skipped", cond->mConditionValue1 & ~RACEMASK_ALL_PLAYABLE);
return false;
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 00fbab8ceb3..44186dad95c 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -305,7 +305,7 @@ bool TradeData::HasItem(uint64 itemGuid) const
return false;
}
-TradeSlots const TradeData::GetTradeSlotForItem(uint64 itemGuid)
+TradeSlots TradeData::GetTradeSlotForItem(uint64 itemGuid) const
{
for (uint8 i = 0; i < TRADE_SLOT_COUNT; ++i)
if (m_items[i] == itemGuid)
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index fccd380bd29..c39d29db12a 100755
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1003,7 +1003,7 @@ class TradeData
Item* GetItem(TradeSlots slot) const;
bool HasItem(uint64 itemGuid) const;
- TradeSlots const GetTradeSlotForItem(uint64 itemGuid);
+ TradeSlots GetTradeSlotForItem(uint64 itemGuid) const;
void SetItem(TradeSlots slot, Item* item);
uint32 GetSpell() const { return m_spell; }
diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp
index ef537cb6198..ef537cb6198 100755
--- a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp
+++ b/src/server/game/Handlers/AddonHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.h b/src/server/game/Handlers/AddonHandler.h
index 36cb19e5698..36cb19e5698 100755
--- a/src/server/game/Server/Protocol/Handlers/AddonHandler.h
+++ b/src/server/game/Handlers/AddonHandler.h
diff --git a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp b/src/server/game/Handlers/ArenaTeamHandler.cpp
index 8fb820713ce..8fb820713ce 100755
--- a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
+++ b/src/server/game/Handlers/ArenaTeamHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index 59eefb9fa77..59eefb9fa77 100755
--- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/AuthHandler.cpp b/src/server/game/Handlers/AuthHandler.cpp
index 9a3e756dda3..9a3e756dda3 100755
--- a/src/server/game/Server/Protocol/Handlers/AuthHandler.cpp
+++ b/src/server/game/Handlers/AuthHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp
index d1aa0021a75..d1aa0021a75 100755
--- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Handlers/BattleGroundHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index be547c84b19..be547c84b19 100755
--- a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp
index 9b749fa8005..9b749fa8005 100755
--- a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp
+++ b/src/server/game/Handlers/ChannelHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index bd9668ce5b8..bd9668ce5b8 100644
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index 3d689196256..3d689196256 100755
--- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp
index 6693cdfca27..6693cdfca27 100755
--- a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp
+++ b/src/server/game/Handlers/CombatHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp
index 8afd9f3b978..8afd9f3b978 100755
--- a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp
+++ b/src/server/game/Handlers/DuelHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index 9343a5356b6..9343a5356b6 100755
--- a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp
index d2a5f8014b8..d2a5f8014b8 100755
--- a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
+++ b/src/server/game/Handlers/GuildHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index 47700fd088a..47700fd088a 100755
--- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp
index 3c6bd28b5cb..3c6bd28b5cb 100755
--- a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
+++ b/src/server/game/Handlers/LFGHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index 6508f08dc22..6508f08dc22 100755
--- a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp
index a8522bb2582..a8522bb2582 100755
--- a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index d1227c9b7d7..d1227c9b7d7 100755
--- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp
index 7d1233c8f70..7d1233c8f70 100755
--- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
+++ b/src/server/game/Handlers/MovementHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index ef49b337b44..ef49b337b44 100755
--- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.h b/src/server/game/Handlers/NPCHandler.h
index af84b71a74f..af84b71a74f 100755
--- a/src/server/game/Server/Protocol/Handlers/NPCHandler.h
+++ b/src/server/game/Handlers/NPCHandler.h
diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index 68ce3153450..68ce3153450 100755
--- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index 26185d3376d..26185d3376d 100755
--- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index 5702eefffec..5702eefffec 100755
--- a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp
index 7e80c780369..7e80c780369 100755
--- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
+++ b/src/server/game/Handlers/QuestHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/ReferAFriendHandler.cpp b/src/server/game/Handlers/ReferAFriendHandler.cpp
index 58d425ddf98..58d425ddf98 100644
--- a/src/server/game/Server/Protocol/Handlers/ReferAFriendHandler.cpp
+++ b/src/server/game/Handlers/ReferAFriendHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp
index 520cd89e7d5..520cd89e7d5 100755
--- a/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp
+++ b/src/server/game/Handlers/SkillHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index b8908d0f9f9..b8908d0f9f9 100755
--- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp
index 3533b153bd8..3533b153bd8 100755
--- a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
+++ b/src/server/game/Handlers/TaxiHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp b/src/server/game/Handlers/TicketHandler.cpp
index a270d42b000..a270d42b000 100755
--- a/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp
+++ b/src/server/game/Handlers/TicketHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp
index ebe54eb17eb..ebe54eb17eb 100755
--- a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp
+++ b/src/server/game/Handlers/TradeHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp b/src/server/game/Handlers/VehicleHandler.cpp
index ce4f6ccb8fe..ce4f6ccb8fe 100644
--- a/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp
+++ b/src/server/game/Handlers/VehicleHandler.cpp
diff --git a/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp b/src/server/game/Handlers/VoiceChatHandler.cpp
index 34ad5ac3eae..34ad5ac3eae 100755
--- a/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp
+++ b/src/server/game/Handlers/VoiceChatHandler.cpp
diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
index ac09f2d403a..94608d85420 100755
--- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
@@ -22,6 +22,7 @@
#include "VMapFactory.h"
#include "MoveSplineInit.h"
#include "MoveSpline.h"
+#include "Player.h"
#ifdef MAP_BASED_RAND_GEN
#define rand_norm() unit.rand_norm()
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
index 505615c07b8..88465017dc2 100755
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
@@ -23,6 +23,7 @@
#include "World.h"
#include "MoveSplineInit.h"
#include "MoveSpline.h"
+#include "Player.h"
//----- Point Movement Generator
template<class T>
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
index b03e13f91f4..0d2982ab6b7 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -24,6 +24,7 @@
#include "World.h"
#include "MoveSplineInit.h"
#include "MoveSpline.h"
+#include "Player.h"
#include <cmath>
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
index 982f7fc875c..696c99e1460 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
@@ -22,6 +22,7 @@
#include "MovementGenerator.h"
#include "FollowerReference.h"
#include "Timer.h"
+#include "Unit.h"
class TargetedMovementGeneratorBase
{
diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp
index 885ade57653..b5ae923dc32 100644
--- a/src/server/game/Movement/Spline/MoveSplineInit.cpp
+++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp
@@ -106,7 +106,6 @@ namespace Movement
void MoveSplineInit::SetFacing(const Unit * target)
{
args.flags.EnableFacingTarget();
- target->GetUInt64Value(OBJECT_FIELD_GUID);
//args.facing.target = target->GetObjectGuid().GetRawValue();
args.facing.target = target->GetUInt64Value(OBJECT_FIELD_GUID);
}
diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt
index d34b1b8c3c3..d43cce45c00 100644
--- a/src/server/scripts/CMakeLists.txt
+++ b/src/server/scripts/CMakeLists.txt
@@ -112,6 +112,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/game/Grids/Notifiers
${CMAKE_SOURCE_DIR}/src/server/game/Groups
${CMAKE_SOURCE_DIR}/src/server/game/Guilds
+ ${CMAKE_SOURCE_DIR}/src/server/game/Handlers
${CMAKE_SOURCE_DIR}/src/server/game/Instances
${CMAKE_SOURCE_DIR}/src/server/game/LookingForGroup
${CMAKE_SOURCE_DIR}/src/server/game/Loot
@@ -130,7 +131,6 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/game/Scripting
${CMAKE_SOURCE_DIR}/src/server/game/Server
${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol
- ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol/Handlers
${CMAKE_SOURCE_DIR}/src/server/game/Skills
${CMAKE_SOURCE_DIR}/src/server/game/Spells
${CMAKE_SOURCE_DIR}/src/server/game/Spells/Auras
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp
index b69f800327e..9b9d1cfd146 100644
--- a/src/server/scripts/Commands/cs_gm.cpp
+++ b/src/server/scripts/Commands/cs_gm.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ObjectMgr.h"
#include "Chat.h"
#include "AccountMgr.h"
+#include "World.h"
class gm_commandscript : public CommandScript
{
@@ -155,7 +156,7 @@ public:
static bool HandleGMListFullCommand(ChatHandler* handler, char const* /*args*/)
{
///- Get the accounts with GM Level >0
- QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel >= %u", SEC_MODERATOR);
+ QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel >= %u AND (aa.realmid = -1 OR aa.realmid = %u)", SEC_MODERATOR, realmID);
if (result)
{
handler->SendSysMessage(LANG_GMLIST);
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index 35b590fe404..363f7645f6f 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -992,7 +992,7 @@ public:
return true;
}
- static bool HandleReloadWpCommand(ChatHandler* handler, const char* args)
+ static bool HandleReloadWpCommand(ChatHandler* /*handler*/, const char* args)
{
if (*args != 'a')
sLog->outString("Re-Loading Waypoints data from 'waypoints_data'");
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp
index a2e41f1af70..7a4ba5777d1 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp
@@ -24,14 +24,19 @@ SDCategory: Blackwing Lair
EndScriptData */
#include "ScriptPCH.h"
+enum Say
+{
+ SAY_AGGRO = -1469000,
+ SAY_LEASH = -1469001
+};
-#define SAY_AGGRO -1469000
-#define SAY_LEASH -1469001
-
-#define SPELL_CLEAVE 26350
-#define SPELL_BLASTWAVE 23331
-#define SPELL_MORTALSTRIKE 24573
-#define SPELL_KNOCKBACK 25778
+enum Spells
+{
+ SPELL_CLEAVE = 26350,
+ SPELL_BLASTWAVE = 23331,
+ SPELL_MORTALSTRIKE = 24573,
+ SPELL_KNOCKBACK = 25778
+};
class boss_broodlord : public CreatureScript
{
@@ -45,7 +50,7 @@ public:
struct boss_broodlordAI : public ScriptedAI
{
- boss_broodlordAI(Creature* c) : ScriptedAI(c) {}
+ boss_broodlordAI(Creature* creature) : ScriptedAI(creature) {}
uint32 Cleave_Timer;
uint32 BlastWave_Timer;
@@ -54,10 +59,10 @@ public:
void Reset()
{
- Cleave_Timer = 8000; //These times are probably wrong
- BlastWave_Timer = 12000;
- MortalStrike_Timer = 20000;
- KnockBack_Timer = 30000;
+ Cleave_Timer = 8000; // These times are probably wrong
+ BlastWave_Timer = 12000;
+ MortalStrike_Timer = 20000;
+ KnockBack_Timer = 30000;
}
void EnterCombat(Unit* /*who*/)
@@ -108,7 +113,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_broodlord()
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp
index 50bda73cfc6..818dcace078 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp
@@ -71,7 +71,7 @@ public:
struct boss_chromaggusAI : public ScriptedAI
{
- boss_chromaggusAI(Creature* c) : ScriptedAI(c)
+ boss_chromaggusAI(Creature* creature) : ScriptedAI(creature)
{
//Select the 2 breaths that we are going to use until despawned
//5 possiblities for the first breath, 4 for the second, 20 total possiblites
@@ -197,9 +197,7 @@ public:
Enraged = false;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff)
{
@@ -297,7 +295,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_chromaggus()
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp
index 09dd0138db8..c91e0fb3303 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp
@@ -42,7 +42,7 @@ public:
struct boss_ebonrocAI : public ScriptedAI
{
- boss_ebonrocAI(Creature* c) : ScriptedAI(c) {}
+ boss_ebonrocAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ShadowFlame_Timer;
uint32 WingBuffet_Timer;
@@ -100,7 +100,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_ebonroc()
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp
index 133d61422b2..c2a2350c0e8 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp
@@ -41,7 +41,7 @@ public:
struct boss_firemawAI : public ScriptedAI
{
- boss_firemawAI(Creature* c) : ScriptedAI(c) {}
+ boss_firemawAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ShadowFlame_Timer;
uint32 WingBuffet_Timer;
@@ -91,7 +91,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_firemaw()
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp
index b71249dc3a3..41bcb6c5427 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp
@@ -25,11 +25,17 @@ EndScriptData */
#include "ScriptPCH.h"
-#define EMOTE_FRENZY -1469031
+enum Emotes
+{
+ EMOTE_FRENZY = -1469031
+};
-#define SPELL_SHADOWFLAME 22539
-#define SPELL_WINGBUFFET 23339
-#define SPELL_FRENZY 23342 //This spell periodically triggers fire nova
+enum Spells
+{
+ SPELL_SHADOWFLAME = 22539,
+ SPELL_WINGBUFFET = 23339,
+ SPELL_FRENZY = 23342 //This spell periodically triggers fire nova
+};
class boss_flamegor : public CreatureScript
{
@@ -43,7 +49,7 @@ public:
struct boss_flamegorAI : public ScriptedAI
{
- boss_flamegorAI(Creature* c) : ScriptedAI(c) {}
+ boss_flamegorAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ShadowFlame_Timer;
uint32 WingBuffet_Timer;
@@ -94,7 +100,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_flamegor()
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp
index 506189697fe..c4e0d6ea715 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp
@@ -25,40 +25,46 @@ EndScriptData */
#include "ScriptPCH.h"
-#define SAY_AGGRO -1469007
-#define SAY_XHEALTH -1469008
-#define SAY_SHADOWFLAME -1469009
-#define SAY_RAISE_SKELETONS -1469010
-#define SAY_SLAY -1469011
-#define SAY_DEATH -1469012
-
-#define SAY_MAGE -1469013
-#define SAY_WARRIOR -1469014
-#define SAY_DRUID -1469015
-#define SAY_PRIEST -1469016
-#define SAY_PALADIN -1469017
-#define SAY_SHAMAN -1469018
-#define SAY_WARLOCK -1469019
-#define SAY_HUNTER -1469020
-#define SAY_ROGUE -1469021
-
-#define SPELL_SHADOWFLAME_INITIAL 22972
-#define SPELL_SHADOWFLAME 22539
-#define SPELL_BELLOWINGROAR 22686
-#define SPELL_VEILOFSHADOW 7068
-#define SPELL_CLEAVE 20691
-#define SPELL_TAILLASH 23364
-#define SPELL_BONECONTRUST 23363 //23362, 23361
-
-#define SPELL_MAGE 23410 //wild magic
-#define SPELL_WARRIOR 23397 //beserk
-#define SPELL_DRUID 23398 // cat form
-#define SPELL_PRIEST 23401 // corrupted healing
-#define SPELL_PALADIN 23418 //syphon blessing
-#define SPELL_SHAMAN 23425 //totems
-#define SPELL_WARLOCK 23427 //infernals
-#define SPELL_HUNTER 23436 //bow broke
-#define SPELL_ROGUE 23414 //Paralise
+enum Say
+{
+ SAY_AGGRO = -1469007,
+ SAY_XHEALTH = -1469008,
+ SAY_SHADOWFLAME = -1469009,
+ SAY_RAISE_SKELETONS = -1469010,
+ SAY_SLAY = -1469011,
+ SAY_DEATH = -1469012,
+
+ SAY_MAGE = -1469013,
+ SAY_WARRIOR = -1469014,
+ SAY_DRUID = -1469015,
+ SAY_PRIEST = -1469016,
+ SAY_PALADIN = -1469017,
+ SAY_SHAMAN = -1469018,
+ SAY_WARLOCK = -1469019,
+ SAY_HUNTER = -1469020,
+ SAY_ROGUE = -1469021
+};
+
+enum Spells
+{
+ SPELL_SHADOWFLAME_INITIAL = 22972,
+ SPELL_SHADOWFLAME = 22539,
+ SPELL_BELLOWINGROAR = 22686,
+ SPELL_VEILOFSHADOW = 7068,
+ SPELL_CLEAVE = 20691,
+ SPELL_TAILLASH = 23364,
+ SPELL_BONECONTRUST = 23363, //23362, 23361
+
+ SPELL_MAGE = 23410, //wild magic
+ SPELL_WARRIOR = 23397, //beserk
+ SPELL_DRUID = 23398, // cat form
+ SPELL_PRIEST = 23401, // corrupted healing
+ SPELL_PALADIN = 23418, //syphon blessing
+ SPELL_SHAMAN = 23425, //totems
+ SPELL_WARLOCK = 23427, //infernals
+ SPELL_HUNTER = 23436, //bow broke
+ SPELL_ROGUE = 23414 //Paralise
+};
class boss_nefarian : public CreatureScript
{
@@ -72,7 +78,7 @@ public:
struct boss_nefarianAI : public ScriptedAI
{
- boss_nefarianAI(Creature* c) : ScriptedAI(c) {}
+ boss_nefarianAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ShadowFlame_Timer;
uint32 BellowingRoar_Timer;
@@ -86,15 +92,15 @@ public:
void Reset()
{
- ShadowFlame_Timer = 12000; //These times are probably wrong
- BellowingRoar_Timer = 30000;
- VeilOfShadow_Timer = 15000;
- Cleave_Timer = 7000;
- TailLash_Timer = 10000;
- ClassCall_Timer = 35000; //35-40 seconds
+ ShadowFlame_Timer = 12000; // These times are probably wrong
+ BellowingRoar_Timer = 30000;
+ VeilOfShadow_Timer = 15000;
+ Cleave_Timer = 7000;
+ TailLash_Timer = 10000;
+ ClassCall_Timer = 35000; // 35-40 seconds
Phase3 = false;
- DespawnTimer = 5000;
+ DespawnTimer = 5000;
}
void KilledUnit(Unit* Victim)
@@ -227,7 +233,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_nefarian()
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
index b643139a71e..a4fb4ad22a3 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
@@ -27,15 +27,21 @@ EndScriptData */
//Razorgore Phase 2 Script
-#define SAY_EGGS_BROKEN1 -1469022
-#define SAY_EGGS_BROKEN2 -1469023
-#define SAY_EGGS_BROKEN3 -1469024
-#define SAY_DEATH -1469025
+enum Say
+{
+ SAY_EGGS_BROKEN1 = -1469022,
+ SAY_EGGS_BROKEN2 = -1469023,
+ SAY_EGGS_BROKEN3 = -1469024,
+ SAY_DEATH = -1469025
+};
-#define SPELL_CLEAVE 22540
-#define SPELL_WARSTOMP 24375
-#define SPELL_FIREBALLVOLLEY 22425
-#define SPELL_CONFLAGRATION 23023
+enum Spells
+{
+ SPELL_CLEAVE = 22540,
+ SPELL_WARSTOMP = 24375,
+ SPELL_FIREBALLVOLLEY = 22425,
+ SPELL_CONFLAGRATION = 23023
+};
class boss_razorgore : public CreatureScript
{
@@ -49,7 +55,7 @@ public:
struct boss_razorgoreAI : public ScriptedAI
{
- boss_razorgoreAI(Creature* c) : ScriptedAI(c) {}
+ boss_razorgoreAI(Creature* creature) : ScriptedAI(creature) {}
uint32 Cleave_Timer;
uint32 WarStomp_Timer;
@@ -120,7 +126,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_razorgore()
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
index 4961d253a26..4a72bd0ca38 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
@@ -25,40 +25,46 @@ EndScriptData */
#include "ScriptPCH.h"
-#define SAY_LINE1 -1469026
-#define SAY_LINE2 -1469027
-#define SAY_LINE3 -1469028
-#define SAY_HALFLIFE -1469029
-#define SAY_KILLTARGET -1469030
+enum Says
+{
+ SAY_LINE1 = -1469026,
+ SAY_LINE2 = -1469027,
+ SAY_LINE3 = -1469028,
+ SAY_HALFLIFE = -1469029,
+ SAY_KILLTARGET = -1469030
+};
#define GOSSIP_ITEM "Start Event <Needs Gossip Text>"
-#define SPELL_ESSENCEOFTHERED 23513
-#define SPELL_FLAMEBREATH 23461
-#define SPELL_FIRENOVA 23462
-#define SPELL_TAILSWIPE 15847
-#define SPELL_BURNINGADRENALINE 23620
-#define SPELL_CLEAVE 20684 //Chain cleave is most likely named something different and contains a dummy effect
+enum Spells
+{
+ SPELL_ESSENCEOFTHERED = 23513,
+ SPELL_FLAMEBREATH = 23461,
+ SPELL_FIRENOVA = 23462,
+ SPELL_TAILSWIPE = 15847,
+ SPELL_BURNINGADRENALINE = 23620,
+ SPELL_CLEAVE = 20684 //Chain cleave is most likely named something different and contains a dummy effect
+};
class boss_vaelastrasz : public CreatureScript
{
public:
boss_vaelastrasz() : CreatureScript("boss_vaelastrasz") { }
- void SendDefaultMenu(Player* player, Creature* creature, uint32 uiAction)
+ void SendDefaultMenu(Player* player, Creature* creature, uint32 Action)
{
- if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
+ if (Action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
{
player->CLOSE_GOSSIP_MENU();
CAST_AI(boss_vaelastrasz::boss_vaelAI, creature->AI())->BeginSpeech(player);
}
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 uiAction)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 Sender, uint32 Action)
{
player->PlayerTalkClass->ClearMenus();
- if (uiSender == GOSSIP_SENDER_MAIN)
- SendDefaultMenu(player, creature, uiAction);
+ if (Sender == GOSSIP_SENDER_MAIN)
+ SendDefaultMenu(player, creature, Action);
return true;
}
@@ -81,11 +87,11 @@ public:
struct boss_vaelAI : public ScriptedAI
{
- boss_vaelAI(Creature* c) : ScriptedAI(c)
+ boss_vaelAI(Creature* creature) : ScriptedAI(creature)
{
- c->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- c->setFaction(35);
- c->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ creature->setFaction(35);
+ creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
uint64 PlayerGUID;
@@ -102,17 +108,17 @@ public:
void Reset()
{
- PlayerGUID = 0;
- SpeechTimer = 0;
- SpeechNum = 0;
- Cleave_Timer = 8000; //These times are probably wrong
- FlameBreath_Timer = 11000;
- BurningAdrenalineCaster_Timer = 15000;
- BurningAdrenalineTank_Timer = 45000;
- FireNova_Timer = 5000;
- TailSwipe_Timer = 20000;
- HasYelled = false;
- DoingSpeech = false;
+ PlayerGUID = 0;
+ SpeechTimer = 0;
+ SpeechNum = 0;
+ Cleave_Timer = 8000; //These times are probably wrong
+ FlameBreath_Timer = 11000;
+ BurningAdrenalineCaster_Timer = 15000;
+ BurningAdrenalineTank_Timer = 45000;
+ FireNova_Timer = 5000;
+ TailSwipe_Timer = 20000;
+ HasYelled = false;
+ DoingSpeech = false;
}
void BeginSpeech(Unit* target)
@@ -213,7 +219,7 @@ public:
Unit* target = NULL;
uint8 i = 0;
- while (i < 3) // max 3 tries to get a random target with power_mana
+ while (i < 3) // max 3 tries to get a random target with power_mana
{
++i;
target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); //not aggro leader
@@ -258,7 +264,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_vael()
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
index 89b34aada66..5222270df1a 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
@@ -25,40 +25,49 @@ EndScriptData */
#include "ScriptPCH.h"
-#define SAY_GAMESBEGIN_1 -1469004
-#define SAY_GAMESBEGIN_2 -1469005
-#define SAY_VAEL_INTRO -1469006 //when he corrupts Vaelastrasz
+enum Says
+{
+ SAY_GAMESBEGIN_1 = -1469004,
+ SAY_GAMESBEGIN_2 = -1469005,
+ SAY_VAEL_INTRO = -1469006 //when he corrupts Vaelastrasz
+};
#define GOSSIP_ITEM_1 "I've made no mistakes."
#define GOSSIP_ITEM_2 "You have lost your mind, Nefarius. You speak in riddles."
#define GOSSIP_ITEM_3 "Please do."
-#define CREATURE_BRONZE_DRAKANOID 14263
-#define CREATURE_BLUE_DRAKANOID 14261
-#define CREATURE_RED_DRAKANOID 14264
-#define CREATURE_GREEN_DRAKANOID 14262
-#define CREATURE_BLACK_DRAKANOID 14265
-
-#define CREATURE_CHROMATIC_DRAKANOID 14302
-#define CREATURE_NEFARIAN 11583
+enum Creatures
+{
+ CREATURE_BRONZE_DRAKANOID = 14263,
+ CREATURE_BLUE_DRAKANOID = 14261,
+ CREATURE_RED_DRAKANOID = 14264,
+ CREATURE_GREEN_DRAKANOID = 14262,
+ CREATURE_BLACK_DRAKANOID = 14265,
+
+ CREATURE_CHROMATIC_DRAKANOID = 14302,
+ CREATURE_NEFARIAN = 11583
+};
-#define ADD_X1 -7591.151855f
-#define ADD_X2 -7514.598633f
-#define ADD_Y1 -1204.051880f
-#define ADD_Y2 -1150.448853f
-#define ADD_Z1 476.800476f
-#define ADD_Z2 476.796570f
+#define ADD_X1 -7591.151855f
+#define ADD_X2 -7514.598633f
+#define ADD_Y1 -1204.051880f
+#define ADD_Y2 -1150.448853f
+#define ADD_Z1 476.800476f
+#define ADD_Z2 476.796570f
-#define NEF_X -7445
-#define NEF_Y -1332
-#define NEF_Z 536
+#define NEF_X -7445
+#define NEF_Y -1332
+#define NEF_Z 536
-#define HIDE_X -7592
-#define HIDE_Y -1264
-#define HIDE_Z 481
+#define HIDE_X -7592
+#define HIDE_Y -1264
+#define HIDE_Z 481
-#define SPELL_SHADOWBOLT 21077
-#define SPELL_FEAR 26070
+enum Spells
+{
+ SPELL_SHADOWBOLT = 21077,
+ SPELL_FEAR = 26070
+};
//This script is complicated
//Instead of morphing Victor Nefarius we will have him control phase 1
@@ -74,10 +83,10 @@ class boss_victor_nefarius : public CreatureScript
public:
boss_victor_nefarius() : CreatureScript("boss_victor_nefarius") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 Action)
{
player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
+ switch (Action)
{
case GOSSIP_ACTION_INFO_DEF+1:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -110,7 +119,7 @@ public:
struct boss_victor_nefariusAI : public ScriptedAI
{
- boss_victor_nefariusAI(Creature* c) : ScriptedAI(c)
+ boss_victor_nefariusAI(Creature* creature) : ScriptedAI(creature)
{
NefarianGUID = 0;
switch (urand(0, 19))
@@ -211,13 +220,13 @@ public:
void Reset()
{
- SpawnedAdds = 0;
- AddSpawnTimer = 10000;
- ShadowBoltTimer = 5000;
- FearTimer = 8000;
- ResetTimer = 900000; //On official it takes him 15 minutes(900 seconds) to reset. We are only doing 1 minute to make testing easier
- NefarianGUID = 0;
- NefCheckTime = 2000;
+ SpawnedAdds = 0;
+ AddSpawnTimer = 10000;
+ ShadowBoltTimer = 5000;
+ FearTimer = 8000;
+ ResetTimer = 900000; //On official it takes him 15 minutes(900 seconds) to reset. We are only doing 1 minute to make testing easier
+ NefarianGUID = 0;
+ NefCheckTime = 2000;
me->SetUInt32Value(UNIT_NPC_FLAGS, 1);
me->setFaction(35);
@@ -378,7 +387,6 @@ public:
}
}
};
-
};
void AddSC_boss_victor_nefarius()
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp
index 54c0855512f..8a9b930aa09 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp
@@ -24,4 +24,3 @@ SDCategory: Blackwing Lair
EndScriptData */
#include "ScriptPCH.h"
-
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp
index eafe55d3821..801a11fbfc8 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp
@@ -30,16 +30,19 @@ EndContentData */
#include "ScriptPCH.h"
#include "ScriptedSimpleAI.h"
-#define SPELL_CONE_OF_FIRE 19630
-#define SPELL_BITE 19771
+enum Spells
+{
+ SPELL_CONE_OF_FIRE = 19630,
+ SPELL_BITE = 19771,
-//Random Debuff (each hound has only one of these)
-#define SPELL_GROUND_STOMP 19364
-#define SPELL_ANCIENT_DREAD 19365
-#define SPELL_CAUTERIZING_FLAMES 19366
-#define SPELL_WITHERING_HEAT 19367
-#define SPELL_ANCIENT_DESPAIR 19369
-#define SPELL_ANCIENT_HYSTERIA 19372
+ //Random Debuff (each hound has only one of these)
+ SPELL_GROUND_STOMP = 19364,
+ SPELL_ANCIENT_DREAD = 19365,
+ SPELL_CAUTERIZING_FLAMES = 19366,
+ SPELL_WITHERING_HEAT = 19367,
+ SPELL_ANCIENT_DESPAIR = 19369,
+ SPELL_ANCIENT_HYSTERIA = 19372
+};
class mob_ancient_core_hound : public CreatureScript
{
@@ -75,7 +78,6 @@ public:
return ai;
}
-
};
void AddSC_molten_core()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
index b3102f2dde7..e5886cc39d4 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
@@ -49,7 +49,7 @@ public:
struct boss_arcanist_doanAI : public ScriptedAI
{
- boss_arcanist_doanAI(Creature* c) : ScriptedAI(c) {}
+ boss_arcanist_doanAI(Creature* creature) : ScriptedAI(creature) {}
uint32 Polymorph_Timer;
uint32 AoESilence_Timer;
@@ -105,26 +105,28 @@ public:
DoCast(target, SPELL_POLYMORPH);
Polymorph_Timer = 20000;
- } else Polymorph_Timer -= diff;
+ }
+ else Polymorph_Timer -= diff;
//AoESilence_Timer
if (AoESilence_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_AOESILENCE);
AoESilence_Timer = urand(15000, 20000);
- } else AoESilence_Timer -= diff;
+ }
+ else AoESilence_Timer -= diff;
//ArcaneExplosion_Timer
if (ArcaneExplosion_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ARCANEEXPLOSION);
ArcaneExplosion_Timer = 8000;
- } else ArcaneExplosion_Timer -= diff;
+ }
+ else ArcaneExplosion_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_arcanist_doan()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
index 36beecb2029..30105cc7315 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
@@ -25,9 +25,12 @@ EndScriptData */
#include "ScriptPCH.h"
-#define SPELL_CALLOFTHEGRAVE 17831
-#define SPELL_TERRIFY 7399
-#define SPELL_SOULSIPHON 7290
+enum Spells
+{
+ SPELL_CALLOFTHEGRAVE = 17831,
+ SPELL_TERRIFY = 7399,
+ SPELL_SOULSIPHON = 7290
+};
class boss_azshir_the_sleepless : public CreatureScript
{
@@ -41,7 +44,7 @@ public:
struct boss_azshir_the_sleeplessAI : public ScriptedAI
{
- boss_azshir_the_sleeplessAI(Creature* c) : ScriptedAI(c) {}
+ boss_azshir_the_sleeplessAI(Creature* creature) : ScriptedAI(creature) {}
uint32 SoulSiphon_Timer;
uint32 CallOftheGrave_Timer;
@@ -54,9 +57,7 @@ public:
Terrify_Timer = 20000;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff)
{
@@ -73,7 +74,8 @@ public:
return;
//SoulSiphon_Timer = 20000;
- } else SoulSiphon_Timer -= diff;
+ }
+ else SoulSiphon_Timer -= diff;
}
//CallOfTheGrave_Timer
@@ -81,19 +83,20 @@ public:
{
DoCast(me->getVictim(), SPELL_CALLOFTHEGRAVE);
CallOftheGrave_Timer = 30000;
- } else CallOftheGrave_Timer -= diff;
+ }
+ else CallOftheGrave_Timer -= diff;
//Terrify_Timer
if (Terrify_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_TERRIFY);
Terrify_Timer = 20000;
- } else Terrify_Timer -= diff;
+ }
+ else Terrify_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_azshir_the_sleepless()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
index 794a686a550..466f940621d 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
@@ -49,7 +49,7 @@ public:
struct boss_bloodmage_thalnosAI : public ScriptedAI
{
- boss_bloodmage_thalnosAI(Creature* c) : ScriptedAI(c) {}
+ boss_bloodmage_thalnosAI(Creature* creature) : ScriptedAI(creature) {}
bool HpYell;
uint32 FlameShock_Timer;
@@ -93,33 +93,36 @@ public:
{
DoCast(me->getVictim(), SPELL_FLAMESHOCK);
FlameShock_Timer = urand(10000, 15000);
- } else FlameShock_Timer -= diff;
+ }
+ else FlameShock_Timer -= diff;
//FlameSpike_Timer
if (FlameSpike_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FLAMESPIKE);
FlameSpike_Timer = 30000;
- } else FlameSpike_Timer -= diff;
+ }
+ else FlameSpike_Timer -= diff;
//FireNova_Timer
if (FireNova_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FIRENOVA);
FireNova_Timer = 40000;
- } else FireNova_Timer -= diff;
+ }
+ else FireNova_Timer -= diff;
//ShadowBolt_Timer
if (ShadowBolt_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOWBOLT);
ShadowBolt_Timer = 2000;
- } else ShadowBolt_Timer -= diff;
+ }
+ else ShadowBolt_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_bloodmage_thalnos()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 14b21504be5..77099f2e2d7 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -28,59 +28,66 @@ EndScriptData */
#include "scarlet_monastery.h"
//this texts are already used by 3975 and 3976
-#define SAY_ENTRANCE -1189001
-#define SAY_REJOINED -1189002
-#define SAY_LOST_HEAD -1189003
-#define SAY_CONFLAGRATION -1189004
-#define SAY_SPROUTING_PUMPKINS -1189005
-#define SAY_PLAYER_DEATH -1189006
-#define SAY_DEATH -1189007
+enum Says
+{
+ SAY_ENTRANCE = -1189001,
+ SAY_REJOINED = -1189002,
+ SAY_LOST_HEAD = -1189003,
+ SAY_CONFLAGRATION = -1189004,
+ SAY_SPROUTING_PUMPKINS = -1189005,
+ SAY_PLAYER_DEATH = -1189006,
+ SAY_DEATH = -1189007
+};
uint32 RandomLaugh[] = {11965, 11975, 11976};
- // Entryes
-#define HH_MOUNTED 23682
-#define HH_UNHORSED 23800
-#define HEAD 23775
-#define PULSING_PUMPKIN 23694
-#define PUMPKIN_FIEND 23545
-#define HELPER 23686
-#define WISP_INVIS 24034
-
- //Spells
-#define SPELL_CLEAVE 42587
-#define SPELL_CONFLAGRATION 42380 //Phase 2, can't find real spell(Dim Fire?)
-//#define SPELL_CONFL_SPEED 22587 //8% increase speed, value 22587 from SPELL_CONFLAGRATION mains that spell?
-#define SPELL_SUMMON_PUMPKIN 42394
-
-#define SPELL_WHIRLWIND 43116
-#define SPELL_IMMUNE 42556
-#define SPELL_BODY_REGEN 42403
-#define SPELL_CONFUSE 43105
-
-#define SPELL_FLYING_HEAD 42399 //visual flying head
-#define SPELL_HEAD 42413 //visual buff, "head"
-#define SPELL_HEAD_IS_DEAD 42428 //at killing head, Phase 3
-
-#define SPELL_PUMPKIN_AURA 42280
-#define SPELL_PUMPKIN_AURA_GREEN 42294
-#define SPELL_SQUASH_SOUL 42514
-#define SPELL_SPROUTING 42281
-#define SPELL_SPROUT_BODY 42285
+enum Entry
+{
+ HH_MOUNTED = 23682,
+ HH_DISMOUNTED = 23800, // unhorsed?? wtf type of engrish was that?
+ HEAD = 23775,
+ PULSING_PUMPKIN = 23694,
+ PUMPKIN_FIEND = 23545,
+ HELPER = 23686,
+ WISP_INVIS = 24034
+};
+
+enum Spells
+{
+ SPELL_CLEAVE = 42587,
+ SPELL_CONFLAGRATION = 42380, //Phase 2, can't find real spell(Dim Fire?)
+ // SPELL_CONFL_SPEED = 22587, //8% increase speed, value 22587 from SPELL_CONFLAGRATION mains that spell?
+ SPELL_SUMMON_PUMPKIN = 42394,
+
+ SPELL_WHIRLWIND = 43116,
+ SPELL_IMMUNE = 42556,
+ SPELL_BODY_REGEN = 42403,
+ SPELL_CONFUSE = 43105,
+
+ SPELL_FLYING_HEAD = 42399, //visual flying head
+ SPELL_HEAD = 42413, //visual buff, "head"
+ SPELL_HEAD_IS_DEAD = 42428, //at killing head, Phase 3
+
+ SPELL_PUMPKIN_AURA = 42280,
+ SPELL_PUMPKIN_AURA_GREEN = 42294,
+ SPELL_SQUASH_SOUL = 42514,
+ SPELL_SPROUTING = 42281,
+ SPELL_SPROUT_BODY = 42285,
//Effects
-#define SPELL_RHYME_BIG 42909
-//#define SPELL_RHYME_SMALL 42910
-#define SPELL_HEAD_SPEAKS 43129
-#define SPELL_HEAD_LANDS 42400
-#define SPELL_BODY_FLAME 42074
-#define SPELL_HEAD_FLAME 42971
-//#define SPELL_ENRAGE_VISUAL 42438 // he uses this spell?
-#define SPELL_WISP_BLUE 42821
-#define SPELL_WISP_FLIGHT_PORT 42818
-//#define SPELL_WISP_INVIS 42823
-#define SPELL_SMOKE 42355
-#define SPELL_DEATH 42566 //not correct spell
+ SPELL_RHYME_BIG = 42909,
+ // SPELL_RHYME_SMALL = 42910,
+ SPELL_HEAD_SPEAKS = 43129,
+ SPELL_HEAD_LANDS = 42400,
+ SPELL_BODY_FLAME = 42074,
+ SPELL_HEAD_FLAME = 42971,
+ // SPELL_ENRAGE_VISUAL = 42438, // he uses this spell?
+ SPELL_WISP_BLUE = 42821,
+ SPELL_WISP_FLIGHT_PORT = 42818,
+ // SPELL_WISP_INVIS = 42823,
+ SPELL_SMOKE = 42355,
+ SPELL_DEATH = 42566 //not correct spell
+};
struct Locations
{
@@ -114,7 +121,7 @@ static Locations FlightPoint[]=
static Locations Spawn[]=
{
- {1776.27f, 1348.74f, 19.20f}, //spawn point for pumpkin shrine mob
+ {1776.27f, 1348.74f, 19.20f}, //spawn point for pumpkin shrine mob
{1765.28f, 1347.46f, 17.55f} //spawn point for smoke
};
@@ -126,7 +133,7 @@ static const char* Text[]=
"Now, know demise!"
};
-#define EMOTE_LAUGHS "Headless Horseman laughs"
+#define EMOTE_LAUGHS "Headless Horseman laughs" // needs assigned to db.
class mob_wisp_invis : public CreatureScript
{
@@ -140,7 +147,7 @@ public:
struct mob_wisp_invisAI : public ScriptedAI
{
- mob_wisp_invisAI(Creature* c) : ScriptedAI(c)
+ mob_wisp_invisAI(Creature* creature) : ScriptedAI(creature)
{
Creaturetype = delay = spell = spell2 = 0;
}
@@ -149,8 +156,8 @@ public:
uint32 delay;
uint32 spell;
uint32 spell2;
- void Reset(){}
- void EnterCombat(Unit* /*who*/){}
+ void Reset() {}
+ void EnterCombat(Unit* /*who*/) {}
void SetType(uint32 _type)
{
switch (Creaturetype = _type)
@@ -205,7 +212,6 @@ public:
}
}
};
-
};
class mob_head : public CreatureScript
@@ -220,7 +226,7 @@ public:
struct mob_headAI : public ScriptedAI
{
- mob_headAI(Creature* c) : ScriptedAI(c) {}
+ mob_headAI(Creature* creature) : ScriptedAI(creature) {}
uint64 bodyGUID;
@@ -316,7 +322,8 @@ public:
if (!me->getVictim()) return;
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveFleeing(me->getVictim());
- } else wait -= diff;
+ }
+ else wait -= diff;
if (laugh <= diff)
{
@@ -327,7 +334,8 @@ public:
if (speaker)
speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
me->MonsterTextEmote(EMOTE_LAUGHS, 0);
- } else laugh -= diff;
+ }
+ else laugh -= diff;
}
else
{
@@ -339,12 +347,12 @@ public:
if (Unit* body = Unit::GetUnit((*me), bodyGUID))
body->Kill(body);
me->Kill(me);
- } else wait -= diff;
+ }
+ else wait -= diff;
}
}
}
};
-
};
class boss_headless_horseman : public CreatureScript
@@ -359,9 +367,9 @@ public:
struct boss_headless_horsemanAI : public ScriptedAI
{
- boss_headless_horsemanAI(Creature* c) : ScriptedAI(c)
+ boss_headless_horsemanAI(Creature* creature) : ScriptedAI(creature)
{
- instance = c->GetInstanceScript();
+ instance = creature->GetInstanceScript();
}
InstanceScript* instance;
@@ -636,7 +644,8 @@ public:
break;
}
++count;
- } else say_timer -= diff;
+ }
+ else say_timer -= diff;
}
else
{
@@ -657,7 +666,8 @@ public:
if (Creature* flame = me->SummonCreature(HELPER, Spawn[0].x, Spawn[0].y, Spawn[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 17000))
CAST_AI(mob_wisp_invis::mob_wisp_invisAI, flame->AI())->SetType(2);
burned = true;
- } else burn -= diff;
+ }
+ else burn -= diff;
break;
case 2:
if (conflagrate <= diff)
@@ -665,7 +675,8 @@ public:
if (Unit* player = SelectRandomPlayer(30.0f))
DoCast(player, SPELL_CONFLAGRATION, false);
conflagrate = urand(10000, 16000);
- } else conflagrate -= diff;
+ }
+ else conflagrate -= diff;
break;
case 3:
if (summonadds <= diff)
@@ -674,7 +685,8 @@ public:
DoCast(me, SPELL_SUMMON_PUMPKIN);
SaySound(SAY_SPROUTING_PUMPKINS);
summonadds = urand(25000, 35000);
- } else summonadds -= diff;
+ }
+ else summonadds -= diff;
break;
}
@@ -683,7 +695,8 @@ public:
laugh = urand(11000, 22000);
me->MonsterTextEmote(EMOTE_LAUGHS, 0);
DoPlaySoundToSet(me, RandomLaugh[rand()%3]);
- } else laugh -= diff;
+ }
+ else laugh -= diff;
if (UpdateVictim())
{
@@ -692,7 +705,8 @@ public:
{
DoCast(me->getVictim(), SPELL_CLEAVE);
cleave = urand(2000, 6000); //1 cleave per 2.0f-6.0fsec
- } else cleave -= diff;
+ }
+ else cleave -= diff;
}
}
else
@@ -725,13 +739,14 @@ public:
me->RemoveAurasDueToSpell(SPELL_CONFUSE);
DoCast(me, SPELL_WHIRLWIND, true);
DoCast(me, SPELL_CONFUSE);
- } else
+ }
+ else
me->RemoveAurasDueToSpell(SPELL_WHIRLWIND);
- } else whirlwind -= diff;
+ }
+ else whirlwind -= diff;
}
}
};
-
};
class mob_pulsing_pumpkin : public CreatureScript
@@ -746,7 +761,7 @@ public:
struct mob_pulsing_pumpkinAI : public ScriptedAI
{
- mob_pulsing_pumpkinAI(Creature* c) : ScriptedAI(c) {}
+ mob_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature) {}
bool sprouted;
uint64 debuffGUID;
@@ -771,7 +786,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
}
- void EnterCombat(Unit* /*who*/){}
+ void EnterCombat(Unit* /*who*/) {}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
{
@@ -813,7 +828,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
class go_loosely_turned_soil : public GameObjectScript
@@ -846,13 +860,13 @@ public:
//}
return true;
}
-
};
void mob_head::mob_headAI::Disappear()
{
if (withbody)
return;
+
if (bodyGUID)
{
Creature* body = Unit::GetCreature((*me), bodyGUID);
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
index d99aabd60e8..16b90f89bb5 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
@@ -26,19 +26,32 @@ EndScriptData */
#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
-#define SAY_AGGRO -1189000
-#define SAY_WHIRLWIND -1189001
-#define SAY_ENRAGE -1189002
-#define SAY_KILL -1189003
-#define EMOTE_ENRAGE -1189004
+enum Says
+{
+ SAY_AGGRO = -1189000,
+ SAY_WHIRLWIND = -1189001,
+ SAY_ENRAGE = -1189002,
+ SAY_KILL = -1189003
+};
-#define SPELL_RUSHINGCHARGE 8260
-#define SPELL_CLEAVE 15496
-#define SPELL_WHIRLWIND 8989
-#define SPELL_FRENZY 8269
+enum Emotes
+{
+ EMOTE_ENRAGE = -1189004
+};
-#define ENTRY_SCARLET_TRAINEE 6575
-#define ENTRY_SCARLET_MYRMIDON 4295
+enum Spells
+{
+ SPELL_RUSHINGCHARGE = 8260,
+ SPELL_CLEAVE = 15496,
+ SPELL_WHIRLWIND = 8989,
+ SPELL_FRENZY = 8269
+};
+
+enum Entry
+{
+ ENTRY_SCARLET_TRAINEE = 6575,
+ ENTRY_SCARLET_MYRMIDON = 4295
+};
class boss_herod : public CreatureScript
{
@@ -52,7 +65,7 @@ public:
struct boss_herodAI : public ScriptedAI
{
- boss_herodAI(Creature* c) : ScriptedAI(c) {}
+ boss_herodAI(Creature* creature) : ScriptedAI(creature) {}
bool Enrage;
@@ -102,7 +115,8 @@ public:
{
DoCast(me->getVictim(), SPELL_CLEAVE);
Cleave_Timer = 12000;
- } else Cleave_Timer -= diff;
+ }
+ else Cleave_Timer -= diff;
// Whirlwind_Timer
if (Whirlwind_Timer <= diff)
@@ -110,12 +124,12 @@ public:
DoScriptText(SAY_WHIRLWIND, me);
DoCast(me->getVictim(), SPELL_WHIRLWIND);
Whirlwind_Timer = 30000;
- } else Whirlwind_Timer -= diff;
+ }
+ else Whirlwind_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
class mob_scarlet_trainee : public CreatureScript
@@ -130,7 +144,7 @@ public:
struct mob_scarlet_traineeAI : public npc_escortAI
{
- mob_scarlet_traineeAI(Creature* c) : npc_escortAI(c)
+ mob_scarlet_traineeAI(Creature* creature) : npc_escortAI(creature)
{
Start_Timer = urand(1000, 6000);
}
@@ -138,7 +152,7 @@ public:
uint32 Start_Timer;
void Reset() {}
- void WaypointReached(uint32 /*uiPoint*/) {}
+ void WaypointReached(uint32 /*point*/) {}
void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff)
@@ -155,7 +169,6 @@ public:
npc_escortAI::UpdateAI(diff);
}
};
-
};
void AddSC_boss_herod()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
index 327c84327c5..a64636a4223 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
@@ -47,7 +47,7 @@ public:
struct boss_high_inquisitor_fairbanksAI : public ScriptedAI
{
- boss_high_inquisitor_fairbanksAI(Creature* c) : ScriptedAI(c) {}
+ boss_high_inquisitor_fairbanksAI(Creature* creature) : ScriptedAI(creature) {}
uint32 CurseOfBlood_Timer;
uint32 DispelMagic_Timer;
@@ -68,9 +68,7 @@ public:
PowerWordShield = false;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff)
{
@@ -82,7 +80,8 @@ public:
{
DoCast(me, SPELL_HEAL);
Heal_Timer = 30000;
- } else Heal_Timer -= diff;
+ }
+ else Heal_Timer -= diff;
//Fear_Timer
if (Fear_Timer <= diff)
@@ -91,7 +90,8 @@ public:
DoCast(target, SPELL_FEAR);
Fear_Timer = 40000;
- } else Fear_Timer -= diff;
+ }
+ else Fear_Timer -= diff;
//Sleep_Timer
if (Sleep_Timer <= diff)
@@ -100,7 +100,8 @@ public:
DoCast(target, SPELL_SLEEP);
Sleep_Timer = 30000;
- } else Sleep_Timer -= diff;
+ }
+ else Sleep_Timer -= diff;
//PowerWordShield_Timer
if (!PowerWordShield && !HealthAbovePct(25))
@@ -116,19 +117,20 @@ public:
DoCast(target, SPELL_DISPELMAGIC);
DispelMagic_Timer = 30000;
- } else DispelMagic_Timer -= diff;
+ }
+ else DispelMagic_Timer -= diff;
//CurseOfBlood_Timer
if (CurseOfBlood_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CURSEOFBLOOD);
CurseOfBlood_Timer = 25000;
- } else CurseOfBlood_Timer -= diff;
+ }
+ else CurseOfBlood_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_high_inquisitor_fairbanks()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
index b070a31d6ee..f311da401d4 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
@@ -44,7 +44,7 @@ public:
struct boss_houndmaster_lokseyAI : public ScriptedAI
{
- boss_houndmaster_lokseyAI(Creature* c) : ScriptedAI(c) {}
+ boss_houndmaster_lokseyAI(Creature* creature) : ScriptedAI(creature) {}
uint32 BloodLust_Timer;
@@ -67,12 +67,12 @@ public:
{
DoCast(me, SPELL_BLOODLUST);
BloodLust_Timer = 20000;
- } else BloodLust_Timer -= diff;
+ }
+ else BloodLust_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_houndmaster_loksey()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
index 28c9b7ea434..058c688641f 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
@@ -26,15 +26,18 @@ EndScriptData */
#include "ScriptPCH.h"
#include "scarlet_monastery.h"
-enum eEnums
+enum Says
{
SAY_AGGRO = -1189011,
SAY_HEALTH1 = -1189012,
SAY_HEALTH2 = -1189013,
SAY_KILL = -1189014,
- SAY_TRIGGER_VORREL = -1189015,
+ SAY_TRIGGER_VORREL = -1189015
+};
- SPELL_SHADOWWORDPAIN = 2767,
+enum Spells
+{
+ SPELL_SHADOWWORDPAIN = 2767
};
class boss_interrogator_vishas : public CreatureScript
@@ -49,7 +52,7 @@ public:
struct boss_interrogator_vishasAI : public ScriptedAI
{
- boss_interrogator_vishasAI(Creature* c) : ScriptedAI(c)
+ boss_interrogator_vishasAI(Creature* creature) : ScriptedAI(creature)
{
instance = me->GetInstanceScript();
}
@@ -108,12 +111,12 @@ public:
{
DoCast(me->getVictim(), SPELL_SHADOWWORDPAIN);
ShadowWordPain_Timer = urand(5000, 15000);
- } else ShadowWordPain_Timer -= diff;
+ }
+ else ShadowWordPain_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_interrogator_vishas()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
index 7e2d3cb6788..ec6ac34b0bb 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
@@ -26,7 +26,7 @@ EndScriptData */
#include "ScriptPCH.h"
#include "scarlet_monastery.h"
-enum eEnums
+enum Says
{
//Mograine says
SAY_MO_AGGRO = -1189005,
@@ -37,7 +37,10 @@ enum eEnums
SAY_WH_INTRO = -1189008,
SAY_WH_KILL = -1189009,
SAY_WH_RESSURECT = -1189010,
+};
+enum Spells
+{
//Mograine Spells
SPELL_CRUSADERSTRIKE = 14518,
SPELL_HAMMEROFJUSTICE = 5589,
@@ -67,43 +70,43 @@ public:
{
boss_scarlet_commander_mograineAI(Creature* creature) : ScriptedAI(creature)
{
- m_instance = creature->GetInstanceScript();
+ instance = creature->GetInstanceScript();
}
- InstanceScript* m_instance;
+ InstanceScript* instance;
- uint32 m_uiCrusaderStrike_Timer;
- uint32 m_uiHammerOfJustice_Timer;
+ uint32 CrusaderStrike_Timer;
+ uint32 HammerOfJustice_Timer;
- bool m_bHasDied;
- bool m_bHeal;
- bool m_bFakeDeath;
+ bool _bHasDied;
+ bool _bHeal;
+ bool _bFakeDeath;
void Reset()
{
- m_uiCrusaderStrike_Timer = 10000;
- m_uiHammerOfJustice_Timer = 10000;
+ CrusaderStrike_Timer = 10000;
+ HammerOfJustice_Timer = 10000;
//Incase wipe during phase that mograine fake death
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetStandState(UNIT_STAND_STATE_STAND);
- if (m_instance)
+ if (instance)
if (me->isAlive())
- m_instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
+ instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
- m_bHasDied = false;
- m_bHeal = false;
- m_bFakeDeath = false;
+ _bHasDied = false;
+ _bHeal = false;
+ _bFakeDeath = false;
}
void JustReachedHome()
{
- if (m_instance)
+ if (instance)
{
- if (m_instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) != NOT_STARTED)
- m_instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, FAIL);
+ if (instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) != NOT_STARTED)
+ instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, FAIL);
}
}
@@ -120,18 +123,18 @@ public:
DoScriptText(SAY_MO_KILL, me);
}
- void DamageTaken(Unit* /*pDoneBy*/, uint32 &uiDamage)
+ void DamageTaken(Unit* /*doneBy*/, uint32 &damage)
{
- if (uiDamage < me->GetHealth() || m_bHasDied || m_bFakeDeath)
+ if (damage < me->GetHealth() || _bHasDied || _bFakeDeath)
return;
- if (!m_instance)
+ if (!instance)
return;
//On first death, fake death and open door, as well as initiate whitemane if exist
- if (Unit* Whitemane = Unit::GetUnit((*me), m_instance->GetData64(DATA_WHITEMANE)))
+ if (Unit* Whitemane = Unit::GetUnit((*me), instance->GetData64(DATA_WHITEMANE)))
{
- m_instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS);
+ instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS);
Whitemane->GetMotionMaster()->MovePoint(1, 1163.113370f, 1398.856812f, 32.527786f);
@@ -150,72 +153,73 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetStandState(UNIT_STAND_STATE_DEAD);
- m_bHasDied = true;
- m_bFakeDeath = true;
+ _bHasDied = true;
+ _bFakeDeath = true;
- uiDamage = 0;
+ damage = 0;
}
}
- void SpellHit(Unit* /*who*/, const SpellInfo* pSpell)
+ void SpellHit(Unit* /*who*/, const SpellInfo* spell)
{
//When hit with ressurection say text
- if (pSpell->Id == SPELL_SCARLETRESURRECTION)
+ if (spell->Id == SPELL_SCARLETRESURRECTION)
{
DoScriptText(SAY_MO_RESSURECTED, me);
- m_bFakeDeath = false;
+ _bFakeDeath = false;
- if (m_instance)
- m_instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL);
+ if (instance)
+ instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL);
}
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
- if (m_bHasDied && !m_bHeal && m_instance && m_instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL)
+ if (_bHasDied && !_bHeal && instance && instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL)
{
//On ressurection, stop fake death and heal whitemane and resume fight
- if (Unit* Whitemane = Unit::GetUnit((*me), m_instance->GetData64(DATA_WHITEMANE)))
+ if (Unit* Whitemane = Unit::GetUnit((*me), instance->GetData64(DATA_WHITEMANE)))
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetStandState(UNIT_STAND_STATE_STAND);
DoCast(Whitemane, SPELL_LAYONHANDS);
- m_uiCrusaderStrike_Timer = 10000;
- m_uiHammerOfJustice_Timer = 10000;
+ CrusaderStrike_Timer = 10000;
+ HammerOfJustice_Timer = 10000;
if (me->getVictim())
me->GetMotionMaster()->MoveChase(me->getVictim());
- m_bHeal = true;
+ _bHeal = true;
}
}
//This if-check to make sure mograine does not attack while fake death
- if (m_bFakeDeath)
+ if (_bFakeDeath)
return;
- //m_uiCrusaderStrike_Timer
- if (m_uiCrusaderStrike_Timer <= uiDiff)
+ //CrusaderStrike_Timer
+ if (CrusaderStrike_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CRUSADERSTRIKE);
- m_uiCrusaderStrike_Timer = 10000;
- } else m_uiCrusaderStrike_Timer -= uiDiff;
+ CrusaderStrike_Timer = 10000;
+ }
+ else CrusaderStrike_Timer -= diff;
- //m_uiHammerOfJustice_Timer
- if (m_uiHammerOfJustice_Timer <= uiDiff)
+ //HammerOfJustice_Timer
+ if (HammerOfJustice_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_HAMMEROFJUSTICE);
- m_uiHammerOfJustice_Timer = 60000;
- } else m_uiHammerOfJustice_Timer -= uiDiff;
+ HammerOfJustice_Timer = 60000;
+ }
+ else HammerOfJustice_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
class boss_high_inquisitor_whitemane : public CreatureScript
@@ -232,37 +236,37 @@ public:
{
boss_high_inquisitor_whitemaneAI(Creature* creature) : ScriptedAI(creature)
{
- m_instance = creature->GetInstanceScript();
+ instance = creature->GetInstanceScript();
}
- InstanceScript* m_instance;
+ InstanceScript* instance;
- uint32 m_uiHeal_Timer;
- uint32 m_uiPowerWordShield_Timer;
- uint32 m_uiHolySmite_Timer;
- uint32 m_uiWait_Timer;
+ uint32 Heal_Timer;
+ uint32 PowerWordShield_Timer;
+ uint32 HolySmite_Timer;
+ uint32 Wait_Timer;
- bool m_bCanResurrectCheck;
- bool m_bCanResurrect;
+ bool _bCanResurrectCheck;
+ bool _bCanResurrect;
void Reset()
{
- m_uiWait_Timer = 7000;
- m_uiHeal_Timer = 10000;
- m_uiPowerWordShield_Timer = 15000;
- m_uiHolySmite_Timer = 6000;
+ Wait_Timer = 7000;
+ Heal_Timer = 10000;
+ PowerWordShield_Timer = 15000;
+ HolySmite_Timer = 6000;
- m_bCanResurrectCheck = false;
- m_bCanResurrect = false;
+ _bCanResurrectCheck = false;
+ _bCanResurrect = false;
- if (m_instance)
+ if (instance)
if (me->isAlive())
- m_instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
+ instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
}
void AttackStart(Unit* who)
{
- if (m_instance && m_instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED)
+ if (instance && instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED)
return;
ScriptedAI::AttackStart(who);
@@ -278,84 +282,86 @@ public:
DoScriptText(SAY_WH_KILL, me);
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
- if (m_bCanResurrect)
+ if (_bCanResurrect)
{
//When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out
- if (m_instance && m_uiWait_Timer <= uiDiff)
+ if (instance && Wait_Timer <= diff)
{
- if (Unit* Mograine = Unit::GetUnit((*me), m_instance->GetData64(DATA_MOGRAINE)))
+ if (Unit* Mograine = Unit::GetUnit((*me), instance->GetData64(DATA_MOGRAINE)))
{
DoCast(Mograine, SPELL_SCARLETRESURRECTION);
DoScriptText(SAY_WH_RESSURECT, me);
- m_bCanResurrect = false;
+ _bCanResurrect = false;
}
}
- else m_uiWait_Timer -= uiDiff;
+ else Wait_Timer -= diff;
}
//Cast Deep sleep when health is less than 50%
- if (!m_bCanResurrectCheck && !HealthAbovePct(50))
+ if (!_bCanResurrectCheck && !HealthAbovePct(50))
{
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(false);
DoCast(me->getVictim(), SPELL_DEEPSLEEP);
- m_bCanResurrectCheck = true;
- m_bCanResurrect = true;
+ _bCanResurrectCheck = true;
+ _bCanResurrect = true;
return;
}
//while in "resurrect-mode", don't do anything
- if (m_bCanResurrect)
+ if (_bCanResurrect)
return;
//If we are <75% hp cast healing spells at self or Mograine
- if (m_uiHeal_Timer <= uiDiff)
+ if (Heal_Timer <= diff)
{
Creature* target = NULL;
if (!HealthAbovePct(75))
target = me;
- if (m_instance)
+ if (instance)
{
- if (Creature* pMograine = Unit::GetCreature((*me), m_instance->GetData64(DATA_MOGRAINE)))
+ if (Creature* mograine = Unit::GetCreature((*me), instance->GetData64(DATA_MOGRAINE)))
{
- // checking m_bCanResurrectCheck prevents her healing Mograine while he is "faking death"
- if (m_bCanResurrectCheck && pMograine->isAlive() && !pMograine->HealthAbovePct(75))
- target = pMograine;
+ // checking _bCanResurrectCheck prevents her healing Mograine while he is "faking death"
+ if (_bCanResurrectCheck && mograine->isAlive() && !mograine->HealthAbovePct(75))
+ target = mograine;
}
}
if (target)
DoCast(target, SPELL_HEAL);
- m_uiHeal_Timer = 13000;
- } else m_uiHeal_Timer -= uiDiff;
+ Heal_Timer = 13000;
+ }
+ else Heal_Timer -= diff;
- //m_uiPowerWordShield_Timer
- if (m_uiPowerWordShield_Timer <= uiDiff)
+ //PowerWordShield_Timer
+ if (PowerWordShield_Timer <= diff)
{
DoCast(me, SPELL_POWERWORDSHIELD);
- m_uiPowerWordShield_Timer = 15000;
- } else m_uiPowerWordShield_Timer -= uiDiff;
+ PowerWordShield_Timer = 15000;
+ }
+ else PowerWordShield_Timer -= diff;
- //m_uiHolySmite_Timer
- if (m_uiHolySmite_Timer <= uiDiff)
+ //HolySmite_Timer
+ if (HolySmite_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_HOLYSMITE);
- m_uiHolySmite_Timer = 6000;
- } else m_uiHolySmite_Timer -= uiDiff;
+ HolySmite_Timer = 6000;
+ }
+ else HolySmite_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_mograine_and_whitemane()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
index dc10cb4d60f..8035adfc33f 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
@@ -25,10 +25,13 @@ EndScriptData */
#include "ScriptPCH.h"
-#define SPELL_LICHSLAP 28873
-#define SPELL_FROSTBOLTVOLLEY 8398
-#define SPELL_MINDFLAY 17313
-#define SPELL_FROSTNOVA 15531
+enum Spells
+{
+ SPELL_LICHSLAP = 28873,
+ SPELL_FROSTBOLTVOLLEY = 8398,
+ SPELL_MINDFLAY = 17313,
+ SPELL_FROSTNOVA = 15531
+};
class boss_scorn : public CreatureScript
{
@@ -42,7 +45,7 @@ public:
struct boss_scornAI : public ScriptedAI
{
- boss_scornAI(Creature* c) : ScriptedAI(c) {}
+ boss_scornAI(Creature* creature) : ScriptedAI(creature) {}
uint32 LichSlap_Timer;
uint32 FrostboltVolley_Timer;
@@ -57,9 +60,7 @@ public:
FrostNova_Timer = 30000;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff)
{
@@ -71,33 +72,36 @@ public:
{
DoCast(me->getVictim(), SPELL_LICHSLAP);
LichSlap_Timer = 45000;
- } else LichSlap_Timer -= diff;
+ }
+ else LichSlap_Timer -= diff;
//FrostboltVolley_Timer
if (FrostboltVolley_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FROSTBOLTVOLLEY);
FrostboltVolley_Timer = 20000;
- } else FrostboltVolley_Timer -= diff;
+ }
+ else FrostboltVolley_Timer -= diff;
//MindFlay_Timer
if (MindFlay_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MINDFLAY);
MindFlay_Timer = 20000;
- } else MindFlay_Timer -= diff;
+ }
+ else MindFlay_Timer -= diff;
//FrostNova_Timer
if (FrostNova_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_FROSTNOVA);
FrostNova_Timer = 15000;
- } else FrostNova_Timer -= diff;
+ }
+ else FrostNova_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_scorn()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
index f1cddb08a69..ba0b854754e 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
@@ -26,10 +26,13 @@ EndScriptData */
#include "ScriptPCH.h"
#include "scarlet_monastery.h"
-#define ENTRY_PUMPKIN_SHRINE 186267
-#define ENTRY_HORSEMAN 23682
-#define ENTRY_HEAD 23775
-#define ENTRY_PUMPKIN 23694
+enum Entry
+{
+ ENTRY_PUMPKIN_SHRINE = 186267,
+ ENTRY_HORSEMAN = 23682,
+ ENTRY_HEAD = 23775,
+ ENTRY_PUMPKIN = 23694
+};
#define MAX_ENCOUNTER 2
@@ -57,11 +60,11 @@ public:
uint64 VorrelGUID;
uint64 DoorHighInquisitorGUID;
- uint32 m_auiEncounter[MAX_ENCOUNTER];
+ uint32 encounter[MAX_ENCOUNTER];
void Initialize()
{
- memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
+ memset(&encounter, 0, sizeof(encounter));
PumpkinShrineGUID = 0;
HorsemanGUID = 0;
@@ -106,13 +109,13 @@ public:
if (data == FAIL)
DoUseDoorOrButton(DoorHighInquisitorGUID);
- m_auiEncounter[0] = data;
+ encounter[0] = data;
break;
case GAMEOBJECT_PUMPKIN_SHRINE:
HandleGameObject(PumpkinShrineGUID, false);
break;
case DATA_HORSEMAN_EVENT:
- m_auiEncounter[1] = data;
+ encounter[1] = data;
if (data == DONE)
{
for (std::set<uint64>::const_iterator itr = HorsemanAdds.begin(); itr != HorsemanAdds.end(); ++itr)
@@ -146,13 +149,12 @@ public:
uint32 GetData(uint32 type)
{
if (type == TYPE_MOGRAINE_AND_WHITE_EVENT)
- return m_auiEncounter[0];
+ return encounter[0];
if (type == DATA_HORSEMAN_EVENT)
- return m_auiEncounter[1];
+ return encounter[1];
return 0;
}
};
-
};
void AddSC_instance_scarlet_monastery()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
index ca6bd1d185a..70b18919704 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
@@ -19,14 +19,17 @@
#ifndef DEF_SCARLET_M
#define DEF_SCARLET_M
-#define TYPE_MOGRAINE_AND_WHITE_EVENT 1
-#define DATA_MOGRAINE 2
-#define DATA_WHITEMANE 3
-#define DATA_DOOR_WHITEMANE 4
+enum eEnums
+{
+ TYPE_MOGRAINE_AND_WHITE_EVENT = 1,
-#define DATA_HORSEMAN_EVENT 5
-#define GAMEOBJECT_PUMPKIN_SHRINE 6
+ DATA_MOGRAINE = 2,
+ DATA_WHITEMANE = 3,
+ DATA_DOOR_WHITEMANE = 4,
-#define DATA_VORREL 7
-#endif
+ DATA_HORSEMAN_EVENT = 5,
+ GAMEOBJECT_PUMPKIN_SHRINE = 6,
+ DATA_VORREL = 7
+};
+#endif
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
index 29029803369..878116ad476 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
@@ -43,7 +43,6 @@ public:
player->AddAura(SPELL_BLESSING_OF_BLACKFATHOM, player);
return true;
}
-
};
class go_blackfathom_fire : public GameObjectScript
@@ -64,7 +63,6 @@ public:
}
return false;
}
-
};
class npc_blackfathom_deeps_event : public CreatureScript
@@ -92,9 +90,9 @@ public:
InstanceScript* instance;
- uint32 uiRavageTimer;
- uint32 uiFrostNovaTimer;
- uint32 uiFrostBoltVolleyTimer;
+ uint32 ravageTimer;
+ uint32 frostNovaTimer;
+ uint32 frostBoltVolleyTimer;
bool bFlee;
@@ -102,9 +100,9 @@ public:
{
bFlee = false;
- uiRavageTimer = urand(5000, 8000);
- uiFrostNovaTimer = urand(9000, 12000);
- uiFrostBoltVolleyTimer = urand(2000, 4000);
+ ravageTimer = urand(5000, 8000);
+ frostNovaTimer = urand(9000, 12000);
+ frostBoltVolleyTimer = urand(2000, 4000);
}
void AttackPlayer()
@@ -131,7 +129,7 @@ public:
}
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
@@ -140,11 +138,11 @@ public:
{
case NPC_AKU_MAI_SNAPJAW:
{
- if (uiRavageTimer <= uiDiff)
+ if (ravageTimer <= diff)
{
DoCast(me->getVictim(), SPELL_RAVAGE);
- uiRavageTimer = urand(9000, 14000);
- } else uiRavageTimer -= uiDiff;
+ ravageTimer = urand(9000, 14000);
+ } else ravageTimer -= diff;
break;
}
case NPC_MURKSHALLOW_SOFTSHELL:
@@ -159,20 +157,23 @@ public:
}
case NPC_AKU_MAI_SERVANT:
{
- if (uiFrostBoltVolleyTimer <= uiDiff)
+ if (frostBoltVolleyTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
if (target)
DoCast(target, SPELL_FROST_BOLT_VOLLEY);
}
- uiFrostBoltVolleyTimer = urand(5000, 8000);
- } else uiFrostBoltVolleyTimer -= uiDiff;
- if (uiFrostNovaTimer <= uiDiff)
+ frostBoltVolleyTimer = urand(5000, 8000);
+ }
+ else frostBoltVolleyTimer -= diff;
+
+ if (frostNovaTimer <= diff)
{
DoCastAOE(SPELL_FROST_NOVA, false);
- uiFrostNovaTimer = urand(25000, 30000);
- } else uiFrostNovaTimer -= uiDiff;
+ frostNovaTimer = urand(25000, 30000);
+ }
+ else frostNovaTimer -= diff;
break;
}
}
@@ -187,7 +188,6 @@ public:
instance->SetData(DATA_EVENT, instance->GetData(DATA_EVENT) + 1);
}
};
-
};
enum eMorridune
@@ -201,12 +201,12 @@ class npc_morridune : public CreatureScript
public:
npc_morridune() : CreatureScript("npc_morridune") { }
- bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*uiSender*/, uint32 uiAction)
+ bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*Sender*/, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
+ switch (action)
{
- case GOSSIP_ACTION_INFO_DEF+1:
+ case GOSSIP_ACTION_INFO_DEF + 1:
player->TeleportTo(1, 9952.239f, 2284.277f, 1341.394f, 1.595f);
player->CLOSE_GOSSIP_MENU();
break;
@@ -216,7 +216,7 @@ public:
bool OnGossipHello(Player* player, Creature* creature)
{
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MORRIDUNE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MORRIDUNE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
return true;
@@ -250,7 +250,6 @@ public:
}
}
};
-
};
void AddSC_blackfathom_deeps()
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp
index 87e8478532d..32a6bcbde77 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp
@@ -36,19 +36,19 @@ public:
struct boss_aku_maiAI : public ScriptedAI
{
- boss_aku_maiAI(Creature* c) : ScriptedAI(c)
+ boss_aku_maiAI(Creature* creature) : ScriptedAI(creature)
{
- instance = c->GetInstanceScript();
+ instance = creature->GetInstanceScript();
}
- uint32 uiPoisonCloudTimer;
+ uint32 poisonCloudTimer;
bool bIsEnraged;
InstanceScript* instance;
void Reset()
{
- uiPoisonCloudTimer = urand(5000, 9000);
+ poisonCloudTimer = urand(5000, 9000);
bIsEnraged = false;
if (instance)
instance->SetData(TYPE_AKU_MAI, NOT_STARTED);
@@ -71,11 +71,11 @@ public:
if (!UpdateVictim())
return;
- if (uiPoisonCloudTimer < diff)
+ if (poisonCloudTimer < diff)
{
DoCastVictim(SPELL_POISON_CLOUD);
- uiPoisonCloudTimer = urand(25000, 50000);
- } else uiPoisonCloudTimer -= diff;
+ poisonCloudTimer = urand(25000, 50000);
+ } else poisonCloudTimer -= diff;
if (!bIsEnraged && HealthBelowPct(30))
{
@@ -86,7 +86,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_aku_mai()
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp
index e7822a6edb3..5a60a849b75 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp
@@ -35,18 +35,18 @@ public:
struct boss_gelihastAI : public ScriptedAI
{
- boss_gelihastAI(Creature* c) : ScriptedAI(c)
+ boss_gelihastAI(Creature* creature) : ScriptedAI(creature)
{
- instance = c->GetInstanceScript();
+ instance = creature->GetInstanceScript();
}
- uint32 uiNetTimer;
+ uint32 netTimer;
InstanceScript* instance;
void Reset()
{
- uiNetTimer = urand(2000, 4000);
+ netTimer = urand(2000, 4000);
if (instance)
instance->SetData(TYPE_GELIHAST, NOT_STARTED);
}
@@ -68,16 +68,15 @@ public:
if (!UpdateVictim())
return;
- if (uiNetTimer < diff)
+ if (netTimer < diff)
{
DoCastVictim(SPELL_NET);
- uiNetTimer = urand(4000, 7000);
- } else uiNetTimer -= diff;
+ netTimer = urand(4000, 7000);
+ } else netTimer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_gelihast()
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
index 5823ed15ed5..7ee17172102 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
@@ -44,20 +44,20 @@ public:
struct boss_kelrisAI : public ScriptedAI
{
- boss_kelrisAI(Creature* c) : ScriptedAI(c)
+ boss_kelrisAI(Creature* creature) : ScriptedAI(creature)
{
- instance = c->GetInstanceScript();
+ instance = creature->GetInstanceScript();
}
- uint32 uiMindBlastTimer;
- uint32 uiSleepTimer;
+ uint32 mindBlastTimer;
+ uint32 sleepTimer;
InstanceScript* instance;
void Reset()
{
- uiMindBlastTimer = urand(2000, 5000);
- uiSleepTimer = urand(9000, 12000);
+ mindBlastTimer = urand(2000, 5000);
+ sleepTimer = urand(9000, 12000);
if (instance)
instance->SetData(TYPE_KELRIS, NOT_STARTED);
}
@@ -81,26 +81,25 @@ public:
if (!UpdateVictim())
return;
- if (uiMindBlastTimer < diff)
+ if (mindBlastTimer < diff)
{
DoCastVictim(SPELL_MIND_BLAST);
- uiMindBlastTimer = urand(7000, 9000);
- } else uiMindBlastTimer -= diff;
+ mindBlastTimer = urand(7000, 9000);
+ } else mindBlastTimer -= diff;
- if (uiSleepTimer < diff)
+ if (sleepTimer < diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
DoScriptText(SAY_SLEEP, me);
DoCast(target, SPELL_SLEEP);
}
- uiSleepTimer = urand(15000, 20000);
- } else uiSleepTimer -= diff;
+ sleepTimer = urand(15000, 20000);
+ } else sleepTimer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_kelris()
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
index 8dd4e60f281..ea33499a960 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
@@ -65,33 +65,33 @@ public:
{
instance_blackfathom_deeps_InstanceMapScript(Map* map) : InstanceScript(map) {}
- uint64 m_uiTwilightLordKelrisGUID;
- uint64 m_uiShrine1GUID;
- uint64 m_uiShrine2GUID;
- uint64 m_uiShrine3GUID;
- uint64 m_uiShrine4GUID;
- uint64 m_uiShrineOfGelihastGUID;
- uint64 m_uiAltarOfTheDeepsGUID;
- uint64 m_uiMainDoorGUID;
+ uint64 twilightLordKelrisGUID;
+ uint64 shrine1GUID;
+ uint64 shrine2GUID;
+ uint64 shrine3GUID;
+ uint64 shrine4GUID;
+ uint64 shrineOfGelihastGUID;
+ uint64 altarOfTheDeepsGUID;
+ uint64 mainDoorGUID;
- uint8 m_auiEncounter[MAX_ENCOUNTER];
- uint8 m_uiCountFires;
- uint8 uiDeathTimes;
+ uint8 encounter[MAX_ENCOUNTER];
+ uint8 countFires;
+ uint8 deathTimes;
void Initialize()
{
- memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
+ memset(&encounter, 0, sizeof(encounter));
- m_uiTwilightLordKelrisGUID = 0;
- m_uiShrine1GUID = 0;
- m_uiShrine2GUID = 0;
- m_uiShrine3GUID = 0;
- m_uiShrine4GUID = 0;
- m_uiShrineOfGelihastGUID = 0;
- m_uiAltarOfTheDeepsGUID = 0;
- m_uiMainDoorGUID = 0;
- m_uiCountFires = 0;
- uiDeathTimes = 0;
+ twilightLordKelrisGUID = 0;
+ shrine1GUID = 0;
+ shrine2GUID = 0;
+ shrine3GUID = 0;
+ shrine4GUID = 0;
+ shrineOfGelihastGUID = 0;
+ altarOfTheDeepsGUID = 0;
+ mainDoorGUID = 0;
+ countFires = 0;
+ deathTimes = 0;
}
void OnCreatureCreate(Creature* creature)
@@ -99,7 +99,7 @@ public:
switch (creature->GetEntry())
{
case NPC_TWILIGHT_LORD_KELRIS:
- m_uiTwilightLordKelrisGUID = creature->GetGUID();
+ twilightLordKelrisGUID = creature->GetGUID();
break;
case NPC_LORGUS_JETT:
creature->SetHomePosition(LorgusPosition[urand(0, 3)]);
@@ -112,150 +112,149 @@ public:
switch (go->GetEntry())
{
case GO_FIRE_OF_AKU_MAI_1:
- m_uiShrine1GUID = go->GetGUID();
+ shrine1GUID = go->GetGUID();
break;
case GO_FIRE_OF_AKU_MAI_2:
- m_uiShrine2GUID = go->GetGUID();
+ shrine2GUID = go->GetGUID();
break;
case GO_FIRE_OF_AKU_MAI_3:
- m_uiShrine3GUID = go->GetGUID();
+ shrine3GUID = go->GetGUID();
break;
case GO_FIRE_OF_AKU_MAI_4:
- m_uiShrine4GUID = go->GetGUID();
+ shrine4GUID = go->GetGUID();
break;
case GO_SHRINE_OF_GELIHAST:
- m_uiShrineOfGelihastGUID = go->GetGUID();
- if (m_auiEncounter[0] != DONE)
+ shrineOfGelihastGUID = go->GetGUID();
+ if (encounter[0] != DONE)
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
break;
case GO_ALTAR_OF_THE_DEEPS:
- m_uiAltarOfTheDeepsGUID = go->GetGUID();
- if (m_auiEncounter[3] != DONE)
+ altarOfTheDeepsGUID = go->GetGUID();
+ if (encounter[3] != DONE)
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
break;
case GO_AKU_MAI_DOOR:
- if (m_auiEncounter[2] == DONE)
+ if (encounter[2] == DONE)
HandleGameObject(0, true, go);
- m_uiMainDoorGUID = go->GetGUID();
+ mainDoorGUID = go->GetGUID();
break;
}
}
- void SetData(uint32 uiType, uint32 uiData)
+ void SetData(uint32 type, uint32 data)
{
- switch (uiType)
+ switch (type)
{
case TYPE_GELIHAST:
- m_auiEncounter[0] = uiData;
- if (uiData == DONE)
- if (GameObject* go = instance->GetGameObject(m_uiShrineOfGelihastGUID))
+ encounter[0] = data;
+ if (data == DONE)
+ if (GameObject* go = instance->GetGameObject(shrineOfGelihastGUID))
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
break;
case TYPE_AKU_MAI:
- m_auiEncounter[3] = uiData;
- if (uiData == DONE)
- if (GameObject* go = instance->GetGameObject(m_uiAltarOfTheDeepsGUID))
+ encounter[3] = data;
+ if (data == DONE)
+ if (GameObject* go = instance->GetGameObject(altarOfTheDeepsGUID))
{
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
go->SummonCreature(NPC_MORRIDUNE, SpawnsLocation[4], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
}
break;
case DATA_FIRE:
- m_uiCountFires = uiData;
- switch (m_uiCountFires)
+ countFires = data;
+ switch (countFires)
{
case 1:
- if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
+ if (GameObject* go = instance->GetGameObject(shrine1GUID))
{
- pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- pGO->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_AKU_MAI_SNAPJAW, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
}
break;
case 2:
- if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
+ if (GameObject* go = instance->GetGameObject(shrine1GUID))
{
for (uint8 i = 0; i < 2; ++i)
{
- pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- pGO->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_MURKSHALLOW_SOFTSHELL, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
}
}
break;
case 3:
- if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
+ if (GameObject* go = instance->GetGameObject(shrine1GUID))
{
- pGO->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- pGO->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_AKU_MAI_SERVANT, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
}
break;
case 4:
- if (GameObject* pGO = instance->GetGameObject(m_uiShrine1GUID))
+ if (GameObject* go = instance->GetGameObject(shrine1GUID))
{
- pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
- pGO->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
+ go->SummonCreature(NPC_BARBED_CRUSTACEAN, SpawnsLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
}
break;
}
break;
case DATA_EVENT:
- uiDeathTimes = uiData;
- if (uiDeathTimes == 18)
- HandleGameObject(m_uiMainDoorGUID, true);
+ deathTimes = data;
+ if (deathTimes == 18)
+ HandleGameObject(mainDoorGUID, true);
break;
}
}
- uint32 GetData(uint32 uiType)
+ uint32 GetData(uint32 type)
{
- switch (uiType)
+ switch (type)
{
case TYPE_GELIHAST:
- return m_auiEncounter[0];
+ return encounter[0];
case TYPE_KELRIS:
- return m_auiEncounter[1];
+ return encounter[1];
case TYPE_SHRINE:
- return m_auiEncounter[2];
+ return encounter[2];
case TYPE_AKU_MAI:
- return m_auiEncounter[3];
+ return encounter[3];
case DATA_FIRE:
- return m_uiCountFires;
+ return countFires;
case DATA_EVENT:
- return uiDeathTimes;
+ return deathTimes;
}
return 0;
}
- uint64 GetData64(uint32 uiData)
+ uint64 GetData64(uint32 data)
{
- switch (uiData)
+ switch (data)
{
case DATA_TWILIGHT_LORD_KELRIS:
- return m_uiTwilightLordKelrisGUID;
+ return twilightLordKelrisGUID;
case DATA_SHRINE1:
- return m_uiShrine1GUID;
+ return shrine1GUID;
case DATA_SHRINE2:
- return m_uiShrine2GUID;
+ return shrine2GUID;
case DATA_SHRINE3:
- return m_uiShrine3GUID;
+ return shrine3GUID;
case DATA_SHRINE4:
- return m_uiShrine4GUID;
+ return shrine4GUID;
case DATA_SHRINE_OF_GELIHAST:
- return m_uiShrineOfGelihastGUID;
+ return shrineOfGelihastGUID;
case DATA_MAINDOOR:
- return m_uiMainDoorGUID;
+ return mainDoorGUID;
}
return 0;
}
};
-
};
void AddSC_instance_blackfathom_deeps()
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index ad0a36da84e..6cdb794bf5e 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -234,53 +234,53 @@ public:
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
- npc_arthasAI* pAI = CAST_AI(npc_arthas::npc_arthasAI, creature->AI());
+ npc_arthasAI* ai = CAST_AI(npc_arthas::npc_arthasAI, creature->AI());
- if (!pAI)
+ if (!ai)
return false;
switch (action)
{
case GOSSIP_ACTION_INFO_DEF:
- pAI->Start(true, true, player->GetGUID(), 0, false, false);
- pAI->SetDespawnAtEnd(false);
- pAI->bStepping = false;
- pAI->uiStep = 1;
+ ai->Start(true, true, player->GetGUID(), 0, false, false);
+ ai->SetDespawnAtEnd(false);
+ ai->bStepping = false;
+ ai->uiStep = 1;
break;
case GOSSIP_ACTION_INFO_DEF+1:
- pAI->bStepping = true;
- pAI->uiStep = 24;
+ ai->bStepping = true;
+ ai->uiStep = 24;
break;
case GOSSIP_ACTION_INFO_DEF+2:
- pAI->SetHoldState(false);
- pAI->bStepping = false;
- pAI->uiStep = 61;
+ ai->SetHoldState(false);
+ ai->bStepping = false;
+ ai->uiStep = 61;
break;
case GOSSIP_ACTION_INFO_DEF+3:
- pAI->SetHoldState(false);
+ ai->SetHoldState(false);
break;
case GOSSIP_ACTION_INFO_DEF+4:
- pAI->bStepping = true;
- pAI->uiStep = 84;
+ ai->bStepping = true;
+ ai->uiStep = 84;
break;
case GOSSIP_ACTION_INFO_DEF+5:
- pAI->bStepping = true;
- pAI->uiStep = 85;
+ ai->bStepping = true;
+ ai->uiStep = 85;
break;
}
player->CLOSE_GOSSIP_MENU();
- pAI->SetDespawnAtFar(true);
+ ai->SetDespawnAtFar(true);
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
return true;
}
bool OnGossipHello(Player* player, Creature* creature)
{
- npc_arthasAI* pAI = CAST_AI(npc_arthas::npc_arthasAI, creature->AI());
+ npc_arthasAI* ai = CAST_AI(npc_arthas::npc_arthasAI, creature->AI());
- if (pAI && pAI->bStepping == false)
+ if (ai && ai->bStepping == false)
{
- switch (pAI->uiGossipStep)
+ switch (ai->uiGossipStep)
{
case 0: //This one is a workaround since the very beggining of the script is wrong.
{
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
index 0010db68673..74e7a919263 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
@@ -25,9 +25,12 @@ EndScriptData */
#include "ScriptPCH.h"
-#define SPELL_WRATH 21807
-#define SPELL_ENTANGLINGROOTS 12747
-#define SPELL_CORRUPT_FORCES 21968
+enum Spells
+{
+ SPELL_WRATH = 21807,
+ SPELL_ENTANGLINGROOTS = 12747,
+ SPELL_CORRUPT_FORCES = 21968
+};
class celebras_the_cursed : public CreatureScript
{
@@ -41,7 +44,7 @@ public:
struct celebras_the_cursedAI : public ScriptedAI
{
- celebras_the_cursedAI(Creature* c) : ScriptedAI(c) {}
+ celebras_the_cursedAI(Creature* creature) : ScriptedAI(creature) {}
uint32 Wrath_Timer;
uint32 EntanglingRoots_Timer;
@@ -74,14 +77,16 @@ public:
if (target)
DoCast(target, SPELL_WRATH);
Wrath_Timer = 8000;
- } else Wrath_Timer -= diff;
+ }
+ else Wrath_Timer -= diff;
//EntanglingRoots
if (EntanglingRoots_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ENTANGLINGROOTS);
EntanglingRoots_Timer = 20000;
- } else EntanglingRoots_Timer -= diff;
+ }
+ else EntanglingRoots_Timer -= diff;
//CorruptForces
if (CorruptForces_Timer <= diff)
@@ -89,12 +94,12 @@ public:
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_CORRUPT_FORCES);
CorruptForces_Timer = 20000;
- } else CorruptForces_Timer -= diff;
+ }
+ else CorruptForces_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_celebras_the_cursed()
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
index fdb5207acd5..418bf3a09ce 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
@@ -25,9 +25,12 @@ EndScriptData */
#include "ScriptPCH.h"
-#define SPELL_KNOCKAWAY 18670
-#define SPELL_TRAMPLE 5568
-#define SPELL_LANDSLIDE 21808
+enum Spells
+{
+ SPELL_KNOCKAWAY = 18670,
+ SPELL_TRAMPLE = 5568,
+ SPELL_LANDSLIDE = 21808
+};
class boss_landslide : public CreatureScript
{
@@ -41,7 +44,7 @@ public:
struct boss_landslideAI : public ScriptedAI
{
- boss_landslideAI(Creature* c) : ScriptedAI(c) {}
+ boss_landslideAI(Creature* creature) : ScriptedAI(creature) {}
uint32 KnockAway_Timer;
uint32 Trample_Timer;
@@ -68,14 +71,16 @@ public:
{
DoCast(me->getVictim(), SPELL_KNOCKAWAY);
KnockAway_Timer = 15000;
- } else KnockAway_Timer -= diff;
+ }
+ else KnockAway_Timer -= diff;
//Trample_Timer
if (Trample_Timer <= diff)
{
DoCast(me, SPELL_TRAMPLE);
Trample_Timer = 8000;
- } else Trample_Timer -= diff;
+ }
+ else Trample_Timer -= diff;
//Landslide
if (HealthBelowPct(50))
@@ -85,13 +90,13 @@ public:
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_LANDSLIDE);
Landslide_Timer = 60000;
- } else Landslide_Timer -= diff;
+ }
+ else Landslide_Timer -= diff;
}
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_landslide()
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
index 2d4c817ffe2..0e3ee5dc52b 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
@@ -24,9 +24,11 @@ SDCategory: Maraudon
EndScriptData */
#include "ScriptPCH.h"
-
-#define SPELL_TOXICVOLLEY 21687
-#define SPELL_UPPERCUT 22916
+enum Spells
+{
+ SPELL_TOXICVOLLEY = 21687,
+ SPELL_UPPERCUT = 22916
+};
class boss_noxxion : public CreatureScript
{
@@ -40,7 +42,7 @@ public:
struct boss_noxxionAI : public ScriptedAI
{
- boss_noxxionAI(Creature* c) : ScriptedAI(c) {}
+ boss_noxxionAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ToxicVolley_Timer;
uint32 Uppercut_Timer;
@@ -78,7 +80,8 @@ public:
me->SetDisplayId(11172);
Invisible = false;
//me->m_canMove = true;
- } else if (Invisible)
+ }
+ else if (Invisible)
{
Invisible_Timer -= diff;
//Do nothing while invisible
@@ -94,14 +97,16 @@ public:
{
DoCast(me->getVictim(), SPELL_TOXICVOLLEY);
ToxicVolley_Timer = 9000;
- } else ToxicVolley_Timer -= diff;
+ }
+ else ToxicVolley_Timer -= diff;
//Uppercut_Timer
if (Uppercut_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_UPPERCUT);
Uppercut_Timer = 12000;
- } else Uppercut_Timer -= diff;
+ }
+ else Uppercut_Timer -= diff;
//Adds_Timer
if (!Invisible && Adds_Timer <= diff)
@@ -122,12 +127,12 @@ public:
Invisible_Timer = 15000;
Adds_Timer = 40000;
- } else Adds_Timer -= diff;
+ }
+ else Adds_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_noxxion()
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
index cb2c7b320e0..bade5655f36 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
@@ -25,10 +25,13 @@ EndScriptData */
#include "ScriptPCH.h"
-#define SPELL_DUSTFIELD 21909
-#define SPELL_BOULDER 21832
-#define SPELL_THRASH 3391
-#define SPELL_REPULSIVEGAZE 21869
+enum Spells
+{
+ SPELL_DUSTFIELD = 21909,
+ SPELL_BOULDER = 21832,
+ SPELL_THRASH = 3391,
+ SPELL_REPULSIVEGAZE = 21869
+};
class boss_princess_theradras : public CreatureScript
{
@@ -42,7 +45,7 @@ public:
struct boss_ptheradrasAI : public ScriptedAI
{
- boss_ptheradrasAI(Creature* c) : ScriptedAI(c) {}
+ boss_ptheradrasAI(Creature* creature) : ScriptedAI(creature) {}
uint32 Dustfield_Timer;
uint32 Boulder_Timer;
@@ -57,9 +60,7 @@ public:
RepulsiveGaze_Timer = 23000;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void JustDied(Unit* /*killer*/)
{
@@ -76,7 +77,8 @@ public:
{
DoCast(me, SPELL_DUSTFIELD);
Dustfield_Timer = 14000;
- } else Dustfield_Timer -= diff;
+ }
+ else Dustfield_Timer -= diff;
//Boulder_Timer
if (Boulder_Timer <= diff)
@@ -86,26 +88,28 @@ public:
if (target)
DoCast(target, SPELL_BOULDER);
Boulder_Timer = 10000;
- } else Boulder_Timer -= diff;
+ }
+ else Boulder_Timer -= diff;
//RepulsiveGaze_Timer
if (RepulsiveGaze_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_REPULSIVEGAZE);
RepulsiveGaze_Timer = 20000;
- } else RepulsiveGaze_Timer -= diff;
+ }
+ else RepulsiveGaze_Timer -= diff;
//Thrash_Timer
if (Thrash_Timer <= diff)
{
DoCast(me, SPELL_THRASH);
Thrash_Timer = 18000;
- } else Thrash_Timer -= diff;
+ }
+ else Thrash_Timer -= diff;
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_ptheradras()
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index 11100e6297e..3d3eaa1cc87 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -646,7 +646,7 @@ class npc_spinestalker : public CreatureScript
void MovementInform(uint32 type, uint32 point)
{
- if (type != POINT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND)
+ if (type != EFFECT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND)
return;
me->setActive(false);
@@ -761,7 +761,7 @@ class npc_rimefang : public CreatureScript
void MovementInform(uint32 type, uint32 point)
{
- if (type != POINT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND)
+ if (type != EFFECT_MOTION_TYPE || point != POINT_FROSTWYRM_LAND)
return;
me->setActive(false);
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
index 1ab95c53500..0c59097a9ec 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
@@ -390,8 +390,9 @@ public:
{
ingvar->RemoveAurasDueToSpell(SPELL_SCOURG_RESURRECTION_DUMMY);
- if (boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI* pAI = CAST_AI(boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI, ingvar->AI()))
- pAI->StartZombiePhase();
+ if (ingvar->getVictim())
+ if (boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI* ai = CAST_AI(boss_ingvar_the_plunderer::boss_ingvar_the_plundererAI, ingvar->AI()))
+ ai->StartZombiePhase();
me->GetMotionMaster()->MovePoint(2, x+1, y, z+30);
++uiResurectPhase;
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
index dc93917f2e5..94a133c78a6 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
@@ -17,354 +17,323 @@
/* ScriptData
SDName: Boss_Prince_Keleseth
-SD%Complete: 90
-SDComment: Needs Prince Movements, Needs adjustments to blizzlike timers, Needs Shadowbolt castbar, Needs right Ressurect Visual, Needs Some Heroic Spells
+SD%Complete: 100
+SDComment:
SDCategory: Utgarde Keep
EndScriptData */
#include "ScriptPCH.h"
#include "utgarde_keep.h"
-enum eEnums
+enum KelsethEncounter
{
- ACHIEVEMENT_ON_THE_ROCKS = 1919,
-
SPELL_SHADOWBOLT = 43667,
- SPELL_SHADOWBOLT_HEROIC = 59389,
SPELL_FROST_TOMB = 48400,
+ SPELL_FROST_TOMB_STUN = 42672,
SPELL_FROST_TOMB_SUMMON = 42714,
+
+ SPELL_SHADOW_FISSURE = 50657,
+ SPELL_FULL_HEAL = 17683,
SPELL_DECREPIFY = 42702,
- SPELL_SCOURGE_RESSURRECTION = 42704,
- CREATURE_FROSTTOMB = 23965,
- CREATURE_SKELETON = 23970,
-
- SAY_AGGRO = -1574000,
- SAY_FROST_TOMB = -1574001,
- SAY_SKELETONS = -1574002,
- SAY_KILL = -1574003,
- SAY_DEATH = -1574004
+ SPELL_BONE_ARMOR = 59386,
+
+ NPC_FROSTTOMB = 23965,
+ NPC_SKELETON = 23970,
+
+ SAY_START_COMBAT = 1,
+ SAY_SUMMON_SKELETONS,
+ SAY_FROST_TOMB,
+ SAY_FROST_TOMB_EMOTE,
+ SAY_DEATH,
+
+ EVENT_SHADOWBOLT = 1,
+ EVENT_FROST_TOMB,
+ EVENT_SUMMON_SKELETONS,
+
+ EVENT_DECREPIFY,
+ EVENT_FULL_HEAL,
+ EVENT_SHADOW_FISSURE,
+ EVENT_RESURRECT,
+
+ DATA_ON_THE_ROCKS
};
#define SKELETONSPAWN_Z 42.8668f
-float SkeletonSpawnPoint[5][5]=
+float const SkeletonSpawnPoint[1][2] =
{
{156.2559f, 259.2093f},
- {156.2559f, 259.2093f},
- {156.2559f, 259.2093f},
- {156.2559f, 259.2093f},
- {156.2559f, 259.2093f},
};
-float AttackLoc[3]={197.636f, 194.046f, 40.8164f};
+float AttackLoc[3]= {197.636f, 194.046f, 40.8164f};
-bool ShatterFrostTomb; // needed for achievement: On The Rocks(1919)
-
-class mob_frost_tomb : public CreatureScript
+class npc_frost_tomb : public CreatureScript
{
public:
- mob_frost_tomb() : CreatureScript("mob_frost_tomb") { }
+ npc_frost_tomb() : CreatureScript("npc_frost_tomb") {}
CreatureAI* GetAI(Creature* creature) const
{
- return new mob_frost_tombAI(creature);
+ return new npc_frost_tombAI(creature);
}
- struct mob_frost_tombAI : public ScriptedAI
+ struct npc_frost_tombAI : public ScriptedAI
{
- mob_frost_tombAI(Creature* c) : ScriptedAI(c)
+ npc_frost_tombAI(Creature* creature) : ScriptedAI(creature)
{
- FrostTombGUID = 0;
- }
-
- uint64 FrostTombGUID;
+ if (me->isSummon())
+ if (Unit* summon = me->ToTempSummon()->GetSummoner())
+ DoCast(summon, SPELL_FROST_TOMB, true);
- void SetPrisoner(Unit* uPrisoner)
- {
- FrostTombGUID = uPrisoner->GetGUID();
+ instance = creature->GetInstanceScript();
}
- void Reset(){ FrostTombGUID = 0; }
- void EnterCombat(Unit* /*who*/) {}
- void AttackStart(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void UpdateAI(const uint32 /*diff*/) {}
- void JustDied(Unit* killer)
+ void JustDied(Unit* /*killer*/)
{
- if (killer->GetGUID() != me->GetGUID())
- ShatterFrostTomb = true;
-
- if (FrostTombGUID)
- {
- Unit* FrostTomb = Unit::GetUnit((*me), FrostTombGUID);
- if (FrostTomb)
- FrostTomb->RemoveAurasDueToSpell(SPELL_FROST_TOMB);
- }
+ if (instance)
+ if (Unit* boss = me->GetUnit(*me, instance->GetData64(DATA_PRINCEKELESETH)))
+ if (boss->ToCreature() && boss->ToCreature()->AI())
+ boss->ToCreature()->AI()->SetData(DATA_ON_THE_ROCKS, false);
}
- void UpdateAI(const uint32 /*diff*/)
- {
- Unit* temp = Unit::GetUnit((*me), FrostTombGUID);
- if ((temp && temp->isAlive() && !temp->HasAura(SPELL_FROST_TOMB)) || !temp)
- me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- }
+ private:
+ InstanceScript* instance;
};
-
};
class boss_keleseth : public CreatureScript
{
public:
- boss_keleseth() : CreatureScript("boss_keleseth") { }
+ boss_keleseth() : CreatureScript("boss_keleseth") {}
CreatureAI* GetAI(Creature* creature) const
{
return new boss_kelesethAI (creature);
}
- struct boss_kelesethAI : public ScriptedAI
+ struct boss_kelesethAI : public BossAI
{
- boss_kelesethAI(Creature* c) : ScriptedAI(c)
+ boss_kelesethAI(Creature* creature) : BossAI(creature, DATA_PRINCEKELESETH_EVENT)
{
- instance = c->GetInstanceScript();
+ creature->SetReactState(REACT_DEFENSIVE);
}
- InstanceScript* instance;
-
- uint32 FrostTombTimer;
- uint32 SummonSkeletonsTimer;
- uint32 RespawnSkeletonsTimer;
- uint32 ShadowboltTimer;
- uint64 SkeletonGUID[5];
- bool Skeletons;
- bool RespawnSkeletons;
-
void Reset()
{
- ShadowboltTimer = 0;
- Skeletons = false;
+ instance->SetData(DATA_PRINCEKELESETH_EVENT, NOT_STARTED);
- ShatterFrostTomb = false;
+ events.Reset();
+ events.ScheduleEvent(EVENT_SHADOWBOLT, urand(2,3)*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FROST_TOMB, urand(14,19)*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SUMMON_SKELETONS, 6*IN_MILLISECONDS);
- ResetTimer();
+ summons.DespawnAll();
- if (instance)
- instance->SetData(DATA_PRINCEKELESETH_EVENT, NOT_STARTED);
+ onTheRocks = true;
}
- void KilledUnit(Unit* victim)
+ void EnterCombat(Unit* /*who*/)
{
- if (victim == me)
- return;
-
- DoScriptText(SAY_KILL, me);
+ me->SetInCombatWithZone();
+ instance->SetData(DATA_PRINCEKELESETH_EVENT, IN_PROGRESS);
+ Talk(SAY_START_COMBAT);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
-
- if (IsHeroic() && !ShatterFrostTomb)
- {
- AchievementEntry const* AchievOnTheRocks = GetAchievementStore()->LookupEntry(ACHIEVEMENT_ON_THE_ROCKS);
- if (AchievOnTheRocks)
- {
- Map* map = me->GetMap();
- if (map && map->IsDungeon())
- {
- Map::PlayerList const &players = map->GetPlayers();
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- itr->getSource()->CompletedAchievement(AchievOnTheRocks);
- }
- }
- }
-
- if (instance)
- instance->SetData(DATA_PRINCEKELESETH_EVENT, DONE);
+ instance->SetData(DATA_PRINCEKELESETH_EVENT, DONE);
+ summons.DespawnAll();
+ Talk(SAY_DEATH);
}
- void EnterCombat(Unit* /*who*/)
+ void SetData(uint32 data, uint32 value)
{
- DoScriptText(SAY_AGGRO, me);
- DoZoneInCombat();
-
- if (instance)
- instance->SetData(DATA_PRINCEKELESETH_EVENT, IN_PROGRESS);
+ if (data == DATA_ON_THE_ROCKS)
+ onTheRocks = value;
}
- void ResetTimer(uint32 inc = 0)
+ uint32 GetData(uint32 data)
{
- SummonSkeletonsTimer = 5000 + inc;
- FrostTombTimer = 28000 + inc;
+ if (data == DATA_ON_THE_ROCKS)
+ return onTheRocks;
+
+ return 0;
}
- void UpdateAI(const uint32 diff)
+ void ExecuteEvent(uint32 const eventId)
{
- if (!UpdateVictim())
- return;
-
- if (ShadowboltTimer <= diff)
+ switch (eventId)
{
- Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0);
- if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER)
- me->CastSpell(target, DUNGEON_MODE(SPELL_SHADOWBOLT, SPELL_SHADOWBOLT_HEROIC), true);
- ShadowboltTimer = 10000;
- } else ShadowboltTimer -= diff;
-
- if (!Skeletons)
- {
- if ((SummonSkeletonsTimer <= diff))
- {
- Creature* Skeleton;
- DoScriptText(SAY_SKELETONS, me);
- for (uint8 i = 0; i < 5; ++i)
+ case EVENT_SUMMON_SKELETONS:
+ Talk(SAY_SUMMON_SKELETONS);
+ SummonSkeletons();
+ break;
+ case EVENT_SHADOWBOLT:
+ DoCastVictim(SPELL_SHADOWBOLT);
+ events.ScheduleEvent(EVENT_SHADOWBOLT, urand(2,3)*IN_MILLISECONDS);
+ break;
+ case EVENT_FROST_TOMB:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true, -SPELL_FROST_TOMB))
{
- Skeleton = me->SummonCreature(CREATURE_SKELETON, SkeletonSpawnPoint[i][0], SkeletonSpawnPoint[i][1], SKELETONSPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
- if (Skeleton)
- {
- Skeleton->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
- Skeleton->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
- Skeleton->AddThreat(me->getVictim(), 0.0f);
- DoZoneInCombat(Skeleton);
- }
- }
- Skeletons = true;
- } else SummonSkeletonsTimer -= diff;
- }
+ Talk(SAY_FROST_TOMB);
+ Talk(SAY_FROST_TOMB_EMOTE, target->GetGUID());
- if (FrostTombTimer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
- if (target->isAlive())
- {
- //DoCast(target, SPELL_FROST_TOMB_SUMMON, true);
- if (Creature* pChains = me->SummonCreature(CREATURE_FROSTTOMB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000))
- {
- CAST_AI(mob_frost_tomb::mob_frost_tombAI, pChains->AI())->SetPrisoner(target);
- pChains->CastSpell(target, SPELL_FROST_TOMB, true);
-
- DoScriptText(SAY_FROST_TOMB, me);
- }
+ DoCast(target, SPELL_FROST_TOMB_STUN, true);
+ // checked from sniffs - the player casts the spell
+ target->CastSpell(target, SPELL_FROST_TOMB_SUMMON, true);
}
- FrostTombTimer = 15000;
- } else FrostTombTimer -= diff;
+ events.ScheduleEvent(EVENT_FROST_TOMB, urand(14,19)*IN_MILLISECONDS);
+ break;
+ }
+ }
- DoMeleeAttackIfReady();
+ void SummonSkeletons()
+ {
+ // I could not found any spell casted for this
+ for (uint8 i = 0; i < 4; ++i)
+ me->SummonCreature(NPC_SKELETON, SkeletonSpawnPoint[0][0], SkeletonSpawnPoint[0][1], SKELETONSPAWN_Z, 0);
}
+ private:
+ bool onTheRocks;
};
-
};
-class mob_vrykul_skeleton : public CreatureScript
+class npc_vrykul_skeleton : public CreatureScript
{
public:
- mob_vrykul_skeleton() : CreatureScript("mob_vrykul_skeleton") { }
+ npc_vrykul_skeleton() : CreatureScript("npc_vrykul_skeleton") {}
CreatureAI* GetAI(Creature* creature) const
{
- return new mob_vrykul_skeletonAI (creature);
+ return new npc_vrykul_skeletonAI (creature);
}
- struct mob_vrykul_skeletonAI : public ScriptedAI
+ struct npc_vrykul_skeletonAI : public ScriptedAI
{
- mob_vrykul_skeletonAI(Creature* c) : ScriptedAI(c)
- {
- instance = c->GetInstanceScript();
- }
-
- InstanceScript* instance;
- uint32 Respawn_Time;
- uint64 Target_Guid;
- uint32 Decrepify_Timer;
-
- bool isDead;
+ npc_vrykul_skeletonAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
{
- Respawn_Time = 12000;
- Decrepify_Timer = urand(10000, 20000);
- isDead = false;
+ events.Reset();
+ events.ScheduleEvent(EVENT_DECREPIFY, urand(4,6)*IN_MILLISECONDS);
+
+ DoCast(SPELL_BONE_ARMOR);
}
- void EnterCombat(Unit* /*who*/){}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* /*done_by*/, uint32 &damage)
{
- if (done_by->GetGUID() == me->GetGUID())
- return;
-
if (damage >= me->GetHealth())
{
- PretendToDie();
damage = 0;
- }
- }
- void PretendToDie()
- {
- isDead = true;
- me->InterruptNonMeleeSpells(true);
- me->RemoveAllAuras();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->GetMotionMaster()->MovementExpired(false);
- me->GetMotionMaster()->MoveIdle();
- me->SetStandState(UNIT_STAND_STATE_DEAD);
- };
+ // There are some issues with pets
+ // they will still attack. I would say it is a PetAI bug
+ if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
+ {
+ // from sniffs
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
- void Resurrect()
- {
- isDead = false;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetStandState(UNIT_STAND_STATE_STAND);
- DoCast(me, SPELL_SCOURGE_RESSURRECTION, true);
+ events.Reset();
+ events.ScheduleEvent(EVENT_RESURRECT, urand(18,22)*IN_MILLISECONDS);
- if (me->getVictim())
- {
- me->GetMotionMaster()->MoveChase(me->getVictim());
- me->AI()->AttackStart(me->getVictim());
+ me->GetMotionMaster()->MovementExpired(false);
+ me->GetMotionMaster()->MoveIdle();
+ }
}
- else
- me->GetMotionMaster()->Initialize();
- };
+ }
void UpdateAI(const uint32 diff)
{
- if (instance && instance->GetData(DATA_PRINCEKELESETH_EVENT) == IN_PROGRESS)
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STAT_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- if (isDead)
+ switch (eventId)
{
- if (Respawn_Time <= diff)
- {
- Resurrect();
- Respawn_Time = 12000;
- } else Respawn_Time -= diff;
+ case EVENT_DECREPIFY:
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_DECREPIFY), SPELL_DECREPIFY);
+ events.ScheduleEvent(EVENT_DECREPIFY, urand(1,5)*IN_MILLISECONDS);
+ break;
+ case EVENT_RESURRECT:
+ events.ScheduleEvent(EVENT_FULL_HEAL, 1*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SHADOW_FISSURE, 1*IN_MILLISECONDS);
+ break;
+ case EVENT_FULL_HEAL:
+ DoCast(me, SPELL_FULL_HEAL, true);
+ break;
+ case EVENT_SHADOW_FISSURE:
+ DoCast(me, SPELL_SHADOW_FISSURE, true);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
+ me->GetMotionMaster()->MoveChase(me->getVictim());
+ events.ScheduleEvent(EVENT_DECREPIFY, urand(4,6)*IN_MILLISECONDS);
+ break;
}
- else
- {
- if (!UpdateVictim())
- return;
+ }
- if (Decrepify_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_DECREPIFY);
- Decrepify_Timer = 30000;
- } else Decrepify_Timer -= diff;
+ if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
+ DoMeleeAttackIfReady();
+ }
- DoMeleeAttackIfReady();
- }
- }else
+ private:
+ EventMap events;
+ };
+};
+
+class spell_frost_tomb : public SpellScriptLoader
+{
+ public:
+ spell_frost_tomb() : SpellScriptLoader("spell_frost_tomb") {}
+
+ class spell_frost_tomb_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_frost_tomb_AuraScript);
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- if (me->isAlive())
- me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH)
+ if (Unit* caster = GetCaster())
+ if (caster->ToCreature() && caster->isAlive())
+ caster->ToCreature()->DespawnOrUnsummon(1000);
}
+ void Register()
+ {
+ AfterEffectRemove += AuraEffectRemoveFn(spell_frost_tomb_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_frost_tomb_AuraScript();
}
- };
+};
+
+
+class achievement_on_the_rocks : public AchievementCriteriaScript
+{
+ public:
+ achievement_on_the_rocks() : AchievementCriteriaScript("achievement_on_the_rocks") {}
+ bool OnCheck(Player* /*source*/, Unit* target)
+ {
+ return target && target->IsAIEnabled && target->GetAI()->GetData(DATA_ON_THE_ROCKS);
+ }
};
void AddSC_boss_keleseth()
{
new boss_keleseth();
- new mob_frost_tomb();
- new mob_vrykul_skeleton();
+ new npc_frost_tomb();
+ new npc_vrykul_skeleton();
+ new spell_frost_tomb();
+ new achievement_on_the_rocks();
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
index 542243293de..5c1ec15030c 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
@@ -276,7 +276,7 @@ public:
me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
- void JustDied(Unit* killer)
+ void JustDied(Unit* /*killer*/)
{
summons.DespawnAll();
@@ -285,8 +285,8 @@ public:
Talk(SAY_DEATH);
}
-
- void SpellHitTarget(Unit* target, const SpellInfo* spell)
+
+ void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell)
{
if (spell->Id == SPELL_RITUAL_STRIKE_EFF_1 && Phase != NORMAL && Phase != SVALADEAD)
{
diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp
index 28384455616..91522503d65 100644
--- a/src/server/scripts/Northrend/icecrown.cpp
+++ b/src/server/scripts/Northrend/icecrown.cpp
@@ -115,38 +115,6 @@ public:
};
/*######
-## npc_dame_evniki_kapsalis
-######*/
-
-enum eDameEnvikiKapsalis
-{
- TITLE_CRUSADER = 123
-};
-
-class npc_dame_evniki_kapsalis : public CreatureScript
-{
-public:
- npc_dame_evniki_kapsalis() : CreatureScript("npc_dame_evniki_kapsalis") { }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (player->HasTitle(TITLE_CRUSADER))
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
- return true;
- }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- if (uiAction == GOSSIP_ACTION_TRADE)
- player->GetSession()->SendListInventory(creature->GetGUID());
- return true;
- }
-};
-
-/*######
## npc_squire_david
######*/
@@ -276,65 +244,6 @@ public:
};
/*######
-## npc_alorah_and_grimmin
-######*/
-
-enum ealorah_and_grimmin
-{
- SPELL_CHAIN = 68341,
- NPC_FJOLA_LIGHTBANE = 36065,
- NPC_EYDIS_DARKBANE = 36066,
- NPC_PRIESTESS_ALORAH = 36101,
- NPC_PRIEST_GRIMMIN = 36102
-};
-
-class npc_alorah_and_grimmin : public CreatureScript
-{
-public:
- npc_alorah_and_grimmin() : CreatureScript("npc_alorah_and_grimmin") { }
-
- struct npc_alorah_and_grimminAI : public ScriptedAI
- {
- npc_alorah_and_grimminAI(Creature* creature) : ScriptedAI(creature) {}
-
- bool uiCast;
-
- void Reset()
- {
- uiCast = false;
- }
-
- void UpdateAI(const uint32 /*uiDiff*/)
- {
- if (uiCast)
- return;
- uiCast = true;
- Creature* target = NULL;
-
- switch (me->GetEntry())
- {
- case NPC_PRIESTESS_ALORAH:
- target = me->FindNearestCreature(NPC_EYDIS_DARKBANE, 10.0f);
- break;
- case NPC_PRIEST_GRIMMIN:
- target = me->FindNearestCreature(NPC_FJOLA_LIGHTBANE, 10.0f);
- break;
- }
- if (target)
- DoCast(target, SPELL_CHAIN);
-
- if (!UpdateVictim())
- return;
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_alorah_and_grimminAI(creature);
- }
-};
-
-/*######
## npc_guardian_pavilion
######*/
@@ -429,10 +338,8 @@ public:
void AddSC_icecrown()
{
new npc_arete;
- new npc_dame_evniki_kapsalis;
new npc_squire_david;
new npc_argent_valiant;
- new npc_alorah_and_grimmin;
new npc_guardian_pavilion;
new npc_vereth_the_cunning;
}
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
index 070c107e61d..ed818fb13be 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
@@ -17,6 +17,9 @@
//! TODO - Boss not scripted, just ported required spellscript from core
+#include "ScriptMgr.h"
+#include "SpellScript.h"
+
enum Spells
{
SPELL_POSITIVE_CHARGE = 39090,
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 5a0ffbd2c90..b40879d500e 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -1128,6 +1128,51 @@ class spell_magic_eater_food : public SpellScriptLoader
}
};
+enum Refocus
+{
+ SPELL_AIMED_SHOT = 19434,
+ SPELL_MULTISHOT = 2643,
+ SPELL_VOLLEY = 42243,
+};
+
+class spell_item_refocus : public SpellScriptLoader
+{
+ public:
+ spell_item_refocus() : SpellScriptLoader("spell_item_refocus") { }
+
+ class spell_item_refocus_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_refocus_SpellScript);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+
+ if (!caster || caster->getClass() != CLASS_HUNTER)
+ return;
+
+ if (caster->HasSpellCooldown(SPELL_AIMED_SHOT))
+ caster->RemoveSpellCooldown(SPELL_AIMED_SHOT, true);
+
+ if (caster->HasSpellCooldown(SPELL_MULTISHOT))
+ caster->RemoveSpellCooldown(SPELL_MULTISHOT, true);
+
+ if (caster->HasSpellCooldown(SPELL_VOLLEY))
+ caster->RemoveSpellCooldown(SPELL_VOLLEY, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_refocus_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_refocus_SpellScript();
+ }
+};
+
void AddSC_item_spell_scripts()
{
// 23074 Arcanite Dragonling
@@ -1160,4 +1205,5 @@ void AddSC_item_spell_scripts()
new spell_item_ashbringer();
new spell_magic_eater_food();
+ new spell_item_refocus();
}
diff --git a/src/server/shared/Cryptography/HMACSHA1.cpp b/src/server/shared/Cryptography/HMACSHA1.cpp
index 3f21aa4582d..447d0b58efc 100755
--- a/src/server/shared/Cryptography/HMACSHA1.cpp
+++ b/src/server/shared/Cryptography/HMACSHA1.cpp
@@ -18,6 +18,7 @@
#include "HMACSHA1.h"
#include "BigNumber.h"
+#include "Common.h"
HmacHash::HmacHash(uint32 len, uint8 *seed)
{
diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt
index 60adce41326..e2b70c9c673 100644
--- a/src/server/worldserver/CMakeLists.txt
+++ b/src/server/worldserver/CMakeLists.txt
@@ -108,6 +108,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/game/Grids
${CMAKE_SOURCE_DIR}/src/server/game/Groups
${CMAKE_SOURCE_DIR}/src/server/game/Guilds
+ ${CMAKE_SOURCE_DIR}/src/server/game/Handlers
${CMAKE_SOURCE_DIR}/src/server/game/Instances
${CMAKE_SOURCE_DIR}/src/server/game/Loot
${CMAKE_SOURCE_DIR}/src/server/game/Mails
@@ -123,7 +124,6 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/game/Reputation
${CMAKE_SOURCE_DIR}/src/server/game/Scripting
${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol
- ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol/Handlers
${CMAKE_SOURCE_DIR}/src/server/game/Server
${CMAKE_SOURCE_DIR}/src/server/game/Skills
${CMAKE_SOURCE_DIR}/src/server/game/Spells