diff options
author | Shauren <shauren.trinity@gmail.com> | 2017-05-18 23:52:58 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-05-18 23:53:25 +0200 |
commit | c5d3dd90bea3889ef5fcd33c9ef0d59d7c544f8a (patch) | |
tree | aa7fde6f924fc39da54908bd6eeeb0be422e5fc3 /src/server/scripts | |
parent | 74456703146194de72424ec98c4ea76402077be6 (diff) |
Core/Game: Include cleanup
* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
Diffstat (limited to 'src/server/scripts')
83 files changed, 242 insertions, 159 deletions
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 5c8332beba8..bfb9897cbf3 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -24,10 +24,12 @@ EndScriptData */ #include "AccountMgr.h" #include "Chat.h" +#include "DatabaseEnv.h" #include "Language.h" #include "Log.h" #include "Player.h" #include "ScriptMgr.h" +#include "World.h" #include <boost/asio/ip/address_v4.hpp> class account_commandscript : public CommandScript diff --git a/src/server/scripts/Commands/cs_arena.cpp b/src/server/scripts/Commands/cs_arena.cpp index 8ffb641d7d3..10194b7c896 100644 --- a/src/server/scripts/Commands/cs_arena.cpp +++ b/src/server/scripts/Commands/cs_arena.cpp @@ -22,10 +22,11 @@ Comment: All arena team related commands Category: commandscripts EndScriptData */ -#include "ObjectMgr.h" +#include "ArenaTeamMgr.h" #include "Chat.h" #include "Language.h" -#include "ArenaTeamMgr.h" +#include "Log.h" +#include "ObjectMgr.h" #include "Player.h" #include "ScriptMgr.h" diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp index 3d1b5982523..c81ca30355b 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -24,11 +24,13 @@ EndScriptData */ #include "AccountMgr.h" #include "Chat.h" +#include "DatabaseEnv.h" #include "Language.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Player.h" #include "ScriptMgr.h" +#include "World.h" class ban_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_battlenet_account.cpp b/src/server/scripts/Commands/cs_battlenet_account.cpp index c62db6d774b..6365cdc4b17 100644 --- a/src/server/scripts/Commands/cs_battlenet_account.cpp +++ b/src/server/scripts/Commands/cs_battlenet_account.cpp @@ -15,9 +15,11 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "BattlenetAccountMgr.h" #include "AccountMgr.h" +#include "BattlenetAccountMgr.h" +#include "BigNumber.h" #include "Chat.h" +#include "DatabaseEnv.h" #include "Language.h" #include "Log.h" #include "Player.h" diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index f0151fca3d6..51ee5c0b313 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -24,11 +24,14 @@ EndScriptData */ #include "AccountMgr.h" #include "Chat.h" +#include "DatabaseEnv.h" +#include "Log.h" #include "ObjectMgr.h" #include "PlayerDump.h" #include "Player.h" #include "ReputationMgr.h" #include "ScriptMgr.h" +#include "World.h" class character_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index be738602fe3..f98d5e35a4c 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -22,24 +22,24 @@ Comment: All debug related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" #include "BattlefieldMgr.h" #include "BattlegroundMgr.h" -#include "Chat.h" #include "Cell.h" #include "CellImpl.h" +#include "Chat.h" #include "Conversation.h" +#include "GossipDef.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "GossipDef.h" -#include "M2Stores.h" -#include "Transport.h" #include "Language.h" +#include "Log.h" +#include "M2Stores.h" #include "MapManager.h" #include "MovementPackets.h" +#include "ObjectMgr.h" +#include "ScriptMgr.h" #include "SpellPackets.h" - +#include "Transport.h" #include <fstream> #include <limits> @@ -379,26 +379,6 @@ public: parsedStream >> val6; data << val6; } - else if (type == "appitsguid") - { - data << unit->GetPackGUID(); - } - else if (type == "appmyguid") - { - data << player->GetPackGUID(); - } - else if (type == "appgoguid") - { - GameObject* obj = handler->GetNearbyGameObject(); - if (!obj) - { - handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, UI64LIT(0)); - handler->SetSentErrorMessage(true); - ifs.close(); - return false; - } - data << obj->GetPackGUID(); - } else if (type == "goguid") { GameObject* obj = handler->GetNearbyGameObject(); diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp index 0349f4eb83f..6c1df3910c5 100644 --- a/src/server/scripts/Commands/cs_disable.cpp +++ b/src/server/scripts/Commands/cs_disable.cpp @@ -22,9 +22,10 @@ Comment: All disable related commands Category: commandscripts EndScriptData */ -#include "DisableMgr.h" -#include "CriteriaHandler.h" #include "Chat.h" +#include "CriteriaHandler.h" +#include "DatabaseEnv.h" +#include "DisableMgr.h" #include "Language.h" #include "ObjectMgr.h" #include "OutdoorPvP.h" diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index 17abb11f790..a625b9d3a33 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -22,14 +22,16 @@ Comment: All gm related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" -#include "Chat.h" #include "AccountMgr.h" +#include "Chat.h" +#include "DatabaseEnv.h" #include "Language.h" -#include "World.h" -#include "Player.h" +#include "ObjectMgr.h" #include "Opcodes.h" +#include "Player.h" +#include "Realm.h" +#include "ScriptMgr.h" +#include "World.h" #include <boost/thread/shared_mutex.hpp> #include <boost/thread/locks.hpp> diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index edb9dc7440f..802f8830ff8 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -22,13 +22,14 @@ Comment: All go related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" -#include "MapManager.h" -#include "SupportMgr.h" #include "Chat.h" +#include "DatabaseEnv.h" #include "Language.h" +#include "MapManager.h" +#include "ObjectMgr.h" #include "Player.h" +#include "ScriptMgr.h" +#include "SupportMgr.h" #include "Transport.h" class go_commandscript : public CommandScript diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 016fc358468..9fafa61be20 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -22,15 +22,17 @@ Comment: All gobject related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "GameEventMgr.h" -#include "ObjectMgr.h" -#include "PoolMgr.h" -#include "MapManager.h" #include "Chat.h" +#include "DatabaseEnv.h" +#include "GameEventMgr.h" #include "Language.h" -#include "Player.h" +#include "Log.h" +#include "MapManager.h" +#include "ObjectMgr.h" #include "Opcodes.h" +#include "Player.h" +#include "PoolMgr.h" +#include "ScriptMgr.h" class gobject_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index 981bfcf852c..8abad46babe 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -16,11 +16,12 @@ */ #include "Chat.h" +#include "DatabaseEnv.h" +#include "GroupMgr.h" #include "Language.h" #include "LFG.h" -#include "Player.h" #include "ObjectMgr.h" -#include "GroupMgr.h" +#include "Player.h" #include "ScriptMgr.h" class group_commandscript : public CommandScript diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index a2c722082b3..d21357a8ef9 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "Guild.h" #include "GuildMgr.h" #include "ObjectAccessor.h" +#include "ObjectMgr.h" #include "ScriptMgr.h" #include <iomanip> diff --git a/src/server/scripts/Commands/cs_lfg.cpp b/src/server/scripts/Commands/cs_lfg.cpp index 66144be75b6..07123744e18 100644 --- a/src/server/scripts/Commands/cs_lfg.cpp +++ b/src/server/scripts/Commands/cs_lfg.cpp @@ -15,14 +15,15 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptMgr.h" #include "Chat.h" +#include "DatabaseEnv.h" +#include "Group.h" +#include "GroupMgr.h" #include "Language.h" #include "LFGMgr.h" #include "ObjectMgr.h" -#include "Group.h" -#include "GroupMgr.h" #include "Player.h" +#include "ScriptMgr.h" void GetPlayerInfo(ChatHandler* handler, Player* player) { diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index cc61406ebdf..c324c292463 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -22,14 +22,14 @@ Comment: All list related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" #include "Chat.h" -#include "SpellAuraEffects.h" +#include "DatabaseEnv.h" #include "Language.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Player.h" -#include <iostream> +#include "ScriptMgr.h" +#include "SpellAuraEffects.h" class list_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 18e15346679..19fa8fde081 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -24,6 +24,7 @@ EndScriptData */ #include "AccountMgr.h" #include "Chat.h" +#include "DatabaseEnv.h" #include "GameEventMgr.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" @@ -31,6 +32,7 @@ EndScriptData */ #include "ReputationMgr.h" #include "ScriptMgr.h" #include "SpellInfo.h" +#include "World.h" class lookup_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp index 85c7c5edafa..e9c681f1904 100644 --- a/src/server/scripts/Commands/cs_message.cpp +++ b/src/server/scripts/Commands/cs_message.cpp @@ -22,13 +22,15 @@ Comment: All message related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" #include "Chat.h" #include "Channel.h" #include "ChannelMgr.h" +#include "DatabaseEnv.h" #include "Language.h" #include "Player.h" #include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "World.h" class message_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 3a57c4ccd69..35fe2ed5e89 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -15,32 +15,37 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "DB2Stores.h" -#include "Chat.h" -#include "ScriptMgr.h" #include "AccountMgr.h" #include "ArenaTeamMgr.h" #include "CellImpl.h" +#include "Chat.h" +#include "DatabaseEnv.h" +#include "DB2Stores.h" +#include "DisableMgr.h" #include "GridNotifiers.h" #include "Group.h" +#include "GroupMgr.h" #include "InstanceSaveMgr.h" #include "Language.h" +#include "LFG.h" +#include "Log.h" +#include "MapManager.h" +#include "MiscPackets.h" +#include "MMapFactory.h" #include "MovementGenerator.h" #include "ObjectAccessor.h" #include "Opcodes.h" -#include "SpellAuras.h" -#include "TargetedMovementGenerator.h" -#include "WeatherMgr.h" -#include "Player.h" #include "Pet.h" -#include "LFG.h" -#include "GroupMgr.h" -#include "MMapFactory.h" -#include "DisableMgr.h" +#include "Player.h" +#include "Realm.h" +#include "ScriptMgr.h" +#include "SpellAuras.h" #include "SpellHistory.h" -#include "MiscPackets.h" +#include "TargetedMovementGenerator.h" #include "Transport.h" -#include "MapManager.h" +#include "Weather.h" +#include "WeatherMgr.h" +#include "World.h" #include <boost/asio/ip/address_v4.hpp> // temporary hack until database includes are sorted out (don't want to pull in Windows.h everywhere from mysql.h) @@ -186,7 +191,7 @@ public: { case HighGuid::Player: { - object = sObjectMgr->GetPlayerByLowGUID(guidLow); + object = ObjectAccessor::FindConnectedPlayer(ObjectGuid::Create<HighGuid::Player>(guidLow)); if (!object) { handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); @@ -823,7 +828,7 @@ public: { case HighGuid::Player: { - object = sObjectMgr->GetPlayerByLowGUID(guidLow); + object = ObjectAccessor::GetPlayer(*handler->GetSession()->GetPlayer(), ObjectGuid::Create<HighGuid::Player>(guidLow)); if (!object) { handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); @@ -1358,7 +1363,7 @@ public: return false; } - Item* item = playerTarget->StoreNewItem(dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId), GuidSet(), 0, bonusListIDs); + Item* item = playerTarget->StoreNewItem(dest, itemId, true, GenerateItemRandomPropertyId(itemId), GuidSet(), 0, bonusListIDs); // remove binding (let GM give it to another player later) if (player == playerTarget) diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 4071a8f4ed2..bc8940a88a1 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -23,7 +23,7 @@ Category: commandscripts EndScriptData */ #include "Chat.h" -#include "ObjectMgr.h" +#include "Log.h" #include "Opcodes.h" #include "Pet.h" #include "Player.h" @@ -741,14 +741,14 @@ public: target->Mount(mId); WorldPacket data(SMSG_MOVE_SET_RUN_SPEED, (8+4+1+4)); - data << target->GetPackGUID(); + data << target->GetGUID(); data << (uint32)0; data << (uint8)0; //new 2.1.0 data << float(speed); target->SendMessageToSet(&data, true); data.Initialize(SMSG_MOVE_SET_SWIM_SPEED, (8+4+4)); - data << target->GetPackGUID(); + data << target->GetGUID(); data << (uint32)0; data << float(speed); target->SendMessageToSet(&data, true); diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index ec7835b5654..34f77727ca3 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -22,16 +22,19 @@ Comment: All npc related commands Category: commandscripts EndScriptData */ -#include "ScriptMgr.h" -#include "ObjectMgr.h" #include "Chat.h" -#include "Transport.h" +#include "CreatureAI.h" #include "CreatureGroups.h" +#include "DatabaseEnv.h" #include "Language.h" -#include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand -#include "CreatureAI.h" -#include "Player.h" +#include "Log.h" +#include "ObjectMgr.h" #include "Pet.h" +#include "Player.h" +#include "ScriptMgr.h" +#include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand +#include "Transport.h" +#include "World.h" template<typename E, typename T = char const*> struct EnumName diff --git a/src/server/scripts/Commands/cs_pet.cpp b/src/server/scripts/Commands/cs_pet.cpp index c82129ca7ec..7591600365a 100644 --- a/src/server/scripts/Commands/cs_pet.cpp +++ b/src/server/scripts/Commands/cs_pet.cpp @@ -17,6 +17,7 @@ #include "Chat.h" #include "Language.h" +#include "Log.h" #include "Pet.h" #include "Player.h" #include "ObjectMgr.h" diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 6f377270ae4..5234b3c240b 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -23,10 +23,12 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "DatabaseEnv.h" #include "ObjectMgr.h" #include "Player.h" #include "ReputationMgr.h" #include "ScriptMgr.h" +#include "World.h" class quest_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_rbac.cpp b/src/server/scripts/Commands/cs_rbac.cpp index eb646d8bcd8..a07bc32fd38 100644 --- a/src/server/scripts/Commands/cs_rbac.cpp +++ b/src/server/scripts/Commands/cs_rbac.cpp @@ -23,11 +23,13 @@ Category: commandscripts EndScriptData */ #include "AccountMgr.h" -#include "Config.h" #include "Chat.h" +#include "Config.h" #include "Language.h" #include "Player.h" +#include "Realm.h" #include "ScriptMgr.h" +#include "World.h" struct RBACCommandData { diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 2732d6d8be7..5c467c9e021 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -31,9 +31,12 @@ EndScriptData */ #include "Chat.h" #include "ConversationDataStore.h" #include "CreatureTextMgr.h" +#include "DatabaseEnv.h" #include "DisableMgr.h" #include "Language.h" #include "LFGMgr.h" +#include "Log.h" +#include "LootMgr.h" #include "MapManager.h" #include "ObjectMgr.h" #include "ScriptMgr.h" diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index f94a0220a3c..ebce9ccd9c4 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -24,12 +24,14 @@ EndScriptData */ #include "AchievementMgr.h" #include "Chat.h" +#include "DatabaseEnv.h" #include "Language.h" #include "Log.h" #include "ObjectAccessor.h" #include "Player.h" #include "Pet.h" #include "ScriptMgr.h" +#include "World.h" #include <boost/thread/shared_mutex.hpp> #include <boost/thread/locks.hpp> diff --git a/src/server/scripts/Commands/cs_send.cpp b/src/server/scripts/Commands/cs_send.cpp index 2a35b190bbe..724a1ef7567 100644 --- a/src/server/scripts/Commands/cs_send.cpp +++ b/src/server/scripts/Commands/cs_send.cpp @@ -16,6 +16,7 @@ */ #include "Chat.h" +#include "DatabaseEnv.h" #include "Language.h" #include "Pet.h" #include "Player.h" diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index b807ee30bfa..d02e3da9208 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -24,13 +24,14 @@ EndScriptData */ #include "Chat.h" #include "Config.h" +#include "GitRevision.h" #include "Language.h" #include "Log.h" #include "ObjectAccessor.h" #include "Player.h" #include "ScriptMgr.h" -#include "GitRevision.h" #include "Util.h" +#include "World.h" class server_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index 5579080a648..c910b942bbf 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -23,6 +23,7 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "DatabaseEnv.h" #include "Group.h" #include "Language.h" #include "MapManager.h" diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index f9a0cef1c66..1f305b8983f 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -29,8 +29,10 @@ EndScriptData */ #include "ObjectMgr.h" #include "Opcodes.h" #include "Player.h" +#include "Realm.h" #include "ScriptMgr.h" #include "SupportMgr.h" +#include "World.h" class ticket_commandscript : public CommandScript { diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index 6aac5045d78..620b68950a4 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -23,6 +23,7 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "DatabaseEnv.h" #include "Language.h" #include "ObjectMgr.h" #include "Player.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp index 5692c2c39c3..4e3d446fd73 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp @@ -21,6 +21,7 @@ #include "ScriptedGossip.h" #include "blackrock_depths.h" #include "Player.h" +#include "Log.h" #include "WorldSession.h" //go_shadowforge_brazier diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp index 9eb10fc9a8b..e6e5bf78608 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp @@ -19,6 +19,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "InstanceScript.h" +#include "Log.h" #include "blackrock_depths.h" #define TIMER_TOMBOFTHESEVEN 15000 diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index 9a8ec451232..5e88f66e1d0 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "gnomeregan.h" +#include "Log.h" #include "Player.h" #define MAX_ENCOUNTER 1 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index c151eda2075..bf231e8cae5 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -29,6 +29,7 @@ EndScriptData */ #include "karazhan.h" #include "Player.h" #include "SpellInfo.h" +#include "Log.h" /***********************************/ /*** OPERA WIZARD OF OZ EVENT *****/ diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index d45fa9fc9b2..5b5001c5c8b 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "karazhan.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "Log.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index 5a979c379a6..d552d455cf8 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -253,7 +253,7 @@ public: unit->CastSpell(unit, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, me->GetGUID()); // Use packet hack WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12); - data << unit->GetPackGUID(); + data << unit->GetGUID(); data << uint32(0); unit->SendMessageToSet(&data, true); } @@ -273,7 +273,7 @@ public: unit->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT); WorldPacket data(SMSG_MOVE_UNSET_CAN_FLY, 12); - data << unit->GetPackGUID(); + data << unit->GetGUID(); data << uint32(0); unit->SendMessageToSet(&data, true); } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 40dee62d459..9fe6e9c7721 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -27,6 +27,7 @@ #include "SpellInfo.h" #include "CreatureTextMgr.h" #include "MoveSplineInit.h" +#include "Log.h" /*###### ##Quest 12848 diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index 9e84eb6f59e..386cdd53b88 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "InstanceScript.h" #include "shadowfang_keep.h" #include "TemporarySummon.h" +#include "Log.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index e0edf1d189c..2fa3e298109 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "InstanceScript.h" #include "stratholme.h" #include "Player.h" +#include "Log.h" enum Misc { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index bde2a220398..7dc575526c9 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -22,6 +22,7 @@ SD%Complete: 80 SDComment: Find a way to start the intro, best code for the intro EndScriptData */ +#include "Log.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "sunwell_plateau.h" diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 299293088ba..9e495c1086c 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -23,6 +23,7 @@ SDComment: SDCategory: Sunwell_Plateau EndScriptData */ +#include "Log.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "sunwell_plateau.h" diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index fb587cdd6e5..e7bac5ec171 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -24,11 +24,12 @@ EndScriptData */ /// @todo rewrite Armageddon +#include "Log.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "sunwell_plateau.h" -#include <math.h> #include "Player.h" +#include <cmath> /*** Speech and sounds***/ enum Yells diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index 1976aab174d..1a7e3045b3e 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -17,6 +17,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" +#include "Log.h" #include "Player.h" #include "sunwell_plateau.h" diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index 4d9c852b44f..b21235b4293 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "InstanceScript.h" #include "uldaman.h" #include "CreatureAI.h" +#include "Log.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp b/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp index 5360a4fbbb8..04cc5c5badf 100644 --- a/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp +++ b/src/server/scripts/EasternKingdoms/zone_tol_barad.cpp @@ -15,15 +15,16 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "Battlefield.h" #include "BattlefieldMgr.h" #include "BattlefieldTB.h" -#include "Battlefield.h" -#include "ScriptSystem.h" -#include "WorldSession.h" +#include "Player.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "ScriptMgr.h" +#include "ScriptSystem.h" #include "SpellScript.h" -#include "Player.h" +#include "WorldSession.h" enum TBSpiritGuide { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp index a0459e9eaf1..6c22a3c716e 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp @@ -34,6 +34,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "hyjalAI.h" #include "Player.h" +#include "Log.h" #define GOSSIP_ITEM_BEGIN_ALLY "My companions and I are with you, Lady Proudmoore." #define GOSSIP_ITEM_ANETHERON "We are ready for whatever Archimonde might send our way, Lady Proudmoore." diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index ef63e45e904..52db6e7d9ba 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -30,6 +30,7 @@ EndScriptData */ #include "GridNotifiersImpl.h" #include "Cell.h" #include "CellImpl.h" +#include "Log.h" #include "hyjalAI.h" #include "hyjal_trash.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 7900359d803..39dfcabc6ea 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "InstanceScript.h" #include "ScriptedCreature.h" #include "hyjal.h" +#include "Log.h" /* Battle of Mount Hyjal encounters: 0 - Rage Winterchill event diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp index 5e4c9c0ed0e..ee798819ee6 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "InstanceScript.h" #include "old_hillsbrad.h" #include "Player.h" +#include "Log.h" #define MAX_ENCOUNTER 6 diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp index 053b670c254..81990a81fb3 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp @@ -30,6 +30,7 @@ Category: Caverns of Time, The Black Morass #include "TemporarySummon.h" #include "SpellInfo.h" #include "ScriptedCreature.h" +#include "Log.h" enum Misc { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp index e4c63e3941f..e164b6ca2fa 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp @@ -35,6 +35,7 @@ EndContentData */ #include "the_black_morass.h" #include "Player.h" #include "SpellInfo.h" +#include "Log.h" enum MedivhBm { diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp index 2ab9b1ec66c..dc0bbd57255 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "InstanceScript.h" #include "razorfen_kraul.h" #include "Player.h" +#include "Log.h" #define WARD_KEEPERS_NR 2 diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index 4287e247943..8a111f1de10 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -15,14 +15,14 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ruins_of_ahnqiraj.h" +#include "MiscPackets.h" #include "Player.h" +#include "ruins_of_ahnqiraj.h" +#include "ScriptedCreature.h" +#include "ScriptMgr.h" #include "SpellInfo.h" +#include "Weather.h" #include "WorldPacket.h" -#include "Opcodes.h" -#include "Packets/MiscPackets.h" enum Texts { diff --git a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp index 672bae016c1..c5a360258c6 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp @@ -23,8 +23,9 @@ SDComment: Everything seems to work, still need some checking SDCategory: Wailing Caverns EndScriptData */ -#include "ScriptMgr.h" +#include "Log.h" #include "InstanceScript.h" +#include "ScriptMgr.h" #include "wailing_caverns.h" #define MAX_ENCOUNTER 9 diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index 0a7695eaf13..6a06ff3f7be 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -36,10 +36,9 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" -#include "Cell.h" #include "CellImpl.h" #include "GridNotifiersImpl.h" -#include "GridNotifiers.h" +#include "Log.h" /*###### ## npc_draenei_survivor diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp index d05c2c303a4..48db0ee6e4e 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp @@ -26,6 +26,7 @@ EndScriptData */ #include "InstanceScript.h" #include "trial_of_the_champion.h" #include "Player.h" +#include "Log.h" #define MAX_ENCOUNTER 4 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index c364e396c7f..eafad7be015 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -16,10 +16,11 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptMgr.h" #include "InstanceScript.h" -#include "trial_of_the_crusader.h" +#include "Log.h" #include "Player.h" +#include "ScriptMgr.h" +#include "trial_of_the_crusader.h" #include "TemporarySummon.h" BossBoundaryData const boundaries = { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 95e42ab8569..5f2e364dbfc 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -15,19 +15,18 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "CellImpl.h" +#include "CreatureTextMgr.h" +#include "GridNotifiersImpl.h" +#include "icecrown_citadel.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" -#include "SpellScript.h" -#include "SpellAuraEffects.h" +#include "ScriptMgr.h" #include "Spell.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" #include "Vehicle.h" -#include "Cell.h" -#include "CellImpl.h" -#include "GridNotifiers.h" -#include "GridNotifiersImpl.h" -#include "CreatureTextMgr.h" -#include "icecrown_citadel.h" +#include "Weather.h" enum Texts { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index 573ce8a53c5..4a548395b68 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -18,6 +18,7 @@ #ifndef ICECROWN_CITADEL_H_ #define ICECROWN_CITADEL_H_ +#include "ScriptMgr.h" #include "SpellScript.h" #define ICCScriptName "instance_icecrown_citadel" diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index 2231b1e2515..864e4d85438 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -15,12 +15,13 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "Log.h" +#include "naxxramas.h" #include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "SpellAuraEffects.h" -#include "naxxramas.h" enum Horseman { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index 6888bb6ac9b..a0615886611 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -21,6 +21,7 @@ #include "GridNotifiers.h" #include "CombatAI.h" #include "AreaBoundary.h" +#include "Log.h" #include "naxxramas.h" /* Constants */ diff --git a/src/server/scripts/Northrend/zone_dalaran.cpp b/src/server/scripts/Northrend/zone_dalaran.cpp index db440f7d060..37777af0e57 100644 --- a/src/server/scripts/Northrend/zone_dalaran.cpp +++ b/src/server/scripts/Northrend/zone_dalaran.cpp @@ -23,6 +23,7 @@ SDComment: For what is 63990+63991? Same function but don't work correct... SDCategory: Dalaran Script Data End */ +#include "DatabaseEnv.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp index a9df87a3969..ac145753f3c 100644 --- a/src/server/scripts/Northrend/zone_wintergrasp.cpp +++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp @@ -15,18 +15,19 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "Battlefield.h" #include "BattlefieldMgr.h" #include "BattlefieldWG.h" -#include "Battlefield.h" -#include "ScriptSystem.h" -#include "WorldSession.h" -#include "ObjectMgr.h" -#include "Vehicle.h" #include "GameObjectAI.h" +#include "ObjectMgr.h" +#include "Player.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "ScriptMgr.h" +#include "ScriptSystem.h" #include "SpellScript.h" -#include "Player.h" +#include "Vehicle.h" +#include "WorldSession.h" #define GOSSIP_HELLO_DEMO1 "Build catapult." #define GOSSIP_HELLO_DEMO2 "Build demolisher." diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp index fa1a53627f7..9283b870a71 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp @@ -23,6 +23,7 @@ #include "Player.h" #include "ObjectMgr.h" #include "WorldPacket.h" +#include "WorldStatePackets.h" const uint32 HP_LANG_CAPTURE_A[HP_TOWER_NUM] = { TEXT_BROKEN_HILL_TAKEN_ALLIANCE, TEXT_OVERLOOK_TAKEN_ALLIANCE, TEXT_STADIUM_TAKEN_ALLIANCE }; diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp index 6220aefb843..6f821514bb4 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp @@ -22,6 +22,7 @@ #include "ObjectMgr.h" #include "OutdoorPvPMgr.h" #include "WorldPacket.h" +#include "WorldStatePackets.h" OutdoorPvPNA::OutdoorPvPNA() { diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index 431acb23abf..efceec2482e 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -26,6 +26,7 @@ #include "ReputationMgr.h" #include "Language.h" #include "World.h" +#include "WorldStatePackets.h" OutdoorPvPSI::OutdoorPvPSI() { diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp index 110bf0f09af..c273e3c26db 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp @@ -23,6 +23,7 @@ #include "WorldPacket.h" #include "Player.h" #include "ObjectMgr.h" +#include "WorldStatePackets.h" OutdoorPvPTF::OutdoorPvPTF() { diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp index 3445c3080ac..b6841462139 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp @@ -25,6 +25,7 @@ #include "ObjectAccessor.h" #include "WorldPacket.h" #include "GossipDef.h" +#include "WorldStatePackets.h" OPvPCapturePointZM_Beacon::OPvPCapturePointZM_Beacon(OutdoorPvP* pvp, ZM_BeaconType type) : OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(ZM_TOWERSTATE_N) diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index ad0d27476c3..03a73e0a1cf 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -24,11 +24,12 @@ SDCategory: Black Temple EndScriptData */ #include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "PassiveAI.h" #include "black_temple.h" +#include "Log.h" +#include "PassiveAI.h" #include "Player.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "SpellInfo.h" // Other defines diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 46622d25dd0..0030b0ddbdd 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -25,8 +25,9 @@ EndScriptData */ #include "ScriptMgr.h" #include "InstanceScript.h" -#include "serpent_shrine.h" +#include "Log.h" #include "Player.h" +#include "serpent_shrine.h" #include "TemporarySummon.h" #define MAX_ENCOUNTER 6 diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp index 30ea7ab41fe..b4b7d0f5fce 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp @@ -17,6 +17,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" +#include "Log.h" #include "steam_vault.h" class go_main_chambers_access_panel : public GameObjectScript diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index 8e353b66014..92d87b5a279 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -31,10 +31,11 @@ npc_fel_guard_hound EndContentData */ #include "ScriptMgr.h" +#include "Log.h" +#include "Player.h" #include "ScriptedCreature.h" -#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" -#include "Player.h" +#include "ScriptedGossip.h" #include "WorldSession.h" /*###### diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp index 0d463c82dfd..9532d43c162 100644 --- a/src/server/scripts/Outland/zone_netherstorm.cpp +++ b/src/server/scripts/Outland/zone_netherstorm.cpp @@ -31,10 +31,11 @@ go_captain_tyralius_prison EndContentData */ #include "ScriptMgr.h" +#include "Log.h" +#include "Player.h" #include "ScriptedCreature.h" -#include "ScriptedGossip.h" #include "ScriptedEscortAI.h" -#include "Player.h" +#include "ScriptedGossip.h" /*###### ## npc_commander_dawnforge diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 62408425efa..d53a014343e 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -31,14 +31,15 @@ #include "Group.h" #include "InstanceScript.h" #include "LFGMgr.h" +#include "Log.h" +#include "NPCPackets.h" #include "Pet.h" #include "ReputationMgr.h" #include "SkillDiscovery.h" -#include "SpellScript.h" #include "SpellAuraEffects.h" #include "SpellHistory.h" +#include "SpellScript.h" #include "Vehicle.h" -#include "NPCPackets.h" class spell_gen_absorb0_hitlimit1 : public SpellScriptLoader { diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index ca3615a141e..c04559b15c5 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -29,6 +29,7 @@ #include "SpellHistory.h" #include "SkillDiscovery.h" #include "Battleground.h" +#include "Log.h" // Generic script for handling item dummy effects which trigger another spell. class spell_item_trigger_spell : public SpellScriptLoader @@ -120,13 +121,13 @@ enum AlchemistStone SPELL_ALCHEMIST_STONE_EXTRA_MANA = 21400 }; -// Item - 13503: Alchemist's Stone -// Item - 35748: Guardian's Alchemist Stone -// Item - 35749: Sorcerer's Alchemist Stone -// Item - 35750: Redeemer's Alchemist Stone -// Item - 35751: Assassin's Alchemist Stone -// Item - 44322: Mercurial Alchemist Stone -// Item - 44323: Indestructible Alchemist's Stone +// Item - 13503: Alchemist's Stone +// Item - 35748: Guardian's Alchemist Stone +// Item - 35749: Sorcerer's Alchemist Stone +// Item - 35750: Redeemer's Alchemist Stone +// Item - 35751: Assassin's Alchemist Stone +// Item - 44322: Mercurial Alchemist Stone +// Item - 44323: Indestructible Alchemist's Stone // Item - 44324: Mighty Alchemist's Stone // 17619 - Alchemist Stone @@ -294,7 +295,7 @@ enum AuraOfMadness SAY_MADNESS = 21954 }; -// Item - 31859: Darkmoon Card: Madness +// Item - 31859: Darkmoon Card: Madness // 39446 - Aura of Madness class spell_item_aura_of_madness : public SpellScriptLoader { @@ -1294,8 +1295,8 @@ enum MarkOfConquest SPELL_MARK_OF_CONQUEST_ENERGIZE = 39599 }; -// Item - 27920: Mark of Conquest -// Item - 27921: Mark of Conquest +// Item - 27920: Mark of Conquest +// Item - 27921: Mark of Conquest // 33510 - Health Restore class spell_item_mark_of_conquest : public SpellScriptLoader { diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index fbb86df1b04..af4283b0e94 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -21,12 +21,13 @@ * Scriptnames of files in this file should be prefixed with "spell_rog_". */ -#include "Player.h" #include "ScriptMgr.h" -#include "SpellScript.h" +#include "Containers.h" +#include "Log.h" +#include "Player.h" #include "SpellAuraEffects.h" #include "SpellHistory.h" -#include "Containers.h" +#include "SpellScript.h" enum RogueSpells { diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 6ed2e92592d..7e40ec29f67 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -317,7 +317,7 @@ public: void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) { PreventDefaultAction(); - GetAura()->SetCastExtraParam("procTargetGUID", eventInfo.GetProcTarget()->GetGUID()); + _procTargetGuid = eventInfo.GetProcTarget()->GetGUID(); eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHAMAN_EARTHEN_RAGE_PERIODIC, true); } @@ -325,6 +325,14 @@ public: { OnEffectProc += AuraEffectProcFn(spell_sha_earthen_rage_passive_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); } + + ObjectGuid _procTargetGuid; + + public: + ObjectGuid const& GetProcTargetGuid() const + { + return _procTargetGuid; + } }; AuraScript* GetAuraScript() const override @@ -354,10 +362,12 @@ public: void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) { + using earthen_rage_script_t = spell_sha_earthen_rage_passive::spell_sha_earthen_rage_passive_AuraScript; + PreventDefaultAction(); if (Aura const* aura = GetCaster()->GetAura(SPELL_SHAMAN_EARTHEN_RAGE_PASSIVE)) - if (ObjectGuid const* procTargetGUID = aura->GetCastExtraParam<ObjectGuid>("procTargetGUID")) - if (Unit* procTarget = ObjectAccessor::GetUnit(*GetCaster(), *procTargetGUID)) + if (earthen_rage_script_t const* earthen_rage_script = dynamic_cast<earthen_rage_script_t const*>(aura->GetScriptByName("spell_sha_earthen_rage_passive"))) + if (Unit* procTarget = ObjectAccessor::GetUnit(*GetCaster(), earthen_rage_script->GetProcTargetGuid())) GetTarget()->CastSpell(procTarget, SPELL_SHAMAN_EARTHEN_RAGE_DAMAGE, true); } diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp index 4c828ce635c..8ab65038028 100644 --- a/src/server/scripts/World/action_ip_logger.cpp +++ b/src/server/scripts/World/action_ip_logger.cpp @@ -16,6 +16,7 @@ */ #include "ScriptMgr.h" +#include "DatabaseEnv.h" #include "Player.h" enum IPLoggingTypes diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp index dc77fd0799d..7366b12e8ea 100644 --- a/src/server/scripts/World/chat_log.cpp +++ b/src/server/scripts/World/chat_log.cpp @@ -19,6 +19,7 @@ #include "Channel.h" #include "Guild.h" #include "Group.h" +#include "Log.h" class ChatLogScript : public PlayerScript { diff --git a/src/server/scripts/World/duel_reset.cpp b/src/server/scripts/World/duel_reset.cpp index d792a1cb47f..ba746a498f3 100644 --- a/src/server/scripts/World/duel_reset.cpp +++ b/src/server/scripts/World/duel_reset.cpp @@ -19,6 +19,7 @@ #include "Player.h" #include "Pet.h" #include "SpellInfo.h" +#include "World.h" class DuelResetScript : public PlayerScript { diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index b1163a760e7..4f7015bd222 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -45,11 +45,12 @@ go_toy_train_set EndContentData */ #include "ScriptMgr.h" +#include "GameObjectAI.h" +#include "Log.h" +#include "Player.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" -#include "GameObjectAI.h" #include "Spell.h" -#include "Player.h" #include "WorldSession.h" /*###### diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 60a282f26de..05f9054ab48 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -159,7 +159,7 @@ public: ItemPosCountVec dest; uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 39883, 1); // Cracked Egg if (msg == EQUIP_ERR_OK) - player->StoreNewItem(dest, 39883, true, Item::GenerateItemRandomPropertyId(39883)); + player->StoreNewItem(dest, 39883, true, GenerateItemRandomPropertyId(39883)); return true; } @@ -179,7 +179,7 @@ public: ItemPosCountVec dest; uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 44718, 1); // Ripe Disgusting Jar if (msg == EQUIP_ERR_OK) - player->StoreNewItem(dest, 44718, true, Item::GenerateItemRandomPropertyId(44718)); + player->StoreNewItem(dest, 44718, true, GenerateItemRandomPropertyId(44718)); return true; } diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index f9b25732270..57fd0e34176 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -24,9 +24,10 @@ SDCategory: NPCs EndScriptData */ #include "ScriptMgr.h" +#include "Log.h" +#include "Player.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" -#include "Player.h" #include "SpellInfo.h" #include "WorldSession.h" @@ -1224,7 +1225,7 @@ enum MultiProfessionTrainer GOSSIP_OPTION_SKINNING = 9, GOSSIP_OPTION_TAILORING = 10, GOSSIP_OPTION_MULTI = 11, - + GOSSIP_MENU_HERBALISM = 12188, GOSSIP_MENU_MINING = 12189, GOSSIP_MENU_SKINNING = 12190, diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index c568929c28f..9987168141c 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -17,23 +17,24 @@ */ #include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "ScriptedEscortAI.h" -#include "ObjectMgr.h" -#include "ScriptMgr.h" -#include "World.h" -#include "PassiveAI.h" +#include "Cell.h" +#include "CellImpl.h" +#include "CreatureTextMgr.h" #include "GameEventMgr.h" #include "GameObjectAI.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "Cell.h" -#include "CellImpl.h" -#include "SpellAuras.h" +#include "Log.h" +#include "ObjectMgr.h" +#include "PassiveAI.h" #include "Pet.h" -#include "CreatureTextMgr.h" +#include "ScriptedCreature.h" +#include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" +#include "ScriptMgr.h" +#include "SpellAuras.h" #include "SpellHistory.h" +#include "World.h" /*######## # npc_air_force_bots |