diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 6f98fd9fc..88a14a1a2 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -16,13 +16,13 @@ */ #include "SmartAI.h" +#include "AreaTriggerScript.h" #include "CellImpl.h" #include "GridDefines.h" #include "GridNotifiers.h" #include "Group.h" #include "ObjectDefines.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellMgr.h" #include "Vehicle.h" diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index d664f78ee..a315ba935 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -29,6 +29,7 @@ #include "Creature.h" #include "CreatureTextMgr.h" #include "Formulas.h" +#include "GameEventMgr.h" #include "GameGraveyard.h" #include "GridNotifiersImpl.h" #include "GroupMgr.h" diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 67544e8b1..65eaeaf76 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -45,7 +45,7 @@ class BattlegroundIC; struct PvPDifficultyEntry; struct GraveyardStruct; -enum BattlegroundDesertionType +enum BattlegroundDesertionType : uint8 { BG_DESERTION_TYPE_LEAVE_BG = 0, // player leaves the BG BG_DESERTION_TYPE_OFFLINE = 1, // player is kicked from BG because offline diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 46f91221f..8336352ea 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -43,6 +43,7 @@ #include "ObjectMgr.h" #include "Opcodes.h" #include "Player.h" +#include "ScriptMgr.h" #include "SharedDefines.h" #include "World.h" #include "WorldPacket.h" diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 9c1a9670d..da147e61d 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -37,7 +37,7 @@ WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId); -enum ContentLevels +enum ContentLevels : uint8 { CONTENT_1_60 = 0, CONTENT_61_70, diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index e2f0726ce..3de529c90 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -34,6 +34,7 @@ #include "ObjectMgr.h" #include "Opcodes.h" #include "Player.h" +#include "ScriptMgr.h" #include "SharedDefines.h" #include "SocialMgr.h" #include "SpellAuras.h" @@ -43,9 +44,6 @@ namespace lfg { LFGMgr::LFGMgr(): m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)), m_Testing(false) { - new LFGPlayerScript(); - new LFGGroupScript(); - for (uint8 team = 0; team < 2; ++team) { m_raidBrowserUpdateTimer[team] = 10000; diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index 02b907d67..cabd4543f 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -297,4 +297,9 @@ namespace lfg } } + void AddSC_LFGScripts() + { + new LFGPlayerScript(); + new LFGGroupScript(); + } } // namespace lfg diff --git a/src/server/game/DungeonFinding/LFGScripts.h b/src/server/game/DungeonFinding/LFGScripts.h index e140eaf10..8173fb1bc 100644 --- a/src/server/game/DungeonFinding/LFGScripts.h +++ b/src/server/game/DungeonFinding/LFGScripts.h @@ -19,16 +19,15 @@ * Interaction between core and LFGScripts */ -#include "Common.h" -#include "ScriptMgr.h" -#include "SharedDefines.h" +#include "GroupScript.h" +#include "ObjectGuid.h" +#include "PlayerScript.h" class Player; class Group; namespace lfg { - class LFGPlayerScript : public PlayerScript { public: @@ -55,4 +54,6 @@ namespace lfg void OnInviteMember(Group* group, ObjectGuid guid) override; }; + void AddSC_LFGScripts(); + } // namespace lfg diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 4eb0b85e4..c761660eb 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -31,13 +31,13 @@ #include "GroupMgr.h" #include "Log.h" #include "LootMgr.h" -#include "MapMgr.h" #include "ObjectMgr.h" #include "Opcodes.h" #include "OutdoorPvPMgr.h" #include "Pet.h" #include "Player.h" #include "PoolMgr.h" +#include "ScriptMgr.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellMgr.h" diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp index 393627795..b2969580d 100644 --- a/src/server/game/Entities/Creature/GossipDef.cpp +++ b/src/server/game/Entities/Creature/GossipDef.cpp @@ -22,6 +22,7 @@ #include "Opcodes.h" #include "Player.h" #include "QuestDef.h" +#include "ScriptMgr.h" #include "WorldPacket.h" #include "WorldSession.h" diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h index 300e7a6a1..e7da6c7a8 100644 --- a/src/server/game/Entities/Item/Item.h +++ b/src/server/game/Entities/Item/Item.h @@ -36,7 +36,7 @@ struct ItemSetEffect }; // EnumUtils: DESCRIBE THIS -enum InventoryResult +enum InventoryResult : uint8 { EQUIP_ERR_OK = 0, EQUIP_ERR_CANT_EQUIP_LEVEL_I = 1, @@ -158,7 +158,7 @@ enum SellResult }; // -1 from client enchantment slot number -enum EnchantmentSlot +enum EnchantmentSlot : uint8 { PERM_ENCHANTMENT_SLOT = 0, TEMP_ENCHANTMENT_SLOT = 1, diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 5bd634c0d..5e10ef17e 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -21,6 +21,7 @@ #include "DatabaseEnv.h" #include "GameTime.h" #include "Group.h" +#include "InstanceScript.h" #include "Log.h" #include "ObjectMgr.h" #include "PetPackets.h" diff --git a/src/server/game/Entities/Player/KillRewarder.cpp b/src/server/game/Entities/Player/KillRewarder.cpp index dfeb8ed6d..50d83a692 100644 --- a/src/server/game/Entities/Player/KillRewarder.cpp +++ b/src/server/game/Entities/Player/KillRewarder.cpp @@ -20,6 +20,7 @@ #include "Group.h" #include "Pet.h" #include "Player.h" +#include "ScriptMgr.h" #include "SpellAuraEffects.h" // KillRewarder incapsulates logic of rewarding player upon kill with: diff --git a/src/server/game/Entities/Player/PlayerQuest.cpp b/src/server/game/Entities/Player/PlayerQuest.cpp index 4056534a7..659e84c72 100644 --- a/src/server/game/Entities/Player/PlayerQuest.cpp +++ b/src/server/game/Entities/Player/PlayerQuest.cpp @@ -17,6 +17,7 @@ #include "CreatureAI.h" #include "DisableMgr.h" +#include "GameEventMgr.h" #include "GameObjectAI.h" #include "GameTime.h" #include "GitRevision.h" diff --git a/src/server/game/Entities/Player/PlayerUpdates.cpp b/src/server/game/Entities/Player/PlayerUpdates.cpp index 1f137edb4..e56e3e3dc 100644 --- a/src/server/game/Entities/Player/PlayerUpdates.cpp +++ b/src/server/game/Entities/Player/PlayerUpdates.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "AchievementMgr.h" #include "BattlefieldMgr.h" #include "CellImpl.h" #include "Channel.h" @@ -35,6 +36,7 @@ #include "SpellMgr.h" #include "UpdateFieldFlags.h" #include "Vehicle.h" +#include "Weather.h" #include "WeatherMgr.h" #include "WorldStatePackets.h" diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 230c424bd..ec358ec78 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -53,6 +53,7 @@ #include "PetAI.h" #include "Player.h" #include "ReputationMgr.h" +#include "ScriptMgr.h" #include "Spell.h" #include "SpellAuraEffects.h" #include "SpellAuras.h" diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index d26069725..8488193f0 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -391,7 +391,7 @@ enum UnitMoveType extern float baseMoveSpeed[MAX_MOVE_TYPE]; extern float playerBaseMoveSpeed[MAX_MOVE_TYPE]; -enum WeaponAttackType +enum WeaponAttackType : uint8 { BASE_ATTACK = 0, OFF_ATTACK = 1, @@ -430,7 +430,7 @@ enum CombatRating #define MAX_COMBAT_RATING 25 -enum DamageEffectType +enum DamageEffectType : uint8 { DIRECT_DAMAGE = 0, // used for normal weapon damage (not for class abilities or spells) SPELL_DIRECT_DAMAGE = 1, // spell/class abilities damage diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index b33502da2..e6ca90428 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -17,6 +17,7 @@ #include "Vehicle.h" #include "BattlefieldWG.h" +#include "CreatureAI.h" #include "Log.h" #include "MoveSplineInit.h" #include "ObjectMgr.h" diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index f18597bec..0849bf9e1 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -35,7 +35,6 @@ #include "GroupMgr.h" #include "GuildMgr.h" #include "LFGMgr.h" -#include "Language.h" #include "Log.h" #include "MapMgr.h" #include "Pet.h" @@ -45,6 +44,7 @@ #include "Spell.h" #include "SpellMgr.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "StringConvert.h" #include "Tokenize.h" #include "Transport.h" diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index 1659711b1..87317f376 100644 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -45,7 +45,7 @@ struct MapEntry; #define MAX_RAID_SUBGROUPS MAXRAIDSIZE/MAXGROUPSIZE #define TARGETICONCOUNT 8 -enum RollVote +enum RollVote : uint8 { PASS = 0, NEED = 1, diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index 4ab089472..7bb348caf 100644 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -23,6 +23,7 @@ #include "DisableMgr.h" #include "GameTime.h" #include "Group.h" +#include "LFGMgr.h" #include "Language.h" #include "ObjectAccessor.h" #include "Opcodes.h" diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index 9609d8b64..7bea72443 100644 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -18,6 +18,7 @@ #include "DatabaseEnv.h" #include "Group.h" #include "GroupMgr.h" +#include "LFGMgr.h" #include "Language.h" #include "Log.h" #include "MiscPackets.h" diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 0c7e8fa5d..df7272d68 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -29,6 +29,7 @@ #include "GossipDef.h" #include "Group.h" #include "GuildMgr.h" +#include "InstanceScript.h" #include "Language.h" #include "Log.h" #include "LootMgr.h" @@ -1425,7 +1426,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recv_data) return; } - if (IsSharedDifficultyMap(groupGuy->GetMap()->GetId()) && (_player->GetRaidDifficulty() >= 0 && uint32(mode % 2) == uint32(_player->GetRaidDifficulty() % 2)) && group->isRaidGroup()) + if (IsSharedDifficultyMap(groupGuy->GetMap()->GetId()) && (uint32(mode % 2) == uint32(_player->GetRaidDifficulty() % 2)) && group->isRaidGroup()) { if (!currMap) currMap = groupGuy->GetMap(); diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 71ea33391..fb5553176 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -52,7 +52,7 @@ enum EncounterFrameType ENCOUNTER_FRAME_REFRESH_FRAMES = 7, // Xinef: can be used to refresh frames after unit was destroyed from client and send back (phase changes) }; -enum EncounterState +enum EncounterState : uint8 { NOT_STARTED = 0, IN_PROGRESS = 1, diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h index 8bff3ebac..957f8374e 100644 --- a/src/server/game/Mails/Mail.h +++ b/src/server/game/Mails/Mail.h @@ -42,7 +42,7 @@ enum MailMessageType MAIL_CALENDAR = 5 }; -enum MailCheckMask +enum MailCheckMask : uint8 { MAIL_CHECK_MASK_NONE = 0x00, MAIL_CHECK_MASK_READ = 0x01, diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 7cafb39ff..50e4a4c00 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -303,7 +303,7 @@ typedef std::map CreatureGroupHol typedef std::unordered_map ZoneDynamicInfoMap; typedef std::set TransportsContainer; -enum EncounterCreditType +enum EncounterCreditType : uint8 { ENCOUNTER_CREDIT_KILL_CREATURE = 0, ENCOUNTER_CREDIT_CAST_SPELL = 1, diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index 92b9d1757..eba9431c7 100644 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -18,8 +18,13 @@ #ifndef ACORE_FORMULAS_H #define ACORE_FORMULAS_H -#include "ScriptMgr.h" #include "SharedDefines.h" +#include + +class Player; +class Unit; + +enum ContentLevels : uint8; namespace Acore::Honor { diff --git a/src/server/game/Motd/MotdMgr.cpp b/src/server/game/Motd/MotdMgr.cpp index 5b39fc6bc..7b382f3af 100644 --- a/src/server/game/Motd/MotdMgr.cpp +++ b/src/server/game/Motd/MotdMgr.cpp @@ -17,10 +17,11 @@ #include "MotdMgr.h" #include "Config.h" -#include "Opcodes.h" +#include "DatabaseEnv.h" +#include "Log.h" #include "ScriptMgr.h" +#include "Timer.h" #include "Tokenize.h" -#include "Util.h" #include "WorldPacket.h" #include diff --git a/src/server/game/Scripting/ScriptDefines/AccountScript.cpp b/src/server/game/Scripting/ScriptDefines/AccountScript.cpp index ff12bd54e..31705babc 100644 --- a/src/server/game/Scripting/ScriptDefines/AccountScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AccountScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "AccountScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -89,10 +90,13 @@ bool ScriptMgr::CanAccountCreateCharacter(uint32 accountId, uint8 charRace, uint return !script->CanAccountCreateCharacter(accountId, charRace, charClass); }); - if (ret && *ret) - { - return false; - } - - return true; + return ReturnValidBool(ret); } + +AccountScript::AccountScript(char const* name) : + ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AccountScript.h b/src/server/game/Scripting/ScriptDefines/AccountScript.h new file mode 100644 index 000000000..a88e4152b --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AccountScript.h @@ -0,0 +1,54 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ACCOUNT_SCRIPT_H_ +#define SCRIPT_OBJECT_ACCOUNT_SCRIPT_H_ + +#include "ScriptObject.h" + +class AccountScript : public ScriptObject +{ +protected: + AccountScript(const char* name); + +public: + // Called when an account logged in successfully + virtual void OnAccountLogin(uint32 /*accountId*/) { } + + // Called when an ip logged in successfully + virtual void OnLastIpUpdate(uint32 /*accountId*/, std::string /*ip*/) { } + + // Called when an account login failed + virtual void OnFailedAccountLogin(uint32 /*accountId*/) { } + + // Called when Email is successfully changed for Account + virtual void OnEmailChange(uint32 /*accountId*/) { } + + // Called when Email failed to change for Account + virtual void OnFailedEmailChange(uint32 /*accountId*/) { } + + // Called when Password is successfully changed for Account + virtual void OnPasswordChange(uint32 /*accountId*/) { } + + // Called when Password failed to change for Account + virtual void OnFailedPasswordChange(uint32 /*accountId*/) { } + + // Called when creating a character on the Account + [[nodiscard]] virtual bool CanAccountCreateCharacter(uint32 /*accountId*/, uint8 /*charRace*/, uint8 /*charClass*/) { return true;} +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.cpp b/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.cpp index 8031a2524..9e0e44e67 100644 --- a/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" #include "ScriptMgr.h" bool ScriptMgr::OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target, uint32 criteria_id) @@ -25,3 +26,11 @@ bool ScriptMgr::OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target, u auto tempScript = ScriptRegistry::GetScriptById(scriptId); return tempScript ? tempScript->OnCheck(source, target, criteria_id) : false; } + +AchievementCriteriaScript::AchievementCriteriaScript(char const* name) : + ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.h b/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.h new file mode 100644 index 000000000..9e097fbe0 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AchievementCriteriaScript.h @@ -0,0 +1,34 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ACHIEVEMENT_CRITERIA_SCRIPT_H_ +#define SCRIPT_OBJECT_ACHIEVEMENT_CRITERIA_SCRIPT_H_ + +#include "ScriptObject.h" + +class AchievementCriteriaScript : public ScriptObject +{ +protected: + AchievementCriteriaScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + [[nodiscard]] virtual bool OnCheck(Player* /*source*/, Unit* /*target*/, uint32 /*criteria_id*/) { return true; }; +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/AchievementScript.cpp b/src/server/game/Scripting/ScriptDefines/AchievementScript.cpp index e99ade7e4..4dc58634d 100644 --- a/src/server/game/Scripting/ScriptDefines/AchievementScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AchievementScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "AchievementScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -56,7 +57,7 @@ bool ScriptMgr::IsRealmCompleted(AchievementGlobalMgr const* globalmgr, Achievem return true; } -void ScriptMgr::OnBeforeCheckCriteria(AchievementMgr* mgr, AchievementCriteriaEntryList const* achievementCriteriaList) +void ScriptMgr::OnBeforeCheckCriteria(AchievementMgr* mgr, std::list const* achievementCriteriaList) { ExecuteScript([&](AchievementScript* script) { @@ -78,3 +79,11 @@ bool ScriptMgr::CanCheckCriteria(AchievementMgr* mgr, AchievementCriteriaEntry c return true; } + +AchievementScript::AchievementScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AchievementScript.h b/src/server/game/Scripting/ScriptDefines/AchievementScript.h new file mode 100644 index 000000000..d1e8ab076 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AchievementScript.h @@ -0,0 +1,45 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ACHIEVEMENT_SCRIPT_H_ +#define SCRIPT_OBJECT_ACHIEVEMENT_SCRIPT_H_ + +#include "Duration.h" +#include "ScriptObject.h" +#include + +class AchievementScript : public ScriptObject +{ +protected: + AchievementScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + // After complete global acvievement + virtual void SetRealmCompleted(AchievementEntry const* /*achievement*/) { } + + [[nodiscard]] virtual bool IsCompletedCriteria(AchievementMgr* /*mgr*/, AchievementCriteriaEntry const* /*achievementCriteria*/, AchievementEntry const* /*achievement*/, CriteriaProgress const* /*progress*/) { return true; } + + [[nodiscard]] virtual bool IsRealmCompleted(AchievementGlobalMgr const* /*globalmgr*/, AchievementEntry const* /*achievement*/, SystemTimePoint /*completionTime*/) { return true; } + + virtual void OnBeforeCheckCriteria(AchievementMgr* /*mgr*/, std::list const* /*achievementCriteriaList*/) { } + + [[nodiscard]] virtual bool CanCheckCriteria(AchievementMgr* /*mgr*/, AchievementCriteriaEntry const* /*achievementCriteria*/) { return true; } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/BGScript.cpp b/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.cpp similarity index 73% rename from src/server/game/Scripting/ScriptDefines/BGScript.cpp rename to src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.cpp index 3e06e2ce3..b5828687a 100644 --- a/src/server/game/Scripting/ScriptDefines/BGScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "AllBattlegroundScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" void ScriptMgr::OnBattlegroundStart(Battleground* bg) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnBattlegroundStart(bg); }); @@ -28,7 +29,7 @@ void ScriptMgr::OnBattlegroundStart(Battleground* bg) void ScriptMgr::OnBattlegroundEndReward(Battleground* bg, Player* player, TeamId winnerTeamId) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnBattlegroundEndReward(bg, player, winnerTeamId); }); @@ -36,7 +37,7 @@ void ScriptMgr::OnBattlegroundEndReward(Battleground* bg, Player* player, TeamId void ScriptMgr::OnBattlegroundUpdate(Battleground* bg, uint32 diff) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnBattlegroundUpdate(bg, diff); }); @@ -44,7 +45,7 @@ void ScriptMgr::OnBattlegroundUpdate(Battleground* bg, uint32 diff) void ScriptMgr::OnBattlegroundAddPlayer(Battleground* bg, Player* player) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnBattlegroundAddPlayer(bg, player); }); @@ -52,7 +53,7 @@ void ScriptMgr::OnBattlegroundAddPlayer(Battleground* bg, Player* player) void ScriptMgr::OnBattlegroundBeforeAddPlayer(Battleground* bg, Player* player) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnBattlegroundBeforeAddPlayer(bg, player); }); @@ -60,7 +61,7 @@ void ScriptMgr::OnBattlegroundBeforeAddPlayer(Battleground* bg, Player* player) void ScriptMgr::OnBattlegroundRemovePlayerAtLeave(Battleground* bg, Player* player) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnBattlegroundRemovePlayerAtLeave(bg, player); }); @@ -69,7 +70,7 @@ void ScriptMgr::OnBattlegroundRemovePlayerAtLeave(Battleground* bg, Player* play void ScriptMgr::OnAddGroup(BattlegroundQueue* queue, GroupQueueInfo* ginfo, uint32& index, Player* leader, Group* group, BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 arenaType, bool isRated, bool isPremade, uint32 arenaRating, uint32 matchmakerRating, uint32 arenaTeamId, uint32 opponentsArenaTeamId) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnAddGroup(queue, ginfo, index, leader, group, bgTypeId, bracketEntry, arenaType, isRated, isPremade, arenaRating, matchmakerRating, arenaTeamId, opponentsArenaTeamId); @@ -78,7 +79,7 @@ void ScriptMgr::OnAddGroup(BattlegroundQueue* queue, GroupQueueInfo* ginfo, uint bool ScriptMgr::CanFillPlayersToBG(BattlegroundQueue* queue, Battleground* bg, BattlegroundBracketId bracket_id) { - auto ret = IsValidBoolScript([&](BGScript* script) + auto ret = IsValidBoolScript([&](AllBattlegroundScript* script) { return !script->CanFillPlayersToBG(queue, bg, bracket_id); }); @@ -88,7 +89,7 @@ bool ScriptMgr::CanFillPlayersToBG(BattlegroundQueue* queue, Battleground* bg, B bool ScriptMgr::IsCheckNormalMatch(BattlegroundQueue* queue, Battleground* bgTemplate, BattlegroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers) { - auto ret = IsValidBoolScript([&](BGScript* script) + auto ret = IsValidBoolScript([&](AllBattlegroundScript* script) { return script->IsCheckNormalMatch(queue, bgTemplate, bracket_id, minPlayers, maxPlayers); }); @@ -98,7 +99,7 @@ bool ScriptMgr::IsCheckNormalMatch(BattlegroundQueue* queue, Battleground* bgTem void ScriptMgr::OnQueueUpdate(BattlegroundQueue* queue, uint32 diff, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType, bool isRated, uint32 arenaRating) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnQueueUpdate(queue, diff, bgTypeId, bracket_id, arenaType, isRated, arenaRating); }); @@ -106,7 +107,7 @@ void ScriptMgr::OnQueueUpdate(BattlegroundQueue* queue, uint32 diff, Battlegroun bool ScriptMgr::CanSendMessageBGQueue(BattlegroundQueue* queue, Player* leader, Battleground* bg, PvPDifficultyEntry const* bracketEntry) { - auto ret = IsValidBoolScript([&](BGScript* script) + auto ret = IsValidBoolScript([&](AllBattlegroundScript* script) { return !script->CanSendMessageBGQueue(queue, leader, bg, bracketEntry); }); @@ -116,7 +117,7 @@ bool ScriptMgr::CanSendMessageBGQueue(BattlegroundQueue* queue, Player* leader, bool ScriptMgr::OnBeforeSendJoinMessageArenaQueue(BattlegroundQueue* queue, Player* leader, GroupQueueInfo* ginfo, PvPDifficultyEntry const* bracketEntry, bool isRated) { - auto ret = IsValidBoolScript([&](BGScript* script) + auto ret = IsValidBoolScript([&](AllBattlegroundScript* script) { return !script->OnBeforeSendJoinMessageArenaQueue(queue, leader, ginfo, bracketEntry, isRated); }); @@ -126,7 +127,7 @@ bool ScriptMgr::OnBeforeSendJoinMessageArenaQueue(BattlegroundQueue* queue, Play bool ScriptMgr::OnBeforeSendExitMessageArenaQueue(BattlegroundQueue* queue, GroupQueueInfo* ginfo) { - auto ret = IsValidBoolScript([&](BGScript* script) + auto ret = IsValidBoolScript([&](AllBattlegroundScript* script) { return !script->OnBeforeSendExitMessageArenaQueue(queue, ginfo); }); @@ -136,7 +137,7 @@ bool ScriptMgr::OnBeforeSendExitMessageArenaQueue(BattlegroundQueue* queue, Grou void ScriptMgr::OnBattlegroundEnd(Battleground* bg, TeamId winnerTeam) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnBattlegroundEnd(bg, winnerTeam); }); @@ -144,7 +145,7 @@ void ScriptMgr::OnBattlegroundEnd(Battleground* bg, TeamId winnerTeam) void ScriptMgr::OnBattlegroundDestroy(Battleground* bg) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnBattlegroundDestroy(bg); }); @@ -152,8 +153,16 @@ void ScriptMgr::OnBattlegroundDestroy(Battleground* bg) void ScriptMgr::OnBattlegroundCreate(Battleground* bg) { - ExecuteScript([&](BGScript* script) + ExecuteScript([&](AllBattlegroundScript* script) { script->OnBattlegroundCreate(bg); }); } + +AllBattlegroundScript::AllBattlegroundScript(char const* name) : + ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.h b/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.h new file mode 100644 index 000000000..379cc4635 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AllBattlegroundScript.h @@ -0,0 +1,115 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ALL_BATTLEGROUND_SCRIPT_H_ +#define SCRIPT_OBJECT_ALL_BATTLEGROUND_SCRIPT_H_ + +#include "ScriptObject.h" + +enum BattlegroundBracketId : uint8; +enum BattlegroundTypeId : uint8; +enum TeamId : uint8; + +class AllBattlegroundScript : public ScriptObject +{ +protected: + AllBattlegroundScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + /** + * @brief This hook runs before start Battleground + * + * @param bg Contains information about the Battleground + */ + virtual void OnBattlegroundStart(Battleground* /*bg*/) { } + + // End Battleground + virtual void OnBattlegroundEndReward(Battleground* /*bg*/, Player* /*player*/, TeamId /*winnerTeamId*/) { } + + // Update Battlegroud + virtual void OnBattlegroundUpdate(Battleground* /*bg*/, uint32 /*diff*/) { } + + // Add Player in Battlegroud + virtual void OnBattlegroundAddPlayer(Battleground* /*bg*/, Player* /*player*/) { } + + // Before added player in Battlegroud + virtual void OnBattlegroundBeforeAddPlayer(Battleground* /*bg*/, Player* /*player*/) { } + + // Remove player at leave BG + virtual void OnBattlegroundRemovePlayerAtLeave(Battleground* /*bg*/, Player* /*player*/) { } + + virtual void OnQueueUpdate(BattlegroundQueue* /*queue*/, uint32 /* diff */, BattlegroundTypeId /* bgTypeId */, BattlegroundBracketId /* bracket_id */, uint8 /* arenaType */, bool /* isRated */, uint32 /* arenaRating */) { } + + virtual void OnAddGroup(BattlegroundQueue* /*queue*/, GroupQueueInfo* /*ginfo*/, uint32& /*index*/, Player* /*leader*/, Group* /*group*/, BattlegroundTypeId /* bgTypeId */, PvPDifficultyEntry const* /* bracketEntry */, + uint8 /* arenaType */, bool /* isRated */, bool /* isPremade */, uint32 /* arenaRating */, uint32 /* matchmakerRating */, uint32 /* arenaTeamId */, uint32 /* opponentsArenaTeamId */) { } + + [[nodiscard]] virtual bool CanFillPlayersToBG(BattlegroundQueue* /*queue*/, Battleground* /*bg*/, BattlegroundBracketId /*bracket_id*/) { return true; } + + [[nodiscard]] virtual bool IsCheckNormalMatch(BattlegroundQueue* /*queue*/, Battleground* /*bgTemplate*/, BattlegroundBracketId /*bracket_id*/, uint32 /*minPlayers*/, uint32 /*maxPlayers*/) { return false; }; + + [[nodiscard]] virtual bool CanSendMessageBGQueue(BattlegroundQueue* /*queue*/, Player* /*leader*/, Battleground* /*bg*/, PvPDifficultyEntry const* /*bracketEntry*/) { return true; } + + /** + * @brief This hook runs before sending the join message during the arena queue, allowing you to run extra operations or disabling the join message + * + * @param queue Contains information about the Arena queue + * @param leader Contains information about the player leader + * @param ginfo Contains information about the group of the queue + * @param bracketEntry Contains information about the bracket + * @param isRated Contains information about rated arena or skirmish + * @return True if you want to continue sending the message, false if you want to disable the message + */ + [[nodiscard]] virtual bool OnBeforeSendJoinMessageArenaQueue(BattlegroundQueue* /*queue*/, Player* /*leader*/, GroupQueueInfo* /*ginfo*/, PvPDifficultyEntry const* /*bracketEntry*/, bool /*isRated*/) { return true; } + + /** + * @brief This hook runs before sending the exit message during the arena queue, allowing you to run extra operations or disabling the exit message + * + * @param queue Contains information about the Arena queue + * @param ginfo Contains information about the group of the queue + * @return True if you want to continue sending the message, false if you want to disable the message + */ + [[nodiscard]] virtual bool OnBeforeSendExitMessageArenaQueue(BattlegroundQueue* /*queue*/, GroupQueueInfo* /*ginfo*/) { return true; } + + /** + * @brief This hook runs after end Battleground + * + * @param bg Contains information about the Battleground + * @param TeamId Contains information about the winneer team + */ + virtual void OnBattlegroundEnd(Battleground* /*bg*/, TeamId /*winner team*/) { } + + /** + * @brief This hook runs before Battleground destroy + * + * @param bg Contains information about the Battleground + */ + virtual void OnBattlegroundDestroy(Battleground* /*bg*/) { } + + /** + * @brief This hook runs after Battleground create + * + * @param bg Contains information about the Battleground + */ + virtual void OnBattlegroundCreate(Battleground* /*bg*/) { } +}; + +// Compatibility for old scripts +using BGScript = AllBattlegroundScript; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/CommandSC.cpp b/src/server/game/Scripting/ScriptDefines/AllCommandScript.cpp similarity index 76% rename from src/server/game/Scripting/ScriptDefines/CommandSC.cpp rename to src/server/game/Scripting/ScriptDefines/AllCommandScript.cpp index 22cb02592..b30b9e601 100644 --- a/src/server/game/Scripting/ScriptDefines/CommandSC.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllCommandScript.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "AllCommandScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" void ScriptMgr::OnHandleDevCommand(Player* player, bool& enable) { - ExecuteScript([&](CommandSC* script) + ExecuteScript([&](AllCommandScript* script) { script->OnHandleDevCommand(player, enable); }); @@ -28,15 +29,16 @@ void ScriptMgr::OnHandleDevCommand(Player* player, bool& enable) bool ScriptMgr::CanExecuteCommand(ChatHandler& handler, std::string_view cmdStr) { - auto ret = IsValidBoolScript([&](CommandSC* script) + auto ret = IsValidBoolScript([&](AllCommandScript* script) { return !script->CanExecuteCommand(handler, cmdStr); }); - if (ret && *ret) - { - return false; - } - - return true; + return ReturnValidBool(ret); +} + +AllCommandScript::AllCommandScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); } diff --git a/src/server/game/Scripting/ScriptDefines/AllCommandScript.h b/src/server/game/Scripting/ScriptDefines/AllCommandScript.h new file mode 100644 index 000000000..68d582490 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AllCommandScript.h @@ -0,0 +1,45 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ALL_COMMAND_SCRIPT_H_ +#define SCRIPT_OBJECT_ALL_COMMAND_SCRIPT_H_ + +#include "ScriptObject.h" + +class AllCommandScript : public ScriptObject +{ +protected: + AllCommandScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + virtual void OnHandleDevCommand(Player* /*player*/, bool& /*enable*/) { } + + /** + * @brief This hook runs execute chat command + * + * @param handler Contains information about the ChatHandler + * @param cmdStr Contains information about the command name + */ + [[nodiscard]] virtual bool CanExecuteCommand(ChatHandler& /*handler*/, std::string_view /*cmdStr*/) { return true; } +}; + +// Compatibility for old scripts +using CommandSC = AllCommandScript; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp index ab588dcdd..7d4e286e3 100644 --- a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "AllCreatureScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -77,3 +78,11 @@ void ScriptMgr::Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* cr // // return true; //} + +AllCreatureScript::AllCreatureScript(const char* name) : + ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.h b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.h new file mode 100644 index 000000000..a4f83dd2b --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.h @@ -0,0 +1,107 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ALL_CREATURE_SCRIPT_H_ +#define SCRIPT_OBJECT_ALL_CREATURE_SCRIPT_H_ + +#include "ScriptObject.h" + +class AllCreatureScript : public ScriptObject +{ +protected: + AllCreatureScript(const char* name); + +public: + // Called from End of Creature Update. + virtual void OnAllCreatureUpdate(Creature* /*creature*/, uint32 /*diff*/) { } + + // Called just before the level of the creature is set. + virtual void OnBeforeCreatureSelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/, uint8& /*level*/) { } + + // Called from End of Creature SelectLevel. + virtual void Creature_SelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/) { } + + /** + * @brief This hook runs after add creature in world + * + * @param creature Contains information about the Creature + */ + virtual void OnCreatureAddWorld(Creature* /*creature*/) { } + + /** + * @brief This hook runs after remove creature in world + * + * @param creature Contains information about the Creature + */ + virtual void OnCreatureRemoveWorld(Creature* /*creature*/) { } + + /** + * @brief This hook runs after creature has been saved to DB + * + * @param creature Contains information about the Creature + */ + virtual void OnCreatureSaveToDB(Creature* /*creature*/) { } + + /** + * @brief This hook called when a player opens a gossip dialog with the creature. + * + * @param player Contains information about the Player + * @param creature Contains information about the Creature + * + * @return False if you want to continue, true if you want to disable + */ + [[nodiscard]] virtual bool CanCreatureGossipHello(Player* /*player*/, Creature* /*creature*/) { return false; } + + /** + * @brief This hook called when a player selects a gossip item in the creature's gossip menu. + * + * @param player Contains information about the Player + * @param creature Contains information about the Creature + * @param sender Contains information about the sender type + * @param action Contains information about the action id + * + * @return False if you want to continue, true if you want to disable + */ + [[nodiscard]] virtual bool CanCreatureGossipSelect(Player* /*player*/, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/) { return false; } + + /** + * @brief This hook called when a player selects a gossip with a code in the creature's gossip menu. + * + * @param player Contains information about the Player + * @param creature Contains information about the Creature + * @param sender Contains information about the sender type + * @param action Contains information about the action id + * @param code Contains information about the code entered + * + * @return True if you want to continue, false if you want to disable + */ + [[nodiscard]] virtual bool CanCreatureGossipSelectCode(Player* /*player*/, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { return false; } + + // Called when a player accepts a quest from the creature. + [[nodiscard]] virtual bool CanCreatureQuestAccept(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; } + + // Called when a player selects a quest reward. + [[nodiscard]] virtual bool CanCreatureQuestReward(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; } + + // Called when a CreatureAI object is needed for the creature. + [[nodiscard]] virtual CreatureAI* GetCreatureAI(Creature* /*creature*/) const { return nullptr; } + + //Called Whenever the UNIT_BYTE2_FLAG_FFA_PVP Bit is set on the creature + virtual void OnFfaPvpStateUpdate(Creature* /*creature*/, bool /*InPvp*/) {} +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp index 933ef025f..55bd6cd16 100644 --- a/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "AllGameObjectScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -47,3 +48,11 @@ void ScriptMgr::OnGameObjectSaveToDB(GameObject* go) script->OnGameObjectSaveToDB(go); }); } + +AllGameObjectScript::AllGameObjectScript(const char* name) : + ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.h b/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.h new file mode 100644 index 000000000..2dd5ba2a7 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.h @@ -0,0 +1,89 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ALL_GAMEOBJECT_SCRIPT_H_ +#define SCRIPT_OBJECT_ALL_GAMEOBJECT_SCRIPT_H_ + +#include "ScriptObject.h" + +class AllGameObjectScript : public ScriptObject +{ +protected: + AllGameObjectScript(const char* name); + +public: + /** + * @brief This hook runs after add game object in world + * + * @param go Contains information about the GameObject + */ + virtual void OnGameObjectAddWorld(GameObject* /*go*/) { } + /** + * @brief This hook runs after the game object iis saved to the database + * + * @param go Contains information about the GameObject + */ + virtual void OnGameObjectSaveToDB(GameObject* /*go*/) { } + /** + * @brief This hook runs after remove game object in world + * + * @param go Contains information about the GameObject + */ + virtual void OnGameObjectRemoveWorld(GameObject* /*go*/) { } + + /** + * @brief This hook runs after remove game object in world + * + * @param go Contains information about the GameObject + */ + virtual void OnGameObjectUpdate(GameObject* /*go*/, uint32 /*diff*/) { } + + // Called when a player opens a gossip dialog with the gameobject. + [[nodiscard]] virtual bool CanGameObjectGossipHello(Player* /*player*/, GameObject* /*go*/) { return false; } + + // Called when a player selects a gossip item in the gameobject's gossip menu. + [[nodiscard]] virtual bool CanGameObjectGossipSelect(Player* /*player*/, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/) { return false; } + + // Called when a player selects a gossip with a code in the gameobject's gossip menu. + [[nodiscard]] virtual bool CanGameObjectGossipSelectCode(Player* /*player*/, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { return false; } + + // Called when a player accepts a quest from the gameobject. + [[nodiscard]] virtual bool CanGameObjectQuestAccept(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/) { return false; } + + // Called when a player selects a quest reward. + [[nodiscard]] virtual bool CanGameObjectQuestReward(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; } + + // Called when the game object is destroyed (destructible buildings only). + virtual void OnGameObjectDestroyed(GameObject* /*go*/, Player* /*player*/) { } + + // Called when the game object is damaged (destructible buildings only). + virtual void OnGameObjectDamaged(GameObject* /*go*/, Player* /*player*/) { } + + // Called when the health of a game object is modified (destructible buildings only). + virtual void OnGameObjectModifyHealth(GameObject* /*go*/, Unit* /*attackerOrHealer*/, int32& /*change*/, SpellInfo const* /*spellInfo*/) { } + + // Called when the game object loot state is changed. + virtual void OnGameObjectLootStateChanged(GameObject* /*go*/, uint32 /*state*/, Unit* /*unit*/) { } + + // Called when the game object state is changed. + virtual void OnGameObjectStateChanged(GameObject* /*go*/, uint32 /*state*/) { } + + // Called when a GameObjectAI object is needed for the gameobject. + virtual GameObjectAI* GetGameObjectAI(GameObject* /*go*/) const { return nullptr; } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/ItemScript.cpp b/src/server/game/Scripting/ScriptDefines/AllItemScript.cpp similarity index 90% rename from src/server/game/Scripting/ScriptDefines/ItemScript.cpp rename to src/server/game/Scripting/ScriptDefines/AllItemScript.cpp index 44e82f0aa..c276bb5d0 100644 --- a/src/server/game/Scripting/ScriptDefines/ItemScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllItemScript.cpp @@ -15,6 +15,8 @@ * with this program. If not, see . */ +#include "AllItemScript.h" +#include "ItemScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" #include "ScriptedGossip.h" @@ -139,3 +141,18 @@ void ScriptMgr::OnGossipSelectCode(Player* player, Item* item, uint32 sender, ui tempScript->OnGossipSelectCode(player, item, sender, action, code); } } + +AllItemScript::AllItemScript(const char* name) : + ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +ItemScript::ItemScript(const char* name) : + ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AllItemScript.h b/src/server/game/Scripting/ScriptDefines/AllItemScript.h new file mode 100644 index 000000000..94c54c4b0 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AllItemScript.h @@ -0,0 +1,48 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ALL_ITEM_SCRIPT_H_ +#define SCRIPT_OBJECT_ALL_ITEM_SCRIPT_H_ + +#include "ScriptObject.h" + +class AllItemScript : public ScriptObject +{ +protected: + AllItemScript(const char* name); + +public: + // Called when a player accepts a quest from the item. + [[nodiscard]] virtual bool CanItemQuestAccept(Player* /*player*/, Item* /*item*/, Quest const* /*quest*/) { return true; } + + // Called when a player uses the item. + [[nodiscard]] virtual bool CanItemUse(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/) { return false; } + + // Called when the item is destroyed. + [[nodiscard]] virtual bool CanItemRemove(Player* /*player*/, Item* /*item*/) { return true; } + + // Called when the item expires (is destroyed). + [[nodiscard]] virtual bool CanItemExpire(Player* /*player*/, ItemTemplate const* /*proto*/) { return true; } + + // Called when a player selects an option in an item gossip window + virtual void OnItemGossipSelect(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/) { } + + // Called when a player selects an option in an item gossip window + virtual void OnItemGossipSelectCode(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/AllMapScript.cpp b/src/server/game/Scripting/ScriptDefines/AllMapScript.cpp index 5dc11d58b..e35700a12 100644 --- a/src/server/game/Scripting/ScriptDefines/AllMapScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllMapScript.cpp @@ -15,122 +15,65 @@ * with this program. If not, see . */ +#include "AllMapScript.h" +#include "BattlegroundMapScript.h" +#include "InstanceMapScript.h" +#include "PlayerScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" +#include "WorldMapScript.h" namespace { template - inline void ForeachMaps([[maybe_unused]] Map* map, [[maybe_unused]] std::function executeHook) - { - static_assert(Acore::dependant_false_v, "Unsupported type used for ForeachMaps"); - } - - template<> - inline void ForeachMaps(Map* map, std::function executeHook) + void ForeachMaps(Map* map, std::function const& executeHook) { auto mapEntry = map->GetEntry(); - if (!mapEntry) { return; } - if (!mapEntry->IsWorldMap()) + if constexpr (std::is_same_v) + { + if (!mapEntry->IsWorldMap()) + { + return; + } + } + else if constexpr (std::is_same_v) + { + if (!mapEntry->IsDungeon()) + { + return; + } + } + else if constexpr (std::is_same_v) + { + if (!mapEntry->IsBattleground()) + { + return; + } + } + else + { + static_assert(Acore::dependant_false_v, "Unsupported type used for ForeachMaps"); + } + + if (ScriptRegistry::ScriptPointerList.empty()) { return; } - if (ScriptRegistry::ScriptPointerList.empty()) + for (auto const& [scriptID, script] : ScriptRegistry::ScriptPointerList) { - return; - } - - for (auto const& [scriptID, script] : ScriptRegistry::ScriptPointerList) - { - MapEntry const* mapEntry = script->GetEntry(); - if (!mapEntry) + auto const scriptEntry = script->GetEntry(); + if (!scriptEntry) { continue; } - if (mapEntry->MapID != map->GetId()) - { - continue; - } - - executeHook(script); - return; - } - } - - template<> - inline void ForeachMaps(Map* map, std::function executeHook) - { - auto mapEntry = map->GetEntry(); - - if (!mapEntry) - { - return; - } - - if (!mapEntry->IsDungeon()) - { - return; - } - - if (ScriptRegistry::ScriptPointerList.empty()) - { - return; - } - - for (auto const& [scriptID, script] : ScriptRegistry::ScriptPointerList) - { - MapEntry const* mapEntry = script->GetEntry(); - if (!mapEntry) - { - continue; - } - - if (mapEntry->MapID != map->GetId()) - { - continue; - } - - executeHook(script); - return; - } - } - - template<> - inline void ForeachMaps(Map* map, std::function executeHook) - { - auto mapEntry = map->GetEntry(); - - if (!mapEntry) - { - return; - } - - if (!mapEntry->IsBattleground()) - { - return; - } - - if (ScriptRegistry::ScriptPointerList.empty()) - { - return; - } - - for (auto const& [scriptID, script] : ScriptRegistry::ScriptPointerList) - { - MapEntry const* mapEntry = script->GetEntry(); - if (!mapEntry) - { - continue; - } - - if (mapEntry->MapID != map->GetId()) + if (scriptEntry->MapID != map->GetId()) { continue; } @@ -151,22 +94,22 @@ void ScriptMgr::OnCreateMap(Map* map) }); ForeachMaps(map, - [&](WorldMapScript* script) - { - script->OnCreate(map); - }); + [&](WorldMapScript* script) + { + script->OnCreate(map); + }); ForeachMaps(map, - [&](InstanceMapScript* script) - { - script->OnCreate((InstanceMap*)map); - }); + [&](InstanceMapScript* script) + { + script->OnCreate((InstanceMap*)map); + }); ForeachMaps(map, - [&](BattlegroundMapScript* script) - { - script->OnCreate((BattlegroundMap*)map); - }); + [&](BattlegroundMapScript* script) + { + script->OnCreate((BattlegroundMap*)map); + }); } void ScriptMgr::OnDestroyMap(Map* map) @@ -179,22 +122,22 @@ void ScriptMgr::OnDestroyMap(Map* map) }); ForeachMaps(map, - [&](WorldMapScript* script) - { - script->OnDestroy(map); - }); + [&](WorldMapScript* script) + { + script->OnDestroy(map); + }); ForeachMaps(map, - [&](InstanceMapScript* script) - { - script->OnDestroy((InstanceMap*)map); - }); + [&](InstanceMapScript* script) + { + script->OnDestroy((InstanceMap*)map); + }); ForeachMaps(map, - [&](BattlegroundMapScript* script) - { - script->OnDestroy((BattlegroundMap*)map); - }); + [&](BattlegroundMapScript* script) + { + script->OnDestroy((BattlegroundMap*)map); + }); } void ScriptMgr::OnLoadGridMap(Map* map, GridMap* gmap, uint32 gx, uint32 gy) @@ -203,22 +146,22 @@ void ScriptMgr::OnLoadGridMap(Map* map, GridMap* gmap, uint32 gx, uint32 gy) ASSERT(gmap); ForeachMaps(map, - [&](WorldMapScript* script) - { - script->OnLoadGridMap(map, gmap, gx, gy); - }); + [&](WorldMapScript* script) + { + script->OnLoadGridMap(map, gmap, gx, gy); + }); ForeachMaps(map, - [&](InstanceMapScript* script) - { - script->OnLoadGridMap((InstanceMap*)map, gmap, gx, gy); - }); + [&](InstanceMapScript* script) + { + script->OnLoadGridMap((InstanceMap*)map, gmap, gx, gy); + }); ForeachMaps(map, - [&](BattlegroundMapScript* script) - { - script->OnLoadGridMap((BattlegroundMap*)map, gmap, gx, gy); - }); + [&](BattlegroundMapScript* script) + { + script->OnLoadGridMap((BattlegroundMap*)map, gmap, gx, gy); + }); } void ScriptMgr::OnUnloadGridMap(Map* map, GridMap* gmap, uint32 gx, uint32 gy) @@ -227,22 +170,22 @@ void ScriptMgr::OnUnloadGridMap(Map* map, GridMap* gmap, uint32 gx, uint32 gy) ASSERT(gmap); ForeachMaps(map, - [&](WorldMapScript* script) - { - script->OnUnloadGridMap(map, gmap, gx, gy); - }); + [&](WorldMapScript* script) + { + script->OnUnloadGridMap(map, gmap, gx, gy); + }); ForeachMaps(map, - [&](InstanceMapScript* script) - { - script->OnUnloadGridMap((InstanceMap*)map, gmap, gx, gy); - }); + [&](InstanceMapScript* script) + { + script->OnUnloadGridMap((InstanceMap*)map, gmap, gx, gy); + }); ForeachMaps(map, - [&](BattlegroundMapScript* script) - { - script->OnUnloadGridMap((BattlegroundMap*)map, gmap, gx, gy); - }); + [&](BattlegroundMapScript* script) + { + script->OnUnloadGridMap((BattlegroundMap*)map, gmap, gx, gy); + }); } void ScriptMgr::OnPlayerEnterMap(Map* map, Player* player) @@ -255,28 +198,28 @@ void ScriptMgr::OnPlayerEnterMap(Map* map, Player* player) script->OnPlayerEnterAll(map, player); }); - ExecuteScript([&](PlayerScript* script) + ExecuteScript([=](PlayerScript* script) { script->OnMapChanged(player); }); ForeachMaps(map, - [&](WorldMapScript* script) - { - script->OnPlayerEnter(map, player); - }); + [&](WorldMapScript* script) + { + script->OnPlayerEnter(map, player); + }); ForeachMaps(map, - [&](InstanceMapScript* script) - { - script->OnPlayerEnter((InstanceMap*)map, player); - }); + [&](InstanceMapScript* script) + { + script->OnPlayerEnter((InstanceMap*)map, player); + }); ForeachMaps(map, - [&](BattlegroundMapScript* script) - { - script->OnPlayerEnter((BattlegroundMap*)map, player); - }); + [&](BattlegroundMapScript* script) + { + script->OnPlayerEnter((BattlegroundMap*)map, player); + }); } void ScriptMgr::OnPlayerLeaveMap(Map* map, Player* player) @@ -290,22 +233,22 @@ void ScriptMgr::OnPlayerLeaveMap(Map* map, Player* player) }); ForeachMaps(map, - [&](WorldMapScript* script) - { - script->OnPlayerLeave(map, player); - }); + [&](WorldMapScript* script) + { + script->OnPlayerLeave(map, player); + }); ForeachMaps(map, - [&](InstanceMapScript* script) - { - script->OnPlayerLeave((InstanceMap*)map, player); - }); + [&](InstanceMapScript* script) + { + script->OnPlayerLeave((InstanceMap*)map, player); + }); ForeachMaps(map, - [&](BattlegroundMapScript* script) - { - script->OnPlayerLeave((BattlegroundMap*)map, player); - }); + [&](BattlegroundMapScript* script) + { + script->OnPlayerLeave((BattlegroundMap*)map, player); + }); } void ScriptMgr::OnMapUpdate(Map* map, uint32 diff) @@ -318,22 +261,22 @@ void ScriptMgr::OnMapUpdate(Map* map, uint32 diff) }); ForeachMaps(map, - [&](WorldMapScript* script) - { - script->OnUpdate(map, diff); - }); + [&](WorldMapScript* script) + { + script->OnUpdate(map, diff); + }); ForeachMaps(map, - [&](InstanceMapScript* script) - { - script->OnUpdate((InstanceMap*)map, diff); - }); + [&](InstanceMapScript* script) + { + script->OnUpdate((InstanceMap*)map, diff); + }); ForeachMaps(map, - [&](BattlegroundMapScript* script) - { - script->OnUpdate((BattlegroundMap*)map, diff); - }); + [&](BattlegroundMapScript* script) + { + script->OnUpdate((BattlegroundMap*)map, diff); + }); } void ScriptMgr::OnBeforeCreateInstanceScript(InstanceMap* instanceMap, InstanceScript* instanceData, bool load, std::string data, uint32 completedEncounterMask) @@ -351,3 +294,11 @@ void ScriptMgr::OnDestroyInstance(MapInstanced* mapInstanced, Map* map) script->OnDestroyInstance(mapInstanced, map); }); } + +AllMapScript::AllMapScript(const char* name) : + ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AllMapScript.h b/src/server/game/Scripting/ScriptDefines/AllMapScript.h new file mode 100644 index 000000000..f97198866 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AllMapScript.h @@ -0,0 +1,87 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ALL_MAP_SCRIPT_H_ +#define SCRIPT_OBJECT_ALL_MAP_SCRIPT_H_ + +#include "ScriptObject.h" + +class AllMapScript : public ScriptObject +{ +protected: + AllMapScript(const char* name); + +public: + /** + * @brief This hook called when a player enters any Map + * + * @param map Contains information about the Map + * @param player Contains information about the Player + */ + virtual void OnPlayerEnterAll(Map* /*map*/, Player* /*player*/) { } + + /** + * @brief This hook called when a player leave any Map + * + * @param map Contains information about the Map + * @param player Contains information about the Player + */ + virtual void OnPlayerLeaveAll(Map* /*map*/, Player* /*player*/) { } + + /** + * @brief This hook called before create instance script + * + * @param instanceMap Contains information about the WorldSession + * @param instanceData Contains information about the WorldPacket + * @param load if true loading instance save data + * @param data Contains information about the instance save data + * @param completedEncounterMask Contains information about the completed encouter mask + */ + virtual void OnBeforeCreateInstanceScript(InstanceMap* /*instanceMap*/, InstanceScript* /*instanceData*/, bool /*load*/, std::string /*data*/, uint32 /*completedEncounterMask*/) { } + + /** + * @brief This hook called before destroy instance + * + * @param mapInstanced Contains information about the MapInstanced + * @param map Contains information about the Map + */ + virtual void OnDestroyInstance(MapInstanced* /*mapInstanced*/, Map* /*map*/) { } + + /** + * @brief This hook called before creating map + * + * @param map Contains information about the Map + */ + virtual void OnCreateMap(Map* /*map*/) { } + + /** + * @brief This hook called before destroing map + * + * @param map Contains information about the Map + */ + virtual void OnDestroyMap(Map* /*map*/) { } + + /** + * @brief This hook called before updating map + * + * @param map Contains information about the Map + * @param diff Contains information about the diff time + */ + virtual void OnMapUpdate(Map* /*map*/, uint32 /*diff*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h b/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h new file mode 100644 index 000000000..aad81c070 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AllScriptsObjects.h @@ -0,0 +1,69 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef ALL_SCRIPT_OBJECTS_H_ +#define ALL_SCRIPT_OBJECTS_H_ + +#include "AccountScript.h" +#include "AchievementCriteriaScript.h" +#include "AchievementScript.h" +#include "AllBattlegroundScript.h" +#include "AllCommandScript.h" +#include "AllCreatureScript.h" +#include "AllGameObjectScript.h" +#include "AllItemScript.h" +#include "AllMapScript.h" +#include "AllSpellScript.h" +#include "AreaTriggerScript.h" +#include "ArenaScript.h" +#include "ArenaTeamScript.h" +#include "AuctionHouseScript.h" +#include "BattlegroundMapScript.h" +#include "BattlegroundScript.h" +#include "CommandScript.h" +#include "ConditionScript.h" +#include "CreatureScript.h" +#include "DatabaseScript.h" +#include "DynamicObjectScript.h" +#include "ElunaScript.h" +#include "FormulaScript.h" +#include "GameEventScript.h" +#include "GameObjectScript.h" +#include "GlobalScript.h" +#include "GroupScript.h" +#include "GuildScript.h" +#include "InstanceMapScript.h" +#include "ItemScript.h" +#include "LootScript.h" +#include "MailScript.h" +#include "MiscScript.h" +#include "ModuleScript.h" +#include "MovementHandlerScript.h" +#include "OutdoorPvPScript.h" +#include "PetScript.h" +#include "PlayerScript.h" +#include "ServerScript.h" +#include "SpellScriptLoader.h" +#include "TransportScript.h" +#include "UnitScript.h" +#include "VehicleScript.h" +#include "WeatherScript.h" +#include "WorldMapScript.h" +#include "WorldObjectScript.h" +#include "WorldScript.h" + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/SpellSC.cpp b/src/server/game/Scripting/ScriptDefines/AllSpellScript.cpp similarity index 77% rename from src/server/game/Scripting/ScriptDefines/SpellSC.cpp rename to src/server/game/Scripting/ScriptDefines/AllSpellScript.cpp index c84bb104e..b0f4948bb 100644 --- a/src/server/game/Scripting/ScriptDefines/SpellSC.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllSpellScript.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "AllSpellScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" void ScriptMgr::OnCalcMaxDuration(Aura const* aura, int32& maxDuration) { - ExecuteScript([&](SpellSC* script) + ExecuteScript([&](AllSpellScript* script) { script->OnCalcMaxDuration(aura, maxDuration); }); @@ -28,7 +29,7 @@ void ScriptMgr::OnCalcMaxDuration(Aura const* aura, int32& maxDuration) bool ScriptMgr::CanModAuraEffectDamageDone(AuraEffect const* auraEff, Unit* target, AuraApplication const* aurApp, uint8 mode, bool apply) { - auto ret = IsValidBoolScript([&](SpellSC* script) + auto ret = IsValidBoolScript([&](AllSpellScript* script) { return !script->CanModAuraEffectDamageDone(auraEff, target, aurApp, mode, apply); }); @@ -43,7 +44,7 @@ bool ScriptMgr::CanModAuraEffectDamageDone(AuraEffect const* auraEff, Unit* targ bool ScriptMgr::CanModAuraEffectModDamagePercentDone(AuraEffect const* auraEff, Unit* target, AuraApplication const* aurApp, uint8 mode, bool apply) { - auto ret = IsValidBoolScript([&](SpellSC* script) + auto ret = IsValidBoolScript([&](AllSpellScript* script) { return !script->CanModAuraEffectModDamagePercentDone(auraEff, target, aurApp, mode, apply); }); @@ -58,7 +59,7 @@ bool ScriptMgr::CanModAuraEffectModDamagePercentDone(AuraEffect const* auraEff, void ScriptMgr::OnSpellCheckCast(Spell* spell, bool strict, SpellCastResult& res) { - ExecuteScript([&](SpellSC* script) + ExecuteScript([&](AllSpellScript* script) { script->OnSpellCheckCast(spell, strict, res); }); @@ -66,7 +67,7 @@ void ScriptMgr::OnSpellCheckCast(Spell* spell, bool strict, SpellCastResult& res bool ScriptMgr::CanPrepare(Spell* spell, SpellCastTargets const* targets, AuraEffect const* triggeredByAura) { - auto ret = IsValidBoolScript([&](SpellSC* script) + auto ret = IsValidBoolScript([&](AllSpellScript* script) { return !script->CanPrepare(spell, targets, triggeredByAura); }); @@ -81,7 +82,7 @@ bool ScriptMgr::CanPrepare(Spell* spell, SpellCastTargets const* targets, AuraEf bool ScriptMgr::CanScalingEverything(Spell* spell) { - auto ret = IsValidBoolScript([&](SpellSC* script) + auto ret = IsValidBoolScript([&](AllSpellScript* script) { return script->CanScalingEverything(spell); }); @@ -96,7 +97,7 @@ bool ScriptMgr::CanScalingEverything(Spell* spell) bool ScriptMgr::CanSelectSpecTalent(Spell* spell) { - auto ret = IsValidBoolScript([&](SpellSC* script) + auto ret = IsValidBoolScript([&](AllSpellScript* script) { return !script->CanSelectSpecTalent(spell); }); @@ -111,7 +112,7 @@ bool ScriptMgr::CanSelectSpecTalent(Spell* spell) void ScriptMgr::OnScaleAuraUnitAdd(Spell* spell, Unit* target, uint32 effectMask, bool checkIfValid, bool implicit, uint8 auraScaleMask, TargetInfo& targetInfo) { - ExecuteScript([&](SpellSC* script) + ExecuteScript([&](AllSpellScript* script) { script->OnScaleAuraUnitAdd(spell, target, effectMask, checkIfValid, implicit, auraScaleMask, targetInfo); }); @@ -119,7 +120,7 @@ void ScriptMgr::OnScaleAuraUnitAdd(Spell* spell, Unit* target, uint32 effectMask void ScriptMgr::OnRemoveAuraScaleTargets(Spell* spell, TargetInfo& targetInfo, uint8 auraScaleMask, bool& needErase) { - ExecuteScript([&](SpellSC* script) + ExecuteScript([&](AllSpellScript* script) { script->OnRemoveAuraScaleTargets(spell, targetInfo, auraScaleMask, needErase); }); @@ -127,7 +128,7 @@ void ScriptMgr::OnRemoveAuraScaleTargets(Spell* spell, TargetInfo& targetInfo, u void ScriptMgr::OnBeforeAuraRankForLevel(SpellInfo const* spellInfo, SpellInfo const* latestSpellInfo, uint8 level) { - ExecuteScript([&](SpellSC* script) + ExecuteScript([&](AllSpellScript* script) { script->OnBeforeAuraRankForLevel(spellInfo, latestSpellInfo, level); }); @@ -135,7 +136,7 @@ void ScriptMgr::OnBeforeAuraRankForLevel(SpellInfo const* spellInfo, SpellInfo c void ScriptMgr::OnDummyEffect(WorldObject* caster, uint32 spellID, SpellEffIndex effIndex, GameObject* gameObjTarget) { - ExecuteScript([&](SpellSC* script) + ExecuteScript([&](AllSpellScript* script) { script->OnDummyEffect(caster, spellID, effIndex, gameObjTarget); }); @@ -143,7 +144,7 @@ void ScriptMgr::OnDummyEffect(WorldObject* caster, uint32 spellID, SpellEffIndex void ScriptMgr::OnDummyEffect(WorldObject* caster, uint32 spellID, SpellEffIndex effIndex, Creature* creatureTarget) { - ExecuteScript([&](SpellSC* script) + ExecuteScript([&](AllSpellScript* script) { script->OnDummyEffect(caster, spellID, effIndex, creatureTarget); }); @@ -151,8 +152,16 @@ void ScriptMgr::OnDummyEffect(WorldObject* caster, uint32 spellID, SpellEffIndex void ScriptMgr::OnDummyEffect(WorldObject* caster, uint32 spellID, SpellEffIndex effIndex, Item* itemTarget) { - ExecuteScript([&](SpellSC* script) + ExecuteScript([&](AllSpellScript* script) { script->OnDummyEffect(caster, spellID, effIndex, itemTarget); }); } + +AllSpellScript::AllSpellScript(char const* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AllSpellScript.h b/src/server/game/Scripting/ScriptDefines/AllSpellScript.h new file mode 100644 index 000000000..2e1899403 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AllSpellScript.h @@ -0,0 +1,89 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ALL_SPELL_SCRIPT_H_ +#define SCRIPT_OBJECT_ALL_SPELL_SCRIPT_H_ + +#include "ScriptObject.h" + +enum SpellCastResult : uint8; +enum SpellEffIndex : uint8; + +class AllSpellScript : public ScriptObject +{ +protected: + AllSpellScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + // Calculate max duration in applying aura + virtual void OnCalcMaxDuration(Aura const* /*aura*/, int32& /*maxDuration*/) { } + + [[nodiscard]] virtual bool CanModAuraEffectDamageDone(AuraEffect const* /*auraEff*/, Unit* /*target*/, AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/) { return true; } + + [[nodiscard]] virtual bool CanModAuraEffectModDamagePercentDone(AuraEffect const* /*auraEff*/, Unit* /*target*/, AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/) { return true; } + + virtual void OnSpellCheckCast(Spell* /*spell*/, bool /*strict*/, SpellCastResult& /*res*/) { } + + [[nodiscard]] virtual bool CanPrepare(Spell* /*spell*/, SpellCastTargets const* /*targets*/, AuraEffect const* /*triggeredByAura*/) { return true; } + + [[nodiscard]] virtual bool CanScalingEverything(Spell* /*spell*/) { return false; } + + [[nodiscard]] virtual bool CanSelectSpecTalent(Spell* /*spell*/) { return true; } + + virtual void OnScaleAuraUnitAdd(Spell* /*spell*/, Unit* /*target*/, uint32 /*effectMask*/, bool /*checkIfValid*/, bool /*implicit*/, uint8 /*auraScaleMask*/, TargetInfo& /*targetInfo*/) { } + + virtual void OnRemoveAuraScaleTargets(Spell* /*spell*/, TargetInfo& /*targetInfo*/, uint8 /*auraScaleMask*/, bool& /*needErase*/) { } + + virtual void OnBeforeAuraRankForLevel(SpellInfo const* /*spellInfo*/, SpellInfo const* /*latestSpellInfo*/, uint8 /*level*/) { } + + /** + * @brief This hook called after spell dummy effect + * + * @param caster Contains information about the WorldObject + * @param spellID Contains information about the spell id + * @param effIndex Contains information about the SpellEffIndex + * @param gameObjTarget Contains information about the GameObject + */ + virtual void OnDummyEffect(WorldObject* /*caster*/, uint32 /*spellID*/, SpellEffIndex /*effIndex*/, GameObject* /*gameObjTarget*/) { } + + /** + * @brief This hook called after spell dummy effect + * + * @param caster Contains information about the WorldObject + * @param spellID Contains information about the spell id + * @param effIndex Contains information about the SpellEffIndex + * @param creatureTarget Contains information about the Creature + */ + virtual void OnDummyEffect(WorldObject* /*caster*/, uint32 /*spellID*/, SpellEffIndex /*effIndex*/, Creature* /*creatureTarget*/) { } + + /** + * @brief This hook called after spell dummy effect + * + * @param caster Contains information about the WorldObject + * @param spellID Contains information about the spell id + * @param effIndex Contains information about the SpellEffIndex + * @param itemTarget Contains information about the Item + */ + virtual void OnDummyEffect(WorldObject* /*caster*/, uint32 /*spellID*/, SpellEffIndex /*effIndex*/, Item* /*itemTarget*/) { } +}; + +// Compatibility for old scripts +using SpellSC = AllSpellScript; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp b/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp index fa3a04deb..6d3429606 100644 --- a/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.cpp @@ -15,6 +15,9 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "ElunaScript.h" +#include "Player.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -36,3 +39,43 @@ bool ScriptMgr::OnAreaTrigger(Player* player, AreaTrigger const* trigger) auto tempScript = ScriptRegistry::GetScriptById(sObjectMgr->GetAreaTriggerScriptId(trigger->entry)); return tempScript ? tempScript->OnTrigger(player, trigger) : false; } + +AreaTriggerScript::AreaTriggerScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +bool OnlyOnceAreaTriggerScript::OnTrigger(Player* player, AreaTrigger const* trigger) +{ + uint32 const triggerId = trigger->entry; + + if (InstanceScript* instance = player->GetInstanceScript()) + { + if (instance->IsAreaTriggerDone(triggerId)) + { + return true; + } + else + { + instance->MarkAreaTriggerDone(triggerId); + } + } + + return _OnTrigger(player, trigger); +} + +void OnlyOnceAreaTriggerScript::ResetAreaTriggerDone(InstanceScript* script, uint32 triggerId) +{ + script->ResetAreaTriggerDone(triggerId); +} + +void OnlyOnceAreaTriggerScript::ResetAreaTriggerDone(Player const* player, AreaTrigger const* trigger) +{ + if (InstanceScript* instance = player->GetInstanceScript()) + { + ResetAreaTriggerDone(instance, trigger->entry); + } +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.h b/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.h new file mode 100644 index 000000000..1ce1e59d0 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AreaTriggerScript.h @@ -0,0 +1,48 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_AREA_TRIGGER_SCRIPT_H_ +#define SCRIPT_OBJECT_AREA_TRIGGER_SCRIPT_H_ + +#include "ScriptObject.h" + +class AreaTriggerScript : public ScriptObject +{ +protected: + AreaTriggerScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + // Called when the area trigger is activated by a player. + [[nodiscard]] virtual bool OnTrigger(Player* /*player*/, AreaTrigger const* /*trigger*/) { return false; } +}; + +class OnlyOnceAreaTriggerScript : public AreaTriggerScript +{ + using AreaTriggerScript::AreaTriggerScript; + +public: + [[nodiscard]] bool OnTrigger(Player* /*player*/, AreaTrigger const* /*trigger*/) override; + +protected: + virtual bool _OnTrigger(Player* /*player*/, AreaTrigger const* /*trigger*/) = 0; + void ResetAreaTriggerDone(InstanceScript* /*instance*/, uint32 /*triggerId*/); + void ResetAreaTriggerDone(Player const* /*player*/, AreaTrigger const* /*trigger*/); +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/ArenaScript.cpp b/src/server/game/Scripting/ScriptDefines/ArenaScript.cpp index 0bfc33184..89303ba95 100644 --- a/src/server/game/Scripting/ScriptDefines/ArenaScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/ArenaScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "ArenaScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -55,3 +56,11 @@ bool ScriptMgr::CanSaveToDB(ArenaTeam* team) return true; } + +ArenaScript::ArenaScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/ArenaScript.h b/src/server/game/Scripting/ScriptDefines/ArenaScript.h new file mode 100644 index 000000000..0d7cb7e93 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/ArenaScript.h @@ -0,0 +1,41 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ARENA_SCRIPT_H_ +#define SCRIPT_OBJECT_ARENA_SCRIPT_H_ + +#include "ObjectGuid.h" +#include "ScriptObject.h" + +class ArenaScript : public ScriptObject +{ +protected: + + ArenaScript(const char* name); + +public: + + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + [[nodiscard]] virtual bool CanAddMember(ArenaTeam* /*team*/, ObjectGuid /*PlayerGuid*/) { return true; } + + virtual void OnGetPoints(ArenaTeam* /*team*/, uint32 /*memberRating*/, float& /*points*/) { } + + [[nodiscard]] virtual bool CanSaveToDB(ArenaTeam* /*team*/) { return true; } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.cpp b/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.cpp index 25555347a..7ddf58f9f 100644 --- a/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "ArenaTeamScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -57,3 +58,11 @@ void ScriptMgr::OnSetArenaMaxPlayersPerTeam(const uint8 arenaType, uint32& maxPl script->OnSetArenaMaxPlayersPerTeam(arenaType, maxPlayerPerTeam); }); } + +ArenaTeamScript::ArenaTeamScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.h b/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.h new file mode 100644 index 000000000..256d5c510 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/ArenaTeamScript.h @@ -0,0 +1,39 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ARENA_TEAM_SCRIPT_H_ +#define SCRIPT_OBJECT_ARENA_TEAM_SCRIPT_H_ + +#include "Battleground.h" +#include "ScriptObject.h" + +class ArenaTeamScript : public ScriptObject +{ +protected: + ArenaTeamScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; }; + + virtual void OnGetSlotByType(const uint32 /*type*/, uint8& /*slot*/) {} + virtual void OnGetArenaPoints(ArenaTeam* /*team*/, float& /*points*/) {} + virtual void OnTypeIDToQueueID(const BattlegroundTypeId /*bgTypeId*/, const uint8 /*arenaType*/, uint32& /*queueTypeID*/) {} + virtual void OnQueueIdToArenaType(const BattlegroundQueueTypeId /*bgQueueTypeId*/, uint8& /*ArenaType*/) {} + virtual void OnSetArenaMaxPlayersPerTeam(const uint8 /*arenaType*/, uint32& /*maxPlayerPerTeam*/) {} +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.cpp b/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.cpp index e0255d26d..4664d1b95 100644 --- a/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "AuctionHouseScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -117,3 +118,11 @@ void ScriptMgr::OnBeforeAuctionHouseMgrUpdate() script->OnBeforeAuctionHouseMgrUpdate(); }); } + +AuctionHouseScript::AuctionHouseScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.h b/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.h new file mode 100644 index 000000000..02cacd112 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/AuctionHouseScript.h @@ -0,0 +1,63 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_AUCTION_HOUSE_SCRIPT_H_ +#define SCRIPT_OBJECT_AUCTION_HOUSE_SCRIPT_H_ + +#include "ScriptObject.h" + +class AuctionHouseScript : public ScriptObject +{ +protected: + AuctionHouseScript(const char* name); + +public: + // Called when an auction is added to an auction house. + virtual void OnAuctionAdd(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { } + + // Called when an auction is removed from an auction house. + virtual void OnAuctionRemove(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { } + + // Called when an auction was succesfully completed. + virtual void OnAuctionSuccessful(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { } + + // Called when an auction expires. + virtual void OnAuctionExpire(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { } + + // Called before sending the mail concerning a won auction + virtual void OnBeforeAuctionHouseMgrSendAuctionWonMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*bidder*/, uint32& /*bidder_accId*/, bool& /*sendNotification*/, bool& /*updateAchievementCriteria*/, bool& /*sendMail*/) { } + + // Called before sending the mail concerning a pending sale + virtual void OnBeforeAuctionHouseMgrSendAuctionSalePendingMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*owner*/, uint32& /*owner_accId*/, bool& /*sendMail*/) { } + + // Called before sending the mail concerning a successful auction + virtual void OnBeforeAuctionHouseMgrSendAuctionSuccessfulMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*owner*/, uint32& /*owner_accId*/, uint32& /*profit*/, bool& /*sendNotification*/, bool& /*updateAchievementCriteria*/, bool& /*sendMail*/) { } + + // Called before sending the mail concerning an expired auction + virtual void OnBeforeAuctionHouseMgrSendAuctionExpiredMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*owner*/, uint32& /*owner_accId*/, bool& /*sendNotification*/, bool& /*sendMail*/) { } + + // Called before sending the mail concerning an outbidded auction + virtual void OnBeforeAuctionHouseMgrSendAuctionOutbiddedMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*oldBidder*/, uint32& /*oldBidder_accId*/, Player* /*newBidder*/, uint32& /*newPrice*/, bool& /*sendNotification*/, bool& /*sendMail*/) { } + + // Called before sending the mail concerning an cancelled auction + virtual void OnBeforeAuctionHouseMgrSendAuctionCancelledToBidderMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*bidder*/, uint32& /*bidder_accId*/, bool& /*sendMail*/) { } + + // Called before updating the auctions + virtual void OnBeforeAuctionHouseMgrUpdate() { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.cpp b/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.cpp new file mode 100644 index 000000000..1d0ac139a --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.cpp @@ -0,0 +1,38 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "BattlegroundMapScript.h" +#include "Log.h" +#include "ScriptMgr.h" + +BattlegroundMapScript::BattlegroundMapScript(const char* name, uint32 mapId) : + ScriptObject(name), MapScript(mapId) +{ + ScriptRegistry::AddScript(this); +} + +void BattlegroundMapScript::checkValidity() +{ + checkMap(); + + if (GetEntry() && !GetEntry()->IsBattleground()) + { + LOG_ERROR("maps.script", "BattlegroundMapScript for map {} is invalid.", GetEntry()->MapID); + } +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.h b/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.h new file mode 100644 index 000000000..c0c9c4518 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/BattlegroundMapScript.h @@ -0,0 +1,34 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_BATTLEGROUND_MAP_SCRIPT_H_ +#define SCRIPT_OBJECT_BATTLEGROUND_MAP_SCRIPT_H_ + +#include "ScriptObject.h" + +class BattlegroundMapScript : public ScriptObject, public MapScript +{ +protected: + BattlegroundMapScript(const char* name, uint32 mapId); + +public: + [[nodiscard]] bool isAfterLoadScript() const override { return true; } + + void checkValidity() override; +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/BattlegroundScript.cpp b/src/server/game/Scripting/ScriptDefines/BattlegroundScript.cpp index 272b62f0a..89cb1462e 100644 --- a/src/server/game/Scripting/ScriptDefines/BattlegroundScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/BattlegroundScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "BattlegroundScript.h" #include "ScriptMgr.h" Battleground* ScriptMgr::CreateBattleground(BattlegroundTypeId /*typeId*/) @@ -23,3 +24,11 @@ Battleground* ScriptMgr::CreateBattleground(BattlegroundTypeId /*typeId*/) ABORT(); return nullptr; } + +BattlegroundScript::BattlegroundScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/BattlegroundScript.h b/src/server/game/Scripting/ScriptDefines/BattlegroundScript.h new file mode 100644 index 000000000..70b59f2d4 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/BattlegroundScript.h @@ -0,0 +1,35 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_BATTLEGROUND_SCRIPT_H_ +#define SCRIPT_OBJECT_BATTLEGROUND_SCRIPT_H_ + +#include "ScriptObject.h" + +class BattlegroundScript : public ScriptObject +{ +protected: + BattlegroundScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + // Should return a fully valid Battleground object for the type ID. + [[nodiscard]] virtual Battleground* GetBattleground() const = 0; +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/CommandScript.cpp b/src/server/game/Scripting/ScriptDefines/CommandScript.cpp index e0b7c0afc..5d930ec0a 100644 --- a/src/server/game/Scripting/ScriptDefines/CommandScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/CommandScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "CommandScript.h" #include "Chat.h" #include "ScriptMgr.h" @@ -30,3 +31,11 @@ Acore::ChatCommands::ChatCommandTable ScriptMgr::GetChatCommands() return table; } + +CommandScript::CommandScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/CommandScript.h b/src/server/game/Scripting/ScriptDefines/CommandScript.h new file mode 100644 index 000000000..397332481 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/CommandScript.h @@ -0,0 +1,34 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_COMMAND_SCRIPT_H_ +#define SCRIPT_OBJECT_COMMAND_SCRIPT_H_ + +#include "ScriptObject.h" +#include + +class CommandScript : public ScriptObject +{ +protected: + CommandScript(const char* name); + +public: + // Should return a pointer to a valid command table (ChatCommand array) to be used by ChatHandler. + [[nodiscard]] virtual std::vector GetCommands() const = 0; +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/ConditionScript.cpp b/src/server/game/Scripting/ScriptDefines/ConditionScript.cpp index 99aacfc82..eab4efb6f 100644 --- a/src/server/game/Scripting/ScriptDefines/ConditionScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/ConditionScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "ConditionScript.h" #include "ScriptMgr.h" bool ScriptMgr::OnConditionCheck(Condition* condition, ConditionSourceInfo& sourceInfo) @@ -24,3 +25,11 @@ bool ScriptMgr::OnConditionCheck(Condition* condition, ConditionSourceInfo& sour auto tempScript = ScriptRegistry::GetScriptById(condition->ScriptId); return tempScript ? tempScript->OnConditionCheck(condition, sourceInfo) : true; } + +ConditionScript::ConditionScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/ConditionScript.h b/src/server/game/Scripting/ScriptDefines/ConditionScript.h new file mode 100644 index 000000000..3f7295e82 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/ConditionScript.h @@ -0,0 +1,35 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_CONDITION_SCRIPT_H_ +#define SCRIPT_OBJECT_CONDITION_SCRIPT_H_ + +#include "ScriptObject.h" + +class ConditionScript : public ScriptObject +{ +protected: + ConditionScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + // Called when a single condition is checked for a player. + [[nodiscard]] virtual bool OnConditionCheck(Condition* /*condition*/, ConditionSourceInfo& /*sourceInfo*/) { return true; } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/CreatureScript.cpp b/src/server/game/Scripting/ScriptDefines/CreatureScript.cpp index 375489a3c..d1a76580d 100644 --- a/src/server/game/Scripting/ScriptDefines/CreatureScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/CreatureScript.cpp @@ -15,6 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "AllCreatureScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" #include "ScriptedGossip.h" @@ -192,3 +194,11 @@ void ScriptMgr::OnCreatureUpdate(Creature* creature, uint32 diff) tempScript->OnUpdate(creature, diff); } } + +CreatureScript::CreatureScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/CreatureScript.h b/src/server/game/Scripting/ScriptDefines/CreatureScript.h new file mode 100644 index 000000000..4fab28f94 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/CreatureScript.h @@ -0,0 +1,83 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_CREATURE_SCRIPT_H_ +#define SCRIPT_OBJECT_CREATURE_SCRIPT_H_ + +#include "QuestDef.h" +#include "ScriptObject.h" + +class CreatureScript : public ScriptObject, public UpdatableScript +{ +protected: + CreatureScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + // Called when a player opens a gossip dialog with the creature. + [[nodiscard]] virtual bool OnGossipHello(Player* /*player*/, Creature* /*creature*/) { return false; } + + // Called when a player selects a gossip item in the creature's gossip menu. + [[nodiscard]] virtual bool OnGossipSelect(Player* /*player*/, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/) { return false; } + + // Called when a player selects a gossip with a code in the creature's gossip menu. + [[nodiscard]] virtual bool OnGossipSelectCode(Player* /*player*/, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { return false; } + + // Called when a player accepts a quest from the creature. + [[nodiscard]] virtual bool OnQuestAccept(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; } + + // Called when a player selects a quest in the creature's quest menu. + [[nodiscard]] virtual bool OnQuestSelect(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; } + + // Called when a player completes a quest with the creature. + [[nodiscard]] virtual bool OnQuestComplete(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; } + + // Called when a player selects a quest reward. + [[nodiscard]] virtual bool OnQuestReward(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; } + + // Called when the dialog status between a player and the creature is requested. + virtual uint32 GetDialogStatus(Player* /*player*/, Creature* /*creature*/) { return DIALOG_STATUS_SCRIPTED_NO_STATUS; } + + // Called when a CreatureAI object is needed for the creature. + virtual CreatureAI* GetAI(Creature* /*creature*/) const { return nullptr; } + + //Called whenever the UNIT_BYTE2_FLAG_FFA_PVP bit is Changed on the player + virtual void OnFfaPvpStateUpdate(Creature* /*player*/, bool /*result*/) { } +}; + +template +class GenericCreatureScript : public CreatureScript +{ +public: + GenericCreatureScript(char const* name) : CreatureScript(name) { } + CreatureAI* GetAI(Creature* me) const override { return new AI(me); } +}; + +#define RegisterCreatureAI(ai_name) new GenericCreatureScript(#ai_name) + +template +class FactoryCreatureScript : public CreatureScript +{ +public: + FactoryCreatureScript(char const* name) : CreatureScript(name) { } + CreatureAI* GetAI(Creature* me) const override { return AIFactory(me); } +}; + +#define RegisterCreatureAIWithFactory(ai_name, factory_fn) new FactoryCreatureScript(#ai_name) + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp b/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp index 2bc860e0b..fcb21f187 100644 --- a/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/DatabaseScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "DatabaseScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -33,3 +34,10 @@ void ScriptMgr::OnAfterDatabaseLoadCreatureTemplates(std::vectorOnAfterDatabaseLoadCreatureTemplates(creatureTemplates); }); } + +DatabaseScript::DatabaseScript(const char* name) : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/DatabaseScript.h b/src/server/game/Scripting/ScriptDefines/DatabaseScript.h new file mode 100644 index 000000000..c975626d4 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/DatabaseScript.h @@ -0,0 +1,50 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_DATABASE_SCRIPT_H_ +#define SCRIPT_OBJECT_DATABASE_SCRIPT_H_ + +#include "ScriptObject.h" +#include + +class DatabaseScript : public ScriptObject +{ +protected: + + DatabaseScript(const char* name); + +public: + + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + /** + * @brief Called after all databases are loaded + * + * @param updateFlags Update flags from the loader + */ + virtual void OnAfterDatabasesLoaded(uint32 /*updateFlags*/) { } + + /** + * @brief Called after all creature template data has been loaded from the database. This hook could be called multiple times, not just at server startup. + * + * @param creatureTemplates Pointer to a modifiable vector of creature templates. Indexed by Entry ID. + */ + virtual void OnAfterDatabaseLoadCreatureTemplates(std::vector /*creatureTemplates*/) { } + +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.cpp index cf2f3ebf1..a3dc5ebfa 100644 --- a/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "DynamicObjectScript.h" #include "ScriptMgr.h" void ScriptMgr::OnDynamicObjectUpdate(DynamicObject* dynobj, uint32 diff) @@ -26,3 +27,11 @@ void ScriptMgr::OnDynamicObjectUpdate(DynamicObject* dynobj, uint32 diff) script->OnUpdate(dynobj, diff); } } + +DynamicObjectScript::DynamicObjectScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.h b/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.h new file mode 100644 index 000000000..b29f5a6bc --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/DynamicObjectScript.h @@ -0,0 +1,29 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_DYNAMIC_OBJECT_SCRIPT_H_ +#define SCRIPT_OBJECT_DYNAMIC_OBJECT_SCRIPT_H_ + +#include "ScriptObject.h" + +class DynamicObjectScript : public ScriptObject, public UpdatableScript +{ +protected: + DynamicObjectScript(const char* name); +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/ElunaScript.cpp b/src/server/game/Scripting/ScriptDefines/ElunaScript.cpp new file mode 100644 index 000000000..fbaa7af76 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/ElunaScript.cpp @@ -0,0 +1,26 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "ElunaScript.h" +#include "ScriptMgr.h" + +ElunaScript::ElunaScript(const char* name) : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/ElunaScript.h b/src/server/game/Scripting/ScriptDefines/ElunaScript.h new file mode 100644 index 000000000..da028a7ba --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/ElunaScript.h @@ -0,0 +1,42 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ELUNA_SCRIPT_H_ +#define SCRIPT_OBJECT_ELUNA_SCRIPT_H_ + +#include "ScriptObject.h" + +class ElunaScript : public ScriptObject +{ +protected: + ElunaScript(const char* name); + +public: + /** + * @brief This hook called when the weather changes in the zone this script is associated with. + * + * @param weather Contains information about the Weather + * @param state Contains information about the WeatherState + * @param grade Contains information about the grade + */ + virtual void OnWeatherChange(Weather* /*weather*/, WeatherState /*state*/, float /*grade*/) { } + + // Called when the area trigger is activated by a player. + [[nodiscard]] virtual bool CanAreaTrigger(Player* /*player*/, AreaTrigger const* /*trigger*/) { return false; } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/FormulaScript.cpp b/src/server/game/Scripting/ScriptDefines/FormulaScript.cpp index c4d029b0a..d9b276f78 100644 --- a/src/server/game/Scripting/ScriptDefines/FormulaScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/FormulaScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "FormulaScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -92,3 +93,11 @@ void ScriptMgr::OnBeforeUpdatingPersonalRating(int32& mod, uint32 type) script->OnBeforeUpdatingPersonalRating(mod, type); }); } + +FormulaScript::FormulaScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/FormulaScript.h b/src/server/game/Scripting/ScriptDefines/FormulaScript.h new file mode 100644 index 000000000..7f664be16 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/FormulaScript.h @@ -0,0 +1,59 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_FORMULA_SCRIPT_H_ +#define SCRIPT_OBJECT_FORMULA_SCRIPT_H_ + +#include "ScriptObject.h" + +enum XPColorChar : uint8; + +class FormulaScript : public ScriptObject +{ +protected: + FormulaScript(const char* name); + +public: + // Called after calculating honor. + virtual void OnHonorCalculation(float& /*honor*/, uint8 /*level*/, float /*multiplier*/) { } + + // Called after gray level calculation. + virtual void OnGrayLevelCalculation(uint8& /*grayLevel*/, uint8 /*playerLevel*/) { } + + // Called after calculating experience color. + virtual void OnColorCodeCalculation(XPColorChar& /*color*/, uint8 /*playerLevel*/, uint8 /*mobLevel*/) { } + + // Called after calculating zero difference. + virtual void OnZeroDifferenceCalculation(uint8& /*diff*/, uint8 /*playerLevel*/) { } + + // Called after calculating base experience gain. + virtual void OnBaseGainCalculation(uint32& /*gain*/, uint8 /*playerLevel*/, uint8 /*mobLevel*/, ContentLevels /*content*/) { } + + // Called after calculating experience gain. + virtual void OnGainCalculation(uint32& /*gain*/, Player* /*player*/, Unit* /*unit*/) { } + + // Called when calculating the experience rate for group experience. + virtual void OnGroupRateCalculation(float& /*rate*/, uint32 /*count*/, bool /*isRaid*/) { } + + // Called after calculating arena rating changes + virtual void OnAfterArenaRatingCalculation(Battleground* const /*bg*/, int32& /*winnerMatchmakerChange*/, int32& /*loserMatchmakerChange*/, int32& /*winnerChange*/, int32& /*loserChange*/) { }; + + // Called before modifying a player's personal rating + virtual void OnBeforeUpdatingPersonalRating(int32& /*mod*/, uint32 /*type*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/GameEventScript.cpp b/src/server/game/Scripting/ScriptDefines/GameEventScript.cpp index 2382092ab..5714bf433 100644 --- a/src/server/game/Scripting/ScriptDefines/GameEventScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/GameEventScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "GameEventScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -41,3 +42,11 @@ void ScriptMgr::OnGameEventCheck(uint16 EventID) script->OnEventCheck(EventID); }); } + +GameEventScript::GameEventScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/GameEventScript.h b/src/server/game/Scripting/ScriptDefines/GameEventScript.h new file mode 100644 index 000000000..9fe40a3f3 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/GameEventScript.h @@ -0,0 +1,39 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_GAME_EVENT_SCRIPT_H_ +#define SCRIPT_OBJECT_GAME_EVENT_SCRIPT_H_ + +#include "ScriptObject.h" + +class GameEventScript : public ScriptObject +{ +protected: + GameEventScript(const char* name); + +public: + // Runs on start event + virtual void OnStart(uint16 /*EventID*/) { } + + // Runs on stop event + virtual void OnStop(uint16 /*EventID*/) { } + + // Runs on event check + virtual void OnEventCheck(uint16 /*EventID*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp index 54dc08228..0deb121d0 100644 --- a/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/GameObjectScript.cpp @@ -15,6 +15,8 @@ * with this program. If not, see . */ +#include "GameObjectScript.h" +#include "AllGameObjectScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" #include "ScriptedGossip.h" @@ -36,7 +38,7 @@ bool ScriptMgr::OnGossipHello(Player* player, GameObject* go) auto tempScript = ScriptRegistry::GetScriptById(go->GetScriptId()); ClearGossipMenuFor(player); - return tempScript ? tempScript->OnGossipHello(player, go) : false; + return tempScript && tempScript->OnGossipHello(player, go); } bool ScriptMgr::OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action) @@ -237,3 +239,11 @@ GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* go) auto tempScript = ScriptRegistry::GetScriptById(go->GetScriptId()); return tempScript ? tempScript->GetAI(go) : nullptr; } + +GameObjectScript::GameObjectScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/GameObjectScript.h b/src/server/game/Scripting/ScriptDefines/GameObjectScript.h new file mode 100644 index 000000000..4038eafac --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/GameObjectScript.h @@ -0,0 +1,90 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_GAMEOBJECT_SCRIPT_H_ +#define SCRIPT_OBJECT_GAMEOBJECT_SCRIPT_H_ + +#include "QuestDef.h" +#include "ScriptObject.h" + +class GameObjectScript : public ScriptObject, public UpdatableScript +{ +protected: + GameObjectScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + // Called when a player opens a gossip dialog with the gameobject. + [[nodiscard]] virtual bool OnGossipHello(Player* /*player*/, GameObject* /*go*/) { return false; } + + // Called when a player selects a gossip item in the gameobject's gossip menu. + [[nodiscard]] virtual bool OnGossipSelect(Player* /*player*/, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/) { return false; } + + // Called when a player selects a gossip with a code in the gameobject's gossip menu. + [[nodiscard]] virtual bool OnGossipSelectCode(Player* /*player*/, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { return false; } + + // Called when a player accepts a quest from the gameobject. + [[nodiscard]] virtual bool OnQuestAccept(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/) { return false; } + + // Called when a player selects a quest reward. + [[nodiscard]] virtual bool OnQuestReward(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; } + + // Called when the dialog status between a player and the gameobject is requested. + virtual uint32 GetDialogStatus(Player* /*player*/, GameObject* /*go*/) { return DIALOG_STATUS_SCRIPTED_NO_STATUS; } + + // Called when the game object is destroyed (destructible buildings only). + virtual void OnDestroyed(GameObject* /*go*/, Player* /*player*/) { } + + // Called when the game object is damaged (destructible buildings only). + virtual void OnDamaged(GameObject* /*go*/, Player* /*player*/) { } + + // Called when the health of a game object is modified (destructible buildings only). + virtual void OnModifyHealth(GameObject* /*go*/, Unit* /*attackerOrHealer*/, int32& /*change*/, SpellInfo const* /*spellInfo*/) { } + + // Called when the game object loot state is changed. + virtual void OnLootStateChanged(GameObject* /*go*/, uint32 /*state*/, Unit* /*unit*/) { } + + // Called when the game object state is changed. + virtual void OnGameObjectStateChanged(GameObject* /*go*/, uint32 /*state*/) { } + + // Called when a GameObjectAI object is needed for the gameobject. + virtual GameObjectAI* GetAI(GameObject* /*go*/) const { return nullptr; } +}; + +// Cannot be used due gob scripts not working like this +template +class GenericGameObjectScript : public GameObjectScript +{ +public: + GenericGameObjectScript(char const* name) : GameObjectScript(name) { } + GameObjectAI* GetAI(GameObject* me) const override { return new AI(me); } +}; + +#define RegisterGameObjectAI(ai_name) new GenericGameObjectScript(#ai_name) + +// Cannot be used due gob scripts not working like this +template class FactoryGameObjectScript : public GameObjectScript +{ +public: + FactoryGameObjectScript(char const* name) : GameObjectScript(name) {} + GameObjectAI* GetAI(GameObject* me) const override { return AIFactory(me); } +}; + +#define RegisterGameObjectAIWithFactory(ai_name, factory_fn) new FactoryGameObjectScript(#ai_name) + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp b/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp index 4206c0618..7ad7b251e 100644 --- a/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/GlobalScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "GlobalScript.h" #include "InstanceScript.h" #include "Player.h" #include "ScriptMgr.h" @@ -86,11 +87,11 @@ bool ScriptMgr::OnItemRoll(Player const* player, LootStoreItem const* lootStoreI return true; } -bool ScriptMgr::OnBeforeLootEqualChanced(Player const* player, LootStoreItemList EqualChanced, Loot& loot, LootStore const& store) +bool ScriptMgr::OnBeforeLootEqualChanced(Player const* player, LootStoreItemList equalChanced, Loot& loot, LootStore const& store) { auto ret = IsValidBoolScript([&](GlobalScript* script) { - return !script->OnBeforeLootEqualChanced(player, EqualChanced, loot, store); + return !script->OnBeforeLootEqualChanced(player, equalChanced, loot, store); }); if (ret && *ret) @@ -230,3 +231,11 @@ void ScriptMgr::OnBeforeSetBossState(uint32 id, EncounterState newState, Encount script->OnBeforeSetBossState(id, newState, oldState, instance); }); } + +GlobalScript::GlobalScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/GlobalScript.h b/src/server/game/Scripting/ScriptDefines/GlobalScript.h new file mode 100644 index 000000000..7dd370a3a --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/GlobalScript.h @@ -0,0 +1,77 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_GLOBAL_SCRIPT_H_ +#define SCRIPT_OBJECT_GLOBAL_SCRIPT_H_ + +#include "DBCEnums.h" +#include "ObjectGuid.h" +#include "ScriptObject.h" +#include + +// following hooks can be used anywhere and are not db bounded +class GlobalScript : public ScriptObject +{ +protected: + GlobalScript(const char* name); + +public: + // items + virtual void OnItemDelFromDB(CharacterDatabaseTransaction /*trans*/, ObjectGuid::LowType /*itemGuid*/) { } + virtual void OnMirrorImageDisplayItem(Item const* /*item*/, uint32& /*display*/) { } + + // loot + virtual void OnAfterRefCount(Player const* /*player*/, LootStoreItem* /*LootStoreItem*/, Loot& /*loot*/, bool /*canRate*/, uint16 /*lootMode*/, uint32& /*maxcount*/, LootStore const& /*store*/) { } + virtual void OnAfterCalculateLootGroupAmount(Player const* /*player*/, Loot& /*loot*/, uint16 /*lootMode*/, uint32& /*groupAmount*/, LootStore const& /*store*/) { } + virtual void OnBeforeDropAddItem(Player const* /*player*/, Loot& /*loot*/, bool /*canRate*/, uint16 /*lootMode*/, LootStoreItem* /*LootStoreItem*/, LootStore const& /*store*/) { } + virtual bool OnItemRoll(Player const* /*player*/, LootStoreItem const* /*LootStoreItem*/, float& /*chance*/, Loot& /*loot*/, LootStore const& /*store*/) { return true; }; + virtual bool OnBeforeLootEqualChanced(Player const* /*player*/, std::list /*EqualChanced*/, Loot& /*loot*/, LootStore const& /*store*/) { return true; } + virtual void OnInitializeLockedDungeons(Player* /*player*/, uint8& /*level*/, uint32& /*lockData*/, lfg::LFGDungeonData const* /*dungeon*/) { } + virtual void OnAfterInitializeLockedDungeons(Player* /*player*/) { } + + // On Before arena points distribution + virtual void OnBeforeUpdateArenaPoints(ArenaTeam* /*at*/, std::map& /*ap*/) { } + + // Called when a dungeon encounter is updated. + virtual void OnAfterUpdateEncounterState(Map* /*map*/, EncounterCreditType /*type*/, uint32 /*creditEntry*/, Unit* /*source*/, Difficulty /*difficulty_fixed*/, std::list const* /*encounters*/, uint32 /*dungeonCompleted*/, bool /*updated*/) { } + + // Called before the phase for a WorldObject is set + virtual void OnBeforeWorldObjectSetPhaseMask(WorldObject const* /*worldObject*/, uint32& /*oldPhaseMask*/, uint32& /*newPhaseMask*/, bool& /*useCombinedPhases*/, bool& /*update*/) { } + + // Called when checking if an aura spell is affected by a mod + virtual bool OnIsAffectedBySpellModCheck(SpellInfo const* /*affectSpell*/, SpellInfo const* /*checkSpell*/, SpellModifier const* /*mod*/) { return true; }; + + // Called when checking for spell negative healing modifiers + virtual bool OnSpellHealingBonusTakenNegativeModifiers(Unit const* /*target*/, Unit const* /*caster*/, SpellInfo const* /*spellInfo*/, float& /*val*/) { return false; }; + + // Called after loading spell dbc corrections + virtual void OnLoadSpellCustomAttr(SpellInfo* /*spell*/) { } + + // Called when checking if a player can see the creature loot item + virtual bool OnAllowedForPlayerLootCheck(Player const* /*player*/, ObjectGuid /*source*/) { return false; }; + + // Called when checking if a player can see the creature loot (if it can click the corpse f.e) + virtual bool OnAllowedToLootContainerCheck(Player const* /*player*/, ObjectGuid /*source*/) { return false; }; + + // Called when instance id is removed from database (e.g. instance reset) + virtual void OnInstanceIdRemoved(uint32 /*instanceId*/) { } + + // Called when any raid boss has their state updated (e.g. pull, reset, kill) + virtual void OnBeforeSetBossState(uint32 /*id*/, EncounterState /*newState*/, EncounterState /*oldState*/, Map* /*instance*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/GroupScript.cpp b/src/server/game/Scripting/ScriptDefines/GroupScript.cpp index 306949402..8e1cc75e3 100644 --- a/src/server/game/Scripting/ScriptDefines/GroupScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/GroupScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "GroupScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -90,3 +91,11 @@ void ScriptMgr::OnCreate(Group* group, Player* leader) script->OnCreate(group, leader); }); } + +GroupScript::GroupScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/GroupScript.h b/src/server/game/Scripting/ScriptDefines/GroupScript.h new file mode 100644 index 000000000..603deb0a1 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/GroupScript.h @@ -0,0 +1,54 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_GROUP_SCRIPT_H_ +#define SCRIPT_OBJECT_GROUP_SCRIPT_H_ + +#include "ObjectGuid.h" +#include "ScriptObject.h" + +enum RemoveMethod : uint8; + +class GroupScript : public ScriptObject +{ +protected: + GroupScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + // Called when a member is added to a group. + virtual void OnAddMember(Group* /*group*/, ObjectGuid /*guid*/) { } + + // Called when a member is invited to join a group. + virtual void OnInviteMember(Group* /*group*/, ObjectGuid /*guid*/) { } + + // Called when a member is removed from a group. + virtual void OnRemoveMember(Group* /*group*/, ObjectGuid /*guid*/, RemoveMethod /*method*/, ObjectGuid /*kicker*/, const char* /*reason*/) { } + + // Called when the leader of a group is changed. + virtual void OnChangeLeader(Group* /*group*/, ObjectGuid /*newLeaderGuid*/, ObjectGuid /*oldLeaderGuid*/) { } + + // Called when a group is disbanded. + virtual void OnDisband(Group* /*group*/) { } + + [[nodiscard]] virtual bool CanGroupJoinBattlegroundQueue(Group const* /*group*/, Player* /*member*/, Battleground const* /*bgTemplate*/, uint32 /*MinPlayerCount*/, bool /*isRated*/, uint32 /*arenaSlot*/) { return true; } + + virtual void OnCreate(Group* /*group*/, Player* /*leader*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/GuildScript.cpp b/src/server/game/Scripting/ScriptDefines/GuildScript.cpp index 6ca69523e..1aae39901 100644 --- a/src/server/game/Scripting/ScriptDefines/GuildScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/GuildScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "GuildScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -121,3 +122,11 @@ bool ScriptMgr::CanGuildSendBankList(Guild const* guild, WorldSession* session, return true; } + +GuildScript::GuildScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/GuildScript.h b/src/server/game/Scripting/ScriptDefines/GuildScript.h new file mode 100644 index 000000000..102ad0537 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/GuildScript.h @@ -0,0 +1,67 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_GUILD_SCRIPT_H_ +#define SCRIPT_OBJECT_GUILD_SCRIPT_H_ + +#include "ObjectGuid.h" +#include "ScriptObject.h" + +class GuildScript : public ScriptObject +{ +protected: + GuildScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + // Called when a member is added to the guild. + virtual void OnAddMember(Guild* /*guild*/, Player* /*player*/, uint8& /*plRank*/) { } + + // Called when a member is removed from the guild. + virtual void OnRemoveMember(Guild* /*guild*/, Player* /*player*/, bool /*isDisbanding*/, bool /*isKicked*/) { } + + // Called when the guild MOTD (message of the day) changes. + virtual void OnMOTDChanged(Guild* /*guild*/, const std::string& /*newMotd*/) { } + + // Called when the guild info is altered. + virtual void OnInfoChanged(Guild* /*guild*/, const std::string& /*newInfo*/) { } + + // Called when a guild is created. + virtual void OnCreate(Guild* /*guild*/, Player* /*leader*/, const std::string& /*name*/) { } + + // Called when a guild is disbanded. + virtual void OnDisband(Guild* /*guild*/) { } + + // Called when a guild member withdraws money from a guild bank. + virtual void OnMemberWitdrawMoney(Guild* /*guild*/, Player* /*player*/, uint32& /*amount*/, bool /*isRepair*/) { } + + // Called when a guild member deposits money in a guild bank. + virtual void OnMemberDepositMoney(Guild* /*guild*/, Player* /*player*/, uint32& /*amount*/) { } + + // Called when a guild member moves an item in a guild bank. + virtual void OnItemMove(Guild* /*guild*/, Player* /*player*/, Item* /*pItem*/, bool /*isSrcBank*/, uint8 /*srcContainer*/, uint8 /*srcSlotId*/, + bool /*isDestBank*/, uint8 /*destContainer*/, uint8 /*destSlotId*/) { } + + virtual void OnEvent(Guild* /*guild*/, uint8 /*eventType*/, ObjectGuid::LowType /*playerGuid1*/, ObjectGuid::LowType /*playerGuid2*/, uint8 /*newRank*/) { } + + virtual void OnBankEvent(Guild* /*guild*/, uint8 /*eventType*/, uint8 /*tabId*/, ObjectGuid::LowType /*playerGuid*/, uint32 /*itemOrMoney*/, uint16 /*itemStackCount*/, uint8 /*destTabId*/) { } + + [[nodiscard]] virtual bool CanGuildSendBankList(Guild const* /*guild*/, WorldSession* /*session*/, uint8 /*tabId*/, bool /*sendAllSlots*/) { return true; } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/InstanceMapScript.cpp b/src/server/game/Scripting/ScriptDefines/InstanceMapScript.cpp index 4a08a49bc..c930b829b 100644 --- a/src/server/game/Scripting/ScriptDefines/InstanceMapScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/InstanceMapScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "InstanceMapScript.h" #include "ScriptMgr.h" InstanceScript* ScriptMgr::CreateInstanceScript(InstanceMap* map) @@ -24,3 +25,21 @@ InstanceScript* ScriptMgr::CreateInstanceScript(InstanceMap* map) auto tempScript = ScriptRegistry::GetScriptById(map->GetScriptId()); return tempScript ? tempScript->GetInstanceScript(map) : nullptr; } + +InstanceMapScript::InstanceMapScript(const char* name, uint32 mapId) : + ScriptObject(name), MapScript(mapId) +{ + ScriptRegistry::AddScript(this); +} + +void InstanceMapScript::checkValidity() +{ + checkMap(); + + if (GetEntry() && !GetEntry()->IsDungeon()) + { + LOG_ERROR("maps.script", "InstanceMapScript for map {} is invalid.", GetEntry()->MapID); + } +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/InstanceMapScript.h b/src/server/game/Scripting/ScriptDefines/InstanceMapScript.h new file mode 100644 index 000000000..edbc9a3ba --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/InstanceMapScript.h @@ -0,0 +1,37 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_INSTANCE_MAP_SCRIPT_H_ +#define SCRIPT_OBJECT_INSTANCE_MAP_SCRIPT_H_ + +#include "ScriptObject.h" + +class InstanceMapScript : public ScriptObject, public MapScript +{ +protected: + InstanceMapScript(const char* name, uint32 mapId); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + void checkValidity() override; + + // Gets an InstanceScript object for this instance. + virtual InstanceScript* GetInstanceScript(InstanceMap* /*map*/) const { return nullptr; } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/ItemScript.h b/src/server/game/Scripting/ScriptDefines/ItemScript.h new file mode 100644 index 000000000..baa8c07f1 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/ItemScript.h @@ -0,0 +1,53 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_ITEM_SCRIPT_H_ +#define SCRIPT_OBJECT_ITEM_SCRIPT_H_ + +#include "ScriptObject.h" + +class ItemScript : public ScriptObject +{ +protected: + ItemScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + // Called when a player accepts a quest from the item. + [[nodiscard]] virtual bool OnQuestAccept(Player* /*player*/, Item* /*item*/, Quest const* /*quest*/) { return false; } + + // Called when a player uses the item. + [[nodiscard]] virtual bool OnUse(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/) { return false; } + + // Called when the item is destroyed. + [[nodiscard]] virtual bool OnRemove(Player* /*player*/, Item* /*item*/) { return false; } + + // Called before casting a combat spell from this item (chance on hit spells of item template, can be used to prevent cast if returning false) + [[nodiscard]] virtual bool OnCastItemCombatSpell(Player* /*player*/, Unit* /*victim*/, SpellInfo const* /*spellInfo*/, Item* /*item*/) { return true; } + + // Called when the item expires (is destroyed). + [[nodiscard]] virtual bool OnExpire(Player* /*player*/, ItemTemplate const* /*proto*/) { return false; } + + // Called when a player selects an option in an item gossip window + virtual void OnGossipSelect(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/) { } + + // Called when a player selects an option in an item gossip window + virtual void OnGossipSelectCode(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/LootScript.cpp b/src/server/game/Scripting/ScriptDefines/LootScript.cpp index b213d6468..6b49ff5a1 100644 --- a/src/server/game/Scripting/ScriptDefines/LootScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/LootScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "LootScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -27,3 +28,8 @@ void ScriptMgr::OnLootMoney(Player* player, uint32 gold) script->OnLootMoney(player, gold); }); } + +LootScript::LootScript(const char* name) : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} diff --git a/src/server/game/Scripting/ScriptDefines/LootScript.h b/src/server/game/Scripting/ScriptDefines/LootScript.h new file mode 100644 index 000000000..d71711383 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/LootScript.h @@ -0,0 +1,40 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_LOOT_SCRIPT_H_ +#define SCRIPT_OBJECT_LOOT_SCRIPT_H_ + +#include "ScriptObject.h" + +class LootScript : public ScriptObject +{ +protected: + LootScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + /** + * @brief This hook called before money loot + * + * @param player Contains information about the Player + * @param gold Contains information about money + */ + virtual void OnLootMoney(Player* /*player*/, uint32 /*gold*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/MailScript.cpp b/src/server/game/Scripting/ScriptDefines/MailScript.cpp index 1d5cd11a1..ac1ca35dc 100644 --- a/src/server/game/Scripting/ScriptDefines/MailScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/MailScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "MailScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -25,3 +26,11 @@ void ScriptMgr::OnBeforeMailDraftSendMailTo(MailDraft* mailDraft, MailReceiver c script->OnBeforeMailDraftSendMailTo(mailDraft, receiver, sender, checked, deliver_delay, custom_expiration, deleteMailItemsFromDB, sendMail);\ }); } + +MailScript::MailScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/MailScript.h b/src/server/game/Scripting/ScriptDefines/MailScript.h new file mode 100644 index 000000000..bd3647e42 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/MailScript.h @@ -0,0 +1,33 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_MAIL_SCRIPT_H_ +#define SCRIPT_OBJECT_MAIL_SCRIPT_H_ + +#include "ScriptObject.h" + +class MailScript : public ScriptObject +{ +protected: + MailScript(const char* name); + +public: + // Called before mail is sent + virtual void OnBeforeMailDraftSendMailTo(MailDraft* /*mailDraft*/, MailReceiver const& /*receiver*/, MailSender const& /*sender*/, MailCheckMask& /*checked*/, uint32& /*deliver_delay*/, uint32& /*custom_expiration*/, bool& /*deleteMailItemsFromDB*/, bool& /*sendMail*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/MiscScript.cpp b/src/server/game/Scripting/ScriptDefines/MiscScript.cpp index cf50229c8..6bcba8962 100644 --- a/src/server/game/Scripting/ScriptDefines/MiscScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/MiscScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "MiscScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -182,3 +183,11 @@ void ScriptMgr::GetDialogStatus(Player* player, Object* questgiver) script->GetDialogStatus(player, questgiver); }); } + +MiscScript::MiscScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/MiscScript.h b/src/server/game/Scripting/ScriptDefines/MiscScript.h new file mode 100644 index 000000000..cb3004003 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/MiscScript.h @@ -0,0 +1,75 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_MISC_SCRIPT_H_ +#define SCRIPT_OBJECT_MISC_SCRIPT_H_ + +#include "ObjectGuid.h" +#include "ScriptObject.h" + +class MiscScript : public ScriptObject +{ +protected: + MiscScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + virtual void OnConstructObject(Object* /*origin*/) { } + + virtual void OnDestructObject(Object* /*origin*/) { } + + virtual void OnConstructPlayer(Player* /*origin*/) { } + + virtual void OnDestructPlayer(Player* /*origin*/) { } + + virtual void OnConstructGroup(Group* /*origin*/) { } + + virtual void OnDestructGroup(Group* /*origin*/) { } + + virtual void OnConstructInstanceSave(InstanceSave* /*origin*/) { } + + virtual void OnDestructInstanceSave(InstanceSave* /*origin*/) { } + + virtual void OnItemCreate(Item* /*item*/, ItemTemplate const* /*itemProto*/, Player const* /*owner*/) { } + + [[nodiscard]] virtual bool CanApplySoulboundFlag(Item* /*item*/, ItemTemplate const* /*proto*/) { return true; } + + [[nodiscard]] virtual bool CanItemApplyEquipSpell(Player* /*player*/, Item* /*item*/) { return true; } + + [[nodiscard]] virtual bool CanSendAuctionHello(WorldSession const* /*session*/, ObjectGuid /*guid*/, Creature* /*creature*/) { return true; } + + virtual void ValidateSpellAtCastSpell(Player* /*player*/, uint32& /*oldSpellId*/, uint32& /*spellId*/, uint8& /*castCount*/, uint8& /*castFlags*/) { } + + virtual void ValidateSpellAtCastSpellResult(Player* /*player*/, Unit* /*mover*/, Spell* /*spell*/, uint32 /*oldSpellId*/, uint32 /*spellId*/) { } + + virtual void OnAfterLootTemplateProcess(Loot* /*loot*/, LootTemplate const* /*tab*/, LootStore const& /*store*/, Player* /*lootOwner*/, bool /*personal*/, bool /*noEmptyError*/, uint16 /*lootMode*/) { } + + virtual void OnPlayerSetPhase(const AuraEffect* /*auraEff*/, AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/, uint32& /*newPhase*/) { } + + virtual void OnInstanceSave(InstanceSave* /*instanceSave*/) { } + + /** + * @brief This hook called before get Quest Dialog Status + * + * @param player Contains information about the Player + * @param questgiver Contains information about the Object + */ + virtual void GetDialogStatus(Player* /*player*/, Object* /*questgiver*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/ModuleScript.cpp b/src/server/game/Scripting/ScriptDefines/ModuleScript.cpp new file mode 100644 index 000000000..3205d2454 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/ModuleScript.cpp @@ -0,0 +1,27 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "ModuleScript.h" +#include "ScriptMgr.h" + +ModuleScript::ModuleScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/ModuleScript.h b/src/server/game/Scripting/ScriptDefines/ModuleScript.h new file mode 100644 index 000000000..7ae228cae --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/ModuleScript.h @@ -0,0 +1,31 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_MODULE_SCRIPT_H_ +#define SCRIPT_OBJECT_MODULE_SCRIPT_H_ + +#include "ScriptObject.h" + +// this class can be used to be extended by Modules +// creating their own custom hooks inside the module itself +class ModuleScript : public ScriptObject +{ +protected: + ModuleScript(const char* name); +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.cpp b/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.cpp index d6a926cca..2f79dd957 100644 --- a/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "MovementHandlerScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -25,3 +26,11 @@ void ScriptMgr::OnPlayerMove(Player* player, MovementInfo movementInfo, uint32 o script->OnPlayerMove(player, movementInfo, opcode); }); } + +MovementHandlerScript::MovementHandlerScript(const char* name) : + ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.h b/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.h new file mode 100644 index 000000000..cc0fdc7cf --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/MovementHandlerScript.h @@ -0,0 +1,34 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_MOVEMENT_SCRIPT_H_ +#define SCRIPT_OBJECT_MOVEMENT_SCRIPT_H_ + +#include "Object.h" +#include "ScriptObject.h" + +class MovementHandlerScript : public ScriptObject +{ +protected: + MovementHandlerScript(const char* name); + +public: + //Called whenever a player moves + virtual void OnPlayerMove(Player* /*player*/, MovementInfo /*movementInfo*/, uint32 /*opcode*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.cpp b/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.cpp index f0c4ea871..d7fff6cdb 100644 --- a/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "OutdoorPvPScript.h" #include "OutdoorPvPMgr.h" #include "ScriptMgr.h" @@ -25,3 +26,11 @@ OutdoorPvP* ScriptMgr::CreateOutdoorPvP(OutdoorPvPData const* data) auto tempScript = ScriptRegistry::GetScriptById(data->ScriptId); return tempScript ? tempScript->GetOutdoorPvP() : nullptr; } + +OutdoorPvPScript::OutdoorPvPScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.h b/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.h new file mode 100644 index 000000000..9fc7f3951 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/OutdoorPvPScript.h @@ -0,0 +1,35 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_OUTDOOR_PVP_SCRIPT_H_ +#define SCRIPT_OBJECT_OUTDOOR_PVP_SCRIPT_H_ + +#include "ScriptObject.h" + +class OutdoorPvPScript : public ScriptObject +{ +protected: + OutdoorPvPScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + // Should return a fully valid OutdoorPvP object for the type ID. + [[nodiscard]] virtual OutdoorPvP* GetOutdoorPvP() const = 0; +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/PetScript.cpp b/src/server/game/Scripting/ScriptDefines/PetScript.cpp index e26c4bc04..090a4c5bf 100644 --- a/src/server/game/Scripting/ScriptDefines/PetScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/PetScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "PetScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -88,3 +89,11 @@ void ScriptMgr::OnPetAddToWorld(Pet* pet) script->OnPetAddToWorld(pet); }); } + +PetScript::PetScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/PetScript.h b/src/server/game/Scripting/ScriptDefines/PetScript.h new file mode 100644 index 000000000..c1425f099 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/PetScript.h @@ -0,0 +1,49 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_PET_SCRIPT_H_ +#define SCRIPT_OBJECT_PET_SCRIPT_H_ + +#include "ScriptObject.h" + +class PetScript : public ScriptObject +{ +protected: + PetScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + virtual void OnInitStatsForLevel(Guardian* /*guardian*/, uint8 /*petlevel*/) { } + + virtual void OnCalculateMaxTalentPointsForLevel(Pet* /*pet*/, uint8 /*level*/, uint8& /*points*/) { } + + [[nodiscard]] virtual bool CanUnlearnSpellSet(Pet* /*pet*/, uint32 /*level*/, uint32 /*spell*/) { return true; } + + [[nodiscard]] virtual bool CanUnlearnSpellDefault(Pet* /*pet*/, SpellInfo const* /*spellInfo*/) { return true; } + + [[nodiscard]] virtual bool CanResetTalents(Pet* /*pet*/) { return true; } + + /** + * @brief This hook called after add pet in world + * + * @param pet Contains information about the Pet + */ + virtual void OnPetAddToWorld(Pet* /*pet*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp b/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp index c6ff46681..1574ff535 100644 --- a/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/PlayerScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "PlayerScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -1696,3 +1697,11 @@ bool ScriptMgr::AnticheatCheckMovementInfo(Player* player, MovementInfo const& m return true; } + +PlayerScript::PlayerScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/PlayerScript.h b/src/server/game/Scripting/ScriptDefines/PlayerScript.h new file mode 100644 index 000000000..1c78056b5 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/PlayerScript.h @@ -0,0 +1,563 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_PLAYER_SCRIPT_H_ +#define SCRIPT_OBJECT_PLAYER_SCRIPT_H_ + +#include "ScriptObject.h" + +// TODO to remove +#include "AchievementMgr.h" + +class PlayerScript : public ScriptObject +{ +protected: + PlayerScript(const char* name); + +public: + virtual void OnPlayerReleasedGhost(Player* /*player*/) { } + + // Called on Send Initial Packets Before Add To Map + virtual void OnSendInitialPacketsBeforeAddToMap(Player* /*player*/, WorldPacket& /*data*/) {} + + // Called when a player does a desertion action (see BattlegroundDesertionType) + virtual void OnBattlegroundDesertion(Player* /*player*/, BattlegroundDesertionType const /*desertionType*/) { } + + // Called when a player completes a quest + virtual void OnPlayerCompleteQuest(Player* /*player*/, Quest const* /*quest_id*/) { } + + // Called when a player kills another player + virtual void OnPVPKill(Player* /*killer*/, Player* /*killed*/) { } + + // Called when a player toggles pvp + virtual void OnPlayerPVPFlagChange(Player* /*player*/, bool /*state*/) { } + + // Called when a player kills a creature + virtual void OnCreatureKill(Player* /*killer*/, Creature* /*killed*/) { } + + // Called when a player's pet kills a creature + virtual void OnCreatureKilledByPet(Player* /*PetOwner*/, Creature* /*killed*/) { } + + // Called when a player is killed by a creature + virtual void OnPlayerKilledByCreature(Creature* /*killer*/, Player* /*killed*/) { } + + // Called when a player's level changes (right after the level is applied) + virtual void OnLevelChanged(Player* /*player*/, uint8 /*oldlevel*/) { } + + // Called when a player's free talent points change (right before the change is applied) + virtual void OnFreeTalentPointsChanged(Player* /*player*/, uint32 /*points*/) { } + + // Called when a player's talent points are reset (right before the reset is done) + virtual void OnTalentsReset(Player* /*player*/, bool /*noCost*/) { } + + // Called after a player switches specs using the dual spec system + virtual void OnAfterSpecSlotChanged(Player* /*player*/, uint8 /*newSlot*/) { } + + // Called for player::update + virtual void OnBeforeUpdate(Player* /*player*/, uint32 /*p_time*/) { } + virtual void OnUpdate(Player* /*player*/, uint32 /*p_time*/) { } + + // Called when a player's money is modified (before the modification is done) + virtual void OnMoneyChanged(Player* /*player*/, int32& /*amount*/) { } + + // Called before looted money is added to a player + virtual void OnBeforeLootMoney(Player* /*player*/, Loot* /*loot*/) {} + + // Called when a player gains XP (before anything is given) + virtual void OnGiveXP(Player* /*player*/, uint32& /*amount*/, Unit* /*victim*/, uint8 /*xpSource*/) { } + + // Called when a player's reputation changes (before it is actually changed) + virtual bool OnReputationChange(Player* /*player*/, uint32 /*factionID*/, int32& /*standing*/, bool /*incremental*/) { return true; } + + // Called when a player's reputation rank changes (before it is actually changed) + virtual void OnReputationRankChange(Player* /*player*/, uint32 /*factionID*/, ReputationRank /*newRank*/, ReputationRank /*olRank*/, bool /*increased*/) { } + + // Called when a player learned new spell + virtual void OnLearnSpell(Player* /*player*/, uint32 /*spellID*/) {} + + // Called when a player forgot spell + virtual void OnForgotSpell(Player* /*player*/, uint32 /*spellID*/) {} + + // Called when a duel is requested + virtual void OnDuelRequest(Player* /*target*/, Player* /*challenger*/) { } + + // Called when a duel starts (after 3s countdown) + virtual void OnDuelStart(Player* /*player1*/, Player* /*player2*/) { } + + // Called when a duel ends + virtual void OnDuelEnd(Player* /*winner*/, Player* /*loser*/, DuelCompleteType /*type*/) { } + + // The following methods are called when a player sends a chat message. + virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/) { } + + virtual void OnBeforeSendChatMessage(Player* /*player*/, uint32& /*type*/, uint32& /*lang*/, std::string& /*msg*/) { } + + virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Player* /*receiver*/) { } + + virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Group* /*group*/) { } + + virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Guild* /*guild*/) { } + + virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Channel* /*channel*/) { } + + // Both of the below are called on emote opcodes. + virtual void OnEmote(Player* /*player*/, uint32 /*emote*/) { } + + virtual void OnTextEmote(Player* /*player*/, uint32 /*textEmote*/, uint32 /*emoteNum*/, ObjectGuid /*guid*/) { } + + // Called in Spell::Cast. + virtual void OnSpellCast(Player* /*player*/, Spell* /*spell*/, bool /*skipCheck*/) { } + + // Called during data loading + virtual void OnLoadFromDB(Player* /*player*/) { }; + + // Called when a player logs in. + virtual void OnLogin(Player* /*player*/) { } + + // Called when a player logs out. + virtual void OnLogout(Player* /*player*/) { } + + // Called when a player is created. + virtual void OnCreate(Player* /*player*/) { } + + // Called when a player is deleted. + virtual void OnDelete(ObjectGuid /*guid*/, uint32 /*accountId*/) { } + + // Called when a player delete failed. + virtual void OnFailedDelete(ObjectGuid /*guid*/, uint32 /*accountId*/) { } + + // Called when a player is about to be saved. + virtual void OnSave(Player* /*player*/) { } + + // Called when a player is bound to an instance + virtual void OnBindToInstance(Player* /*player*/, Difficulty /*difficulty*/, uint32 /*mapId*/, bool /*permanent*/) { } + + // Called when a player switches to a new zone + virtual void OnUpdateZone(Player* /*player*/, uint32 /*newZone*/, uint32 /*newArea*/) { } + + // Called when a player switches to a new area (more accurate than UpdateZone) + virtual void OnUpdateArea(Player* /*player*/, uint32 /*oldArea*/, uint32 /*newArea*/) { } + + // Called when a player changes to a new map (after moving to new map) + virtual void OnMapChanged(Player* /*player*/) { } + + // Called before a player is being teleported to new coords + [[nodiscard]] virtual bool OnBeforeTeleport(Player* /*player*/, uint32 /*mapid*/, float /*x*/, float /*y*/, float /*z*/, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) { return true; } + + // Called when team/faction is set on player + virtual void OnUpdateFaction(Player* /*player*/) { } + + // Called when a player is added to battleground + virtual void OnAddToBattleground(Player* /*player*/, Battleground* /*bg*/) { } + + // Called when a player queues a Random Dungeon using the RDF (Random Dungeon Finder) + virtual void OnQueueRandomDungeon(Player* /*player*/, uint32 & /*rDungeonId*/) { } + + // Called when a player is removed from battleground + virtual void OnRemoveFromBattleground(Player* /*player*/, Battleground* /*bg*/) { } + + // Called when a player complete an achievement + virtual void OnAchiComplete(Player* /*player*/, AchievementEntry const* /*achievement*/) { } + + // Called before player complete an achievement, can be used to disable achievements in certain conditions + virtual bool OnBeforeAchiComplete(Player* /*player*/, AchievementEntry const* /*achievement*/) { return true; } + + // Called when a player complete an achievement criteria + virtual void OnCriteriaProgress(Player* /*player*/, AchievementCriteriaEntry const* /*criteria*/) { } + + // Called before player complete an achievement criteria, can be used to disable achievement criteria in certain conditions + virtual bool OnBeforeCriteriaProgress(Player* /*player*/, AchievementCriteriaEntry const* /*criteria*/) { return true; } + + // Called when an Achievement is saved to DB + virtual void OnAchiSave(CharacterDatabaseTransaction /*trans*/, Player* /*player*/, uint16 /*achId*/, CompletedAchievementData /*achiData*/) { } + + // Called when an Criteria is saved to DB + virtual void OnCriteriaSave(CharacterDatabaseTransaction /*trans*/, Player* /*player*/, uint16 /*achId*/, CriteriaProgress /*criteriaData*/) { } + + // Called when a player selects an option in a player gossip window + virtual void OnGossipSelect(Player* /*player*/, uint32 /*menu_id*/, uint32 /*sender*/, uint32 /*action*/) { } + + // Called when a player selects an option in a player gossip window + virtual void OnGossipSelectCode(Player* /*player*/, uint32 /*menu_id*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { } + + // On player getting charmed + virtual void OnBeingCharmed(Player* /*player*/, Unit* /*charmer*/, uint32 /*oldFactionId*/, uint32 /*newFactionId*/) { } + + // To change behaviour of set visible item slot + virtual void OnAfterSetVisibleItemSlot(Player* /*player*/, uint8 /*slot*/, Item* /*item*/) { } + + // After an item has been moved from inventory + virtual void OnAfterMoveItemFromInventory(Player* /*player*/, Item* /*it*/, uint8 /*bag*/, uint8 /*slot*/, bool /*update*/) { } + + // After an item has been equipped + virtual void OnEquip(Player* /*player*/, Item* /*it*/, uint8 /*bag*/, uint8 /*slot*/, bool /*update*/) { } + + // After player enters queue for BG + virtual void OnPlayerJoinBG(Player* /*player*/) { } + + // After player enters queue for Arena + virtual void OnPlayerJoinArena(Player* /*player*/) { } + + //Called when trying to get a team ID of a slot > 2 (This is for custom teams created by modules) + virtual void GetCustomGetArenaTeamId(Player const* /*player*/, uint8 /*slot*/, uint32& /*teamID*/) const { } + + //Called when trying to get players personal rating of an arena slot > 2 (This is for custom teams created by modules) + virtual void GetCustomArenaPersonalRating(Player const* /*player*/, uint8 /*slot*/, uint32& /*rating*/) const { } + + //Called after the normal slots (0..2) for arena have been evaluated so that custom arena teams could modify it if nececasry + virtual void OnGetMaxPersonalArenaRatingRequirement(Player const* /*player*/, uint32 /*minSlot*/, uint32& /*maxArenaRating*/) const {} + + //After looting item + virtual void OnLootItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/, ObjectGuid /*lootguid*/) { } + + //Before looting item + virtual void OnBeforeFillQuestLootItem(Player* /*player*/, LootItem& /*item*/) { } + + //After looting item (includes master loot). + virtual void OnStoreNewItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/) { } + + //After creating item (eg profession item creation) + virtual void OnCreateItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/) { } + + // After receiving item as a quest reward + virtual void OnQuestRewardItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/) { } + + // When placing a bid or buying out an auction + [[nodiscard]] virtual bool CanPlaceAuctionBid(Player* /*player*/, AuctionEntry* /*auction*/) { return true; } + + // After receiving item as a group roll reward + virtual void OnGroupRollRewardItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/, RollVote /*voteType*/, Roll* /*roll*/) { } + + //Before opening an item + [[nodiscard]] virtual bool OnBeforeOpenItem(Player* /*player*/, Item* /*item*/) { return true; } + + // After completed a quest + [[nodiscard]] virtual bool OnBeforeQuestComplete(Player* /*player*/, uint32 /*quest_id*/) { return true; } + + // Called after computing the XP reward value for a quest + virtual void OnQuestComputeXP(Player* /*player*/, Quest const* /*quest*/, uint32& /*xpValue*/) { } + + // Before durability repair action, you can even modify the discount value + virtual void OnBeforeDurabilityRepair(Player* /*player*/, ObjectGuid /*npcGUID*/, ObjectGuid /*itemGUID*/, float&/*discountMod*/, uint8 /*guildBank*/) { } + + //Before buying something from any vendor + virtual void OnBeforeBuyItemFromVendor(Player* /*player*/, ObjectGuid /*vendorguid*/, uint32 /*vendorslot*/, uint32& /*item*/, uint8 /*count*/, uint8 /*bag*/, uint8 /*slot*/) { }; + + //Before buying something from any vendor + virtual void OnBeforeStoreOrEquipNewItem(Player* /*player*/, uint32 /*vendorslot*/, uint32& /*item*/, uint8 /*count*/, uint8 /*bag*/, uint8 /*slot*/, ItemTemplate const* /*pProto*/, Creature* /*pVendor*/, VendorItem const* /*crItem*/, bool /*bStore*/) { }; + + //After buying something from any vendor + virtual void OnAfterStoreOrEquipNewItem(Player* /*player*/, uint32 /*vendorslot*/, Item* /*item*/, uint8 /*count*/, uint8 /*bag*/, uint8 /*slot*/, ItemTemplate const* /*pProto*/, Creature* /*pVendor*/, VendorItem const* /*crItem*/, bool /*bStore*/) { }; + + virtual void OnAfterUpdateMaxPower(Player* /*player*/, Powers& /*power*/, float& /*value*/) { } + + virtual void OnAfterUpdateMaxHealth(Player* /*player*/, float& /*value*/) { } + + virtual void OnBeforeUpdateAttackPowerAndDamage(Player* /*player*/, float& /*level*/, float& /*val2*/, bool /*ranged*/) { } + virtual void OnAfterUpdateAttackPowerAndDamage(Player* /*player*/, float& /*level*/, float& /*base_attPower*/, float& /*attPowerMod*/, float& /*attPowerMultiplier*/, bool /*ranged*/) { } + + virtual void OnBeforeInitTalentForLevel(Player* /*player*/, uint8& /*level*/, uint32& /*talentPointsForLevel*/) { } + + virtual void OnFirstLogin(Player* /*player*/) { } + + virtual void OnSetMaxLevel(Player* /*player*/, uint32& /*maxPlayerLevel*/) { } + + [[nodiscard]] virtual bool CanJoinInBattlegroundQueue(Player* /*player*/, ObjectGuid /*BattlemasterGuid*/, BattlegroundTypeId /*BGTypeID*/, uint8 /*joinAsGroup*/, GroupJoinBattlegroundResult& /*err*/) { return true; } + virtual bool ShouldBeRewardedWithMoneyInsteadOfExp(Player* /*player*/) { return false; } + + // Called before the player's temporary summoned creature has initialized it's stats + virtual void OnBeforeTempSummonInitStats(Player* /*player*/, TempSummon* /*tempSummon*/, uint32& /*duration*/) { } + + // Called before the player's guardian / pet has initialized it's stats for the player's level + virtual void OnBeforeGuardianInitStatsForLevel(Player* /*player*/, Guardian* /*guardian*/, CreatureTemplate const* /*cinfo*/, PetType& /*petType*/) { } + + // Called after the player's guardian / pet has initialized it's stats for the player's level + virtual void OnAfterGuardianInitStatsForLevel(Player* /*player*/, Guardian* /*guardian*/) { } + + // Called before loading a player's pet from the DB + virtual void OnBeforeLoadPetFromDB(Player* /*player*/, uint32& /*petentry*/, uint32& /*petnumber*/, bool& /*current*/, bool& /*forceLoadFromDB*/) { } + + [[nodiscard]] virtual bool CanJoinInArenaQueue(Player* /*player*/, ObjectGuid /*BattlemasterGuid*/, uint8 /*arenaslot*/, BattlegroundTypeId /*BGTypeID*/, uint8 /*joinAsGroup*/, uint8 /*IsRated*/, GroupJoinBattlegroundResult& /*err*/) { return true; } + + [[nodiscard]] virtual bool CanBattleFieldPort(Player* /*player*/, uint8 /*arenaType*/, BattlegroundTypeId /*BGTypeID*/, uint8 /*action*/) { return true; } + + [[nodiscard]] virtual bool CanGroupInvite(Player* /*player*/, std::string& /*membername*/) { return true; } + + [[nodiscard]] virtual bool CanGroupAccept(Player* /*player*/, Group* /*group*/) { return true; } + + [[nodiscard]] virtual bool CanSellItem(Player* /*player*/, Item* /*item*/, Creature* /*creature*/) { return true; } + + [[nodiscard]] virtual bool CanSendMail(Player* /*player*/, ObjectGuid /*receiverGuid*/, ObjectGuid /*mailbox*/, std::string& /*subject*/, std::string& /*body*/, uint32 /*money*/, uint32 /*COD*/, Item* /*item*/) { return true; } + + virtual void PetitionBuy(Player* /*player*/, Creature* /*creature*/, uint32& /*charterid*/, uint32& /*cost*/, uint32& /*type*/) { } + + virtual void PetitionShowList(Player* /*player*/, Creature* /*creature*/, uint32& /*CharterEntry*/, uint32& /*CharterDispayID*/, uint32& /*CharterCost*/) { } + + virtual void OnRewardKillRewarder(Player* /*player*/, bool /*isDungeon*/, float& /*rate*/) { } + + [[nodiscard]] virtual bool CanGiveMailRewardAtGiveLevel(Player* /*player*/, uint8 /*level*/) { return true; } + + virtual void OnDeleteFromDB(CharacterDatabaseTransaction /*trans*/, uint32 /*guid*/) { } + + [[nodiscard]] virtual bool CanRepopAtGraveyard(Player* /*player*/) { return true; } + + virtual void OnGetMaxSkillValue(Player* /*player*/, uint32 /*skill*/, int32& /*result*/, bool /*IsPure*/) { } + + /** + * @brief This hook called before gathering skill gain is applied to the character. + * + * @param player Contains information about the Player sender + * @param skill_id Contains information about the skill line + * @param current Contains the current skill level for skill + * @param gray Contains the gray skill level for current application + * @param green Contains the green skill level for current application + * @param yellow Contains the yellow skill level for current application + * @param gain Contains the amount of points that should be added to the Player + */ + virtual void OnUpdateGatheringSkill(Player* /*player*/, uint32 /*skill_id*/, uint32 /*current*/, uint32 /*gray*/, uint32 /*green*/, uint32 /*yellow*/, uint32& /*gain*/) { } + + /** + * @brief This hook is called before crafting skill gain is applied to the character. + * + * @param player Contains information about the Player sender + * @param skill Contains information about the skill line + * @param current_level Contains the current skill level for skill + * @param gain Contains the amount of points that should be added to the Player + */ + virtual void OnUpdateCraftingSkill(Player* /*player*/, SkillLineAbilityEntry const* /*skill*/, uint32 /*current_level*/, uint32& /*gain*/) { } + + [[nodiscard]] virtual bool OnUpdateFishingSkill(Player* /*player*/, int32 /*skill*/, int32 /*zone_skill*/, int32 /*chance*/, int32 /*roll*/) { return true; } + + [[nodiscard]] virtual bool CanAreaExploreAndOutdoor(Player* /*player*/) { return true; } + + virtual void OnVictimRewardBefore(Player* /*player*/, Player* /*victim*/, uint32& /*killer_title*/, uint32& /*victim_title*/) { } + + virtual void OnVictimRewardAfter(Player* /*player*/, Player* /*victim*/, uint32& /*killer_title*/, uint32& /*victim_rank*/, float& /*honor_f*/) { } + + virtual void OnCustomScalingStatValueBefore(Player* /*player*/, ItemTemplate const* /*proto*/, uint8 /*slot*/, bool /*apply*/, uint32& /*CustomScalingStatValue*/) { } + + virtual void OnCustomScalingStatValue(Player* /*player*/, ItemTemplate const* /*proto*/, uint32& /*statType*/, int32& /*val*/, uint8 /*itemProtoStatNumber*/, uint32 /*ScalingStatValue*/, ScalingStatValuesEntry const* /*ssv*/) { } + + [[nodiscard]] virtual bool CanArmorDamageModifier(Player* /*player*/) { return true; } + + virtual void OnGetFeralApBonus(Player* /*player*/, int32& /*feral_bonus*/, int32 /*dpsMod*/, ItemTemplate const* /*proto*/, ScalingStatValuesEntry const* /*ssv*/) { } + + [[nodiscard]] virtual bool CanApplyWeaponDependentAuraDamageMod(Player* /*player*/, Item* /*item*/, WeaponAttackType /*attackType*/, AuraEffect const* /*aura*/, bool /*apply*/) { return true; } + + [[nodiscard]] virtual bool CanApplyEquipSpell(Player* /*player*/, SpellInfo const* /*spellInfo*/, Item* /*item*/, bool /*apply*/, bool /*form_change*/) { return true; } + + [[nodiscard]] virtual bool CanApplyEquipSpellsItemSet(Player* /*player*/, ItemSetEffect* /*eff*/) { return true; } + + [[nodiscard]] virtual bool CanCastItemCombatSpell(Player* /*player*/, Unit* /*target*/, WeaponAttackType /*attType*/, uint32 /*procVictim*/, uint32 /*procEx*/, Item* /*item*/, ItemTemplate const* /*proto*/) { return true; } + + [[nodiscard]] virtual bool CanCastItemUseSpell(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/, uint8 /*cast_count*/, uint32 /*glyphIndex*/) { return true; } + + virtual void OnApplyAmmoBonuses(Player* /*player*/, ItemTemplate const* /*proto*/, float& /*currentAmmoDPS*/) { } + + [[nodiscard]] virtual bool CanEquipItem(Player* /*player*/, uint8 /*slot*/, uint16& /*dest*/, Item* /*pItem*/, bool /*swap*/, bool /*not_loading*/) { return true; } + + [[nodiscard]] virtual bool CanUnequipItem(Player* /*player*/, uint16 /*pos*/, bool /*swap*/) { return true; } + + [[nodiscard]] virtual bool CanUseItem(Player* /*player*/, ItemTemplate const* /*proto*/, InventoryResult& /*result*/) { return true; } + + [[nodiscard]] virtual bool CanSaveEquipNewItem(Player* /*player*/, Item* /*item*/, uint16 /*pos*/, bool /*update*/) { return true; } + + [[nodiscard]] virtual bool CanApplyEnchantment(Player* /*player*/, Item* /*item*/, EnchantmentSlot /*slot*/, bool /*apply*/, bool /*apply_dur*/, bool /*ignore_condition*/) { return true; } + + virtual void OnGetQuestRate(Player* /*player*/, float& /*result*/) { } + + [[nodiscard]] virtual bool PassedQuestKilledMonsterCredit(Player* /*player*/, Quest const* /*qinfo*/, uint32 /*entry*/, uint32 /*real_entry*/, ObjectGuid /*guid*/) { return true; } + + [[nodiscard]] virtual bool CheckItemInSlotAtLoadInventory(Player* /*player*/, Item* /*item*/, uint8 /*slot*/, uint8& /*err*/, uint16& /*dest*/) { return true; } + + [[nodiscard]] virtual bool NotAvoidSatisfy(Player* /*player*/, DungeonProgressionRequirements const* /*ar*/, uint32 /*target_map*/, bool /*report*/) { return true; } + + [[nodiscard]] virtual bool NotVisibleGloballyFor(Player* /*player*/, Player const* /*u*/) { return true; } + + virtual void OnGetArenaPersonalRating(Player* /*player*/, uint8 /*slot*/, uint32& /*result*/) { } + + virtual void OnGetArenaTeamId(Player* /*player*/, uint8 /*slot*/, uint32& /*result*/) { } + + virtual void OnIsFFAPvP(Player* /*player*/, bool& /*result*/) { } + + //Fires whenever the UNIT_BYTE2_FLAG_FFA_PVP bit is Changed on the player + virtual void OnFfaPvpStateUpdate(Player* /*player*/, bool /*result*/) { } + + virtual void OnIsPvP(Player* /*player*/, bool& /*result*/) { } + + virtual void OnGetMaxSkillValueForLevel(Player* /*player*/, uint16& /*result*/) { } + + [[nodiscard]] virtual bool NotSetArenaTeamInfoField(Player* /*player*/, uint8 /*slot*/, ArenaTeamInfoType /*type*/, uint32 /*value*/) { return true; } + + [[nodiscard]] virtual bool CanJoinLfg(Player* /*player*/, uint8 /*roles*/, std::set& /*dungeons*/, const std::string& /*comment*/) { return true; } + + [[nodiscard]] virtual bool CanEnterMap(Player* /*player*/, MapEntry const* /*entry*/, InstanceTemplate const* /*instance*/, MapDifficulty const* /*mapDiff*/, bool /*loginCheck*/) { return true; } + + [[nodiscard]] virtual bool CanInitTrade(Player* /*player*/, Player* /*target*/) { return true; } + + virtual void OnSetServerSideVisibility(Player* /*player*/, ServerSideVisibilityType& /*type*/, AccountTypes& /*sec*/) { } + + virtual void OnSetServerSideVisibilityDetect(Player* /*player*/, ServerSideVisibilityType& /*type*/, AccountTypes& /*sec*/) { } + + virtual void OnPlayerResurrect(Player* /*player*/, float /*restore_percent*/, bool /*applySickness*/) { } + + // Called before selecting the graveyard when releasing spirit + virtual void OnBeforeChooseGraveyard(Player* /*player*/, TeamId /*teamId*/, bool /*nearCorpse*/, uint32& /*graveyardOverride*/) { } + + /** + * @brief This hook called before player sending message in default chat + * + * @param player Contains information about the Player sender + * @param type Contains information about the chat message type + * @param language Contains information about the language type + * @param msg Contains information about the message + * + * @return True if you want to continue sending the message, false if you want to disable sending the message + */ + [[nodiscard]] virtual bool CanPlayerUseChat(Player* /*player*/, uint32 /*type*/, uint32 /*language*/, std::string& /*msg*/) { return true; } + + /** + * @brief This hook called before player sending message to other player via private + * + * @param player Contains information about the Player sender + * @param type Contains information about the chat message type + * @param language Contains information about the language type + * @param msg Contains information about the message + * @param receiver Contains information about the Player receiver + * + * @return True if you want to continue sending the message, false if you want to disable sending the message + */ + [[nodiscard]] virtual bool CanPlayerUseChat(Player* /*player*/, uint32 /*type*/, uint32 /*language*/, std::string& /*msg*/, Player* /*receiver*/) { return true; } + + /** + * @brief This hook called before player sending message to group + * + * @param player Contains information about the Player sender + * @param type Contains information about the chat message type + * @param language Contains information about the language type + * @param msg Contains information about the message + * @param group Contains information about the Group + * + * @return True if you want to continue sending the message, false if you want to disable sending the message + */ + [[nodiscard]] virtual bool CanPlayerUseChat(Player* /*player*/, uint32 /*type*/, uint32 /*language*/, std::string& /*msg*/, Group* /*group*/) { return true; } + + /** + * @brief This hook called before player sending message to guild + * + * @param player Contains information about the Player sender + * @param type Contains information about the chat message type + * @param language Contains information about the language type + * @param msg Contains information about the message + * @param guild Contains information about the Guild + * + * @return True if you want to continue sending the message, false if you want to disable sending the message + */ + [[nodiscard]] virtual bool CanPlayerUseChat(Player* /*player*/, uint32 /*type*/, uint32 /*language*/, std::string& /*msg*/, Guild* /*guild*/) { return true; } + + /** + * @brief This hook called before player sending message to channel + * + * @param player Contains information about the Player sender + * @param type Contains information about the chat message type + * @param language Contains information about the language type + * @param msg Contains information about the message + * @param channel Contains information about the Channel + * + * @return True if you want to continue sending the message, false if you want to disable sending the message + */ + [[nodiscard]] virtual bool CanPlayerUseChat(Player* /*player*/, uint32 /*type*/, uint32 /*language*/, std::string& /*msg*/, Channel* /*channel*/) { return true; } + + /** + * @brief This hook called after player learning talents + * + * @param player Contains information about the Player + * @param talentId Contains information about the talent id + * @param talentRank Contains information about the talent rank + * @param spellid Contains information about the spell id + */ + virtual void OnPlayerLearnTalents(Player* /*player*/, uint32 /*talentId*/, uint32 /*talentRank*/, uint32 /*spellid*/) { } + + /** + * @brief This hook called after player entering combat + * + * @param player Contains information about the Player + * @param Unit Contains information about the Unit + */ + virtual void OnPlayerEnterCombat(Player* /*player*/, Unit* /*enemy*/) { } + + /** + * @brief This hook called after player leave combat + * + * @param player Contains information about the Player + */ + virtual void OnPlayerLeaveCombat(Player* /*player*/) { } + + /** + * @brief This hook called after player abandoning quest + * + * @param player Contains information about the Player + * @param questId Contains information about the quest id + */ + virtual void OnQuestAbandon(Player* /*player*/, uint32 /*questId*/) { } + + /** + * @brief This hook called before other CanFlyChecks are applied + * + * @param player Contains information about the Player + * @param mapId Contains information about the current map id + * @param zoneId Contains information about the current zone + * @param bySpell Contains information about the spell that invoked the check + */ + [[nodiscard]] virtual bool OnCanPlayerFlyInZone(Player* /*player*/, uint32 /*mapId*/, uint32 /*zoneId*/, SpellInfo const* /*bySpell*/) { return true; } + + // Passive Anticheat System + virtual void AnticheatSetSkipOnePacketForASH(Player* /*player*/, bool /*apply*/) { } + virtual void AnticheatSetCanFlybyServer(Player* /*player*/, bool /*apply*/) { } + virtual void AnticheatSetUnderACKmount(Player* /*player*/) { } + virtual void AnticheatSetRootACKUpd(Player* /*player*/) { } + virtual void AnticheatSetJumpingbyOpcode(Player* /*player*/, bool /*jump*/) { } + virtual void AnticheatUpdateMovementInfo(Player* /*player*/, MovementInfo const& /*movementInfo*/) { } + [[nodiscard]] virtual bool AnticheatHandleDoubleJump(Player* /*player*/, Unit* /*mover*/) { return true; } + [[nodiscard]] virtual bool AnticheatCheckMovementInfo(Player* /*player*/, MovementInfo const& /*movementInfo*/, Unit* /*mover*/, bool /*jump*/) { return true; } + + /** + * @brief This hook is called, to avoid displaying the error message that the body has already been stripped + * + * @param player Contains information about the Player + * + * @return true Avoiding displaying the error message that the loot has already been taken. + */ + virtual bool CanSendErrorAlreadyLooted(Player* /*player*/) { return true; } + + /** + * @brief It is used when an item is taken from a creature. + * + * @param player Contains information about the Player + * + */ + virtual void OnAfterCreatureLoot(Player* /*player*/) { } + + /** + * @brief After a creature's money is taken + * + * @param player Contains information about the Player + */ + virtual void OnAfterCreatureLootMoney(Player* /*player*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/ServerScript.cpp b/src/server/game/Scripting/ScriptDefines/ServerScript.cpp index ca8f7cf67..ef0e8b721 100644 --- a/src/server/game/Scripting/ScriptDefines/ServerScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/ServerScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "ServerScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -95,3 +96,11 @@ bool ScriptMgr::CanPacketSend(WorldSession* session, WorldPacket const& packet) return true; } + +ServerScript::ServerScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/ServerScript.h b/src/server/game/Scripting/ScriptDefines/ServerScript.h new file mode 100644 index 000000000..b09c07ecb --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/ServerScript.h @@ -0,0 +1,62 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_SERVER_SCRIPT_H_ +#define SCRIPT_OBJECT_SERVER_SCRIPT_H_ + +#include "ScriptObject.h" + +class ServerScript : public ScriptObject +{ +protected: + ServerScript(const char* name); + +public: + // Called when reactive socket I/O is started (WorldSocketMgr). + virtual void OnNetworkStart() { } + + // Called when reactive I/O is stopped. + virtual void OnNetworkStop() { } + + // Called when a remote socket establishes a connection to the server. Do not store the socket object. + virtual void OnSocketOpen(std::shared_ptr /*socket*/) { } + + // Called when a socket is closed. Do not store the socket object, and do not rely on the connection + // being open; it is not. + virtual void OnSocketClose(std::shared_ptr /*socket*/) { } + + /** + * @brief This hook called when a packet is sent to a client. The packet object is a copy of the original packet, so reading and modifying it is safe. + * + * @param session Contains information about the WorldSession + * @param packet Contains information about the WorldPacket + * @return True if you want to continue sending the packet, false if you want to disallow sending the packet + */ + [[nodiscard]] virtual bool CanPacketSend(WorldSession* /*session*/, WorldPacket& /*packet*/) { return true; } + + /** + * @brief Called when a (valid) packet is received by a client. The packet object is a copy of the original packet, so + * reading and modifying it is safe. Make sure to check WorldSession pointer before usage, it might be null in case of auth packets + * + * @param session Contains information about the WorldSession + * @param packet Contains information about the WorldPacket + * @return True if you want to continue receive the packet, false if you want to disallow receive the packet + */ + [[nodiscard]] virtual bool CanPacketReceive(WorldSession* /*session*/, WorldPacket& /*packet*/) { return true; } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.cpp b/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.cpp index c2e29ff79..06aecaa12 100644 --- a/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "SpellScriptLoader.h" #include "ScriptMgr.h" #include "SpellScript.h" @@ -74,3 +75,11 @@ void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.h b/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.h new file mode 100644 index 000000000..826d5288e --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/SpellScriptLoader.h @@ -0,0 +1,144 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_SPELL_SCRIPT_LOADER_H_ +#define SCRIPT_OBJECT_SPELL_SCRIPT_LOADER_H_ + +#include "ScriptObject.h" +#include "Tuples.h" +#include "Types.h" + +class SpellScriptLoader : public ScriptObject +{ +protected: + SpellScriptLoader(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + // Should return a fully valid SpellScript pointer. + [[nodiscard]] virtual SpellScript* GetSpellScript() const { return nullptr; } + + // Should return a fully valid AuraScript pointer. + [[nodiscard]] virtual AuraScript* GetAuraScript() const { return nullptr; } +}; + +namespace Acore::SpellScripts +{ + template + using is_SpellScript = std::is_base_of; + + template + using is_AuraScript = std::is_base_of; +} + +template +class GenericSpellAndAuraScriptLoader : public SpellScriptLoader +{ + using SpellScriptType = typename Acore::find_type_if_t; + using AuraScriptType = typename Acore::find_type_if_t; + using ArgsType = typename Acore::find_type_if_t; + +public: + GenericSpellAndAuraScriptLoader(char const* name, ArgsType&& args) : SpellScriptLoader(name), _args(std::move(args)) { } + +private: + [[nodiscard]] SpellScript* GetSpellScript() const override + { + if constexpr (!std::is_same_v) + { + return Acore::new_from_tuple(_args); + } + else + { + return nullptr; + } + } + + [[nodiscard]] AuraScript* GetAuraScript() const override + { + if constexpr (!std::is_same_v) + { + return Acore::new_from_tuple(_args); + } + else + { + return nullptr; + } + } + + ArgsType _args; +}; + +#define RegisterSpellScriptWithArgs(spell_script, script_name, ...) new GenericSpellAndAuraScriptLoader(script_name, std::make_tuple(__VA_ARGS__)) +#define RegisterSpellScript(spell_script) RegisterSpellScriptWithArgs(spell_script, #spell_script) +#define RegisterSpellAndAuraScriptPairWithArgs(script_1, script_2, script_name, ...) new GenericSpellAndAuraScriptLoader(script_name, std::make_tuple(__VA_ARGS__)) +#define RegisterSpellAndAuraScriptPair(script_1, script_2) RegisterSpellAndAuraScriptPairWithArgs(script_1, script_2, #script_1) + +//namespace Acore::SpellScripts +//{ +// template +// using is_SpellScript = std::is_base_of; +// +// template +// using is_AuraScript = std::is_base_of; +//} +// +//template +//class GenericSpellAndAuraScriptLoader : public SpellScriptLoader +//{ +// using SpellScriptType = typename Acore::find_type_if_t; +// using AuraScriptType = typename Acore::find_type_if_t; +// using ArgsType = typename Acore::find_type_if_t; +// +//public: +// GenericSpellAndAuraScriptLoader(std::string_view name, ArgsType&& args) : SpellScriptLoader(name), _args(std::move(args)) { } +// +//private: +// [[nodiscard]] SpellScript* GetSpellScript() const override +// { +// if constexpr (!std::is_same_v) +// { +// return Acore::new_from_tuple(_args); +// } +// else +// { +// return nullptr; +// } +// } +// +// [[nodiscard]] AuraScript* GetAuraScript() const override +// { +// if constexpr (!std::is_same_v) +// { +// return Acore::new_from_tuple(_args); +// } +// else +// { +// return nullptr; +// } +// } +// +// ArgsType _args; +//}; +// +//#define RegisterSpellScriptWithArgs(spell_script, script_name, ...) new GenericSpellAndAuraScriptLoader(script_name, std::make_tuple(__VA_ARGS__)) +//#define RegisterSpellScript(spell_script) RegisterSpellScriptWithArgs(spell_script, #spell_script) +//#define RegisterSpellAndAuraScriptPairWithArgs(script_1, script_2, script_name, ...) new GenericSpellAndAuraScriptLoader(script_name, std::make_tuple(__VA_ARGS__)) +//#define RegisterSpellAndAuraScriptPair(script_1, script_2) RegisterSpellAndAuraScriptPairWithArgs(script_1, script_2, #script_1) + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/TransportScript.cpp b/src/server/game/Scripting/ScriptDefines/TransportScript.cpp index 3b870ffa1..f6eb1df82 100644 --- a/src/server/game/Scripting/ScriptDefines/TransportScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/TransportScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "TransportScript.h" #include "ScriptMgr.h" #include "Transport.h" @@ -68,3 +69,11 @@ void ScriptMgr::OnRelocate(Transport* transport, uint32 waypointId, uint32 mapId tempScript->OnRelocate(transport, waypointId, mapId, x, y, z); } } + +TransportScript::TransportScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/TransportScript.h b/src/server/game/Scripting/ScriptDefines/TransportScript.h new file mode 100644 index 000000000..df1f5ed68 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/TransportScript.h @@ -0,0 +1,44 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_TRANSPORT_SCRIPT_H_ +#define SCRIPT_OBJECT_TRANSPORT_SCRIPT_H_ + +#include "ScriptObject.h" + +class TransportScript : public ScriptObject, public UpdatableScript +{ +protected: + TransportScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + // Called when a player boards the transport. + virtual void OnAddPassenger(Transport* /*transport*/, Player* /*player*/) { } + + // Called when a creature boards the transport. + virtual void OnAddCreaturePassenger(Transport* /*transport*/, Creature* /*creature*/) { } + + // Called when a player exits the transport. + virtual void OnRemovePassenger(Transport* /*transport*/, Player* /*player*/) { } + + // Called when transport moves. + virtual void OnRelocate(Transport* /*transport*/, uint32 /*waypointId*/, uint32 /*mapId*/, float /*x*/, float /*y*/, float /*z*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/UnitScript.cpp b/src/server/game/Scripting/ScriptDefines/UnitScript.cpp index 5d66f7a88..eb070a6cf 100644 --- a/src/server/game/Scripting/ScriptDefines/UnitScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/UnitScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "UnitScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -250,3 +251,12 @@ void ScriptMgr::OnAuraApply(Unit* unit, Aura* aura) script->OnAuraApply(unit, aura); }); } + +UnitScript::UnitScript(const char* name, bool addToScripts) : + ScriptObject(name) +{ + if (addToScripts) + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/UnitScript.h b/src/server/game/Scripting/ScriptDefines/UnitScript.h new file mode 100644 index 000000000..3b44ca03d --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/UnitScript.h @@ -0,0 +1,89 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_UNIT_SCRIPT_H_ +#define SCRIPT_OBJECT_UNIT_SCRIPT_H_ + +#include "ScriptObject.h" + +enum ReputationRank : uint8; +class ByteBuffer; + +class UnitScript : public ScriptObject +{ +protected: + UnitScript(const char* name, bool addToScripts = true); + +public: + // Called when a unit deals healing to another unit + virtual void OnHeal(Unit* /*healer*/, Unit* /*reciever*/, uint32& /*gain*/) { } + + // Called when a unit deals damage to another unit + virtual void OnDamage(Unit* /*attacker*/, Unit* /*victim*/, uint32& /*damage*/) { } + + // Called when DoT's Tick Damage is being Dealt + // Attacker can be nullptr if he is despawned while the aura still exists on target + virtual void ModifyPeriodicDamageAurasTick(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/, SpellInfo const* /*spellInfo*/) { } + + // Called when Melee Damage is being Dealt + virtual void ModifyMeleeDamage(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/) { } + + // Called when Spell Damage is being Dealt + virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/, SpellInfo const* /*spellInfo*/) { } + + // Called when Heal is Recieved + virtual void ModifyHealReceived(Unit* /*target*/, Unit* /*healer*/, uint32& /*heal*/, SpellInfo const* /*spellInfo*/) { } + + //Called when Damage is Dealt + virtual uint32 DealDamage(Unit* /*AttackerUnit*/, Unit* /*pVictim*/, uint32 damage, DamageEffectType /*damagetype*/) { return damage; } + + virtual void OnBeforeRollMeleeOutcomeAgainst(Unit const* /*attacker*/, Unit const* /*victim*/, WeaponAttackType /*attType*/, int32& /*attackerMaxSkillValueForLevel*/, int32& /*victimMaxSkillValueForLevel*/, int32& /*attackerWeaponSkill*/, int32& /*victimDefenseSkill*/, int32& /*crit_chance*/, int32& /*miss_chance*/, int32& /*dodge_chance*/, int32& /*parry_chance*/, int32& /*block_chance*/ ) { }; + + virtual void OnAuraApply(Unit* /*unit*/, Aura* /*aura*/) { } + + virtual void OnAuraRemove(Unit* /*unit*/, AuraApplication* /*aurApp*/, AuraRemoveMode /*mode*/) { } + + [[nodiscard]] virtual bool IfNormalReaction(Unit const* /*unit*/, Unit const* /*target*/, ReputationRank& /*repRank*/) { return true; } + + [[nodiscard]] virtual bool IsNeedModSpellDamagePercent(Unit const* /*unit*/, AuraEffect* /*auraEff*/, float& /*doneTotalMod*/, SpellInfo const* /*spellProto*/) { return true; } + + [[nodiscard]] virtual bool IsNeedModMeleeDamagePercent(Unit const* /*unit*/, AuraEffect* /*auraEff*/, float& /*doneTotalMod*/, SpellInfo const* /*spellProto*/) { return true; } + + [[nodiscard]] virtual bool IsNeedModHealPercent(Unit const* /*unit*/, AuraEffect* /*auraEff*/, float& /*doneTotalMod*/, SpellInfo const* /*spellProto*/) { return true; } + + [[nodiscard]] virtual bool CanSetPhaseMask(Unit const* /*unit*/, uint32 /*newPhaseMask*/, bool /*update*/) { return true; } + + [[nodiscard]] virtual bool IsCustomBuildValuesUpdate(Unit const* /*unit*/, uint8 /*updateType*/, ByteBuffer& /*fieldBuffer*/, Player const* /*target*/, uint16 /*index*/) { return false; } + + [[nodiscard]] virtual bool OnBuildValuesUpdate(Unit const* /*unit*/, uint8 /*updateType*/, ByteBuffer& /*fieldBuffer*/, Player* /*target*/, uint16 /*index*/) { return false; } + + /** + * @brief This hook runs in Unit::Update + * + * @param unit Contains information about the Unit + * @param diff Contains information about the diff time + */ + virtual void OnUnitUpdate(Unit* /*unit*/, uint32 /*diff*/) { } + + virtual void OnDisplayIdChange(Unit* /*unit*/, uint32 /*displayId*/) { } + + virtual void OnUnitEnterEvadeMode(Unit* /*unit*/, uint8 /*evadeReason*/) { } + virtual void OnUnitEnterCombat(Unit* /*unit*/, Unit* /*victim*/) { } + virtual void OnUnitDeath(Unit* /*unit*/, Unit* /*killer*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/VehicleScript.cpp b/src/server/game/Scripting/ScriptDefines/VehicleScript.cpp index 2d9d1b746..ae58a8cd5 100644 --- a/src/server/game/Scripting/ScriptDefines/VehicleScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/VehicleScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "VehicleScript.h" #include "ScriptMgr.h" #include "Vehicle.h" @@ -86,3 +87,11 @@ void ScriptMgr::OnRemovePassenger(Vehicle* veh, Unit* passenger) tempScript->OnRemovePassenger(veh, passenger); } } + +VehicleScript::VehicleScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/VehicleScript.h b/src/server/game/Scripting/ScriptDefines/VehicleScript.h new file mode 100644 index 000000000..b1e7cf7bf --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/VehicleScript.h @@ -0,0 +1,48 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_VEHICLE_SCRIPT_H_ +#define SCRIPT_OBJECT_VEHICLE_SCRIPT_H_ + +#include "ScriptObject.h" + +class VehicleScript : public ScriptObject +{ +protected: + VehicleScript(const char* name); + +public: + // Called after a vehicle is installed. + virtual void OnInstall(Vehicle* /*veh*/) { } + + // Called after a vehicle is uninstalled. + virtual void OnUninstall(Vehicle* /*veh*/) { } + + // Called when a vehicle resets. + virtual void OnReset(Vehicle* /*veh*/) { } + + // Called after an accessory is installed in a vehicle. + virtual void OnInstallAccessory(Vehicle* /*veh*/, Creature* /*accessory*/) { } + + // Called after a passenger is added to a vehicle. + virtual void OnAddPassenger(Vehicle* /*veh*/, Unit* /*passenger*/, int8 /*seatId*/) { } + + // Called after a passenger is removed from a vehicle. + virtual void OnRemovePassenger(Vehicle* /*veh*/, Unit* /*passenger*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp b/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp index 2375ad530..5232ae0ca 100644 --- a/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/WeatherScript.cpp @@ -15,6 +15,8 @@ * with this program. If not, see . */ +#include "WeatherScript.h" +#include "ElunaScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -42,3 +44,11 @@ void ScriptMgr::OnWeatherUpdate(Weather* weather, uint32 diff) tempScript->OnUpdate(weather, diff); } } + +WeatherScript::WeatherScript(const char* name) + : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/WeatherScript.h b/src/server/game/Scripting/ScriptDefines/WeatherScript.h new file mode 100644 index 000000000..60a86290b --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/WeatherScript.h @@ -0,0 +1,35 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_WEATHER_SCRIPT_H_ +#define SCRIPT_OBJECT_WEATHER_SCRIPT_H_ + +#include "ScriptObject.h" + +class WeatherScript : public ScriptObject, public UpdatableScript +{ +protected: + WeatherScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return true; } + + // Called when the weather changes in the zone, this script is associated with. + virtual void OnChange(Weather* /*weather*/, WeatherState /*state*/, float /*grade*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/WorldMapScript.cpp b/src/server/game/Scripting/ScriptDefines/WorldMapScript.cpp new file mode 100644 index 000000000..bacbabc92 --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/WorldMapScript.cpp @@ -0,0 +1,38 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "WorldMapScript.h" +#include "Log.h" +#include "ScriptMgr.h" + +WorldMapScript::WorldMapScript(const char* name, uint32 mapId) : + ScriptObject(name), MapScript(mapId) +{ + ScriptRegistry::AddScript(this); +} + +void WorldMapScript::checkValidity() +{ + checkMap(); + + if (GetEntry() && !GetEntry()->IsWorldMap()) + { + LOG_ERROR("maps.script", "WorldMapScript for map {} is invalid.", GetEntry()->MapID); + } +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/WorldMapScript.h b/src/server/game/Scripting/ScriptDefines/WorldMapScript.h new file mode 100644 index 000000000..bbfc0d83b --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/WorldMapScript.h @@ -0,0 +1,34 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_WORLD_MAP_SCRIPT_H_ +#define SCRIPT_OBJECT_WORLD_MAP_SCRIPT_H_ + +#include "ScriptObject.h" + +class WorldMapScript : public ScriptObject, public MapScript +{ +protected: + WorldMapScript(const char* name, uint32 mapId); + +public: + [[nodiscard]] bool isAfterLoadScript() const override { return true; } + + void checkValidity() override; +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/WorldObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/WorldObjectScript.cpp index e41a820e0..f9fa1c781 100644 --- a/src/server/game/Scripting/ScriptDefines/WorldObjectScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/WorldObjectScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "WorldObjectScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -67,3 +68,10 @@ void ScriptMgr::OnWorldObjectUpdate(WorldObject* object, uint32 diff) script->OnWorldObjectUpdate(object, diff); }); } + +WorldObjectScript::WorldObjectScript(const char* name) : ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/WorldObjectScript.h b/src/server/game/Scripting/ScriptDefines/WorldObjectScript.h new file mode 100644 index 000000000..6f1a17c4f --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/WorldObjectScript.h @@ -0,0 +1,68 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_WORLD_OBJECT_SCRIPT_H_ +#define SCRIPT_OBJECT_WORLD_OBJECT_SCRIPT_H_ + +#include "ScriptObject.h" + +class WorldObjectScript : public ScriptObject +{ +protected: + WorldObjectScript(const char* name); + +public: + [[nodiscard]] bool IsDatabaseBound() const override { return false; } + + /** + * @brief This hook called before destroy world object + * + * @param object Contains information about the WorldObject + */ + virtual void OnWorldObjectDestroy(WorldObject* /*object*/) { } + + /** + * @brief This hook called after create world object + * + * @param object Contains information about the WorldObject + */ + virtual void OnWorldObjectCreate(WorldObject* /*object*/) { } + + /** + * @brief This hook called after world object set to map + * + * @param object Contains information about the WorldObject + */ + virtual void OnWorldObjectSetMap(WorldObject* /*object*/, Map* /*map*/ ) { } + + /** + * @brief This hook called after world object reset + * + * @param object Contains information about the WorldObject + */ + virtual void OnWorldObjectResetMap(WorldObject* /*object*/) { } + + /** + * @brief This hook called after world object update + * + * @param object Contains information about the WorldObject + * @param diff Contains information about the diff time + */ + virtual void OnWorldObjectUpdate(WorldObject* /*object*/, uint32 /*diff*/) { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptDefines/WorldScript.cpp b/src/server/game/Scripting/ScriptDefines/WorldScript.cpp index 33cef453b..0d8748734 100644 --- a/src/server/game/Scripting/ScriptDefines/WorldScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/WorldScript.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "WorldScript.h" #include "ScriptMgr.h" #include "ScriptMgrMacros.h" @@ -121,3 +122,11 @@ void ScriptMgr::OnAfterUnloadAllMaps() script->OnAfterUnloadAllMaps(); }); } + +WorldScript::WorldScript(const char* name) : + ScriptObject(name) +{ + ScriptRegistry::AddScript(this); +} + +template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptDefines/WorldScript.h b/src/server/game/Scripting/ScriptDefines/WorldScript.h new file mode 100644 index 000000000..a9fdbb64a --- /dev/null +++ b/src/server/game/Scripting/ScriptDefines/WorldScript.h @@ -0,0 +1,77 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef SCRIPT_OBJECT_WORLD_SCRIPT_H_ +#define SCRIPT_OBJECT_WORLD_SCRIPT_H_ + +#include "ScriptObject.h" + +class WorldScript : public ScriptObject +{ +protected: + WorldScript(const char* name); + +public: + // Called when the open/closed state of the world changes. + virtual void OnOpenStateChange(bool /*open*/) { } + + // Called after the world configuration is (re)loaded. + virtual void OnAfterConfigLoad(bool /*reload*/) { } + + // Called when loading custom database tables + virtual void OnLoadCustomDatabaseTable() { } + + // Called before the world configuration is (re)loaded. + virtual void OnBeforeConfigLoad(bool /*reload*/) { } + + // Called before the message of the day is changed. + virtual void OnMotdChange(std::string& /*newMotd*/) { } + + // Called when a world shutdown is initiated. + virtual void OnShutdownInitiate(ShutdownExitCode /*code*/, ShutdownMask /*mask*/) { } + + // Called when a world shutdown is cancelled. + virtual void OnShutdownCancel() { } + + // Called on every world tick (don't execute too heavy code here). + virtual void OnUpdate(uint32 /*diff*/) { } + + // Called when the world is started. + virtual void OnStartup() { } + + // Called when the world is actually shut down. + virtual void OnShutdown() { } + + /** + * @brief Called after all maps are unloaded from core + */ + virtual void OnAfterUnloadAllMaps() { } + + /** + * @brief This hook runs before finalizing the player world session. Can be also used to mutate the cache version of the Client. + * + * @param version The cache version that we will be sending to the Client. + */ + virtual void OnBeforeFinalizePlayerWorldSession(uint32& /*cacheVersion*/) { } + + /** + * @brief This hook runs after all scripts loading and before itialized + */ + virtual void OnBeforeWorldInitialized() { } +}; + +#endif diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 2ddad5cf1..9d2afcd0c 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -16,7 +16,9 @@ */ #include "ScriptMgr.h" +#include "AllScriptsObjects.h" #include "InstanceScript.h" +#include "ScriptObject.h" #include "ScriptSystem.h" #include "SmartAI.h" #include "SpellMgr.h" @@ -287,359 +289,3 @@ void ScriptMgr::FillSpellSummary() } } } - -///- -AllMapScript::AllMapScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -AllCreatureScript::AllCreatureScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -UnitScript::UnitScript(const char* name, bool addToScripts) - : ScriptObject(name) -{ - if (addToScripts) - ScriptRegistry::AddScript(this); -} - -MovementHandlerScript::MovementHandlerScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -SpellScriptLoader::SpellScriptLoader(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -ServerScript::ServerScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -WorldScript::WorldScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -FormulaScript::FormulaScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -WorldMapScript::WorldMapScript(const char* name, uint32 mapId) - : ScriptObject(name), MapScript(mapId) -{ - ScriptRegistry::AddScript(this); -} - -InstanceMapScript::InstanceMapScript(const char* name, uint32 mapId) - : ScriptObject(name), MapScript(mapId) -{ - ScriptRegistry::AddScript(this); -} - -BattlegroundMapScript::BattlegroundMapScript(const char* name, uint32 mapId) - : ScriptObject(name), MapScript(mapId) -{ - ScriptRegistry::AddScript(this); -} - -ItemScript::ItemScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -CreatureScript::CreatureScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -GameObjectScript::GameObjectScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -AreaTriggerScript::AreaTriggerScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -bool OnlyOnceAreaTriggerScript::OnTrigger(Player* player, AreaTrigger const* trigger) -{ - uint32 const triggerId = trigger->entry; - if (InstanceScript* instance = player->GetInstanceScript()) - { - if (instance->IsAreaTriggerDone(triggerId)) - { - return true; - } - else - { - instance->MarkAreaTriggerDone(triggerId); - } - } - return _OnTrigger(player, trigger); -} - -void OnlyOnceAreaTriggerScript::ResetAreaTriggerDone(InstanceScript* script, uint32 triggerId) -{ - script->ResetAreaTriggerDone(triggerId); -} - -void OnlyOnceAreaTriggerScript::ResetAreaTriggerDone(Player const* player, AreaTrigger const* trigger) -{ - if (InstanceScript* instance = player->GetInstanceScript()) - { - ResetAreaTriggerDone(instance, trigger->entry); - } -} - -BattlegroundScript::BattlegroundScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -OutdoorPvPScript::OutdoorPvPScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -CommandScript::CommandScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -WeatherScript::WeatherScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -AuctionHouseScript::AuctionHouseScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -ConditionScript::ConditionScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -VehicleScript::VehicleScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -DynamicObjectScript::DynamicObjectScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -TransportScript::TransportScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -AchievementCriteriaScript::AchievementCriteriaScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -PlayerScript::PlayerScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -AccountScript::AccountScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -GuildScript::GuildScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -GroupScript::GroupScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -GlobalScript::GlobalScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -BGScript::BGScript(char const* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -ArenaTeamScript::ArenaTeamScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -SpellSC::SpellSC(char const* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -ModuleScript::ModuleScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -GameEventScript::GameEventScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -MailScript::MailScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -AchievementScript::AchievementScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -PetScript::PetScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -ArenaScript::ArenaScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -MiscScript::MiscScript(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -CommandSC::CommandSC(const char* name) - : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -DatabaseScript::DatabaseScript(const char* name) : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -WorldObjectScript::WorldObjectScript(const char* name) : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -LootScript::LootScript(const char* name) : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -ElunaScript::ElunaScript(const char* name) : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -AllItemScript::AllItemScript(const char* name) : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -AllGameObjectScript::AllGameObjectScript(const char* name) : ScriptObject(name) -{ - ScriptRegistry::AddScript(this); -} - -// Specialize for each script type class like so: -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; -template class AC_GAME_API ScriptRegistry; diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 681fddc6e..42ab7e15b 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -39,6 +39,9 @@ #include "World.h" #include +// Add support old api modules +#include "AllScriptsObjects.h" + class AuctionHouseObject; class AuraScript; class Battleground; @@ -75,6 +78,7 @@ class WorldObject; class WorldPacket; class WorldSocket; class CharacterCreateInfo; +class SpellScriptLoader; struct AchievementCriteriaData; struct AuctionEntry; @@ -92,8 +96,6 @@ namespace Acore::ChatCommands struct ChatCommandBuilder; } -#define VISIBLE_RANGE 166.0f //MAX visible range (size of grid) - // Check out our guide on how to create new hooks in our wiki! https://www.azerothcore.org/wiki/hooks-script /* TODO: Add more script type classes. @@ -104,2031 +106,6 @@ namespace Acore::ChatCommands */ -class ScriptObject -{ - friend class ScriptMgr; - -public: - // Do not override this in scripts; it should be overridden by the various script type classes. It indicates - // whether or not this script type must be assigned in the database. - [[nodiscard]] virtual bool IsDatabaseBound() const { return false; } - [[nodiscard]] virtual bool isAfterLoadScript() const { return IsDatabaseBound(); } - virtual void checkValidity() { } - - [[nodiscard]] const std::string& GetName() const { return _name; } - -protected: - ScriptObject(const char* name) - : _name(std::string(name)) - { - } - - virtual ~ScriptObject() = default; - -private: - const std::string _name; -}; - -template class UpdatableScript -{ -protected: - UpdatableScript() = default; - -public: - virtual void OnUpdate(TObject* /*obj*/, uint32 /*diff*/) { } -}; - -class SpellScriptLoader : public ScriptObject -{ -protected: - SpellScriptLoader(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - // Should return a fully valid SpellScript pointer. - [[nodiscard]] virtual SpellScript* GetSpellScript() const { return nullptr; } - - // Should return a fully valid AuraScript pointer. - [[nodiscard]] virtual AuraScript* GetAuraScript() const { return nullptr; } -}; - -class ServerScript : public ScriptObject -{ -protected: - ServerScript(const char* name); - -public: - // Called when reactive socket I/O is started (WorldSocketMgr). - virtual void OnNetworkStart() { } - - // Called when reactive I/O is stopped. - virtual void OnNetworkStop() { } - - // Called when a remote socket establishes a connection to the server. Do not store the socket object. - virtual void OnSocketOpen(std::shared_ptr /*socket*/) { } - - // Called when a socket is closed. Do not store the socket object, and do not rely on the connection - // being open; it is not. - virtual void OnSocketClose(std::shared_ptr /*socket*/) { } - - /** - * @brief This hook called when a packet is sent to a client. The packet object is a copy of the original packet, so reading and modifying it is safe. - * - * @param session Contains information about the WorldSession - * @param packet Contains information about the WorldPacket - * @return True if you want to continue sending the packet, false if you want to disallow sending the packet - */ - [[nodiscard]] virtual bool CanPacketSend(WorldSession* /*session*/, WorldPacket& /*packet*/) { return true; } - - /** - * @brief Called when a (valid) packet is received by a client. The packet object is a copy of the original packet, so - * reading and modifying it is safe. Make sure to check WorldSession pointer before usage, it might be null in case of auth packets - * - * @param session Contains information about the WorldSession - * @param packet Contains information about the WorldPacket - * @return True if you want to continue receive the packet, false if you want to disallow receive the packet - */ - [[nodiscard]] virtual bool CanPacketReceive(WorldSession* /*session*/, WorldPacket& /*packet*/) { return true; } -}; - -class WorldScript : public ScriptObject -{ -protected: - WorldScript(const char* name); - -public: - // Called when the open/closed state of the world changes. - virtual void OnOpenStateChange(bool /*open*/) { } - - // Called after the world configuration is (re)loaded. - virtual void OnAfterConfigLoad(bool /*reload*/) { } - - // Called when loading custom database tables - virtual void OnLoadCustomDatabaseTable() { } - - // Called before the world configuration is (re)loaded. - virtual void OnBeforeConfigLoad(bool /*reload*/) { } - - // Called before the message of the day is changed. - virtual void OnMotdChange(std::string& /*newMotd*/) { } - - // Called when a world shutdown is initiated. - virtual void OnShutdownInitiate(ShutdownExitCode /*code*/, ShutdownMask /*mask*/) { } - - // Called when a world shutdown is cancelled. - virtual void OnShutdownCancel() { } - - // Called on every world tick (don't execute too heavy code here). - virtual void OnUpdate(uint32 /*diff*/) { } - - // Called when the world is started. - virtual void OnStartup() { } - - // Called when the world is actually shut down. - virtual void OnShutdown() { } - - /** - * @brief Called after all maps are unloaded from core - */ - virtual void OnAfterUnloadAllMaps() { } - - /** - * @brief This hook runs before finalizing the player world session. Can be also used to mutate the cache version of the Client. - * - * @param version The cache version that we will be sending to the Client. - */ - virtual void OnBeforeFinalizePlayerWorldSession(uint32& /*cacheVersion*/) { } - - /** - * @brief This hook runs after all scripts loading and before itialized - */ - virtual void OnBeforeWorldInitialized() { } -}; - -class FormulaScript : public ScriptObject -{ -protected: - FormulaScript(const char* name); - -public: - // Called after calculating honor. - virtual void OnHonorCalculation(float& /*honor*/, uint8 /*level*/, float /*multiplier*/) { } - - // Called after gray level calculation. - virtual void OnGrayLevelCalculation(uint8& /*grayLevel*/, uint8 /*playerLevel*/) { } - - // Called after calculating experience color. - virtual void OnColorCodeCalculation(XPColorChar& /*color*/, uint8 /*playerLevel*/, uint8 /*mobLevel*/) { } - - // Called after calculating zero difference. - virtual void OnZeroDifferenceCalculation(uint8& /*diff*/, uint8 /*playerLevel*/) { } - - // Called after calculating base experience gain. - virtual void OnBaseGainCalculation(uint32& /*gain*/, uint8 /*playerLevel*/, uint8 /*mobLevel*/, ContentLevels /*content*/) { } - - // Called after calculating experience gain. - virtual void OnGainCalculation(uint32& /*gain*/, Player* /*player*/, Unit* /*unit*/) { } - - // Called when calculating the experience rate for group experience. - virtual void OnGroupRateCalculation(float& /*rate*/, uint32 /*count*/, bool /*isRaid*/) { } - - // Called after calculating arena rating changes - virtual void OnAfterArenaRatingCalculation(Battleground* const /*bg*/, int32& /*winnerMatchmakerChange*/, int32& /*loserMatchmakerChange*/, int32& /*winnerChange*/, int32& /*loserChange*/) { }; - - // Called before modifying a player's personal rating - virtual void OnBeforeUpdatingPersonalRating(int32& /*mod*/, uint32 /*type*/) { } -}; - -template class MapScript : public UpdatableScript -{ - MapEntry const* _mapEntry; - uint32 _mapId; - -protected: - MapScript(uint32 mapId) - : _mapId(mapId) - { - } - -public: - void checkMap() - { - _mapEntry = sMapStore.LookupEntry(_mapId); - - if (!_mapEntry) - LOG_ERROR("maps.script", "Invalid MapScript for {}; no such map ID.", _mapId); - } - - // Gets the MapEntry structure associated with this script. Can return nullptr. - MapEntry const* GetEntry() { return _mapEntry; } - - // Called when the map is created. - virtual void OnCreate(TMap* /*map*/) { } - - // Called just before the map is destroyed. - virtual void OnDestroy(TMap* /*map*/) { } - - // Called when a grid map is loaded. - virtual void OnLoadGridMap(TMap* /*map*/, GridMap* /*gmap*/, uint32 /*gx*/, uint32 /*gy*/) { } - - // Called when a grid map is unloaded. - virtual void OnUnloadGridMap(TMap* /*map*/, GridMap* /*gmap*/, uint32 /*gx*/, uint32 /*gy*/) { } - - // Called when a player enters the map. - virtual void OnPlayerEnter(TMap* /*map*/, Player* /*player*/) { } - - // Called when a player leaves the map. - virtual void OnPlayerLeave(TMap* /*map*/, Player* /*player*/) { } - - // Called on every map update tick. - void OnUpdate(TMap* /*map*/, uint32 /*diff*/) override { } -}; - -class WorldMapScript : public ScriptObject, public MapScript -{ -protected: - WorldMapScript(const char* name, uint32 mapId); - -public: - [[nodiscard]] bool isAfterLoadScript() const override { return true; } - - void checkValidity() override - { - checkMap(); - - if (GetEntry() && !GetEntry()->IsWorldMap()) - LOG_ERROR("maps.script", "WorldMapScript for map {} is invalid.", GetEntry()->MapID); - } -}; - -class InstanceMapScript : public ScriptObject, public MapScript -{ -protected: - InstanceMapScript(const char* name, uint32 mapId); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - void checkValidity() override - { - checkMap(); - - if (GetEntry() && !GetEntry()->IsDungeon()) - LOG_ERROR("maps.script", "InstanceMapScript for map {} is invalid.", GetEntry()->MapID); - } - - // Gets an InstanceScript object for this instance. - virtual InstanceScript* GetInstanceScript(InstanceMap* /*map*/) const { return nullptr; } -}; - -class BattlegroundMapScript : public ScriptObject, public MapScript -{ -protected: - BattlegroundMapScript(const char* name, uint32 mapId); - -public: - [[nodiscard]] bool isAfterLoadScript() const override { return true; } - - void checkValidity() override - { - checkMap(); - - if (GetEntry() && !GetEntry()->IsBattleground()) - LOG_ERROR("maps.script", "BattlegroundMapScript for map {} is invalid.", GetEntry()->MapID); - } -}; - -class ItemScript : public ScriptObject -{ -protected: - ItemScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - // Called when a player accepts a quest from the item. - [[nodiscard]] virtual bool OnQuestAccept(Player* /*player*/, Item* /*item*/, Quest const* /*quest*/) { return false; } - - // Called when a player uses the item. - [[nodiscard]] virtual bool OnUse(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/) { return false; } - - // Called when the item is destroyed. - [[nodiscard]] virtual bool OnRemove(Player* /*player*/, Item* /*item*/) { return false; } - - // Called before casting a combat spell from this item (chance on hit spells of item template, can be used to prevent cast if returning false) - [[nodiscard]] virtual bool OnCastItemCombatSpell(Player* /*player*/, Unit* /*victim*/, SpellInfo const* /*spellInfo*/, Item* /*item*/) { return true; } - - // Called when the item expires (is destroyed). - [[nodiscard]] virtual bool OnExpire(Player* /*player*/, ItemTemplate const* /*proto*/) { return false; } - - // Called when a player selects an option in an item gossip window - virtual void OnGossipSelect(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/) { } - - // Called when a player selects an option in an item gossip window - virtual void OnGossipSelectCode(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { } -}; - -class UnitScript : public ScriptObject -{ -protected: - UnitScript(const char* name, bool addToScripts = true); - -public: - // Called when a unit deals healing to another unit - virtual void OnHeal(Unit* /*healer*/, Unit* /*reciever*/, uint32& /*gain*/) { } - - // Called when a unit deals damage to another unit - virtual void OnDamage(Unit* /*attacker*/, Unit* /*victim*/, uint32& /*damage*/) { } - - // Called when DoT's Tick Damage is being Dealt - // Attacker can be nullptr if he is despawned while the aura still exists on target - virtual void ModifyPeriodicDamageAurasTick(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/, SpellInfo const* /*spellInfo*/) { } - - // Called when Melee Damage is being Dealt - virtual void ModifyMeleeDamage(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/) { } - - // Called when Spell Damage is being Dealt - virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/, SpellInfo const* /*spellInfo*/) { } - - // Called when Heal is Recieved - virtual void ModifyHealReceived(Unit* /*target*/, Unit* /*healer*/, uint32& /*heal*/, SpellInfo const* /*spellInfo*/) { } - - //Called when Damage is Dealt - virtual uint32 DealDamage(Unit* /*AttackerUnit*/, Unit* /*pVictim*/, uint32 damage, DamageEffectType /*damagetype*/) { return damage; } - - virtual void OnBeforeRollMeleeOutcomeAgainst(Unit const* /*attacker*/, Unit const* /*victim*/, WeaponAttackType /*attType*/, int32& /*attackerMaxSkillValueForLevel*/, int32& /*victimMaxSkillValueForLevel*/, int32& /*attackerWeaponSkill*/, int32& /*victimDefenseSkill*/, int32& /*crit_chance*/, int32& /*miss_chance*/, int32& /*dodge_chance*/, int32& /*parry_chance*/, int32& /*block_chance*/ ) { }; - - virtual void OnAuraApply(Unit* /*unit*/, Aura* /*aura*/) { } - - virtual void OnAuraRemove(Unit* /*unit*/, AuraApplication* /*aurApp*/, AuraRemoveMode /*mode*/) { } - - [[nodiscard]] virtual bool IfNormalReaction(Unit const* /*unit*/, Unit const* /*target*/, ReputationRank& /*repRank*/) { return true; } - - [[nodiscard]] virtual bool IsNeedModSpellDamagePercent(Unit const* /*unit*/, AuraEffect* /*auraEff*/, float& /*doneTotalMod*/, SpellInfo const* /*spellProto*/) { return true; } - - [[nodiscard]] virtual bool IsNeedModMeleeDamagePercent(Unit const* /*unit*/, AuraEffect* /*auraEff*/, float& /*doneTotalMod*/, SpellInfo const* /*spellProto*/) { return true; } - - [[nodiscard]] virtual bool IsNeedModHealPercent(Unit const* /*unit*/, AuraEffect* /*auraEff*/, float& /*doneTotalMod*/, SpellInfo const* /*spellProto*/) { return true; } - - [[nodiscard]] virtual bool CanSetPhaseMask(Unit const* /*unit*/, uint32 /*newPhaseMask*/, bool /*update*/) { return true; } - - [[nodiscard]] virtual bool IsCustomBuildValuesUpdate(Unit const* /*unit*/, uint8 /*updateType*/, ByteBuffer& /*fieldBuffer*/, Player const* /*target*/, uint16 /*index*/) { return false; } - - [[nodiscard]] virtual bool OnBuildValuesUpdate(Unit const* /*unit*/, uint8 /*updateType*/, ByteBuffer& /*fieldBuffer*/, Player* /*target*/, uint16 /*index*/) { return false; } - - /** - * @brief This hook runs in Unit::Update - * - * @param unit Contains information about the Unit - * @param diff Contains information about the diff time - */ - virtual void OnUnitUpdate(Unit* /*unit*/, uint32 /*diff*/) { } - - virtual void OnDisplayIdChange(Unit* /*unit*/, uint32 /*displayId*/) { } - - virtual void OnUnitEnterEvadeMode(Unit* /*unit*/, uint8 /*evadeReason*/) { } - virtual void OnUnitEnterCombat(Unit* /*unit*/, Unit* /*victim*/) { } - virtual void OnUnitDeath(Unit* /*unit*/, Unit* /*killer*/) { } -}; - -class MovementHandlerScript : public ScriptObject -{ -protected: - MovementHandlerScript(const char* name); - -public: - //Called whenever a player moves - virtual void OnPlayerMove(Player* /*player*/, MovementInfo /*movementInfo*/, uint32 /*opcode*/) { } -}; - -class AllMapScript : public ScriptObject -{ -protected: - AllMapScript(const char* name); - -public: - /** - * @brief This hook called when a player enters any Map - * - * @param map Contains information about the Map - * @param player Contains information about the Player - */ - virtual void OnPlayerEnterAll(Map* /*map*/, Player* /*player*/) { } - - /** - * @brief This hook called when a player leave any Map - * - * @param map Contains information about the Map - * @param player Contains information about the Player - */ - virtual void OnPlayerLeaveAll(Map* /*map*/, Player* /*player*/) { } - - /** - * @brief This hook called before create instance script - * - * @param instanceMap Contains information about the WorldSession - * @param instanceData Contains information about the WorldPacket - * @param load if true loading instance save data - * @param data Contains information about the instance save data - * @param completedEncounterMask Contains information about the completed encouter mask - */ - virtual void OnBeforeCreateInstanceScript(InstanceMap* /*instanceMap*/, InstanceScript* /*instanceData*/, bool /*load*/, std::string /*data*/, uint32 /*completedEncounterMask*/) { } - - /** - * @brief This hook called before destroy instance - * - * @param mapInstanced Contains information about the MapInstanced - * @param map Contains information about the Map - */ - virtual void OnDestroyInstance(MapInstanced* /*mapInstanced*/, Map* /*map*/) { } - - /** - * @brief This hook called before creating map - * - * @param map Contains information about the Map - */ - virtual void OnCreateMap(Map* /*map*/) { } - - /** - * @brief This hook called before destroing map - * - * @param map Contains information about the Map - */ - virtual void OnDestroyMap(Map* /*map*/) { } - - /** - * @brief This hook called before updating map - * - * @param map Contains information about the Map - * @param diff Contains information about the diff time - */ - virtual void OnMapUpdate(Map* /*map*/, uint32 /*diff*/) { } -}; - -class AllCreatureScript : public ScriptObject -{ -protected: - AllCreatureScript(const char* name); - -public: - // Called from End of Creature Update. - virtual void OnAllCreatureUpdate(Creature* /*creature*/, uint32 /*diff*/) { } - - // Called just before the level of the creature is set. - virtual void OnBeforeCreatureSelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/, uint8& /*level*/) { } - - // Called from End of Creature SelectLevel. - virtual void Creature_SelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/) { } - - /** - * @brief This hook runs after add creature in world - * - * @param creature Contains information about the Creature - */ - virtual void OnCreatureAddWorld(Creature* /*creature*/) { } - - /** - * @brief This hook runs after remove creature in world - * - * @param creature Contains information about the Creature - */ - virtual void OnCreatureRemoveWorld(Creature* /*creature*/) { } - - /** - * @brief This hook runs after creature has been saved to DB - * - * @param creature Contains information about the Creature - */ - virtual void OnCreatureSaveToDB(Creature* /*creature*/) { } - - /** - * @brief This hook called when a player opens a gossip dialog with the creature. - * - * @param player Contains information about the Player - * @param creature Contains information about the Creature - * - * @return False if you want to continue, true if you want to disable - */ - [[nodiscard]] virtual bool CanCreatureGossipHello(Player* /*player*/, Creature* /*creature*/) { return false; } - - /** - * @brief This hook called when a player selects a gossip item in the creature's gossip menu. - * - * @param player Contains information about the Player - * @param creature Contains information about the Creature - * @param sender Contains information about the sender type - * @param action Contains information about the action id - * - * @return False if you want to continue, true if you want to disable - */ - [[nodiscard]] virtual bool CanCreatureGossipSelect(Player* /*player*/, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/) { return false; } - - /** - * @brief This hook called when a player selects a gossip with a code in the creature's gossip menu. - * - * @param player Contains information about the Player - * @param creature Contains information about the Creature - * @param sender Contains information about the sender type - * @param action Contains information about the action id - * @param code Contains information about the code entered - * - * @return True if you want to continue, false if you want to disable - */ - [[nodiscard]] virtual bool CanCreatureGossipSelectCode(Player* /*player*/, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { return false; } - - // Called when a player accepts a quest from the creature. - [[nodiscard]] virtual bool CanCreatureQuestAccept(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; } - - // Called when a player selects a quest reward. - [[nodiscard]] virtual bool CanCreatureQuestReward(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; } - - // Called when a CreatureAI object is needed for the creature. - [[nodiscard]] virtual CreatureAI* GetCreatureAI(Creature* /*creature*/) const { return nullptr; } - - //Called Whenever the UNIT_BYTE2_FLAG_FFA_PVP Bit is set on the creature - virtual void OnFfaPvpStateUpdate(Creature* /*creature*/, bool /*InPvp*/) {} -}; - -class AllItemScript : public ScriptObject -{ -protected: - AllItemScript(const char* name); - -public: - // Called when a player accepts a quest from the item. - [[nodiscard]] virtual bool CanItemQuestAccept(Player* /*player*/, Item* /*item*/, Quest const* /*quest*/) { return true; } - - // Called when a player uses the item. - [[nodiscard]] virtual bool CanItemUse(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/) { return false; } - - // Called when the item is destroyed. - [[nodiscard]] virtual bool CanItemRemove(Player* /*player*/, Item* /*item*/) { return true; } - - // Called when the item expires (is destroyed). - [[nodiscard]] virtual bool CanItemExpire(Player* /*player*/, ItemTemplate const* /*proto*/) { return true; } - - // Called when a player selects an option in an item gossip window - virtual void OnItemGossipSelect(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/) { } - - // Called when a player selects an option in an item gossip window - virtual void OnItemGossipSelectCode(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { } -}; - -class AllGameObjectScript : public ScriptObject -{ -protected: - AllGameObjectScript(const char* name); - -public: - /** - * @brief This hook runs after add game object in world - * - * @param go Contains information about the GameObject - */ - virtual void OnGameObjectAddWorld(GameObject* /*go*/) { } - /** - * @brief This hook runs after the game object iis saved to the database - * - * @param go Contains information about the GameObject - */ - virtual void OnGameObjectSaveToDB(GameObject* /*go*/) { } - /** - * @brief This hook runs after remove game object in world - * - * @param go Contains information about the GameObject - */ - virtual void OnGameObjectRemoveWorld(GameObject* /*go*/) { } - - /** - * @brief This hook runs after remove game object in world - * - * @param go Contains information about the GameObject - */ - virtual void OnGameObjectUpdate(GameObject* /*go*/, uint32 /*diff*/) { } - - // Called when a player opens a gossip dialog with the gameobject. - [[nodiscard]] virtual bool CanGameObjectGossipHello(Player* /*player*/, GameObject* /*go*/) { return false; } - - // Called when a player selects a gossip item in the gameobject's gossip menu. - [[nodiscard]] virtual bool CanGameObjectGossipSelect(Player* /*player*/, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/) { return false; } - - // Called when a player selects a gossip with a code in the gameobject's gossip menu. - [[nodiscard]] virtual bool CanGameObjectGossipSelectCode(Player* /*player*/, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { return false; } - - // Called when a player accepts a quest from the gameobject. - [[nodiscard]] virtual bool CanGameObjectQuestAccept(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/) { return false; } - - // Called when a player selects a quest reward. - [[nodiscard]] virtual bool CanGameObjectQuestReward(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; } - - // Called when the game object is destroyed (destructible buildings only). - virtual void OnGameObjectDestroyed(GameObject* /*go*/, Player* /*player*/) { } - - // Called when the game object is damaged (destructible buildings only). - virtual void OnGameObjectDamaged(GameObject* /*go*/, Player* /*player*/) { } - - // Called when the health of a game object is modified (destructible buildings only). - virtual void OnGameObjectModifyHealth(GameObject* /*go*/, Unit* /*attackerOrHealer*/, int32& /*change*/, SpellInfo const* /*spellInfo*/) { } - - // Called when the game object loot state is changed. - virtual void OnGameObjectLootStateChanged(GameObject* /*go*/, uint32 /*state*/, Unit* /*unit*/) { } - - // Called when the game object state is changed. - virtual void OnGameObjectStateChanged(GameObject* /*go*/, uint32 /*state*/) { } - - // Called when a GameObjectAI object is needed for the gameobject. - virtual GameObjectAI* GetGameObjectAI(GameObject* /*go*/) const { return nullptr; } -}; - -class CreatureScript : public ScriptObject, public UpdatableScript -{ -protected: - CreatureScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - // Called when a player opens a gossip dialog with the creature. - [[nodiscard]] virtual bool OnGossipHello(Player* /*player*/, Creature* /*creature*/) { return false; } - - // Called when a player selects a gossip item in the creature's gossip menu. - [[nodiscard]] virtual bool OnGossipSelect(Player* /*player*/, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/) { return false; } - - // Called when a player selects a gossip with a code in the creature's gossip menu. - [[nodiscard]] virtual bool OnGossipSelectCode(Player* /*player*/, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { return false; } - - // Called when a player accepts a quest from the creature. - [[nodiscard]] virtual bool OnQuestAccept(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; } - - // Called when a player selects a quest in the creature's quest menu. - [[nodiscard]] virtual bool OnQuestSelect(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; } - - // Called when a player completes a quest with the creature. - [[nodiscard]] virtual bool OnQuestComplete(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; } - - // Called when a player selects a quest reward. - [[nodiscard]] virtual bool OnQuestReward(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; } - - // Called when the dialog status between a player and the creature is requested. - virtual uint32 GetDialogStatus(Player* /*player*/, Creature* /*creature*/) { return DIALOG_STATUS_SCRIPTED_NO_STATUS; } - - // Called when a CreatureAI object is needed for the creature. - virtual CreatureAI* GetAI(Creature* /*creature*/) const { return nullptr; } - - //Called whenever the UNIT_BYTE2_FLAG_FFA_PVP bit is Changed on the player - virtual void OnFfaPvpStateUpdate(Creature* /*player*/, bool /*result*/) { } - -}; - -class GameObjectScript : public ScriptObject, public UpdatableScript -{ -protected: - GameObjectScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - // Called when a player opens a gossip dialog with the gameobject. - [[nodiscard]] virtual bool OnGossipHello(Player* /*player*/, GameObject* /*go*/) { return false; } - - // Called when a player selects a gossip item in the gameobject's gossip menu. - [[nodiscard]] virtual bool OnGossipSelect(Player* /*player*/, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/) { return false; } - - // Called when a player selects a gossip with a code in the gameobject's gossip menu. - [[nodiscard]] virtual bool OnGossipSelectCode(Player* /*player*/, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { return false; } - - // Called when a player accepts a quest from the gameobject. - [[nodiscard]] virtual bool OnQuestAccept(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/) { return false; } - - // Called when a player selects a quest reward. - [[nodiscard]] virtual bool OnQuestReward(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; } - - // Called when the dialog status between a player and the gameobject is requested. - virtual uint32 GetDialogStatus(Player* /*player*/, GameObject* /*go*/) { return DIALOG_STATUS_SCRIPTED_NO_STATUS; } - - // Called when the game object is destroyed (destructible buildings only). - virtual void OnDestroyed(GameObject* /*go*/, Player* /*player*/) { } - - // Called when the game object is damaged (destructible buildings only). - virtual void OnDamaged(GameObject* /*go*/, Player* /*player*/) { } - - // Called when the health of a game object is modified (destructible buildings only). - virtual void OnModifyHealth(GameObject* /*go*/, Unit* /*attackerOrHealer*/, int32& /*change*/, SpellInfo const* /*spellInfo*/) { } - - // Called when the game object loot state is changed. - virtual void OnLootStateChanged(GameObject* /*go*/, uint32 /*state*/, Unit* /*unit*/) { } - - // Called when the game object state is changed. - virtual void OnGameObjectStateChanged(GameObject* /*go*/, uint32 /*state*/) { } - - // Called when a GameObjectAI object is needed for the gameobject. - virtual GameObjectAI* GetAI(GameObject* /*go*/) const { return nullptr; } -}; - -class AreaTriggerScript : public ScriptObject -{ -protected: - AreaTriggerScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - // Called when the area trigger is activated by a player. - [[nodiscard]] virtual bool OnTrigger(Player* /*player*/, AreaTrigger const* /*trigger*/) { return false; } -}; - -class OnlyOnceAreaTriggerScript : public AreaTriggerScript -{ - using AreaTriggerScript::AreaTriggerScript; - -public: - [[nodiscard]] bool OnTrigger(Player* /*player*/, AreaTrigger const* /*trigger*/) override; - -protected: - virtual bool _OnTrigger(Player* /*player*/, AreaTrigger const* /*trigger*/) = 0; - void ResetAreaTriggerDone(InstanceScript* /*instance*/, uint32 /*triggerId*/); - void ResetAreaTriggerDone(Player const* /*player*/, AreaTrigger const* /*trigger*/); -}; - -class BattlegroundScript : public ScriptObject -{ -protected: - BattlegroundScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - // Should return a fully valid Battleground object for the type ID. - [[nodiscard]] virtual Battleground* GetBattleground() const = 0; -}; - -class OutdoorPvPScript : public ScriptObject -{ -protected: - OutdoorPvPScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - // Should return a fully valid OutdoorPvP object for the type ID. - [[nodiscard]] virtual OutdoorPvP* GetOutdoorPvP() const = 0; -}; - -class CommandScript : public ScriptObject -{ -protected: - CommandScript(const char* name); - -public: - // Should return a pointer to a valid command table (ChatCommand array) to be used by ChatHandler. - [[nodiscard]] virtual std::vector GetCommands() const = 0; -}; - -class WeatherScript : public ScriptObject, public UpdatableScript -{ -protected: - WeatherScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - // Called when the weather changes in the zone this script is associated with. - virtual void OnChange(Weather* /*weather*/, WeatherState /*state*/, float /*grade*/) { } -}; - -class AuctionHouseScript : public ScriptObject -{ -protected: - AuctionHouseScript(const char* name); - -public: - // Called when an auction is added to an auction house. - virtual void OnAuctionAdd(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { } - - // Called when an auction is removed from an auction house. - virtual void OnAuctionRemove(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { } - - // Called when an auction was succesfully completed. - virtual void OnAuctionSuccessful(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { } - - // Called when an auction expires. - virtual void OnAuctionExpire(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { } - - // Called before sending the mail concerning a won auction - virtual void OnBeforeAuctionHouseMgrSendAuctionWonMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*bidder*/, uint32& /*bidder_accId*/, bool& /*sendNotification*/, bool& /*updateAchievementCriteria*/, bool& /*sendMail*/) { } - - // Called before sending the mail concerning a pending sale - virtual void OnBeforeAuctionHouseMgrSendAuctionSalePendingMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*owner*/, uint32& /*owner_accId*/, bool& /*sendMail*/) { } - - // Called before sending the mail concerning a successful auction - virtual void OnBeforeAuctionHouseMgrSendAuctionSuccessfulMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*owner*/, uint32& /*owner_accId*/, uint32& /*profit*/, bool& /*sendNotification*/, bool& /*updateAchievementCriteria*/, bool& /*sendMail*/) { } - - // Called before sending the mail concerning an expired auction - virtual void OnBeforeAuctionHouseMgrSendAuctionExpiredMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*owner*/, uint32& /*owner_accId*/, bool& /*sendNotification*/, bool& /*sendMail*/) { } - - // Called before sending the mail concerning an outbidded auction - virtual void OnBeforeAuctionHouseMgrSendAuctionOutbiddedMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*oldBidder*/, uint32& /*oldBidder_accId*/, Player* /*newBidder*/, uint32& /*newPrice*/, bool& /*sendNotification*/, bool& /*sendMail*/) { } - - // Called before sending the mail concerning an cancelled auction - virtual void OnBeforeAuctionHouseMgrSendAuctionCancelledToBidderMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* /*auction*/, Player* /*bidder*/, uint32& /*bidder_accId*/, bool& /*sendMail*/) { } - - // Called before updating the auctions - virtual void OnBeforeAuctionHouseMgrUpdate() { } -}; - -class ConditionScript : public ScriptObject -{ -protected: - ConditionScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - // Called when a single condition is checked for a player. - [[nodiscard]] virtual bool OnConditionCheck(Condition* /*condition*/, ConditionSourceInfo& /*sourceInfo*/) { return true; } -}; - -class VehicleScript : public ScriptObject -{ -protected: - VehicleScript(const char* name); - -public: - // Called after a vehicle is installed. - virtual void OnInstall(Vehicle* /*veh*/) { } - - // Called after a vehicle is uninstalled. - virtual void OnUninstall(Vehicle* /*veh*/) { } - - // Called when a vehicle resets. - virtual void OnReset(Vehicle* /*veh*/) { } - - // Called after an accessory is installed in a vehicle. - virtual void OnInstallAccessory(Vehicle* /*veh*/, Creature* /*accessory*/) { } - - // Called after a passenger is added to a vehicle. - virtual void OnAddPassenger(Vehicle* /*veh*/, Unit* /*passenger*/, int8 /*seatId*/) { } - - // Called after a passenger is removed from a vehicle. - virtual void OnRemovePassenger(Vehicle* /*veh*/, Unit* /*passenger*/) { } -}; - -class DynamicObjectScript : public ScriptObject, public UpdatableScript -{ -protected: - DynamicObjectScript(const char* name); -}; - -class TransportScript : public ScriptObject, public UpdatableScript -{ -protected: - TransportScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - // Called when a player boards the transport. - virtual void OnAddPassenger(Transport* /*transport*/, Player* /*player*/) { } - - // Called when a creature boards the transport. - virtual void OnAddCreaturePassenger(Transport* /*transport*/, Creature* /*creature*/) { } - - // Called when a player exits the transport. - virtual void OnRemovePassenger(Transport* /*transport*/, Player* /*player*/) { } - - // Called when a transport moves. - virtual void OnRelocate(Transport* /*transport*/, uint32 /*waypointId*/, uint32 /*mapId*/, float /*x*/, float /*y*/, float /*z*/) { } -}; - -class AchievementCriteriaScript : public ScriptObject -{ -protected: - AchievementCriteriaScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return true; } - - [[nodiscard]] virtual bool OnCheck(Player* /*source*/, Unit* /*target*/, uint32 /*criteria_id*/) { return true; }; -}; - -class PlayerScript : public ScriptObject -{ -protected: - PlayerScript(const char* name); - -public: - virtual void OnPlayerReleasedGhost(Player* /*player*/) { } - - // Called on Send Initial Packets Before Add To Map - virtual void OnSendInitialPacketsBeforeAddToMap(Player* /*player*/, WorldPacket& /*data*/) {} - - // Called when a player does a desertion action (see BattlegroundDesertionType) - virtual void OnBattlegroundDesertion(Player* /*player*/, BattlegroundDesertionType const /*desertionType*/) { } - - // Called when a player completes a quest - virtual void OnPlayerCompleteQuest(Player* /*player*/, Quest const* /*quest_id*/) { } - - // Called when a player kills another player - virtual void OnPVPKill(Player* /*killer*/, Player* /*killed*/) { } - - // Called when a player toggles pvp - virtual void OnPlayerPVPFlagChange(Player* /*player*/, bool /*state*/) { } - - // Called when a player kills a creature - virtual void OnCreatureKill(Player* /*killer*/, Creature* /*killed*/) { } - - // Called when a player's pet kills a creature - virtual void OnCreatureKilledByPet(Player* /*PetOwner*/, Creature* /*killed*/) { } - - // Called when a player is killed by a creature - virtual void OnPlayerKilledByCreature(Creature* /*killer*/, Player* /*killed*/) { } - - // Called when a player's level changes (right after the level is applied) - virtual void OnLevelChanged(Player* /*player*/, uint8 /*oldlevel*/) { } - - // Called when a player's free talent points change (right before the change is applied) - virtual void OnFreeTalentPointsChanged(Player* /*player*/, uint32 /*points*/) { } - - // Called when a player's talent points are reset (right before the reset is done) - virtual void OnTalentsReset(Player* /*player*/, bool /*noCost*/) { } - - // Called after a player switches specs using the dual spec system - virtual void OnAfterSpecSlotChanged(Player* /*player*/, uint8 /*newSlot*/) { } - - // Called for player::update - virtual void OnBeforeUpdate(Player* /*player*/, uint32 /*p_time*/) { } - virtual void OnUpdate(Player* /*player*/, uint32 /*p_time*/) { } - - // Called when a player's money is modified (before the modification is done) - virtual void OnMoneyChanged(Player* /*player*/, int32& /*amount*/) { } - - // Called before looted money is added to a player - virtual void OnBeforeLootMoney(Player* /*player*/, Loot* /*loot*/) {} - - // Called when a player gains XP (before anything is given) - virtual void OnGiveXP(Player* /*player*/, uint32& /*amount*/, Unit* /*victim*/, uint8 /*xpSource*/) { } - - // Called when a player's reputation changes (before it is actually changed) - virtual bool OnReputationChange(Player* /*player*/, uint32 /*factionID*/, int32& /*standing*/, bool /*incremental*/) { return true; } - - // Called when a player's reputation rank changes (before it is actually changed) - virtual void OnReputationRankChange(Player* /*player*/, uint32 /*factionID*/, ReputationRank /*newRank*/, ReputationRank /*olRank*/, bool /*increased*/) { } - - // Called when a player learned new spell - virtual void OnLearnSpell(Player* /*player*/, uint32 /*spellID*/) {} - - // Called when a player forgot spell - virtual void OnForgotSpell(Player* /*player*/, uint32 /*spellID*/) {} - - // Called when a duel is requested - virtual void OnDuelRequest(Player* /*target*/, Player* /*challenger*/) { } - - // Called when a duel starts (after 3s countdown) - virtual void OnDuelStart(Player* /*player1*/, Player* /*player2*/) { } - - // Called when a duel ends - virtual void OnDuelEnd(Player* /*winner*/, Player* /*loser*/, DuelCompleteType /*type*/) { } - - // The following methods are called when a player sends a chat message. - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/) { } - - virtual void OnBeforeSendChatMessage(Player* /*player*/, uint32& /*type*/, uint32& /*lang*/, std::string& /*msg*/) { } - - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Player* /*receiver*/) { } - - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Group* /*group*/) { } - - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Guild* /*guild*/) { } - - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Channel* /*channel*/) { } - - // Both of the below are called on emote opcodes. - virtual void OnEmote(Player* /*player*/, uint32 /*emote*/) { } - - virtual void OnTextEmote(Player* /*player*/, uint32 /*textEmote*/, uint32 /*emoteNum*/, ObjectGuid /*guid*/) { } - - // Called in Spell::Cast. - virtual void OnSpellCast(Player* /*player*/, Spell* /*spell*/, bool /*skipCheck*/) { } - - // Called during data loading - virtual void OnLoadFromDB(Player* /*player*/) { }; - - // Called when a player logs in. - virtual void OnLogin(Player* /*player*/) { } - - // Called when a player logs out. - virtual void OnLogout(Player* /*player*/) { } - - // Called when a player is created. - virtual void OnCreate(Player* /*player*/) { } - - // Called when a player is deleted. - virtual void OnDelete(ObjectGuid /*guid*/, uint32 /*accountId*/) { } - - // Called when a player delete failed. - virtual void OnFailedDelete(ObjectGuid /*guid*/, uint32 /*accountId*/) { } - - // Called when a player is about to be saved. - virtual void OnSave(Player* /*player*/) { } - - // Called when a player is bound to an instance - virtual void OnBindToInstance(Player* /*player*/, Difficulty /*difficulty*/, uint32 /*mapId*/, bool /*permanent*/) { } - - // Called when a player switches to a new zone - virtual void OnUpdateZone(Player* /*player*/, uint32 /*newZone*/, uint32 /*newArea*/) { } - - // Called when a player switches to a new area (more accurate than UpdateZone) - virtual void OnUpdateArea(Player* /*player*/, uint32 /*oldArea*/, uint32 /*newArea*/) { } - - // Called when a player changes to a new map (after moving to new map) - virtual void OnMapChanged(Player* /*player*/) { } - - // Called before a player is being teleported to new coords - [[nodiscard]] virtual bool OnBeforeTeleport(Player* /*player*/, uint32 /*mapid*/, float /*x*/, float /*y*/, float /*z*/, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) { return true; } - - // Called when team/faction is set on player - virtual void OnUpdateFaction(Player* /*player*/) { } - - // Called when a player is added to battleground - virtual void OnAddToBattleground(Player* /*player*/, Battleground* /*bg*/) { } - - // Called when a player queues a Random Dungeon using the RDF (Random Dungeon Finder) - virtual void OnQueueRandomDungeon(Player* /*player*/, uint32 & /*rDungeonId*/) { } - - // Called when a player is removed from battleground - virtual void OnRemoveFromBattleground(Player* /*player*/, Battleground* /*bg*/) { } - - // Called when a player complete an achievement - virtual void OnAchiComplete(Player* /*player*/, AchievementEntry const* /*achievement*/) { } - - // Called before player complete an achievement, can be used to disable achievements in certain conditions - virtual bool OnBeforeAchiComplete(Player* /*player*/, AchievementEntry const* /*achievement*/) { return true; } - - // Called when a player complete an achievement criteria - virtual void OnCriteriaProgress(Player* /*player*/, AchievementCriteriaEntry const* /*criteria*/) { } - - // Called before player complete an achievement criteria, can be used to disable achievement criteria in certain conditions - virtual bool OnBeforeCriteriaProgress(Player* /*player*/, AchievementCriteriaEntry const* /*criteria*/) { return true; } - - // Called when an Achievement is saved to DB - virtual void OnAchiSave(CharacterDatabaseTransaction /*trans*/, Player* /*player*/, uint16 /*achId*/, CompletedAchievementData /*achiData*/) { } - - // Called when an Criteria is saved to DB - virtual void OnCriteriaSave(CharacterDatabaseTransaction /*trans*/, Player* /*player*/, uint16 /*achId*/, CriteriaProgress /*criteriaData*/) { } - - // Called when a player selects an option in a player gossip window - virtual void OnGossipSelect(Player* /*player*/, uint32 /*menu_id*/, uint32 /*sender*/, uint32 /*action*/) { } - - // Called when a player selects an option in a player gossip window - virtual void OnGossipSelectCode(Player* /*player*/, uint32 /*menu_id*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { } - - // On player getting charmed - virtual void OnBeingCharmed(Player* /*player*/, Unit* /*charmer*/, uint32 /*oldFactionId*/, uint32 /*newFactionId*/) { } - - // To change behaviour of set visible item slot - virtual void OnAfterSetVisibleItemSlot(Player* /*player*/, uint8 /*slot*/, Item* /*item*/) { } - - // After an item has been moved from inventory - virtual void OnAfterMoveItemFromInventory(Player* /*player*/, Item* /*it*/, uint8 /*bag*/, uint8 /*slot*/, bool /*update*/) { } - - // After an item has been equipped - virtual void OnEquip(Player* /*player*/, Item* /*it*/, uint8 /*bag*/, uint8 /*slot*/, bool /*update*/) { } - - // After player enters queue for BG - virtual void OnPlayerJoinBG(Player* /*player*/) { } - - // After player enters queue for Arena - virtual void OnPlayerJoinArena(Player* /*player*/) { } - - //Called when trying to get a team ID of a slot > 2 (This is for custom teams created by modules) - virtual void GetCustomGetArenaTeamId(Player const* /*player*/, uint8 /*slot*/, uint32& /*teamID*/) const { } - - //Called when trying to get players personal rating of an arena slot > 2 (This is for custom teams created by modules) - virtual void GetCustomArenaPersonalRating(Player const* /*player*/, uint8 /*slot*/, uint32& /*rating*/) const { } - - //Called after the normal slots (0..2) for arena have been evaluated so that custom arena teams could modify it if nececasry - virtual void OnGetMaxPersonalArenaRatingRequirement(Player const* /*player*/, uint32 /*minSlot*/, uint32& /*maxArenaRating*/) const {} - - //After looting item - virtual void OnLootItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/, ObjectGuid /*lootguid*/) { } - - //Before looting item - virtual void OnBeforeFillQuestLootItem(Player* /*player*/, LootItem& /*item*/) { } - - //After looting item (includes master loot). - virtual void OnStoreNewItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/) { } - - //After creating item (eg profession item creation) - virtual void OnCreateItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/) { } - - // After receiving item as a quest reward - virtual void OnQuestRewardItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/) { } - - // When placing a bid or buying out an auction - [[nodiscard]] virtual bool CanPlaceAuctionBid(Player* /*player*/, AuctionEntry* /*auction*/) { return true; } - - // After receiving item as a group roll reward - virtual void OnGroupRollRewardItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/, RollVote /*voteType*/, Roll* /*roll*/) { } - - //Before opening an item - [[nodiscard]] virtual bool OnBeforeOpenItem(Player* /*player*/, Item* /*item*/) { return true; } - - // After completed a quest - [[nodiscard]] virtual bool OnBeforeQuestComplete(Player* /*player*/, uint32 /*quest_id*/) { return true; } - - // Called after computing the XP reward value for a quest - virtual void OnQuestComputeXP(Player* /*player*/, Quest const* /*quest*/, uint32& /*xpValue*/) { } - - // Before durability repair action, you can even modify the discount value - virtual void OnBeforeDurabilityRepair(Player* /*player*/, ObjectGuid /*npcGUID*/, ObjectGuid /*itemGUID*/, float&/*discountMod*/, uint8 /*guildBank*/) { } - - //Before buying something from any vendor - virtual void OnBeforeBuyItemFromVendor(Player* /*player*/, ObjectGuid /*vendorguid*/, uint32 /*vendorslot*/, uint32& /*item*/, uint8 /*count*/, uint8 /*bag*/, uint8 /*slot*/) { }; - - //Before buying something from any vendor - virtual void OnBeforeStoreOrEquipNewItem(Player* /*player*/, uint32 /*vendorslot*/, uint32& /*item*/, uint8 /*count*/, uint8 /*bag*/, uint8 /*slot*/, ItemTemplate const* /*pProto*/, Creature* /*pVendor*/, VendorItem const* /*crItem*/, bool /*bStore*/) { }; - - //After buying something from any vendor - virtual void OnAfterStoreOrEquipNewItem(Player* /*player*/, uint32 /*vendorslot*/, Item* /*item*/, uint8 /*count*/, uint8 /*bag*/, uint8 /*slot*/, ItemTemplate const* /*pProto*/, Creature* /*pVendor*/, VendorItem const* /*crItem*/, bool /*bStore*/) { }; - - virtual void OnAfterUpdateMaxPower(Player* /*player*/, Powers& /*power*/, float& /*value*/) { } - - virtual void OnAfterUpdateMaxHealth(Player* /*player*/, float& /*value*/) { } - - virtual void OnBeforeUpdateAttackPowerAndDamage(Player* /*player*/, float& /*level*/, float& /*val2*/, bool /*ranged*/) { } - virtual void OnAfterUpdateAttackPowerAndDamage(Player* /*player*/, float& /*level*/, float& /*base_attPower*/, float& /*attPowerMod*/, float& /*attPowerMultiplier*/, bool /*ranged*/) { } - - virtual void OnBeforeInitTalentForLevel(Player* /*player*/, uint8& /*level*/, uint32& /*talentPointsForLevel*/) { } - - virtual void OnFirstLogin(Player* /*player*/) { } - - virtual void OnSetMaxLevel(Player* /*player*/, uint32& /*maxPlayerLevel*/) { } - - [[nodiscard]] virtual bool CanJoinInBattlegroundQueue(Player* /*player*/, ObjectGuid /*BattlemasterGuid*/, BattlegroundTypeId /*BGTypeID*/, uint8 /*joinAsGroup*/, GroupJoinBattlegroundResult& /*err*/) { return true; } - virtual bool ShouldBeRewardedWithMoneyInsteadOfExp(Player* /*player*/) { return false; } - - // Called before the player's temporary summoned creature has initialized it's stats - virtual void OnBeforeTempSummonInitStats(Player* /*player*/, TempSummon* /*tempSummon*/, uint32& /*duration*/) { } - - // Called before the player's guardian / pet has initialized it's stats for the player's level - virtual void OnBeforeGuardianInitStatsForLevel(Player* /*player*/, Guardian* /*guardian*/, CreatureTemplate const* /*cinfo*/, PetType& /*petType*/) { } - - // Called after the player's guardian / pet has initialized it's stats for the player's level - virtual void OnAfterGuardianInitStatsForLevel(Player* /*player*/, Guardian* /*guardian*/) { } - - // Called before loading a player's pet from the DB - virtual void OnBeforeLoadPetFromDB(Player* /*player*/, uint32& /*petentry*/, uint32& /*petnumber*/, bool& /*current*/, bool& /*forceLoadFromDB*/) { } - - [[nodiscard]] virtual bool CanJoinInArenaQueue(Player* /*player*/, ObjectGuid /*BattlemasterGuid*/, uint8 /*arenaslot*/, BattlegroundTypeId /*BGTypeID*/, uint8 /*joinAsGroup*/, uint8 /*IsRated*/, GroupJoinBattlegroundResult& /*err*/) { return true; } - - [[nodiscard]] virtual bool CanBattleFieldPort(Player* /*player*/, uint8 /*arenaType*/, BattlegroundTypeId /*BGTypeID*/, uint8 /*action*/) { return true; } - - [[nodiscard]] virtual bool CanGroupInvite(Player* /*player*/, std::string& /*membername*/) { return true; } - - [[nodiscard]] virtual bool CanGroupAccept(Player* /*player*/, Group* /*group*/) { return true; } - - [[nodiscard]] virtual bool CanSellItem(Player* /*player*/, Item* /*item*/, Creature* /*creature*/) { return true; } - - [[nodiscard]] virtual bool CanSendMail(Player* /*player*/, ObjectGuid /*receiverGuid*/, ObjectGuid /*mailbox*/, std::string& /*subject*/, std::string& /*body*/, uint32 /*money*/, uint32 /*COD*/, Item* /*item*/) { return true; } - - virtual void PetitionBuy(Player* /*player*/, Creature* /*creature*/, uint32& /*charterid*/, uint32& /*cost*/, uint32& /*type*/) { } - - virtual void PetitionShowList(Player* /*player*/, Creature* /*creature*/, uint32& /*CharterEntry*/, uint32& /*CharterDispayID*/, uint32& /*CharterCost*/) { } - - virtual void OnRewardKillRewarder(Player* /*player*/, bool /*isDungeon*/, float& /*rate*/) { } - - [[nodiscard]] virtual bool CanGiveMailRewardAtGiveLevel(Player* /*player*/, uint8 /*level*/) { return true; } - - virtual void OnDeleteFromDB(CharacterDatabaseTransaction /*trans*/, uint32 /*guid*/) { } - - [[nodiscard]] virtual bool CanRepopAtGraveyard(Player* /*player*/) { return true; } - - virtual void OnGetMaxSkillValue(Player* /*player*/, uint32 /*skill*/, int32& /*result*/, bool /*IsPure*/) { } - - /** - * @brief This hook called before gathering skill gain is applied to the character. - * - * @param player Contains information about the Player sender - * @param skill_id Contains information about the skill line - * @param current Contains the current skill level for skill - * @param gray Contains the gray skill level for current application - * @param green Contains the green skill level for current application - * @param yellow Contains the yellow skill level for current application - * @param gain Contains the amount of points that should be added to the Player - */ - virtual void OnUpdateGatheringSkill(Player* /*player*/, uint32 /*skill_id*/, uint32 /*current*/, uint32 /*gray*/, uint32 /*green*/, uint32 /*yellow*/, uint32& /*gain*/) { } - - /** - * @brief This hook is called before crafting skill gain is applied to the character. - * - * @param player Contains information about the Player sender - * @param skill Contains information about the skill line - * @param current_level Contains the current skill level for skill - * @param gain Contains the amount of points that should be added to the Player - */ - virtual void OnUpdateCraftingSkill(Player* /*player*/, SkillLineAbilityEntry const* /*skill*/, uint32 /*current_level*/, uint32& /*gain*/) { } - - [[nodiscard]] virtual bool OnUpdateFishingSkill(Player* /*player*/, int32 /*skill*/, int32 /*zone_skill*/, int32 /*chance*/, int32 /*roll*/) { return true; } - - [[nodiscard]] virtual bool CanAreaExploreAndOutdoor(Player* /*player*/) { return true; } - - virtual void OnVictimRewardBefore(Player* /*player*/, Player* /*victim*/, uint32& /*killer_title*/, uint32& /*victim_title*/) { } - - virtual void OnVictimRewardAfter(Player* /*player*/, Player* /*victim*/, uint32& /*killer_title*/, uint32& /*victim_rank*/, float& /*honor_f*/) { } - - virtual void OnCustomScalingStatValueBefore(Player* /*player*/, ItemTemplate const* /*proto*/, uint8 /*slot*/, bool /*apply*/, uint32& /*CustomScalingStatValue*/) { } - - virtual void OnCustomScalingStatValue(Player* /*player*/, ItemTemplate const* /*proto*/, uint32& /*statType*/, int32& /*val*/, uint8 /*itemProtoStatNumber*/, uint32 /*ScalingStatValue*/, ScalingStatValuesEntry const* /*ssv*/) { } - - [[nodiscard]] virtual bool CanArmorDamageModifier(Player* /*player*/) { return true; } - - virtual void OnGetFeralApBonus(Player* /*player*/, int32& /*feral_bonus*/, int32 /*dpsMod*/, ItemTemplate const* /*proto*/, ScalingStatValuesEntry const* /*ssv*/) { } - - [[nodiscard]] virtual bool CanApplyWeaponDependentAuraDamageMod(Player* /*player*/, Item* /*item*/, WeaponAttackType /*attackType*/, AuraEffect const* /*aura*/, bool /*apply*/) { return true; } - - [[nodiscard]] virtual bool CanApplyEquipSpell(Player* /*player*/, SpellInfo const* /*spellInfo*/, Item* /*item*/, bool /*apply*/, bool /*form_change*/) { return true; } - - [[nodiscard]] virtual bool CanApplyEquipSpellsItemSet(Player* /*player*/, ItemSetEffect* /*eff*/) { return true; } - - [[nodiscard]] virtual bool CanCastItemCombatSpell(Player* /*player*/, Unit* /*target*/, WeaponAttackType /*attType*/, uint32 /*procVictim*/, uint32 /*procEx*/, Item* /*item*/, ItemTemplate const* /*proto*/) { return true; } - - [[nodiscard]] virtual bool CanCastItemUseSpell(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/, uint8 /*cast_count*/, uint32 /*glyphIndex*/) { return true; } - - virtual void OnApplyAmmoBonuses(Player* /*player*/, ItemTemplate const* /*proto*/, float& /*currentAmmoDPS*/) { } - - [[nodiscard]] virtual bool CanEquipItem(Player* /*player*/, uint8 /*slot*/, uint16& /*dest*/, Item* /*pItem*/, bool /*swap*/, bool /*not_loading*/) { return true; } - - [[nodiscard]] virtual bool CanUnequipItem(Player* /*player*/, uint16 /*pos*/, bool /*swap*/) { return true; } - - [[nodiscard]] virtual bool CanUseItem(Player* /*player*/, ItemTemplate const* /*proto*/, InventoryResult& /*result*/) { return true; } - - [[nodiscard]] virtual bool CanSaveEquipNewItem(Player* /*player*/, Item* /*item*/, uint16 /*pos*/, bool /*update*/) { return true; } - - [[nodiscard]] virtual bool CanApplyEnchantment(Player* /*player*/, Item* /*item*/, EnchantmentSlot /*slot*/, bool /*apply*/, bool /*apply_dur*/, bool /*ignore_condition*/) { return true; } - - virtual void OnGetQuestRate(Player* /*player*/, float& /*result*/) { } - - [[nodiscard]] virtual bool PassedQuestKilledMonsterCredit(Player* /*player*/, Quest const* /*qinfo*/, uint32 /*entry*/, uint32 /*real_entry*/, ObjectGuid /*guid*/) { return true; } - - [[nodiscard]] virtual bool CheckItemInSlotAtLoadInventory(Player* /*player*/, Item* /*item*/, uint8 /*slot*/, uint8& /*err*/, uint16& /*dest*/) { return true; } - - [[nodiscard]] virtual bool NotAvoidSatisfy(Player* /*player*/, DungeonProgressionRequirements const* /*ar*/, uint32 /*target_map*/, bool /*report*/) { return true; } - - [[nodiscard]] virtual bool NotVisibleGloballyFor(Player* /*player*/, Player const* /*u*/) { return true; } - - virtual void OnGetArenaPersonalRating(Player* /*player*/, uint8 /*slot*/, uint32& /*result*/) { } - - virtual void OnGetArenaTeamId(Player* /*player*/, uint8 /*slot*/, uint32& /*result*/) { } - - virtual void OnIsFFAPvP(Player* /*player*/, bool& /*result*/) { } - - //Fires whenever the UNIT_BYTE2_FLAG_FFA_PVP bit is Changed on the player - virtual void OnFfaPvpStateUpdate(Player* /*player*/, bool /*result*/) { } - - virtual void OnIsPvP(Player* /*player*/, bool& /*result*/) { } - - virtual void OnGetMaxSkillValueForLevel(Player* /*player*/, uint16& /*result*/) { } - - [[nodiscard]] virtual bool NotSetArenaTeamInfoField(Player* /*player*/, uint8 /*slot*/, ArenaTeamInfoType /*type*/, uint32 /*value*/) { return true; } - - [[nodiscard]] virtual bool CanJoinLfg(Player* /*player*/, uint8 /*roles*/, lfg::LfgDungeonSet& /*dungeons*/, const std::string& /*comment*/) { return true; } - - [[nodiscard]] virtual bool CanEnterMap(Player* /*player*/, MapEntry const* /*entry*/, InstanceTemplate const* /*instance*/, MapDifficulty const* /*mapDiff*/, bool /*loginCheck*/) { return true; } - - [[nodiscard]] virtual bool CanInitTrade(Player* /*player*/, Player* /*target*/) { return true; } - - virtual void OnSetServerSideVisibility(Player* /*player*/, ServerSideVisibilityType& /*type*/, AccountTypes& /*sec*/) { } - - virtual void OnSetServerSideVisibilityDetect(Player* /*player*/, ServerSideVisibilityType& /*type*/, AccountTypes& /*sec*/) { } - - virtual void OnPlayerResurrect(Player* /*player*/, float /*restore_percent*/, bool /*applySickness*/) { } - - // Called before selecting the graveyard when releasing spirit - virtual void OnBeforeChooseGraveyard(Player* /*player*/, TeamId /*teamId*/, bool /*nearCorpse*/, uint32& /*graveyardOverride*/) { } - - /** - * @brief This hook called before player sending message in default chat - * - * @param player Contains information about the Player sender - * @param type Contains information about the chat message type - * @param language Contains information about the language type - * @param msg Contains information about the message - * - * @return True if you want to continue sending the message, false if you want to disable sending the message - */ - [[nodiscard]] virtual bool CanPlayerUseChat(Player* /*player*/, uint32 /*type*/, uint32 /*language*/, std::string& /*msg*/) { return true; } - - /** - * @brief This hook called before player sending message to other player via private - * - * @param player Contains information about the Player sender - * @param type Contains information about the chat message type - * @param language Contains information about the language type - * @param msg Contains information about the message - * @param receiver Contains information about the Player receiver - * - * @return True if you want to continue sending the message, false if you want to disable sending the message - */ - [[nodiscard]] virtual bool CanPlayerUseChat(Player* /*player*/, uint32 /*type*/, uint32 /*language*/, std::string& /*msg*/, Player* /*receiver*/) { return true; } - - /** - * @brief This hook called before player sending message to group - * - * @param player Contains information about the Player sender - * @param type Contains information about the chat message type - * @param language Contains information about the language type - * @param msg Contains information about the message - * @param group Contains information about the Group - * - * @return True if you want to continue sending the message, false if you want to disable sending the message - */ - [[nodiscard]] virtual bool CanPlayerUseChat(Player* /*player*/, uint32 /*type*/, uint32 /*language*/, std::string& /*msg*/, Group* /*group*/) { return true; } - - /** - * @brief This hook called before player sending message to guild - * - * @param player Contains information about the Player sender - * @param type Contains information about the chat message type - * @param language Contains information about the language type - * @param msg Contains information about the message - * @param guild Contains information about the Guild - * - * @return True if you want to continue sending the message, false if you want to disable sending the message - */ - [[nodiscard]] virtual bool CanPlayerUseChat(Player* /*player*/, uint32 /*type*/, uint32 /*language*/, std::string& /*msg*/, Guild* /*guild*/) { return true; } - - /** - * @brief This hook called before player sending message to channel - * - * @param player Contains information about the Player sender - * @param type Contains information about the chat message type - * @param language Contains information about the language type - * @param msg Contains information about the message - * @param channel Contains information about the Channel - * - * @return True if you want to continue sending the message, false if you want to disable sending the message - */ - [[nodiscard]] virtual bool CanPlayerUseChat(Player* /*player*/, uint32 /*type*/, uint32 /*language*/, std::string& /*msg*/, Channel* /*channel*/) { return true; } - - /** - * @brief This hook called after player learning talents - * - * @param player Contains information about the Player - * @param talentId Contains information about the talent id - * @param talentRank Contains information about the talent rank - * @param spellid Contains information about the spell id - */ - virtual void OnPlayerLearnTalents(Player* /*player*/, uint32 /*talentId*/, uint32 /*talentRank*/, uint32 /*spellid*/) { } - - /** - * @brief This hook called after player entering combat - * - * @param player Contains information about the Player - * @param Unit Contains information about the Unit - */ - virtual void OnPlayerEnterCombat(Player* /*player*/, Unit* /*enemy*/) { } - - /** - * @brief This hook called after player leave combat - * - * @param player Contains information about the Player - */ - virtual void OnPlayerLeaveCombat(Player* /*player*/) { } - - /** - * @brief This hook called after player abandoning quest - * - * @param player Contains information about the Player - * @param questId Contains information about the quest id - */ - virtual void OnQuestAbandon(Player* /*player*/, uint32 /*questId*/) { } - - /** - * @brief This hook called before other CanFlyChecks are applied - * - * @param player Contains information about the Player - * @param mapId Contains information about the current map id - * @param zoneId Contains information about the current zone - * @param bySpell Contains information about the spell that invoked the check - */ - [[nodiscard]] virtual bool OnCanPlayerFlyInZone(Player* /*player*/, uint32 /*mapId*/, uint32 /*zoneId*/, SpellInfo const* /*bySpell*/) { return true; } - - // Passive Anticheat System - virtual void AnticheatSetSkipOnePacketForASH(Player* /*player*/, bool /*apply*/) { } - virtual void AnticheatSetCanFlybyServer(Player* /*player*/, bool /*apply*/) { } - virtual void AnticheatSetUnderACKmount(Player* /*player*/) { } - virtual void AnticheatSetRootACKUpd(Player* /*player*/) { } - virtual void AnticheatSetJumpingbyOpcode(Player* /*player*/, bool /*jump*/) { } - virtual void AnticheatUpdateMovementInfo(Player* /*player*/, MovementInfo const& /*movementInfo*/) { } - [[nodiscard]] virtual bool AnticheatHandleDoubleJump(Player* /*player*/, Unit* /*mover*/) { return true; } - [[nodiscard]] virtual bool AnticheatCheckMovementInfo(Player* /*player*/, MovementInfo const& /*movementInfo*/, Unit* /*mover*/, bool /*jump*/) { return true; } - - /** - * @brief This hook is called, to avoid displaying the error message that the body has already been stripped - * - * @param player Contains information about the Player - * - * @return true Avoiding displaying the error message that the loot has already been taken. - */ - virtual bool CanSendErrorAlreadyLooted(Player* /*player*/) { return true; } - - /** - * @brief It is used when an item is taken from a creature. - * - * @param player Contains information about the Player - * - */ - virtual void OnAfterCreatureLoot(Player* /*player*/) { } - - /** - * @brief After a creature's money is taken - * - * @param player Contains information about the Player - */ - virtual void OnAfterCreatureLootMoney(Player* /*player*/) { } -}; - -class AccountScript : public ScriptObject -{ -protected: - AccountScript(const char* name); - -public: - // Called when an account logged in successfully - virtual void OnAccountLogin(uint32 /*accountId*/) { } - - // Called when an ip logged in successfully - virtual void OnLastIpUpdate(uint32 /*accountId*/, std::string /*ip*/) { } - - // Called when an account login failed - virtual void OnFailedAccountLogin(uint32 /*accountId*/) { } - - // Called when Email is successfully changed for Account - virtual void OnEmailChange(uint32 /*accountId*/) { } - - // Called when Email failed to change for Account - virtual void OnFailedEmailChange(uint32 /*accountId*/) { } - - // Called when Password is successfully changed for Account - virtual void OnPasswordChange(uint32 /*accountId*/) { } - - // Called when Password failed to change for Account - virtual void OnFailedPasswordChange(uint32 /*accountId*/) { } - - // Called when creating a character on the Account - [[nodiscard]] virtual bool CanAccountCreateCharacter(uint32 /*accountId*/, uint8 /*charRace*/, uint8 /*charClass*/) { return true;} -}; - -class GuildScript : public ScriptObject -{ -protected: - GuildScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - // Called when a member is added to the guild. - virtual void OnAddMember(Guild* /*guild*/, Player* /*player*/, uint8& /*plRank*/) { } - - // Called when a member is removed from the guild. - virtual void OnRemoveMember(Guild* /*guild*/, Player* /*player*/, bool /*isDisbanding*/, bool /*isKicked*/) { } - - // Called when the guild MOTD (message of the day) changes. - virtual void OnMOTDChanged(Guild* /*guild*/, const std::string& /*newMotd*/) { } - - // Called when the guild info is altered. - virtual void OnInfoChanged(Guild* /*guild*/, const std::string& /*newInfo*/) { } - - // Called when a guild is created. - virtual void OnCreate(Guild* /*guild*/, Player* /*leader*/, const std::string& /*name*/) { } - - // Called when a guild is disbanded. - virtual void OnDisband(Guild* /*guild*/) { } - - // Called when a guild member withdraws money from a guild bank. - virtual void OnMemberWitdrawMoney(Guild* /*guild*/, Player* /*player*/, uint32& /*amount*/, bool /*isRepair*/) { } - - // Called when a guild member deposits money in a guild bank. - virtual void OnMemberDepositMoney(Guild* /*guild*/, Player* /*player*/, uint32& /*amount*/) { } - - // Called when a guild member moves an item in a guild bank. - virtual void OnItemMove(Guild* /*guild*/, Player* /*player*/, Item* /*pItem*/, bool /*isSrcBank*/, uint8 /*srcContainer*/, uint8 /*srcSlotId*/, - bool /*isDestBank*/, uint8 /*destContainer*/, uint8 /*destSlotId*/) { } - - virtual void OnEvent(Guild* /*guild*/, uint8 /*eventType*/, ObjectGuid::LowType /*playerGuid1*/, ObjectGuid::LowType /*playerGuid2*/, uint8 /*newRank*/) { } - - virtual void OnBankEvent(Guild* /*guild*/, uint8 /*eventType*/, uint8 /*tabId*/, ObjectGuid::LowType /*playerGuid*/, uint32 /*itemOrMoney*/, uint16 /*itemStackCount*/, uint8 /*destTabId*/) { } - - [[nodiscard]] virtual bool CanGuildSendBankList(Guild const* /*guild*/, WorldSession* /*session*/, uint8 /*tabId*/, bool /*sendAllSlots*/) { return true; } -}; - -class GroupScript : public ScriptObject -{ -protected: - GroupScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - // Called when a member is added to a group. - virtual void OnAddMember(Group* /*group*/, ObjectGuid /*guid*/) { } - - // Called when a member is invited to join a group. - virtual void OnInviteMember(Group* /*group*/, ObjectGuid /*guid*/) { } - - // Called when a member is removed from a group. - virtual void OnRemoveMember(Group* /*group*/, ObjectGuid /*guid*/, RemoveMethod /*method*/, ObjectGuid /*kicker*/, const char* /*reason*/) { } - - // Called when the leader of a group is changed. - virtual void OnChangeLeader(Group* /*group*/, ObjectGuid /*newLeaderGuid*/, ObjectGuid /*oldLeaderGuid*/) { } - - // Called when a group is disbanded. - virtual void OnDisband(Group* /*group*/) { } - - [[nodiscard]] virtual bool CanGroupJoinBattlegroundQueue(Group const* /*group*/, Player* /*member*/, Battleground const* /*bgTemplate*/, uint32 /*MinPlayerCount*/, bool /*isRated*/, uint32 /*arenaSlot*/) { return true; } - - virtual void OnCreate(Group* /*group*/, Player* /*leader*/) { } -}; - -// following hooks can be used anywhere and are not db bounded -class GlobalScript : public ScriptObject -{ -protected: - GlobalScript(const char* name); - -public: - // items - virtual void OnItemDelFromDB(CharacterDatabaseTransaction /*trans*/, ObjectGuid::LowType /*itemGuid*/) { } - virtual void OnMirrorImageDisplayItem(Item const* /*item*/, uint32& /*display*/) { } - - // loot - virtual void OnAfterRefCount(Player const* /*player*/, LootStoreItem* /*LootStoreItem*/, Loot& /*loot*/, bool /*canRate*/, uint16 /*lootMode*/, uint32& /*maxcount*/, LootStore const& /*store*/) { } - virtual void OnAfterCalculateLootGroupAmount(Player const* /*player*/, Loot& /*loot*/, uint16 /*lootMode*/, uint32& /*groupAmount*/, LootStore const& /*store*/) { } - virtual void OnBeforeDropAddItem(Player const* /*player*/, Loot& /*loot*/, bool /*canRate*/, uint16 /*lootMode*/, LootStoreItem* /*LootStoreItem*/, LootStore const& /*store*/) { } - virtual bool OnItemRoll(Player const* /*player*/, LootStoreItem const* /*LootStoreItem*/, float& /*chance*/, Loot& /*loot*/, LootStore const& /*store*/) { return true; }; - virtual bool OnBeforeLootEqualChanced(Player const* /*player*/, LootStoreItemList /*EqualChanced*/, Loot& /*loot*/, LootStore const& /*store*/) { return true; } - virtual void OnInitializeLockedDungeons(Player* /*player*/, uint8& /*level*/, uint32& /*lockData*/, lfg::LFGDungeonData const* /*dungeon*/) { } - virtual void OnAfterInitializeLockedDungeons(Player* /*player*/) { } - - // On Before arena points distribution - virtual void OnBeforeUpdateArenaPoints(ArenaTeam* /*at*/, std::map& /*ap*/) { } - - // Called when a dungeon encounter is updated. - virtual void OnAfterUpdateEncounterState(Map* /*map*/, EncounterCreditType /*type*/, uint32 /*creditEntry*/, Unit* /*source*/, Difficulty /*difficulty_fixed*/, DungeonEncounterList const* /*encounters*/, uint32 /*dungeonCompleted*/, bool /*updated*/) { } - - // Called before the phase for a WorldObject is set - virtual void OnBeforeWorldObjectSetPhaseMask(WorldObject const* /*worldObject*/, uint32& /*oldPhaseMask*/, uint32& /*newPhaseMask*/, bool& /*useCombinedPhases*/, bool& /*update*/) { } - - // Called when checking if an aura spell is affected by a mod - virtual bool OnIsAffectedBySpellModCheck(SpellInfo const* /*affectSpell*/, SpellInfo const* /*checkSpell*/, SpellModifier const* /*mod*/) { return true; }; - - // Called when checking for spell negative healing modifiers - virtual bool OnSpellHealingBonusTakenNegativeModifiers(Unit const* /*target*/, Unit const* /*caster*/, SpellInfo const* /*spellInfo*/, float& /*val*/) { return false; }; - - // Called after loading spell dbc corrections - virtual void OnLoadSpellCustomAttr(SpellInfo* /*spell*/) { } - - // Called when checking if a player can see the creature loot item - virtual bool OnAllowedForPlayerLootCheck(Player const* /*player*/, ObjectGuid /*source*/) { return false; }; - - // Called when checking if a player can see the creature loot (if it can click the corpse f.e) - virtual bool OnAllowedToLootContainerCheck(Player const* /*player*/, ObjectGuid /*source*/) { return false; }; - - // Called when instance id is removed from database (e.g. instance reset) - virtual void OnInstanceIdRemoved(uint32 /*instanceId*/) { } - - // Called when any raid boss has their state updated (e.g. pull, reset, kill) - virtual void OnBeforeSetBossState(uint32 /*id*/, EncounterState /*newState*/, EncounterState /*oldState*/, Map* /*instance*/) { } -}; - -class BGScript : public ScriptObject -{ -protected: - BGScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - /** - * @brief This hook runs before start Battleground - * - * @param bg Contains information about the Battleground - */ - virtual void OnBattlegroundStart(Battleground* /*bg*/) { } - - // End Battleground - virtual void OnBattlegroundEndReward(Battleground* /*bg*/, Player* /*player*/, TeamId /*winnerTeamId*/) { } - - // Update Battlegroud - virtual void OnBattlegroundUpdate(Battleground* /*bg*/, uint32 /*diff*/) { } - - // Add Player in Battlegroud - virtual void OnBattlegroundAddPlayer(Battleground* /*bg*/, Player* /*player*/) { } - - // Before added player in Battlegroud - virtual void OnBattlegroundBeforeAddPlayer(Battleground* /*bg*/, Player* /*player*/) { } - - // Remove player at leave BG - virtual void OnBattlegroundRemovePlayerAtLeave(Battleground* /*bg*/, Player* /*player*/) { } - - virtual void OnQueueUpdate(BattlegroundQueue* /*queue*/, uint32 /* diff */, BattlegroundTypeId /* bgTypeId */, BattlegroundBracketId /* bracket_id */, uint8 /* arenaType */, bool /* isRated */, uint32 /* arenaRating */) { } - - virtual void OnAddGroup(BattlegroundQueue* /*queue*/, GroupQueueInfo* /*ginfo*/, uint32& /*index*/, Player* /*leader*/, Group* /*group*/, BattlegroundTypeId /* bgTypeId */, PvPDifficultyEntry const* /* bracketEntry */, - uint8 /* arenaType */, bool /* isRated */, bool /* isPremade */, uint32 /* arenaRating */, uint32 /* matchmakerRating */, uint32 /* arenaTeamId */, uint32 /* opponentsArenaTeamId */) { } - - [[nodiscard]] virtual bool CanFillPlayersToBG(BattlegroundQueue* /*queue*/, Battleground* /*bg*/, BattlegroundBracketId /*bracket_id*/) { return true; } - - [[nodiscard]] virtual bool IsCheckNormalMatch(BattlegroundQueue* /*queue*/, Battleground* /*bgTemplate*/, BattlegroundBracketId /*bracket_id*/, uint32 /*minPlayers*/, uint32 /*maxPlayers*/) { return false; }; - - [[nodiscard]] virtual bool CanSendMessageBGQueue(BattlegroundQueue* /*queue*/, Player* /*leader*/, Battleground* /*bg*/, PvPDifficultyEntry const* /*bracketEntry*/) { return true; } - - /** - * @brief This hook runs before sending the join message during the arena queue, allowing you to run extra operations or disabling the join message - * - * @param queue Contains information about the Arena queue - * @param leader Contains information about the player leader - * @param ginfo Contains information about the group of the queue - * @param bracketEntry Contains information about the bracket - * @param isRated Contains information about rated arena or skirmish - * @return True if you want to continue sending the message, false if you want to disable the message - */ - [[nodiscard]] virtual bool OnBeforeSendJoinMessageArenaQueue(BattlegroundQueue* /*queue*/, Player* /*leader*/, GroupQueueInfo* /*ginfo*/, PvPDifficultyEntry const* /*bracketEntry*/, bool /*isRated*/) { return true; } - - /** - * @brief This hook runs before sending the exit message during the arena queue, allowing you to run extra operations or disabling the exit message - * - * @param queue Contains information about the Arena queue - * @param ginfo Contains information about the group of the queue - * @return True if you want to continue sending the message, false if you want to disable the message - */ - [[nodiscard]] virtual bool OnBeforeSendExitMessageArenaQueue(BattlegroundQueue* /*queue*/, GroupQueueInfo* /*ginfo*/) { return true; } - - /** - * @brief This hook runs after end Battleground - * - * @param bg Contains information about the Battleground - * @param TeamId Contains information about the winneer team - */ - virtual void OnBattlegroundEnd(Battleground* /*bg*/, TeamId /*winner team*/) { } - - /** - * @brief This hook runs before Battleground destroy - * - * @param bg Contains information about the Battleground - */ - virtual void OnBattlegroundDestroy(Battleground* /*bg*/) { } - - /** - * @brief This hook runs after Battleground create - * - * @param bg Contains information about the Battleground - */ - virtual void OnBattlegroundCreate(Battleground* /*bg*/) { } -}; - -class ArenaTeamScript : public ScriptObject -{ -protected: - ArenaTeamScript(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return false; }; - - virtual void OnGetSlotByType(const uint32 /*type*/, uint8& /*slot*/) {} - virtual void OnGetArenaPoints(ArenaTeam* /*team*/, float& /*points*/) {} - virtual void OnTypeIDToQueueID(const BattlegroundTypeId /*bgTypeId*/, const uint8 /*arenaType*/, uint32& /*queueTypeID*/) {} - virtual void OnQueueIdToArenaType(const BattlegroundQueueTypeId /*bgQueueTypeId*/, uint8& /*ArenaType*/) {} - virtual void OnSetArenaMaxPlayersPerTeam(const uint8 /*arenaType*/, uint32& /*maxPlayerPerTeam*/) {} -}; - -class SpellSC : public ScriptObject -{ -protected: - SpellSC(const char* name); - -public: - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - // Calculate max duration in applying aura - virtual void OnCalcMaxDuration(Aura const* /*aura*/, int32& /*maxDuration*/) { } - - [[nodiscard]] virtual bool CanModAuraEffectDamageDone(AuraEffect const* /*auraEff*/, Unit* /*target*/, AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/) { return true; } - - [[nodiscard]] virtual bool CanModAuraEffectModDamagePercentDone(AuraEffect const* /*auraEff*/, Unit* /*target*/, AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/) { return true; } - - virtual void OnSpellCheckCast(Spell* /*spell*/, bool /*strict*/, SpellCastResult& /*res*/) { } - - [[nodiscard]] virtual bool CanPrepare(Spell* /*spell*/, SpellCastTargets const* /*targets*/, AuraEffect const* /*triggeredByAura*/) { return true; } - - [[nodiscard]] virtual bool CanScalingEverything(Spell* /*spell*/) { return false; } - - [[nodiscard]] virtual bool CanSelectSpecTalent(Spell* /*spell*/) { return true; } - - virtual void OnScaleAuraUnitAdd(Spell* /*spell*/, Unit* /*target*/, uint32 /*effectMask*/, bool /*checkIfValid*/, bool /*implicit*/, uint8 /*auraScaleMask*/, TargetInfo& /*targetInfo*/) { } - - virtual void OnRemoveAuraScaleTargets(Spell* /*spell*/, TargetInfo& /*targetInfo*/, uint8 /*auraScaleMask*/, bool& /*needErase*/) { } - - virtual void OnBeforeAuraRankForLevel(SpellInfo const* /*spellInfo*/, SpellInfo const* /*latestSpellInfo*/, uint8 /*level*/) { } - - /** - * @brief This hook called after spell dummy effect - * - * @param caster Contains information about the WorldObject - * @param spellID Contains information about the spell id - * @param effIndex Contains information about the SpellEffIndex - * @param gameObjTarget Contains information about the GameObject - */ - virtual void OnDummyEffect(WorldObject* /*caster*/, uint32 /*spellID*/, SpellEffIndex /*effIndex*/, GameObject* /*gameObjTarget*/) { } - - /** - * @brief This hook called after spell dummy effect - * - * @param caster Contains information about the WorldObject - * @param spellID Contains information about the spell id - * @param effIndex Contains information about the SpellEffIndex - * @param creatureTarget Contains information about the Creature - */ - virtual void OnDummyEffect(WorldObject* /*caster*/, uint32 /*spellID*/, SpellEffIndex /*effIndex*/, Creature* /*creatureTarget*/) { } - - /** - * @brief This hook called after spell dummy effect - * - * @param caster Contains information about the WorldObject - * @param spellID Contains information about the spell id - * @param effIndex Contains information about the SpellEffIndex - * @param itemTarget Contains information about the Item - */ - virtual void OnDummyEffect(WorldObject* /*caster*/, uint32 /*spellID*/, SpellEffIndex /*effIndex*/, Item* /*itemTarget*/) { } -}; - -// this class can be used to be extended by Modules -// creating their own custom hooks inside module itself -class ModuleScript : public ScriptObject -{ -protected: - ModuleScript(const char* name); -}; - -class GameEventScript : public ScriptObject -{ -protected: - GameEventScript(const char* name); - -public: - // Runs on start event - virtual void OnStart(uint16 /*EventID*/) { } - - // Runs on stop event - virtual void OnStop(uint16 /*EventID*/) { } - - // Runs on event check - virtual void OnEventCheck(uint16 /*EventID*/) { } -}; - -class MailScript : public ScriptObject -{ -protected: - MailScript(const char* name); - -public: - // Called before mail is sent - virtual void OnBeforeMailDraftSendMailTo(MailDraft* /*mailDraft*/, MailReceiver const& /*receiver*/, MailSender const& /*sender*/, MailCheckMask& /*checked*/, uint32& /*deliver_delay*/, uint32& /*custom_expiration*/, bool& /*deleteMailItemsFromDB*/, bool& /*sendMail*/) { } -}; - -class AchievementScript : public ScriptObject -{ -protected: - - AchievementScript(const char* name); - -public: - - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - // After complete global acvievement - virtual void SetRealmCompleted(AchievementEntry const* /*achievement*/) { } - - [[nodiscard]] virtual bool IsCompletedCriteria(AchievementMgr* /*mgr*/, AchievementCriteriaEntry const* /*achievementCriteria*/, AchievementEntry const* /*achievement*/, CriteriaProgress const* /*progress*/) { return true; } - - [[nodiscard]] virtual bool IsRealmCompleted(AchievementGlobalMgr const* /*globalmgr*/, AchievementEntry const* /*achievement*/, SystemTimePoint /*completionTime*/) { return true; } - - virtual void OnBeforeCheckCriteria(AchievementMgr* /*mgr*/, AchievementCriteriaEntryList const* /*achievementCriteriaList*/) { } - - [[nodiscard]] virtual bool CanCheckCriteria(AchievementMgr* /*mgr*/, AchievementCriteriaEntry const* /*achievementCriteria*/) { return true; } -}; - -class PetScript : public ScriptObject -{ -protected: - - PetScript(const char* name); - -public: - - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - virtual void OnInitStatsForLevel(Guardian* /*guardian*/, uint8 /*petlevel*/) { } - - virtual void OnCalculateMaxTalentPointsForLevel(Pet* /*pet*/, uint8 /*level*/, uint8& /*points*/) { } - - [[nodiscard]] virtual bool CanUnlearnSpellSet(Pet* /*pet*/, uint32 /*level*/, uint32 /*spell*/) { return true; } - - [[nodiscard]] virtual bool CanUnlearnSpellDefault(Pet* /*pet*/, SpellInfo const* /*spellInfo*/) { return true; } - - [[nodiscard]] virtual bool CanResetTalents(Pet* /*pet*/) { return true; } - - /** - * @brief This hook called after add pet in world - * - * @param pet Contains information about the Pet - */ - virtual void OnPetAddToWorld(Pet* /*pet*/) { } -}; - -class ArenaScript : public ScriptObject -{ -protected: - - ArenaScript(const char* name); - -public: - - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - [[nodiscard]] virtual bool CanAddMember(ArenaTeam* /*team*/, ObjectGuid /*PlayerGuid*/) { return true; } - - virtual void OnGetPoints(ArenaTeam* /*team*/, uint32 /*memberRating*/, float& /*points*/) { } - - [[nodiscard]] virtual bool CanSaveToDB(ArenaTeam* /*team*/) { return true; } -}; - -class MiscScript : public ScriptObject -{ -protected: - - MiscScript(const char* name); - -public: - - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - virtual void OnConstructObject(Object* /*origin*/) { } - - virtual void OnDestructObject(Object* /*origin*/) { } - - virtual void OnConstructPlayer(Player* /*origin*/) { } - - virtual void OnDestructPlayer(Player* /*origin*/) { } - - virtual void OnConstructGroup(Group* /*origin*/) { } - - virtual void OnDestructGroup(Group* /*origin*/) { } - - virtual void OnConstructInstanceSave(InstanceSave* /*origin*/) { } - - virtual void OnDestructInstanceSave(InstanceSave* /*origin*/) { } - - virtual void OnItemCreate(Item* /*item*/, ItemTemplate const* /*itemProto*/, Player const* /*owner*/) { } - - [[nodiscard]] virtual bool CanApplySoulboundFlag(Item* /*item*/, ItemTemplate const* /*proto*/) { return true; } - - [[nodiscard]] virtual bool CanItemApplyEquipSpell(Player* /*player*/, Item* /*item*/) { return true; } - - [[nodiscard]] virtual bool CanSendAuctionHello(WorldSession const* /*session*/, ObjectGuid /*guid*/, Creature* /*creature*/) { return true; } - - virtual void ValidateSpellAtCastSpell(Player* /*player*/, uint32& /*oldSpellId*/, uint32& /*spellId*/, uint8& /*castCount*/, uint8& /*castFlags*/) { } - - virtual void ValidateSpellAtCastSpellResult(Player* /*player*/, Unit* /*mover*/, Spell* /*spell*/, uint32 /*oldSpellId*/, uint32 /*spellId*/) { } - - virtual void OnAfterLootTemplateProcess(Loot* /*loot*/, LootTemplate const* /*tab*/, LootStore const& /*store*/, Player* /*lootOwner*/, bool /*personal*/, bool /*noEmptyError*/, uint16 /*lootMode*/) { } - - virtual void OnPlayerSetPhase(const AuraEffect* /*auraEff*/, AuraApplication const* /*aurApp*/, uint8 /*mode*/, bool /*apply*/, uint32& /*newPhase*/) { } - - virtual void OnInstanceSave(InstanceSave* /*instanceSave*/) { } - - /** - * @brief This hook called before get Quest Dialog Status - * - * @param player Contains information about the Player - * @param questgiver Contains information about the Object - */ - virtual void GetDialogStatus(Player* /*player*/, Object* /*questgiver*/) { } -}; - -class CommandSC : public ScriptObject -{ -protected: - - CommandSC(const char* name); - -public: - - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - virtual void OnHandleDevCommand(Player* /*player*/, bool& /*enable*/) { } - - /** - * @brief This hook runs execute chat command - * - * @param handler Contains information about the ChatHandler - * @param cmdStr Contains information about the command name - */ - [[nodiscard]] virtual bool CanExecuteCommand(ChatHandler& /*handler*/, std::string_view /*cmdStr*/) { return true; } -}; - -class DatabaseScript : public ScriptObject -{ -protected: - - DatabaseScript(const char* name); - -public: - - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - /** - * @brief Called after all databases are loaded - * - * @param updateFlags Update flags from the loader - */ - virtual void OnAfterDatabasesLoaded(uint32 /*updateFlags*/) { } - - /** - * @brief Called after all creature template data has been loaded from the database. This hook could be called multiple times, not just at server startup. - * - * @param creatureTemplates Pointer to a modifiable vector of creature templates. Indexed by Entry ID. - */ - virtual void OnAfterDatabaseLoadCreatureTemplates(std::vector /*creatureTemplates*/) { } - -}; - -class WorldObjectScript : public ScriptObject -{ -protected: - - WorldObjectScript(const char* name); - -public: - - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - /** - * @brief This hook called before destroy world object - * - * @param object Contains information about the WorldObject - */ - virtual void OnWorldObjectDestroy(WorldObject* /*object*/) { } - - /** - * @brief This hook called after create world object - * - * @param object Contains information about the WorldObject - */ - virtual void OnWorldObjectCreate(WorldObject* /*object*/) { } - - /** - * @brief This hook called after world object set to map - * - * @param object Contains information about the WorldObject - */ - virtual void OnWorldObjectSetMap(WorldObject* /*object*/, Map* /*map*/ ) { } - - /** - * @brief This hook called after world object reset - * - * @param object Contains information about the WorldObject - */ - virtual void OnWorldObjectResetMap(WorldObject* /*object*/) { } - - /** - * @brief This hook called after world object update - * - * @param object Contains information about the WorldObject - * @param diff Contains information about the diff time - */ - virtual void OnWorldObjectUpdate(WorldObject* /*object*/, uint32 /*diff*/) { } -}; - -class LootScript : public ScriptObject -{ -protected: - - LootScript(const char* name); - -public: - - [[nodiscard]] bool IsDatabaseBound() const override { return false; } - - /** - * @brief This hook called before money loot - * - * @param player Contains information about the Player - * @param gold Contains information about money - */ - virtual void OnLootMoney(Player* /*player*/, uint32 /*gold*/) { } -}; - -class ElunaScript : public ScriptObject -{ -protected: - - ElunaScript(const char* name); - -public: - /** - * @brief This hook called when the weather changes in the zone this script is associated with. - * - * @param weather Contains information about the Weather - * @param state Contains information about the WeatherState - * @param grade Contains information about the grade - */ - virtual void OnWeatherChange(Weather* /*weather*/, WeatherState /*state*/, float /*grade*/) { } - - // Called when the area trigger is activated by a player. - [[nodiscard]] virtual bool CanAreaTrigger(Player* /*player*/, AreaTrigger const* /*trigger*/) { return false; } -}; - // Manages registration, loading, and execution of scripts. class ScriptMgr { @@ -2145,10 +122,11 @@ public: /* Initialization */ void FillSpellSummary(); void CheckIfScriptsInDatabaseExist(); - const char* ScriptsVersion() const { return "Integrated Azeroth Scripts"; } + std::string_view ScriptsVersion() const { return "Integrated Azeroth Scripts"; } - void IncrementScriptCount() { ++_scriptCount; } - uint32 GetScriptCount() const { return _scriptCount; } + void IncreaseScriptCount() { ++_scriptCount; } + void DecreaseScriptCount() { --_scriptCount; } + [[nodiscard]] uint32 GetScriptCount() const { return _scriptCount; } typedef void(*ScriptLoaderCallbackType)(); typedef void(*ModulesLoaderCallbackType)(); @@ -2173,7 +151,7 @@ public: /* Unloading */ public: /* SpellScriptLoader */ void CreateSpellScripts(uint32 spellId, std::list& scriptVector); void CreateAuraScripts(uint32 spellId, std::list& scriptVector); - void CreateSpellScriptLoaders(uint32 spellId, std::vector::iterator> >& scriptVector); + void CreateSpellScriptLoaders(uint32 spellId, std::vector::iterator>>& scriptVector); public: /* ServerScript */ void OnNetworkStart(); @@ -2716,95 +694,6 @@ private: ModulesLoaderCallbackType _modules_loader_callback; }; -namespace Acore::SpellScripts -{ - template - using is_SpellScript = std::is_base_of; - - template - using is_AuraScript = std::is_base_of; -} - -template -class GenericSpellAndAuraScriptLoader : public SpellScriptLoader -{ - using SpellScriptType = typename Acore::find_type_if_t; - using AuraScriptType = typename Acore::find_type_if_t; - using ArgsType = typename Acore::find_type_if_t; - -public: - GenericSpellAndAuraScriptLoader(char const* name, ArgsType&& args) : SpellScriptLoader(name), _args(std::move(args)) { } - -private: - [[nodiscard]] SpellScript* GetSpellScript() const override - { - if constexpr (!std::is_same_v) - { - return Acore::new_from_tuple(_args); - } - else - { - return nullptr; - } - } - - [[nodiscard]] AuraScript* GetAuraScript() const override - { - if constexpr (!std::is_same_v) - { - return Acore::new_from_tuple(_args); - } - else - { - return nullptr; - } - } - - ArgsType _args; -}; - -#define RegisterSpellScriptWithArgs(spell_script, script_name, ...) new GenericSpellAndAuraScriptLoader(script_name, std::make_tuple(__VA_ARGS__)) -#define RegisterSpellScript(spell_script) RegisterSpellScriptWithArgs(spell_script, #spell_script) -#define RegisterSpellAndAuraScriptPairWithArgs(script_1, script_2, script_name, ...) new GenericSpellAndAuraScriptLoader(script_name, std::make_tuple(__VA_ARGS__)) -#define RegisterSpellAndAuraScriptPair(script_1, script_2) RegisterSpellAndAuraScriptPairWithArgs(script_1, script_2, #script_1) - -template -class GenericCreatureScript : public CreatureScript -{ - public: - GenericCreatureScript(char const* name) : CreatureScript(name) { } - CreatureAI* GetAI(Creature* me) const override { return new AI(me); } -}; -#define RegisterCreatureAI(ai_name) new GenericCreatureScript(#ai_name) - -template -class FactoryCreatureScript : public CreatureScript -{ - public: - FactoryCreatureScript(char const* name) : CreatureScript(name) { } - CreatureAI* GetAI(Creature* me) const override { return AIFactory(me); } -}; -#define RegisterCreatureAIWithFactory(ai_name, factory_fn) new FactoryCreatureScript(#ai_name) - -// Cannot be used due gob scripts not working like this -template -class GenericGameObjectScript : public GameObjectScript -{ - public: - GenericGameObjectScript(char const* name) : GameObjectScript(name) { } - GameObjectAI* GetAI(GameObject* me) const override { return new AI(me); } -}; -#define RegisterGameObjectAI(ai_name) new GenericGameObjectScript(#ai_name) - -// Cannot be used due gob scripts not working like this -template class FactoryGameObjectScript : public GameObjectScript -{ - public: - FactoryGameObjectScript(char const* name) : GameObjectScript(name) {} - GameObjectAI* GetAI(GameObject* me) const override { return AIFactory(me); } -}; -#define RegisterGameObjectAIWithFactory(ai_name, factory_fn) new FactoryGameObjectScript(#ai_name) - #define sScriptMgr ScriptMgr::instance() template @@ -2840,7 +729,7 @@ public: // We're dealing with a code-only script; just add it. ScriptPointerList[_scriptIdCounter++] = script; - sScriptMgr->IncrementScriptCount(); + sScriptMgr->IncreaseScriptCount(); } } @@ -2889,7 +778,7 @@ public: // Increment script count only with new scripts if (!oldScript) { - sScriptMgr->IncrementScriptCount(); + sScriptMgr->IncreaseScriptCount(); } } else @@ -2904,7 +793,7 @@ public: { // We're dealing with a code-only script; just add it. ScriptPointerList[_scriptIdCounter++] = script; - sScriptMgr->IncrementScriptCount(); + sScriptMgr->IncreaseScriptCount(); } } } diff --git a/src/server/game/Scripting/ScriptObject.cpp b/src/server/game/Scripting/ScriptObject.cpp new file mode 100644 index 000000000..1143f328d --- /dev/null +++ b/src/server/game/Scripting/ScriptObject.cpp @@ -0,0 +1,43 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "ScriptObject.h" +#include "DBCStores.h" +#include "Log.h" + +//ScriptObject::ScriptObject(char const* name) : _name(name) +//{ +// sScriptMgr->IncreaseScriptCount(); +//} +// +//ScriptObject::~ScriptObject() +//{ +// sScriptMgr->DecreaseScriptCount(); +//} + +template +void MapScript::checkMap() +{ + _mapEntry = sMapStore.LookupEntry(_mapId); + + if (!_mapEntry) + LOG_ERROR("maps.script", "Invalid MapScript for {}; no such map ID.", _mapId); +} + +template class AC_GAME_API MapScript; +template class AC_GAME_API MapScript; +template class AC_GAME_API MapScript; diff --git a/src/server/game/Scripting/ScriptObject.h b/src/server/game/Scripting/ScriptObject.h new file mode 100644 index 000000000..c5bb042e5 --- /dev/null +++ b/src/server/game/Scripting/ScriptObject.h @@ -0,0 +1,114 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef _SCRIPT_OBJECT_H_ +#define _SCRIPT_OBJECT_H_ + +#include "DatabaseEnvFwd.h" +#include "ScriptObjectFwd.h" +#include + +//#include "Duration.h" +//#include "LFG.h" +//#include "ObjectGuid.h" +//#include "SharedDefines.h" +//#include "Tuples.h" +//#include "Types.h" + + // Check out our guide on how to create new hooks in our wiki! https://www.azerothcore.org/wiki/hooks-script + /* + TODO: Add more script type classes. + + SessionScript + CollisionScript + ArenaTeamScript + */ + +constexpr auto VISIBLE_RANGE = 166.0f; //MAX visible range (size of grid) + +class ScriptObject +{ + friend class ScriptMgr; + +public: + // Do not override this in scripts; it should be overridden by the various script type classes. It indicates + // whether or not this script type must be assigned in the database. + [[nodiscard]] virtual bool IsDatabaseBound() const { return false; } + [[nodiscard]] virtual bool isAfterLoadScript() const { return IsDatabaseBound(); } + virtual void checkValidity() { } + + [[nodiscard]] const std::string& GetName() const { return _name; } + +protected: + ScriptObject(const char* name) : _name(std::string(name)) + { + } + + virtual ~ScriptObject() = default; + +private: + const std::string _name; +}; + +template +class UpdatableScript +{ +protected: + UpdatableScript() = default; + +public: + virtual void OnUpdate(TObject* /*obj*/, uint32 /*diff*/) { } +}; + +template +class MapScript : public UpdatableScript +{ + MapEntry const* _mapEntry; + uint32 _mapId; + +protected: + explicit MapScript(uint32 mapId) : _mapId(mapId) { } + +public: + void checkMap(); + + // Gets the MapEntry structure associated with this script. Can return nullptr. + MapEntry const* GetEntry() { return _mapEntry; } + + // Called when the map is created. + virtual void OnCreate(TMap* /*map*/) { } + + // Called just before the map is destroyed. + virtual void OnDestroy(TMap* /*map*/) { } + + // Called when a grid map is loaded. + virtual void OnLoadGridMap(TMap* /*map*/, GridMap* /*gmap*/, uint32 /*gx*/, uint32 /*gy*/) { } + + // Called when a grid map is unloaded. + virtual void OnUnloadGridMap(TMap* /*map*/, GridMap* /*gmap*/, uint32 /*gx*/, uint32 /*gy*/) { } + + // Called when a player enters the map. + virtual void OnPlayerEnter(TMap* /*map*/, Player* /*player*/) { } + + // Called when a player leaves the map. + virtual void OnPlayerLeave(TMap* /*map*/, Player* /*player*/) { } + + // Called on every map update tick. + void OnUpdate(TMap* /*map*/, uint32 /*diff*/) override { } +}; + +#endif //_SCRIPT_OBJECT_H_ diff --git a/src/server/game/Scripting/ScriptObjectFwd.h b/src/server/game/Scripting/ScriptObjectFwd.h new file mode 100644 index 000000000..67c5e8ca7 --- /dev/null +++ b/src/server/game/Scripting/ScriptObjectFwd.h @@ -0,0 +1,151 @@ +/* + * This file is part of the AzeerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef AC_SCRIPT_OBJECT_FWD_H_ +#define AC_SCRIPT_OBJECT_FWD_H_ + +#include "Define.h" + +// Core class +class AchievementGlobalMgr; +class AchievementMgr; +class ArenaTeam; +class AuctionEntry; +class AuctionHouseMgr; +class AuctionHouseObject; +class Aura; +class AuraApplication; +class AuraEffect; +class AuraScript; +class Battleground; +class BattlegroundMap; +class BattlegroundQueue; +class Channel; +class ChatHandler; +class Creature; +class CreatureAI; +class DynamicObject; +class GameObject; +class GameObjectAI; +class GridMap; +class Group; +class Guardian; +class Guild; +class InstanceMap; +class InstanceSave; +class InstanceScript; +class Item; +class LootStore; +class LootTemplate; +class MailDraft; +class MailReceiver; +class MailSender; +class Map; +class MapInstanced; +class Object; +class OutdoorPvP; +class Pet; +class Player; +class Quest; +class Roll; +class Spell; +class SpellCastTargets; +class SpellInfo; +class SpellScript; +class TempSummon; +class Transport; +class Unit; +class Vehicle; +class Weather; +class WorldObject; +class WorldPacket; +class WorldSession; +class WorldSocket; + +enum ArenaTeamInfoType : uint8; +enum AuraRemoveMode : uint8; +enum BattlegroundDesertionType : uint8; +enum ContentLevels : uint8; +enum DamageEffectType : uint8; +enum EnchantmentSlot : uint8; +enum EncounterCreditType : uint8; +enum EncounterState : uint8; +enum InventoryResult : uint8; +enum MailCheckMask : uint8; +enum PetType : uint8; +enum RollVote : uint8; +enum ShutdownExitCode : uint8; +enum ShutdownMask : uint8; +enum WeaponAttackType : uint8; +enum WeatherState : uint32; + +struct AchievementCriteriaEntry; +struct AchievementEntry; +struct AreaTrigger; +struct CompletedAchievementData; +struct Condition; +struct ConditionSourceInfo; +struct CreatureTemplate; +struct CriteriaProgress; +struct DungeonEncounter; +struct DungeonProgressionRequirements; +struct GroupQueueInfo; +struct InstanceTemplate; +struct ItemSetEffect; +struct ItemTemplate; +struct Loot; +struct LootItem; +struct LootStoreItem; +struct MapDifficulty; +struct MapEntry; +struct MovementInfo; +struct PvPDifficultyEntry; +struct QuestStatusData; +struct ScalingStatValuesEntry; +struct SpellModifier; +struct TargetInfo; +struct VendorItem; +struct SkillLineAbilityEntry; + +// Dynamic linking class +class ModuleReference; + +// Script objects +class SpellScriptLoader; + +// +struct OutdoorPvPData; + +namespace lfg +{ + struct LFGDungeonData; +} + +namespace Acore +{ + namespace Asio + { + class IoContext; + } + + namespace ChatCommands + { + struct ChatCommandBuilder; + } +} + +#endif diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 7a830e00b..a3a94d7ac 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -26,6 +26,7 @@ #include "Common.h" #include "DatabaseEnv.h" #include "GameTime.h" +#include "Group.h" #include "Guild.h" #include "GuildMgr.h" #include "Hyperlinks.h" @@ -60,7 +61,7 @@ bool MapSessionFilter::Process(WorldPacket* packet) { ClientOpcodeHandler const* opHandle = opcodeTable[static_cast(packet->GetOpcode())]; - //let's check if our opcode can be really processed in Map::Update() + //let's check if our has an anxiety disorder can be really processed in Map::Update() if (opHandle->ProcessingPlace == PROCESS_INPLACE) return true; diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h index 37b046f44..9847e89ae 100644 --- a/src/server/game/Spells/Auras/SpellAuraDefines.h +++ b/src/server/game/Spells/Auras/SpellAuraDefines.h @@ -386,7 +386,7 @@ enum AuraObjectType DYNOBJ_AURA_TYPE, }; -enum AuraRemoveMode +enum AuraRemoveMode : uint8 { AURA_REMOVE_NONE = 0, AURA_REMOVE_BY_DEFAULT = 1, // scripted remove, remove by stack with aura with different ids and sc aura remove diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 81e324c90..7a30041bc 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -22,6 +22,7 @@ #include "Common.h" #include "GameTime.h" #include "GridNotifiers.h" +#include "InstanceScript.h" #include "Log.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index de373358a..eaf17a08e 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -43,13 +43,13 @@ struct Realm; AC_GAME_API extern Realm realm; -enum ShutdownMask +enum ShutdownMask : uint8 { SHUTDOWN_MASK_RESTART = 1, SHUTDOWN_MASK_IDLE = 2, }; -enum ShutdownExitCode +enum ShutdownExitCode : uint8 { SHUTDOWN_EXIT_CODE = 0, ERROR_EXIT_CODE = 1, diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 0a3f73591..3187e6a74 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -26,9 +26,9 @@ EndScriptData */ #include "AccountMgr.h" #include "Base32.h" #include "Chat.h" +#include "CommandScript.h" #include "CryptoGenerics.h" #include "IPLocation.h" -#include "Language.h" #include "Player.h" #include "Realm.h" #include "ScriptMgr.h" diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp index a7a551a88..d730c0a34 100644 --- a/src/server/scripts/Commands/cs_achievement.cpp +++ b/src/server/scripts/Commands/cs_achievement.cpp @@ -24,9 +24,8 @@ EndScriptData */ #include "AchievementMgr.h" #include "Chat.h" -#include "Language.h" +#include "CommandScript.h" #include "Player.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_arena.cpp b/src/server/scripts/Commands/cs_arena.cpp index 909ee8e6a..3531d62de 100644 --- a/src/server/scripts/Commands/cs_arena.cpp +++ b/src/server/scripts/Commands/cs_arena.cpp @@ -24,9 +24,8 @@ EndScriptData */ #include "ArenaTeamMgr.h" #include "Chat.h" -#include "Language.h" +#include "CommandScript.h" #include "Player.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_bag.cpp b/src/server/scripts/Commands/cs_bag.cpp index d190b790f..874405dcf 100644 --- a/src/server/scripts/Commands/cs_bag.cpp +++ b/src/server/scripts/Commands/cs_bag.cpp @@ -16,9 +16,9 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" constexpr std::array itemQualityToString = { diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp index 9aa0da608..4bdec3f6c 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -26,12 +26,12 @@ EndScriptData */ #include "BanMgr.h" #include "CharacterCache.h" #include "Chat.h" +#include "CommandScript.h" #include "GameTime.h" #include "Language.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" /// Ban function modes enum BanMode diff --git a/src/server/scripts/Commands/cs_bf.cpp b/src/server/scripts/Commands/cs_bf.cpp index 6eec1e41b..0d7cc648a 100644 --- a/src/server/scripts/Commands/cs_bf.cpp +++ b/src/server/scripts/Commands/cs_bf.cpp @@ -24,7 +24,7 @@ EndScriptData */ #include "BattlefieldMgr.h" #include "Chat.h" -#include "ScriptMgr.h" +#include "CommandScript.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_cache.cpp b/src/server/scripts/Commands/cs_cache.cpp index 9943d3143..d32ba2575 100644 --- a/src/server/scripts/Commands/cs_cache.cpp +++ b/src/server/scripts/Commands/cs_cache.cpp @@ -16,10 +16,10 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "Group.h" #include "Language.h" #include "Player.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_cast.cpp b/src/server/scripts/Commands/cs_cast.cpp index f3bdf6075..47e3c3035 100644 --- a/src/server/scripts/Commands/cs_cast.cpp +++ b/src/server/scripts/Commands/cs_cast.cpp @@ -23,10 +23,10 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "Creature.h" #include "Language.h" #include "Player.h" -#include "ScriptMgr.h" #include "SpellInfo.h" #include "SpellMgr.h" diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 8753bec15..9122c06f4 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -24,6 +24,7 @@ EndScriptData */ #include "AccountMgr.h" #include "Chat.h" +#include "CommandScript.h" #include "DBCStores.h" #include "DatabaseEnv.h" #include "Log.h" @@ -32,7 +33,6 @@ EndScriptData */ #include "Player.h" #include "PlayerDump.h" #include "ReputationMgr.h" -#include "ScriptMgr.h" #include "Timer.h" #include "World.h" #include "WorldSession.h" diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp index 8ba1e0311..5b6eadd47 100644 --- a/src/server/scripts/Commands/cs_cheat.cpp +++ b/src/server/scripts/Commands/cs_cheat.cpp @@ -16,9 +16,9 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "Language.h" #include "Player.h" -#include "ScriptMgr.h" #include "WorldSession.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 6417f8668..9baef8d81 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -27,8 +27,10 @@ #include "CellImpl.h" #include "Channel.h" #include "Chat.h" +#include "CommandScript.h" #include "GossipDef.h" #include "GridNotifiersImpl.h" +#include "LFGMgr.h" #include "Language.h" #include "Log.h" #include "M2Stores.h" diff --git a/src/server/scripts/Commands/cs_deserter.cpp b/src/server/scripts/Commands/cs_deserter.cpp index 5f58849e4..b8b0d05f0 100644 --- a/src/server/scripts/Commands/cs_deserter.cpp +++ b/src/server/scripts/Commands/cs_deserter.cpp @@ -23,9 +23,9 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "Language.h" #include "Player.h" -#include "ScriptMgr.h" #include "SpellAuras.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp index bdbf3705f..f717469e6 100644 --- a/src/server/scripts/Commands/cs_disable.cpp +++ b/src/server/scripts/Commands/cs_disable.cpp @@ -24,12 +24,12 @@ EndScriptData */ #include "AchievementMgr.h" #include "Chat.h" +#include "CommandScript.h" #include "DisableMgr.h" #include "Language.h" #include "ObjectMgr.h" #include "OutdoorPvP.h" #include "Player.h" -#include "ScriptMgr.h" #include "SpellMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_event.cpp b/src/server/scripts/Commands/cs_event.cpp index c8732b162..80d036d2c 100644 --- a/src/server/scripts/Commands/cs_event.cpp +++ b/src/server/scripts/Commands/cs_event.cpp @@ -23,11 +23,11 @@ EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "GameEventMgr.h" #include "GameTime.h" #include "Language.h" #include "Player.h" -#include "ScriptMgr.h" #include "Timer.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_gear.cpp b/src/server/scripts/Commands/cs_gear.cpp index 6e3e4c97c..3f0e3aedc 100644 --- a/src/server/scripts/Commands/cs_gear.cpp +++ b/src/server/scripts/Commands/cs_gear.cpp @@ -16,10 +16,10 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "Language.h" #include "Log.h" #include "Player.h" -#include "ScriptMgr.h" #include "WorldSession.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index 4816e9969..c49cf4c67 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -24,13 +24,13 @@ EndScriptData */ #include "AccountMgr.h" #include "Chat.h" +#include "CommandScript.h" #include "DatabaseEnv.h" #include "Language.h" #include "ObjectAccessor.h" #include "Opcodes.h" #include "Player.h" #include "Realm.h" -#include "ScriptMgr.h" #include "World.h" #include "WorldSession.h" diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index 0de76e3cb..4d0bc6ba0 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -23,16 +23,16 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "GameGraveyard.h" #include "Language.h" #include "MapMgr.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "TicketMgr.h" -#include #include "boost/algorithm/string.hpp" +#include using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 40babbc68..b44ccd4d0 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -23,6 +23,7 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "GameEventMgr.h" #include "GameObject.h" #include "GameTime.h" @@ -32,7 +33,6 @@ EndScriptData */ #include "Opcodes.h" #include "Player.h" #include "PoolMgr.h" -#include "ScriptMgr.h" #include "Transport.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index 84ef21734..441bde078 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -16,11 +16,11 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "DatabaseEnv.h" #include "GroupMgr.h" #include "Language.h" #include "Player.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index ea2404cb4..254ff7df4 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -23,9 +23,9 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "Guild.h" #include "GuildMgr.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_honor.cpp b/src/server/scripts/Commands/cs_honor.cpp index 46794c94e..9d5090b18 100644 --- a/src/server/scripts/Commands/cs_honor.cpp +++ b/src/server/scripts/Commands/cs_honor.cpp @@ -23,9 +23,9 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "Language.h" #include "Player.h" -#include "ScriptMgr.h" #include "WorldSession.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_instance.cpp b/src/server/scripts/Commands/cs_instance.cpp index 00d2630bc..732f0982b 100644 --- a/src/server/scripts/Commands/cs_instance.cpp +++ b/src/server/scripts/Commands/cs_instance.cpp @@ -23,6 +23,7 @@ EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "GameTime.h" #include "Group.h" #include "InstanceSaveMgr.h" @@ -31,7 +32,6 @@ #include "MapMgr.h" #include "ObjectAccessor.h" #include "Player.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_inventory.cpp b/src/server/scripts/Commands/cs_inventory.cpp index dcf873d98..09dc88381 100644 --- a/src/server/scripts/Commands/cs_inventory.cpp +++ b/src/server/scripts/Commands/cs_inventory.cpp @@ -16,9 +16,9 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "Language.h" #include "Player.h" -#include "ScriptMgr.h" #include "WorldSession.h" constexpr std::array bagSpecsToString = diff --git a/src/server/scripts/Commands/cs_item.cpp b/src/server/scripts/Commands/cs_item.cpp index dff751758..1557398ad 100644 --- a/src/server/scripts/Commands/cs_item.cpp +++ b/src/server/scripts/Commands/cs_item.cpp @@ -23,12 +23,12 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "DBCStores.h" #include "DatabaseEnv.h" #include "Language.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 51f2bcdc9..efe99283f 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -22,12 +22,12 @@ Comment: All learn related commands Category: commandscripts EndScriptData */ +#include "CommandScript.h" #include "Language.h" #include "ObjectMgr.h" #include "Pet.h" #include "Player.h" #include "PlayerCommand.h" -#include "ScriptMgr.h" #include "SpellInfo.h" #include "SpellMgr.h" diff --git a/src/server/scripts/Commands/cs_lfg.cpp b/src/server/scripts/Commands/cs_lfg.cpp index 681de4235..1cf649976 100644 --- a/src/server/scripts/Commands/cs_lfg.cpp +++ b/src/server/scripts/Commands/cs_lfg.cpp @@ -16,12 +16,12 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "DatabaseEnv.h" #include "Group.h" #include "LFGMgr.h" #include "Language.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 5ee7c51e3..af687c177 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -23,6 +23,7 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "Creature.h" #include "DBCStores.h" #include "DatabaseEnv.h" @@ -33,7 +34,6 @@ EndScriptData */ #include "ObjectMgr.h" #include "Player.h" #include "Random.h" -#include "ScriptMgr.h" #include "SpellAuraEffects.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 49b8e0501..b89506e52 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -25,12 +25,12 @@ EndScriptData */ #include "AccountMgr.h" #include "CharacterCache.h" #include "Chat.h" +#include "CommandScript.h" #include "GameEventMgr.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Player.h" #include "ReputationMgr.h" -#include "ScriptMgr.h" #include "SpellInfo.h" #include "SpellMgr.h" diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp index 1e387f3e3..3c4cd5b4c 100644 --- a/src/server/scripts/Commands/cs_message.cpp +++ b/src/server/scripts/Commands/cs_message.cpp @@ -24,12 +24,12 @@ EndScriptData */ #include "Channel.h" #include "Chat.h" +#include "CommandScript.h" #include "DatabaseEnv.h" #include "Language.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "World.h" #include "WorldSession.h" diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 42f0f3f2a..52fae57d5 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -21,6 +21,7 @@ #include "CellImpl.h" #include "CharacterCache.h" #include "Chat.h" +#include "CommandScript.h" #include "GameGraveyard.h" #include "GameTime.h" #include "GridNotifiers.h" @@ -29,6 +30,7 @@ #include "IPLocation.h" #include "InstanceSaveMgr.h" #include "LFG.h" +#include "LFGMgr.h" #include "Language.h" #include "MapMgr.h" #include "MiscPackets.h" diff --git a/src/server/scripts/Commands/cs_mmaps.cpp b/src/server/scripts/Commands/cs_mmaps.cpp index cf97bfd28..9c1130071 100644 --- a/src/server/scripts/Commands/cs_mmaps.cpp +++ b/src/server/scripts/Commands/cs_mmaps.cpp @@ -25,6 +25,7 @@ #include "CellImpl.h" #include "Chat.h" +#include "CommandScript.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "MMapFactory.h" @@ -33,7 +34,6 @@ #include "PathGenerator.h" #include "Player.h" #include "PointMovementGenerator.h" -#include "ScriptMgr.h" #include "TargetedMovementGenerator.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index abefda321..aaadedb7b 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -24,12 +24,12 @@ EndScriptData */ #include "AccountMgr.h" #include "Chat.h" +#include "CommandScript.h" #include "ObjectMgr.h" #include "Opcodes.h" #include "Pet.h" #include "Player.h" #include "ReputationMgr.h" -#include "ScriptMgr.h" #include "StringConvert.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index eca1ccdc7..d555e9e0b 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -16,6 +16,7 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "CreatureAI.h" #include "CreatureGroups.h" #include "GameTime.h" @@ -23,7 +24,6 @@ #include "ObjectMgr.h" #include "Pet.h" #include "Player.h" -#include "ScriptMgr.h" #include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand #include "Transport.h" #include diff --git a/src/server/scripts/Commands/cs_pet.cpp b/src/server/scripts/Commands/cs_pet.cpp index c9058b400..30937d5ca 100644 --- a/src/server/scripts/Commands/cs_pet.cpp +++ b/src/server/scripts/Commands/cs_pet.cpp @@ -16,12 +16,12 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "Language.h" #include "Log.h" #include "ObjectMgr.h" #include "Pet.h" #include "Player.h" -#include "ScriptMgr.h" #include "SpellInfo.h" #include "SpellMgr.h" diff --git a/src/server/scripts/Commands/cs_player.cpp b/src/server/scripts/Commands/cs_player.cpp index af7fe6867..acaa520cf 100644 --- a/src/server/scripts/Commands/cs_player.cpp +++ b/src/server/scripts/Commands/cs_player.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CommandScript.h" #include "PlayerCommand.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_player_settings.cpp b/src/server/scripts/Commands/cs_player_settings.cpp index efc5ae603..01ec08fe5 100644 --- a/src/server/scripts/Commands/cs_player_settings.cpp +++ b/src/server/scripts/Commands/cs_player_settings.cpp @@ -16,9 +16,9 @@ */ #include "Chat.h" +#include "CommandScript.h" #include "Player.h" #include "PlayerSettings.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 941e011fb..f02f34d02 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -23,11 +23,11 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "GameTime.h" #include "ObjectMgr.h" #include "Player.h" #include "ReputationMgr.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index a1e177f21..d73ef896b 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "AutobroadcastMgr.h" #include "BattlegroundMgr.h" #include "Chat.h" +#include "CommandScript.h" #include "CreatureTextMgr.h" #include "DisableMgr.h" #include "GameGraveyard.h" diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 69758acb9..bd3ffeaa3 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -24,6 +24,7 @@ EndScriptData */ #include "AchievementMgr.h" #include "Chat.h" +#include "CommandScript.h" #include "Language.h" #include "ObjectAccessor.h" #include "Pet.h" diff --git a/src/server/scripts/Commands/cs_send.cpp b/src/server/scripts/Commands/cs_send.cpp index cc19fba24..cac9cf014 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 "CommandScript.h" #include "DatabaseEnv.h" #include "Item.h" #include "Language.h" @@ -23,7 +24,6 @@ #include "ObjectMgr.h" #include "Pet.h" #include "Player.h" -#include "ScriptMgr.h" #include "Tokenize.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index b7495b409..63f5cf03e 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -23,6 +23,7 @@ EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "Config.h" #include "GameTime.h" #include "GitRevision.h" @@ -32,7 +33,6 @@ #include "MySQLThreading.h" #include "Player.h" #include "Realm.h" -#include "ScriptMgr.h" #include "StringConvert.h" #include "UpdateTime.h" #include "VMapFactory.h" diff --git a/src/server/scripts/Commands/cs_spectator.cpp b/src/server/scripts/Commands/cs_spectator.cpp index e2a5b45a4..e20308249 100644 --- a/src/server/scripts/Commands/cs_spectator.cpp +++ b/src/server/scripts/Commands/cs_spectator.cpp @@ -19,8 +19,8 @@ #include "ArenaSpectator.h" #include "BattlegroundMgr.h" #include "Chat.h" +#include "CommandScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "World.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index 12335e5fd..1264384ac 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 "CommandScript.h" #include "DBCStores.h" #include "DatabaseEnv.h" #include "Group.h" @@ -30,7 +31,6 @@ EndScriptData */ #include "MapMgr.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index da1452c75..ecd3c9b6c 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -24,11 +24,11 @@ EndScriptData */ #include "AccountMgr.h" #include "Chat.h" +#include "CommandScript.h" #include "ObjectMgr.h" #include "Opcodes.h" #include "Player.h" #include "Realm.h" -#include "ScriptMgr.h" #include "TicketMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 089499486..8b5a6c949 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -23,10 +23,10 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "DBCStores.h" #include "Language.h" #include "Player.h" -#include "ScriptMgr.h" using namespace Acore::ChatCommands; diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index 7d4b49342..573d23026 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -23,10 +23,10 @@ Category: commandscripts EndScriptData */ #include "Chat.h" +#include "CommandScript.h" #include "Language.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "WaypointMgr.h" #if AC_COMPILER == AC_COMPILER_GNU diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp index 19a7472e6..bd7109934 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp @@ -16,7 +16,7 @@ */ #include "BattlegroundAV.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" enum Spells diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp index e79d9d13a..c3b59c8f5 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" enum Spells diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp index 0732aca1f..fddb202e8 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp @@ -16,7 +16,7 @@ */ #include "BattlegroundAV.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" enum Spells diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp index 3f3b0ba74..6f4544ae1 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" enum Spells diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp index 3b97ce733..bf868c78c 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp @@ -16,7 +16,7 @@ */ #include "BattlegroundAV.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" enum Yells diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp index f35fa073c..50f7d26fb 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp @@ -16,13 +16,14 @@ */ #include "blackrock_depths.h" +#include "AreaTriggerScript.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "GameTime.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" -#include "WorldSession.h" enum IronhandData { diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp index 9fc630ff1..51f19f74b 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" #include diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp index 896b65704..dadfb58c6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp index 1fa25c3ca..1d0f48145 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_eviscerator.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_eviscerator.cpp index 06973abee..5d12ea5ac 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_eviscerator.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_eviscerator.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp index 3c969778b..df2d91e83 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp index 369941c61..662182983 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp index 86846cddf..cbe77cd85 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_hedrum.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_hedrum.cpp index 83f50d0b8..6861d1b89 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_hedrum.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_hedrum.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp index 68c3cd6c2..afe90c9ad 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp index a35b03d5c..038f2b104 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp index 06891497b..5d2710493 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_okthor.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_okthor.cpp index 8b0052401..c5168332a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_okthor.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_okthor.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp index d3ac86617..cfecdbfdc 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "blackrock_depths.h" 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 6d706d99a..014531fa2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp @@ -16,9 +16,9 @@ */ #include "GameTime.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "blackrock_depths.h" constexpr auto MAX_ENCOUNTER = 6; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp index 1951846e8..02e619627 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp index f0bf32c95..de39ca404 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "blackrock_spire.h" enum Spells @@ -244,3 +245,4 @@ void AddSC_boss_gyth() new boss_gyth(); RegisterSpellScript(spell_gyth_chromatic_protection); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp index a75aca8fc..1875c67fa 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp index 0bcaece06..f80ab90e9 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp index bb18ee33c..66ecf747e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mor_grayhoof.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mor_grayhoof.cpp index bbf40c142..c416371cd 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mor_grayhoof.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mor_grayhoof.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "TaskScheduler.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp index 6bd951658..f9c31a876 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp index 02187b8af..6ef78bb34 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp index 4ca0b2387..631ce29ed 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp index 5c9bdab64..638368194 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_solakar_flamewreath.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_solakar_flamewreath.cpp index 57b76bf01..f820384c8 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_solakar_flamewreath.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_solakar_flamewreath.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp index e4d0c9806..84d3c07ac 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp index d1815f6c6..7c41061e4 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp index 22110c1c5..55ac1f26e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp index 8977f82ec..47f66c506 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp @@ -15,17 +15,21 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" #include "Cell.h" #include "CellImpl.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "GridNotifiers.h" -#include "GridNotifiersImpl.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "ObjectDefines.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "blackrock_spire.h" +#include "GridNotifiersImpl.h" uint32 const DragonspireMobs[3] = { NPC_BLACKHAND_DREADWEAVER, NPC_BLACKHAND_SUMMONER, NPC_BLACKHAND_VETERAN }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp index 6bd29958b..3a50ba724 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -15,12 +15,15 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameObject.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "blackwing_lair.h" enum Say @@ -273,3 +276,4 @@ void AddSC_boss_broodlord() new go_suppression_device(); RegisterSpellScript(spell_suppression_aura); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp index fdf613bcd..d948c1113 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp @@ -15,14 +15,17 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameObject.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Map.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "blackwing_lair.h" enum Emotes @@ -363,3 +366,4 @@ void AddSC_boss_chromaggus() RegisterSpellScript(spell_gen_elemental_shield); RegisterSpellScript(spell_gen_brood_power); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp index 7635294b4..12fab34d1 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackwing_lair.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp index cb8d43b0a..6673d556a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackwing_lair.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp index 99a8434a7..8bbf3d1a3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blackwing_lair.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index fa2596f19..7f73b5b37 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -15,14 +15,16 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameObject.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "MotionMaster.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "TemporarySummon.h" #include "blackwing_lair.h" @@ -1305,3 +1307,4 @@ void AddSC_boss_nefarian() RegisterSpellScript(spell_shadowblink); RegisterSpellScript(spell_spawn_drakonid); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp index c61e28444..98f656c3c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp @@ -15,10 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "blackwing_lair.h" enum Say @@ -347,3 +349,4 @@ void AddSC_boss_razorgore() new go_orb_of_domination(); new spell_egg_event(); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp index 886800336..45cf9d1f0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp @@ -15,13 +15,14 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "ObjectAccessor.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "blackwing_lair.h" constexpr float aNefariusSpawnLoc[4] = { -7466.16f, -1040.80f, 412.053f, 2.14675f }; @@ -327,3 +328,4 @@ void AddSC_boss_vaelastrasz() new boss_vaelastrasz(); RegisterSpellScript(spell_vael_burning_adrenaline); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index a8aac9757..d87ddbc5c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -15,18 +15,19 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" #include "EventMap.h" #include "GameObject.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Map.h" #include "MotionMaster.h" #include "Player.h" -#include "ScriptMgr.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TemporarySummon.h" #include "blackwing_lair.h" - #include DoorData const doorData[] = @@ -541,3 +542,4 @@ void AddSC_instance_blackwing_lair() new spell_bwl_shadowflame(); new at_orb_of_command(); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp index cec746870..363c8151c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "molten_core.h" enum Emotes @@ -250,3 +251,4 @@ void AddSC_boss_baron_geddon() new spell_geddon_inferno(); new spell_geddon_armageddon(); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp index 2fb8992c3..0ef52588e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp @@ -16,12 +16,13 @@ */ #include "Containers.h" +#include "CreatureScript.h" #include "ObjectAccessor.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "molten_core.h" enum Texts @@ -253,3 +254,4 @@ void AddSC_boss_garr() new spell_garr_separation_nexiety(); new spell_garr_frenzy(); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp index 6076addf7..ffdcb5c56 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "molten_core.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp index 665cd5258..0dea2ea3a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "ObjectAccessor.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "molten_core.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp index 2df1b4852..384b81897 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "molten_core.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp index 0a2d75365..12aca38e7 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "molten_core.h" enum Texts @@ -177,3 +178,4 @@ void AddSC_boss_magmadar() // Spells new spell_magmadar_lava_bomb(); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp index 042fe52a8..3c12600f3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "ObjectAccessor.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "molten_core.h" enum Texts @@ -694,3 +695,4 @@ void AddSC_boss_majordomo() new spell_majordomo_separation_nexiety(); new spell_summon_ragnaros(); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp index 9caa24644..95049716c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "molten_core.h" enum Texts @@ -563,3 +564,4 @@ void AddSC_boss_ragnaros() RegisterSpellScript(spell_ragnaros_lava_burst_randomizer); RegisterSpellScript(spell_ragnaros_summon_sons_of_flame); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp index eb14b8149..6ef919b52 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "molten_core.h" enum Spells @@ -197,3 +198,4 @@ void AddSC_boss_shazzrah() // Spells new spell_shazzrah_gate_dummy(); } + diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp index d40447338..942a22f61 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "molten_core.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp index 45a2de64e..a54192a9a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "TemporarySummon.h" #include "molten_core.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.cpp index 1cda09c9e..f25149e66 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ -#include "molten_core.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" +#include "molten_core.h" enum Texts { @@ -273,3 +274,4 @@ void AddSC_molten_core() // Spells new spell_mc_play_dead(); } + diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp index 10697610f..44c7b6839 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "deadmines.h" diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index 27371a4b5..3f099e499 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "deadmines.h" class instance_deadmines : public InstanceMapScript diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index a67da8176..6302f44b5 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -15,11 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "gnomeregan.h" class instance_gnomeregan : public InstanceMapScript @@ -184,3 +186,4 @@ void AddSC_instance_gnomeregan() new npc_kernobee(); new spell_gnomeregan_radiation_bolt(); } + diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp index 6ff967c87..e45aa6d16 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_chess_event.cpp @@ -15,20 +15,17 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" -#include "ScriptedEscortAI.h" -#include "ScriptedFollowerAI.h" #include "ScriptedGossip.h" -#include "SpellAuras.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Unit.h" #include "World.h" #include "karazhan.h" - #include enum EchoOfMedivhGossipOptions @@ -2090,3 +2087,4 @@ void AddSC_boss_chess_event() RegisterSpellScript(spell_control_piece); } + diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index c48253a90..59dfb2990 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "karazhan.h" diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp index 353b669e5..cd9de7f46 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "karazhan.h" diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 82061fcb8..d2d361fe0 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Unit.h" #include "karazhan.h" @@ -415,3 +416,4 @@ void AddSC_boss_attumen() RegisterKarazhanCreatureAI(boss_attumen); RegisterSpellScript(spell_midnight_fixate); } + diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index 8456ac1d8..dbbc87cdd 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "karazhan.h" enum Yells @@ -282,3 +283,4 @@ void AddSC_boss_moroes() RegisterKarazhanCreatureAI(boss_moroes); RegisterSpellScript(spell_moroes_vanish); } + diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index 4b128ad96..77c0f379b 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "karazhan.h" enum Emotes @@ -336,3 +337,4 @@ void AddSC_boss_netherspite() RegisterKarazhanCreatureAI(boss_netherspite); RegisterSpellScript(spell_nether_portal_perseverence); } + diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index 156bb7ecc..e53e28c32 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "TaskScheduler.h" #include "karazhan.h" diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 59a7687ff..10d03fa83 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "karazhan.h" enum PrinceSay @@ -396,3 +397,4 @@ void AddSC_boss_malchezaar() RegisterKarazhanCreatureAI(npc_netherspite_infernal); RegisterSpellScript(spell_malchezaar_enfeeble); } + diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_servant_quarters.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_servant_quarters.cpp index 4dd8dbb76..640201037 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_servant_quarters.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_servant_quarters.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "karazhan.h" diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index aef6851a6..465f2d432 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -15,13 +15,15 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "GameObject.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "karazhan.h" @@ -474,3 +476,4 @@ void AddSC_boss_shade_of_aran() RegisterSpellScript(spell_flamewreath_aura); new at_karazhan_atiesh_aran(); } + diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index 956bd2b6f..4ce157d35 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "karazhan.h" diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 5b4f52ba8..42af93dd6 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -22,8 +22,8 @@ SDComment: Oz, Hood, and RAJ event implemented. RAJ event requires more testing. SDCategory: Karazhan EndScriptData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellInfo.h" diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index ed6cca1bf..447c6a375 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -17,12 +17,13 @@ #include "Creature.h" #include "GameObject.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Map.h" #include "Player.h" -#include "ScriptMgr.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "karazhan.h" const Position OptionalSpawn[] = @@ -626,3 +627,4 @@ void AddSC_instance_karazhan() new spell_karazhan_overload(); new spell_karazhan_blink(); } + diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 34a6deb29..410e262d1 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -15,6 +15,17 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" +#include "SpellAuraEffects.h" +#include "SpellAuras.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "karazhan.h" /* ScriptData SDName: Karazhan SD%Complete: 100 @@ -28,16 +39,6 @@ npc_berthold npc_image_of_medivh EndContentData */ -#include "karazhan.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedEscortAI.h" -#include "ScriptedGossip.h" -#include "SpellAuraEffects.h" -#include "SpellAuras.h" -#include "SpellScript.h" - enum Spells { // Barnes diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index 8a5b4404e..9a0ac2d6b 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Opcodes.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "magisters_terrace.h" enum Says @@ -310,3 +311,4 @@ void AddSC_boss_felblood_kaelthas() RegisterMagistersTerraceCreatureAI(boss_felblood_kaelthas); RegisterSpellScript(spell_mt_phoenix_burn); } + diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index 9aafcaa42..2fa74afae 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "magisters_terrace.h" diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index 6abca3627..07ae7403f 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "magisters_terrace.h" diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index 3fce92845..abcf65c0e 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "magisters_terrace.h" diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index e09413bd4..fb72da90e 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "magisters_terrace.h" diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index ee5e4f252..0d55b9f4c 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -16,17 +16,19 @@ */ #include "CombatAI.h" +#include "CreatureScript.h" #include "CreatureTextMgr.h" +#include "GameObjectScript.h" #include "MoveSplineInit.h" #include "ObjectMgr.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" /*###### @@ -1255,3 +1257,4 @@ void AddSC_the_scarlet_enclave_c1() RegisterSpellScript(spell_death_knight_initiate_visual); } + diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 6ee4ac80d..8e936fddc 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -16,9 +16,9 @@ */ #include "CombatAI.h" +#include "CreatureScript.h" #include "CreatureTextMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "SpellInfo.h" diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp index 7504b35cf..746f18d9c 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp @@ -15,10 +15,10 @@ * with this program. If not, see . */ -#include "Player.h" -#include "ScriptMgr.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "Unit.h" class spell_q12779_an_end_to_all_things : public SpellScript { @@ -40,3 +40,4 @@ void AddSC_the_scarlet_enclave_c3() { RegisterSpellScript(spell_q12779_an_end_to_all_things); } + diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 91a926628..e324dd7f8 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" enum LightOfDawnSays { @@ -1248,3 +1249,4 @@ void AddSC_the_scarlet_enclave_c5() new spell_chapter5_light_of_dawn_aura(); new spell_chapter5_rebuke(); } + diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp index 8d48baefa..67e24ba1a 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" /*#### diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index edfa3fb6e..9be35e30b 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SmartAI.h" diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp index 597cdc884..87a22ba7c 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Map.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "scholomance.h" diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp index b29c2e291..110bedfaf 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp @@ -15,10 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameObjectAI.h" #include "MoveSplineInit.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "scholomance.h" diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp index 9929cb8f2..76af8ead4 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "scholomance.h" @@ -212,3 +213,4 @@ void AddSC_boss_kormok() RegisterSpellScript(spell_kormok_summon_bone_mages); RegisterSpellScript(spell_kormok_summon_bone_minions); } + diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp index 3bafef4d7..d13d6bccb 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp @@ -15,13 +15,15 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameObjectAI.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "scholomance.h" Position KirtonosSpawn = Position(315.028, 70.5385, 102.15, 0.385971); @@ -462,3 +464,4 @@ void AddSC_instance_scholomance() new spell_scholomance_boon_of_life(); new npc_scholomance_occultist(); } + diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp index 226ebce73..976383abd 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp @@ -15,17 +15,18 @@ * with this program. If not, see . */ -#include "GridNotifiersImpl.h" +#include "CreatureScript.h" #include "Group.h" #include "LFGMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "shadowfang_keep.h" +#include "GridNotifiersImpl.h" enum ApothecarySpells { @@ -530,3 +531,4 @@ void AddSC_boss_apothecary_hummel() RegisterSpellScript(spell_apothecary_perfume_spill); RegisterSpellScript(spell_apothecary_cologne_spill); } + diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index 0e4b6ce5e..6d7a62b31 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" +#include "SpellScriptLoader.h" #include "TemporarySummon.h" #include "shadowfang_keep.h" @@ -234,3 +235,4 @@ void AddSC_instance_shadowfang_keep() new spell_shadowfang_keep_haunting_spirits(); new spell_shadowfang_keep_forsaken_skills(); } + diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp index 44fd7acb1..1f51567b6 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp @@ -15,10 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "InstanceScript.h" #include "ObjectAccessor.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "TaskScheduler.h" #include "stratholme.h" diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_jarien_and_sothos.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_jarien_and_sothos.cpp index 91a353b99..6db2b0a58 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_jarien_and_sothos.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_jarien_and_sothos.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "TaskScheduler.h" #include "stratholme.h" diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 2de15bdf7..910e648d3 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "stratholme.h" diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp index e73bb8534..0dc316c08 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp @@ -15,12 +15,14 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" #include "CreatureAI.h" #include "EventMap.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Unit.h" #include "sunken_temple.h" @@ -300,3 +302,4 @@ void AddSC_instance_sunken_temple() new spell_temple_of_atal_hakkar_hex_of_jammal_an(); new spell_temple_of_atal_hakkar_awaken_the_soulflayer(); } + diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index 6158571a0..3124551d6 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "WorldSession.h" #include "sunwell_plateau.h" @@ -548,3 +550,4 @@ void AddSC_boss_brutallus() new spell_brutallus_burn(); new AreaTrigger_at_sunwell_madrigosa(); } + diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index ddb88fa1b..63e0f862b 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" +#include "SpellScriptLoader.h" #include "sunwell_plateau.h" enum Quotes @@ -524,3 +526,4 @@ void AddSC_boss_eredar_twins() new spell_eredar_twins_blaze(); new AreaTrigger_at_sunwell_eredar_twins(); } + diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index 03ba292b5..a3fb4fe85 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -17,9 +17,10 @@ #include "Cell.h" #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "sunwell_plateau.h" enum Yells @@ -585,3 +586,4 @@ void AddSC_boss_felmyst() new spell_felmyst_fog_of_corruption_charm(); new spell_felmyst_open_brutallus_back_doors(); } + diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index f76d54b5a..8ba9ecc2e 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "WorldSession.h" #include "sunwell_plateau.h" @@ -779,3 +780,4 @@ void AddSC_boss_kalecgos() new spell_kalecgos_spectral_realm_dummy(); new spell_kalecgos_spectral_realm(); } + diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 7840ff702..954ff836d 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "CreatureTextMgr.h" #include "MoveSplineInit.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "sunwell_plateau.h" enum Yells @@ -1343,3 +1344,4 @@ void AddSC_boss_kiljaeden() new spell_kiljaeden_armageddon_missile(); new spell_kiljaeden_dragon_breath(); } + diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index e0ee6a0b1..46293dbd1 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" +#include "SpellScriptLoader.h" #include "sunwell_plateau.h" enum Spells @@ -517,3 +518,4 @@ void AddSC_boss_muru() new spell_entropius_void_zone_visual(); new spell_entropius_black_hole_effect(); } + diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index 5e3e6e2e3..71cf4e99d 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" +#include "SpellScriptLoader.h" #include "sunwell_plateau.h" DoorData const doorData[] = @@ -303,3 +304,4 @@ void AddSC_instance_sunwell_plateau() new instance_sunwell_plateau(); new spell_cataclysm_breath(); } + diff --git a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp index f390c3acd..bf9168f97 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" class instance_the_stockade : public InstanceMapScript { diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index f1a69a4ef..32d9613a7 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -16,9 +16,10 @@ */ #include "CreatureAI.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "uldaman.h" enum Spells @@ -252,3 +253,4 @@ void AddSC_instance_uldaman() new spell_uldaman_stoned(); new spell_uldaman_boss_agro_archaedas(); } + diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 97a0d1045..25f92a7e8 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -26,9 +26,9 @@ EndScriptData */ #include "Cell.h" #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Weather.h" #include "zulaman.h" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index de8b05dbd..6dd0b436c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "zulaman.h" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 1253017b8..8d357de1e 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -15,6 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "ScriptedCreature.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "zulaman.h" /* ScriptData SDName: Boss_Hex_Lord_Malacrass SD%Complete: @@ -22,12 +28,6 @@ SDComment: SDCategory: Zul'Aman EndScriptData */ -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" -#include "zulaman.h" - enum Says { SAY_AGGRO = 0, @@ -996,3 +996,4 @@ void AddSC_boss_hex_lord_malacrass() new boss_alyson_antille(); new spell_hexlord_unstable_affliction(); } + diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 172bc17db..4ef7cb169 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -23,9 +23,9 @@ SDCategory: Zul'Aman EndScriptData */ #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "zulaman.h" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index 0c03cc52a..5631b5edc 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -23,9 +23,9 @@ SDCategory: Zul'Aman EndScriptData */ #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "zulaman.h" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 0f464806c..f03e61f26 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -21,7 +21,7 @@ SD%Complete: 85% SDComment: EndScriptData */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "zulaman.h" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index e6934009f..ea7198184 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -22,9 +22,9 @@ SDComment: SDCategory: Zul'Aman EndScriptData */ +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "TemporarySummon.h" #include "zulaman.h" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index ab5719b64..da0969143 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -27,8 +27,8 @@ npc_forest_frog EndContentData */ #include "zulaman.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellInfo.h" diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp index d618c9f0a..fde23a807 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -24,7 +24,8 @@ TCComment: Can't test LOS until mmaps. TCCategory: Zul'Gurub EndScriptData */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "zulgurub.h" diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp index 9e917e53d..2da3f6f0b 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp @@ -15,6 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "zulgurub.h" /* ScriptData SDName: Boss_Gahz'ranka SD%Complete: 85 @@ -22,11 +27,6 @@ SDComment: Massive Geyser with knockback not working. Spell buggy. SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SpellScript.h" -#include "zulgurub.h" - enum Spells { SPELL_FROSTBREATH = 16099, @@ -202,3 +202,4 @@ void AddSC_boss_gahzranka() RegisterSpellScript(spell_gahzranka_slam); RegisterSpellScript(spell_pagles_point_cast); } + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp index 7e95c16e6..782730498 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp @@ -22,7 +22,7 @@ SDComment: SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "zulgurub.h" diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp index 8c9136957..9efa0e05d 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp @@ -15,6 +15,13 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "zulgurub.h" /* Name: Boss_Hakkar %Complete: 95 @@ -22,12 +29,6 @@ Comment: Blood siphon spell buggy cause of Core Issue. Category: Zul'Gurub */ -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SpellScript.h" -#include "zulgurub.h" - enum Says { SAY_AGGRO = 0, @@ -412,3 +413,4 @@ void AddSC_boss_hakkar() RegisterSpellScript(spell_blood_siphon); RegisterSpellScript(spell_hakkar_power_down); } + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp index b753acf8b..280012a91 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "zulgurub.h" enum Spells @@ -168,3 +169,4 @@ void AddSC_boss_hazzarah() RegisterZulGurubCreatureAI(boss_hazzarah); RegisterSpellScript(spell_chain_burn); } + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index cd8c177d0..09fb2de49 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameObjectAI.h" #include "MoveSplineInit.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SmartAI.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "WaypointMgr.h" #include "zulgurub.h" @@ -423,3 +424,4 @@ void AddSC_boss_jeklik() RegisterCreatureAI(npc_batrider); RegisterSpellScript(spell_batrider_bomb); } + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp index 8f3f26d7c..c9b6f89b4 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "zulgurub.h" @@ -321,3 +322,4 @@ void AddSC_boss_jindo() RegisterSpellScript(spell_random_aggro); RegisterSpellScript(spell_delusions_of_jindo); } + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index 5dc93c772..4b5049da4 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "zulgurub.h" @@ -801,3 +802,4 @@ void AddSC_boss_mandokir() RegisterSpellScript(spell_mandokir_charge); RegisterSpellScript(spell_threatening_gaze_charge); } + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp index 3e3dc1e73..0b1368092 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameObjectAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "zulgurub.h" @@ -342,3 +343,4 @@ void AddSC_boss_marli() RegisterSpellScript(spell_enveloping_webs); RegisterSpellScript(spell_marli_transform); } + diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp index 5ed123a2e..6445a79fd 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp @@ -22,7 +22,7 @@ SDComment: SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "zulgurub.h" diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index 839dc5fef..60393e412 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SharedDefines.h" #include "TaskScheduler.h" diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp index 959c50dc1..091bff795 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "Spell.h" #include "zulgurub.h" diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp index 771424b66..726a0473f 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp @@ -22,7 +22,7 @@ SDComment: SDCategory: Zul'Gurub EndScriptData */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "zulgurub.h" diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp index 91734be85..d1b6f2aae 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp @@ -22,9 +22,11 @@ SDComment: Missing reset function after killing a boss for Ohgan, Thekal. SDCategory: Zul'Gurub EndScriptData */ +#include "GameEventMgr.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "zulgurub.h" DoorData const doorData[] = diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp index b8c390fe2..fd25a4e76 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp @@ -16,8 +16,8 @@ */ #include "GridNotifiers.h" -#include "ScriptMgr.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" enum Spells { @@ -56,3 +56,4 @@ void AddSC_zulgurub() { RegisterSpellScript(spell_axe_flurry); } + diff --git a/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp index 0f9ef5252..3b686daa5 100644 --- a/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp @@ -25,7 +25,7 @@ EndScriptData */ /* ContentData EndContentData */ -//#include "ScriptMgr.h" +//#include "CreatureScript.h" //#include "ScriptedCreature.h" /*void AddSC_alterac_mountains() diff --git a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp index cab0ece62..459785d1e 100644 --- a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp @@ -26,8 +26,8 @@ EndScriptData */ npc_professor_phizzlethorpe EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp index 97d0de989..034698592 100644 --- a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp @@ -20,11 +20,12 @@ Blasted_Lands Quest support: 3628. Teleporter to Rise of the Defiler. */ +#include "CreatureScript.h" #include "Group.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" /*##### # spell_razelikh_teleport_group diff --git a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp index 6ebb65ac5..6e4c11e7d 100644 --- a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp +++ b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp index 4eae86200..2accdfa58 100644 --- a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "TaskScheduler.h" diff --git a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp index 322a1d0f9..827d6d8e5 100644 --- a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp @@ -29,13 +29,12 @@ npc_darrowshire_spirit npc_tirion_fordring EndContentData */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellInfo.h" -#include "WorldSession.h" // Ours diff --git a/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp b/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp index 4936c6b39..45184f838 100644 --- a/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp +++ b/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp @@ -17,9 +17,9 @@ #include "Common.h" #include "CreatureGroups.h" +#include "CreatureScript.h" #include "GameEventMgr.h" #include "ObjectAccessor.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" enum COG_Paths diff --git a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp index eea437bcd..c715e3542 100644 --- a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp @@ -16,7 +16,7 @@ */ #include "Common.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" enum Partygoer_Pather diff --git a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp index c5bc2e3d2..ca2941346 100644 --- a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "ObjectGuid.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp index c4e1eabed..84a27c6c0 100644 --- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp @@ -26,8 +26,8 @@ EndScriptData */ npc_rinji EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp index cc8024d91..54d31091a 100644 --- a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp @@ -15,6 +15,14 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "PassiveAI.h" +#include "Pet.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "SpellInfo.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* ScriptData SDName: Isle_of_Queldanas SD%Complete: 100 @@ -27,14 +35,6 @@ npc_converted_sentry npc_greengill_slave EndContentData */ -#include "PassiveAI.h" -#include "Pet.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SpellInfo.h" -#include "SpellScript.h" - /*###### OUR: ######*/ enum ThalorienNpcs @@ -698,3 +698,4 @@ void AddSC_isle_of_queldanas() // THEIR: new npc_greengill_slave(); } + diff --git a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp index 0f03cee66..bbf103752 100644 --- a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp @@ -21,8 +21,8 @@ SD%Complete: 100% SDComment: Support for quest 219. Script Data End */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp index 93e6573d3..f11a572ab 100644 --- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp @@ -27,9 +27,9 @@ npc_deathstalker_erland pyrewood_ambush EndContentData */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp index 1634b59e3..5a4ec3eba 100644 --- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp @@ -30,8 +30,8 @@ npc_marzon_silent_blade npc_lord_gregor_lescovar EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp index 9085e2be3..1b4f06fe1 100644 --- a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp +++ b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp @@ -28,8 +28,8 @@ go_mausoleum_door go_mausoleum_trigger EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" /*###### diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index 354c2bd97..b53a079bd 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -28,15 +28,16 @@ npc_highborne_lamenter npc_parqual_fintallas EndContentData */ +#include "CreatureScript.h" #include "ObjectAccessor.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" /*###### ## npc_lady_sylvanas_windrunner diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp index b7e675402..aedde8f42 100644 --- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp @@ -27,11 +27,9 @@ npc_the_scourge_cauldron npc_andorhal_tower EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "WorldSession.h" /*###### ## npc_the_scourge_cauldron diff --git a/src/server/scripts/EasternKingdoms/zone_westfall.cpp b/src/server/scripts/EasternKingdoms/zone_westfall.cpp index 870cb76c9..4b022c7a7 100644 --- a/src/server/scripts/EasternKingdoms/zone_westfall.cpp +++ b/src/server/scripts/EasternKingdoms/zone_westfall.cpp @@ -26,8 +26,8 @@ EndScriptData */ npc_daphne_stilwell EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp index a4e84a4bd..6575b2dfb 100644 --- a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp @@ -27,8 +27,8 @@ npc_mikhail npc_tapoke_slim_jahn EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/Events/brewfest.cpp b/src/server/scripts/Events/brewfest.cpp index 53c5ddded..9dcb005c5 100644 --- a/src/server/scripts/Events/brewfest.cpp +++ b/src/server/scripts/Events/brewfest.cpp @@ -16,19 +16,21 @@ */ #include "CellImpl.h" +#include "CreatureScript.h" #include "GameEventMgr.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" #include "GameTime.h" #include "GridNotifiers.h" #include "Group.h" #include "LFGMgr.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" /////////////////////////////////////// diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp index 556c95310..572e7caa5 100644 --- a/src/server/scripts/Events/childrens_week.cpp +++ b/src/server/scripts/Events/childrens_week.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" diff --git a/src/server/scripts/Events/hallows_end.cpp b/src/server/scripts/Events/hallows_end.cpp index 412d71231..f0905929f 100644 --- a/src/server/scripts/Events/hallows_end.cpp +++ b/src/server/scripts/Events/hallows_end.cpp @@ -16,17 +16,19 @@ */ #include "CellImpl.h" +#include "CreatureScript.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" #include "GossipDef.h" #include "GridNotifiers.h" #include "Group.h" #include "LFGMgr.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" /// @todo: this import is not necessary for compilation and marked as unused by the IDE diff --git a/src/server/scripts/Events/love_in_air.cpp b/src/server/scripts/Events/love_in_air.cpp index 6141b180d..08f402f83 100644 --- a/src/server/scripts/Events/love_in_air.cpp +++ b/src/server/scripts/Events/love_in_air.cpp @@ -17,13 +17,13 @@ #include "Cell.h" #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" #include "Group.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" -#include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" /////////////////////////////////////// ////// GOS @@ -496,3 +496,4 @@ void AddSC_event_love_in_the_air() RegisterSpellScript(spell_love_is_in_the_air_romantic_picnic); RegisterSpellScript(spell_gen_aura_service_uniform); } + diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 1d1b12a6b..e56636865 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -15,14 +15,16 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "GameTime.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Spell.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include enum eBonfire @@ -893,3 +895,4 @@ void AddSC_event_midsummer_scripts() RegisterSpellScript(spell_midsummer_juggling_torch); RegisterSpellScript(spell_midsummer_torch_catch); } + diff --git a/src/server/scripts/Events/pilgrims_bounty.cpp b/src/server/scripts/Events/pilgrims_bounty.cpp index ef165e564..0327a3d40 100644 --- a/src/server/scripts/Events/pilgrims_bounty.cpp +++ b/src/server/scripts/Events/pilgrims_bounty.cpp @@ -15,12 +15,14 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" #include "CombatAI.h" +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" /////////////////////////////////////// @@ -673,3 +675,4 @@ void AddSC_event_pilgrims_end_scripts() new achievement_pb_pilgrims_peril(); new achievement_pb_terokkar_turkey_time(); } + diff --git a/src/server/scripts/Events/winter_veil.cpp b/src/server/scripts/Events/winter_veil.cpp index 4c9961032..c87f5c2bb 100644 --- a/src/server/scripts/Events/winter_veil.cpp +++ b/src/server/scripts/Events/winter_veil.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameEventMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" /////////////////////////////// // SPELLS @@ -265,3 +266,4 @@ void AddSC_event_winter_veil_scripts() RegisterSpellScript(spell_winter_veil_racer_slam_hit); RegisterSpellScript(spell_winter_veil_shoot_air_rifle); } + diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp index c1207cb3a..280e5b05b 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "blackfathom_deeps.h" class instance_blackfathom_deeps : public InstanceMapScript diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index e349dedf0..b8f078695 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "hyjal.h" #include "hyjal_trash.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 569ae5c5c..df544d935 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -15,6 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "SpellAuras.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "hyjal.h" /* ScriptData SDName: Boss_Archimonde SD%Complete: 85 @@ -22,13 +29,6 @@ SDComment: Doomfires not completely offlike due to core limitations for random m SDCategory: Caverns of Time, Mount Hyjal EndScriptData */ -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SpellAuras.h" -#include "SpellScript.h" -#include "hyjal.h" - enum Texts { SAY_AGGRO = 1, @@ -789,3 +789,4 @@ void AddSC_boss_archimonde() new npc_doomfire_targetting(); new npc_ancient_wisp(); } + diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index 6fbdbaa29..cc3e8fc35 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "hyjal.h" #include "hyjal_trash.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp index f5f4e17d9..b5b3b63a8 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "hyjal.h" #include "hyjal_trash.h" @@ -228,3 +229,4 @@ void AddSC_boss_kazrogal() new boss_kazrogal(); new spell_mark_of_kazrogal(); } + diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp index cd3ee4526..49590d280 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "hyjal.h" #include "hyjal_trash.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp index 16e06f17d..261cf8ca1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp @@ -28,8 +28,8 @@ npc_thrall npc_tyrande_whisperwind EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "hyjalAI.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index 51d059dd2..e883f1c20 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -16,7 +16,7 @@ */ #include "hyjal_trash.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "hyjal.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 0c4dab7ab..b0cc5f6f9 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -23,9 +23,10 @@ SDCategory: Caverns of Time, Mount Hyjal EndScriptData */ #include "Chat.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Opcodes.h" -#include "ScriptMgr.h" #include "WorldPacket.h" #include "hyjal_trash.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp index 84c7a97c6..f429e5a47 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "culling_of_stratholme.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp index cfad4392f..c815ce3fd 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "culling_of_stratholme.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp index 1979946d5..065224bdc 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "culling_of_stratholme.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp index 0f60e28c0..8a87485c1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "culling_of_stratholme.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp index 94ddd4a2d..6ae04d96a 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "culling_of_stratholme.h" enum Spells @@ -197,3 +198,4 @@ void AddSC_boss_salramm() new boss_salramm(); new spell_boss_salramm_steal_flesh(); } + 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 00f43d616..cc94d7dc0 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -16,9 +16,9 @@ */ #include "culling_of_stratholme.h" +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp index 001fbcb5a..9c3779987 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "CreatureTextMgr.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "TemporarySummon.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp index 6082152a4..5eb5eeb08 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "old_hillsbrad.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp index 8aa0d26b7..2bf4030a5 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "old_hillsbrad.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_lieutenant_drake.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_lieutenant_drake.cpp index 0dffc7040..99c4cbfa3 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_lieutenant_drake.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_lieutenant_drake.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "MoveSplineInit.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SmartScriptMgr.h" #include "old_hillsbrad.h" 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 fdf579cc5..002890dde 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "EventMap.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "old_hillsbrad.h" static Position const instancePositions[INSTANCE_POSITIONS_COUNT] = diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp index 5d698d960..8745dc128 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp @@ -16,8 +16,8 @@ */ #include "old_hillsbrad.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp index bcfbcfb9a..2a21d7205 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_black_morass.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp index 98a5d43ef..3f2aaaf13 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_black_morass.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp index 7b161e05f..b5ec43ce7 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_black_morass.h" 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 5a2b46316..ab8cd45da 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 @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "TemporarySummon.h" 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 4efa7e2fb..62eb71097 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ -#include "the_black_morass.h" +#include "CreatureScript.h" #include "MoveSplineInit.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SmartAI.h" +#include "SpellScriptLoader.h" +#include "the_black_morass.h" enum medivhMisc { @@ -472,3 +473,4 @@ void AddSC_the_black_morass() RegisterSpellScript(spell_black_morass_corrupt_medivh); } + diff --git a/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp b/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp index e81a7a565..94107fa06 100644 --- a/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp +++ b/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "TaskScheduler.h" #include "dire_maul.h" diff --git a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp index ab34bc3ff..fdf47189b 100644 --- a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp +++ b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "dire_maul.h" class instance_dire_maul : public InstanceMapScript diff --git a/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp b/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp index 3d8bffce2..02f1b708b 100644 --- a/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp +++ b/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "maraudon.h" class instance_maraudon : public InstanceMapScript diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp index 1b0967efb..3564bc880 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "onyxias_lair.h" diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp index 570e29e9d..7b6872bf0 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "InstanceMapScript.h" #include "ScriptedCreature.h" #include "onyxias_lair.h" diff --git a/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp b/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp index 5172ad96e..98f4025ac 100644 --- a/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp +++ b/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" class instance_ragefire_chasm : public InstanceMapScript { diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp index 04e8f6ab9..e12dfb5be 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "razorfen_downs.h" class instance_razorfen_downs : public InstanceMapScript diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp index 3033156a2..8a50b36cc 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp @@ -18,10 +18,10 @@ #include "razorfen_downs.h" #include "Cell.h" #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp index 6aa5288e9..b572610bc 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" class instance_razorfen_kraul : public InstanceMapScript { diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp index f0af04f5f..cb0991cb9 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ruins_of_ahnqiraj.h" enum Spells @@ -427,3 +428,4 @@ void AddSC_boss_ayamiss() RegisterSpellScriptWithArgs(spell_gen_ayamiss_swarmer_loop, "spell_gen_ayamiss_swarmer_loop_2", (NPC_HIVEZARA_SWARMER + 6) * 10); RegisterSpellScriptWithArgs(spell_gen_ayamiss_swarmer_loop, "spell_gen_ayamiss_swarmer_loop_3", (NPC_HIVEZARA_SWARMER + 7) * 10); } + diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp index b7bb08f02..ac1a5896c 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "ruins_of_ahnqiraj.h" @@ -270,3 +271,4 @@ void AddSC_boss_buru() RegisterRuinsOfAhnQirajCreatureAI(npc_buru_egg); RegisterSpellScript(spell_egg_explosion); } + diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp index cd763ae20..7938f9b75 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "CreatureTextMgr.h" #include "GameObjectAI.h" -#include "ScriptMgr.h" +#include "GameObjectScript.h" #include "ScriptedCreature.h" #include "TaskScheduler.h" #include "ruins_of_ahnqiraj.h" diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp index b788415f6..ab12a3e82 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ruins_of_ahnqiraj.h" enum Texts @@ -203,3 +204,4 @@ void AddSC_boss_moam() RegisterSpellScript(spell_moam_mana_drain_filter); RegisterSpellScript(spell_moam_summon_mana_fiends); } + diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index af9dde742..b43894d2d 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -15,14 +15,16 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" #include "MiscPackets.h" #include "Opcodes.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "ruins_of_ahnqiraj.h" diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp index 18d689262..8b6646486 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SmartAI.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ruins_of_ahnqiraj.h" enum Yells @@ -381,3 +382,4 @@ void AddSC_boss_rajaxx() RegisterSpellScript(spell_rajaxx_thundercrash); RegisterRuinsOfAhnQirajCreatureAI(npc_general_andorov); } + diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp index b51e3b68b..15168742c 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp @@ -16,9 +16,10 @@ */ #include "CreatureGroups.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "TaskScheduler.h" #include "ruins_of_ahnqiraj.h" diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp index e6fa818dd..80d7390a3 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ruins_of_ahnqiraj.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "ruins_of_ahnqiraj.h" enum Spells { @@ -160,3 +161,4 @@ void AddSC_ruins_of_ahnqiraj() RegisterRuinsOfAhnQirajCreatureAI(npc_obsidian_destroyer); RegisterSpellScript(spell_drain_mana); } + diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp index 95bb8ecc4..323d4af42 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "temple_of_ahnqiraj.h" enum Spells @@ -489,3 +490,4 @@ void AddSC_bug_trio() RegisterSpellScript(spell_vem_knockback); RegisterSpellScript(spell_vem_vengeance); } + diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 4d42a76b8..5555b1538 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -15,6 +15,13 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "temple_of_ahnqiraj.h" /* ScriptData SDName: Boss_Cthun SD%Complete: 95 @@ -22,12 +29,6 @@ SDComment: Darkglare tracking issue SDCategory: Temple of Ahn'Qiraj EndScriptData */ -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SpellScript.h" -#include "temple_of_ahnqiraj.h" - enum Spells { // ***** Main Phase 1 ******** @@ -1053,3 +1054,4 @@ void AddSC_boss_cthun() new at_cthun_stomach_exit(); new at_cthun_center(); } + diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp index 18bdc3f3d..b07aca899 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "temple_of_ahnqiraj.h" diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp index 974f3e960..943a2d056 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "temple_of_ahnqiraj.h" enum Emotes @@ -184,3 +185,4 @@ void AddSC_boss_huhuran() RegisterSpellScript(spell_huhuran_wyvern_sting); RegisterSpellScript(spell_huhuran_poison_bolt); } + diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp index b3ff6485c..4468cab45 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp @@ -17,10 +17,10 @@ #include "Cell.h" #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "temple_of_ahnqiraj.h" diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp index bcf7496c3..4b4277224 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "temple_of_ahnqiraj.h" diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index 578b7b763..cb8a231a6 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "temple_of_ahnqiraj.h" enum Yells @@ -260,3 +261,4 @@ void AddSC_boss_skeram() RegisterTempleOfAhnQirajCreatureAI(boss_skeram); RegisterSpellScript(spell_skeram_arcane_explosion); } + diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index cc47b7d93..d0f96d03b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -15,10 +15,12 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "temple_of_ahnqiraj.h" enum Spells @@ -485,3 +487,4 @@ void AddSC_boss_twinemperors() new at_twin_emperors(); RegisterSpellScript(spell_mutate_explode_bug); } + diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp index 53e1506b5..3f813297c 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "temple_of_ahnqiraj.h" enum Spells @@ -419,3 +420,4 @@ void AddSC_boss_viscidus() RegisterSpellScript(spell_explode_trigger); RegisterSpellScript(spell_summon_toxin_slime); } + diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index daa2c2e4e..2f309aa4b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -16,9 +16,10 @@ */ #include "CreatureGroups.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "TaskScheduler.h" #include "temple_of_ahnqiraj.h" diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp index 7a28ca58a..09925a7af 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "temple_of_ahnqiraj.h" enum Spells @@ -356,3 +357,4 @@ void AddSC_npc_anubisath_sentinel() RegisterSpellScript(spell_anubisath_mortal_strike); RegisterSpellScript(spell_mana_burn_area); } + diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp index 293ea8876..b44ed7876 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp @@ -15,12 +15,14 @@ * with this program. If not, see . */ -#include "temple_of_ahnqiraj.h" +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "MapReference.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "temple_of_ahnqiraj.h" enum Spells { @@ -573,3 +575,4 @@ void AddSC_temple_of_ahnqiraj() RegisterSpellScript(spell_nullify); new at_battleguard_sartura(); } + diff --git a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp index d9ea29f03..fe9ea41b4 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "wailing_caverns.h" class instance_wailing_caverns : public InstanceMapScript diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index e7d4f6100..371c233bc 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -15,12 +15,14 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GridNotifiers.h" -#include "GridNotifiersImpl.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" +#include "SpellScriptLoader.h" #include "TemporarySummon.h" #include "zulfarrak.h" +#include "GridNotifiersImpl.h" enum Misc { @@ -537,3 +539,4 @@ void AddSC_instance_zulfarrak() new spell_zulfarrak_summon_zulfarrak_zombies(); new spell_zulfarrak_unlocking(); } + diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index 80862401e..3a4780764 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -15,6 +15,21 @@ * with this program. If not, see . */ +#include "zulfarrak.h" +#include "Cell.h" +#include "CellImpl.h" +#include "CreatureScript.h" +#include "GameObject.h" +#include "GameObjectAI.h" +#include "GameObjectScript.h" +#include "GridNotifiers.h" +#include "InstanceScript.h" +#include "MotionMaster.h" +#include "ObjectAccessor.h" +#include "Player.h" +#include "ScriptSystem.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" /* ScriptData SDName: Zulfarrak SD%Complete: 50 @@ -27,21 +42,7 @@ npc_sergeant_bly npc_weegli_blastfuse EndContentData */ -#include "zulfarrak.h" -#include "Cell.h" -#include "CellImpl.h" -#include "GameObject.h" -#include "GameObjectAI.h" -#include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "InstanceScript.h" -#include "MotionMaster.h" -#include "ObjectAccessor.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptSystem.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" /*###### ## npc_sergeant_bly @@ -734,3 +735,4 @@ void AddSC_zulfarrak() new npc_shadowpriest_sezziz(); new go_troll_cage(); } + diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp index 807ea6211..0c0ef7c68 100644 --- a/src/server/scripts/Kalimdor/boss_azuregos.cpp +++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameTime.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" enum Say @@ -229,3 +230,4 @@ void AddSC_boss_azuregos() RegisterSpellScript(spell_arcane_vacuum); RegisterSpellScript(spell_mark_of_frost_freeze); } + diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp index 978fdd913..fc2e60f17 100644 --- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp +++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp @@ -22,8 +22,8 @@ SDComment: Quest support: 6544, 6482 SDCategory: Ashenvale Forest EndScriptData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp index 198feaf3d..e225cff10 100644 --- a/src/server/scripts/Kalimdor/zone_azshara.cpp +++ b/src/server/scripts/Kalimdor/zone_azshara.cpp @@ -27,8 +27,8 @@ npc_rizzle_sprysprocket npc_depth_charge EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellInfo.h" diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index dc7bb1607..828f6b390 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -15,6 +15,16 @@ * with this program. If not, see . */ +#include "Cell.h" +#include "CellImpl.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" +#include "GridNotifiers.h" +#include "ScriptedCreature.h" +#include "ScriptedEscortAI.h" +#include "SpellAuras.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* ScriptData SDName: Azuremyst_Isle SD%Complete: 75 @@ -31,16 +41,7 @@ go_ravager_cage npc_death_ravager EndContentData */ -#include "Cell.h" -#include "CellImpl.h" -#include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedEscortAI.h" -#include "ScriptedGossip.h" -#include "SpellAuras.h" -#include "SpellScript.h" /*###### ## npc_draenei_survivor @@ -584,3 +585,4 @@ void AddSC_azuremyst_isle() new go_bristlelimb_cage(); RegisterSpellScript(spell_inoculate_nestlewood_owlkin); } + diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp index 080b31667..c5a2f55e7 100644 --- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp @@ -26,8 +26,8 @@ EndScriptData */ npc_webbed_creature EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" /*###### diff --git a/src/server/scripts/Kalimdor/zone_darkshore.cpp b/src/server/scripts/Kalimdor/zone_darkshore.cpp index bc7318539..595bec255 100644 --- a/src/server/scripts/Kalimdor/zone_darkshore.cpp +++ b/src/server/scripts/Kalimdor/zone_darkshore.cpp @@ -27,8 +27,8 @@ npc_kerlonian npc_prospector_remtravel EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" diff --git a/src/server/scripts/Kalimdor/zone_desolace.cpp b/src/server/scripts/Kalimdor/zone_desolace.cpp index b4b242018..8f1af105d 100644 --- a/src/server/scripts/Kalimdor/zone_desolace.cpp +++ b/src/server/scripts/Kalimdor/zone_desolace.cpp @@ -26,8 +26,8 @@ EndScriptData */ npc_aged_dying_ancient_kodo EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Kalimdor/zone_durotar.cpp b/src/server/scripts/Kalimdor/zone_durotar.cpp index af38415b3..ffca73f50 100644 --- a/src/server/scripts/Kalimdor/zone_durotar.cpp +++ b/src/server/scripts/Kalimdor/zone_durotar.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" enum Texts @@ -510,3 +511,4 @@ void AddSC_durotar() new spell_voljin_war_drums(); new spell_voodoo(); } + diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp index 79ba973bd..4f3934f2b 100644 --- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" enum SpellScripts { @@ -160,3 +161,4 @@ void AddSC_dustwallow_marsh() new spell_ooze_zap_channel_end(); new spell_energize_aoe(); } + diff --git a/src/server/scripts/Kalimdor/zone_felwood.cpp b/src/server/scripts/Kalimdor/zone_felwood.cpp index 920960948..e40e67cb1 100644 --- a/src/server/scripts/Kalimdor/zone_felwood.cpp +++ b/src/server/scripts/Kalimdor/zone_felwood.cpp @@ -26,8 +26,9 @@ EndScriptData */ npcs_riverbreeze_and_silversky EndContentData */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Kalimdor/zone_feralas.cpp b/src/server/scripts/Kalimdor/zone_feralas.cpp index 60503714e..634c6de85 100644 --- a/src/server/scripts/Kalimdor/zone_feralas.cpp +++ b/src/server/scripts/Kalimdor/zone_feralas.cpp @@ -15,6 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "Group.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* ScriptData SDName: Feralas SD%Complete: 100 @@ -22,13 +29,6 @@ SDComment: Quest support: 3520 Special vendor Gregan Brewspewer SDCategory: Feralas EndScriptData */ -#include "Group.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "SpellScript.h" - enum GordunniTrap { GO_GORDUNNI_DIRT_MOUND = 144064, @@ -69,3 +69,4 @@ void AddSC_feralas() { new spell_gordunni_trap(); } + diff --git a/src/server/scripts/Kalimdor/zone_moonglade.cpp b/src/server/scripts/Kalimdor/zone_moonglade.cpp index 1afaa3e13..c574da421 100644 --- a/src/server/scripts/Kalimdor/zone_moonglade.cpp +++ b/src/server/scripts/Kalimdor/zone_moonglade.cpp @@ -32,10 +32,10 @@ EndContentData */ #include "Cell.h" #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp index d4ecb8cad..dd70a5aae 100644 --- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp @@ -27,8 +27,8 @@ npc_shenthul npc_thrall_warchief EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "TaskScheduler.h" diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp index 9507c0a88..13a2de09b 100644 --- a/src/server/scripts/Kalimdor/zone_silithus.cpp +++ b/src/server/scripts/Kalimdor/zone_silithus.cpp @@ -28,12 +28,13 @@ quest_a_pawn_on_the_eternal_pawn EndContentData */ #include "AccountMgr.h" +#include "CreatureScript.h" #include "GameObject.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" #include "Group.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Spell.h" diff --git a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp index 94fa002b9..129665a30 100644 --- a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp +++ b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp @@ -27,8 +27,8 @@ npc_braug_dimspirit npc_kaya_flathoof EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp index c92bd5f6b..a011bc2f9 100644 --- a/src/server/scripts/Kalimdor/zone_tanaris.cpp +++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp @@ -30,8 +30,8 @@ npc_stone_watcher_of_norgannon npc_tooga EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp index 176f8dad5..7bc91c79f 100644 --- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp +++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp @@ -31,8 +31,8 @@ npc_twiggy_flathead npc_wizzlecrank_shredder EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp index 06cf84fa1..91ccd664f 100644 --- a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp +++ b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp @@ -15,6 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* ScriptData SDName: Thousand Needles SD%Complete: 100 @@ -30,13 +37,6 @@ npc_enraged_panther go_panther_cage EndContentData */ -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedEscortAI.h" -#include "ScriptedGossip.h" -#include "SpellScript.h" - /*###### # npc_lakota_windsong ######*/ @@ -360,3 +360,4 @@ void AddSC_thousand_needles() new npc_plucky(); RegisterSpellScript(spell_panther_cage_key); } + diff --git a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp index 0c19c1248..7f2d54bcc 100644 --- a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp +++ b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" /*##### diff --git a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp index 58cd413c7..4ed502a38 100644 --- a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp +++ b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp @@ -27,8 +27,8 @@ npc_a-me npc_ringo EndContentData */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" diff --git a/src/server/scripts/Kalimdor/zone_winterspring.cpp b/src/server/scripts/Kalimdor/zone_winterspring.cpp index aba69cb51..164bedebc 100644 --- a/src/server/scripts/Kalimdor/zone_winterspring.cpp +++ b/src/server/scripts/Kalimdor/zone_winterspring.cpp @@ -28,8 +28,9 @@ npc_ranshalla go_elune_fire EndContentData */ +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index 24e9b2d5d..34da57c69 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "azjol_nerub.h" enum Spells @@ -299,3 +300,4 @@ void AddSC_boss_anub_arak() RegisterSpellScript(spell_azjol_nerub_pound); RegisterSpellScript(spell_azjol_nerub_impale_summon); } + diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp index 4f5103a45..c1003c512 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "azjol_nerub.h" enum Spells @@ -426,3 +428,4 @@ void AddSC_boss_hadronox() new spell_hadronox_leech_poison(); new achievement_hadronox_denied(); } + diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp index 27bd5612e..d599c462c 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "azjol_nerub.h" diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp index ecdcadef1..88c820c97 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -16,8 +16,10 @@ */ #include "AreaBoundary.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "azjol_nerub.h" DoorData const doorData[] = diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp index ea496cda9..32f6dbd8f 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ahnkahet.h" enum Spells @@ -349,3 +350,4 @@ void AddSC_boss_amanitar() // Spells RegisterSpellScript(spell_amanitar_remove_mushroom_power); } + diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp index e974a18c6..6dcd6128e 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp @@ -15,11 +15,13 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" #include "Containers.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ahnkahet.h" enum Misc @@ -393,3 +395,4 @@ void AddSC_boss_elder_nadox() // Achievements new achievement_respect_your_elders(); } + diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp index 1dc0dfa00..b35c57902 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ahnkahet.h" enum Spells @@ -503,3 +504,4 @@ void AddSC_boss_volazj() RegisterSpellScript(spell_herald_volzaj_insanity); RegisterSpellScript(spell_volazj_whisper); } + diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp index 9416b371f..0f706defe 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp @@ -15,12 +15,14 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" #include "Containers.h" +#include "CreatureScript.h" #include "ObjectAccessor.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TemporarySummon.h" #include "ahnkahet.h" @@ -733,3 +735,4 @@ void AddSC_boss_jedoga_shadowseeker() // Achievements new achievement_volunteer_work(); } + diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp index 602e89859..9cff13a2b 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ahnkahet.h" enum Spells @@ -548,3 +549,4 @@ void AddSC_boss_taldaram() RegisterSpellScript(spell_prince_taldaram_conjure_flame_sphere); RegisterSpellScript(spell_prince_taldaram_flame_sphere_summon); } + diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp index c70189eaf..d8129f441 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp @@ -15,10 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ahnkahet.h" ObjectData const creatureData[] = diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp index 4ced79a81..eae494c58 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "obsidian_sanctum.h" enum Says @@ -1583,3 +1584,4 @@ void AddSC_boss_sartharion() new spell_sartharion_lava_strike(); } + diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp index 59880642b..dc22b897e 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp @@ -17,8 +17,9 @@ #include "AreaBoundary.h" #include "CreatureAIImpl.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "obsidian_sanctum.h" @@ -194,3 +195,4 @@ void AddSC_instance_obsidian_sanctum() { new instance_obsidian_sanctum(); } + diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp index ec4498925..5f939219c 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp @@ -15,10 +15,12 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" +#include "SpellScriptLoader.h" #include "ruby_sanctum.h" enum Texts diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp index 281f25526..ac9a9d734 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ruby_sanctum.h" diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index 72f8554ae..72171d39a 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -15,14 +15,15 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameObjectAI.h" #include "MapMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "WorldSession.h" #include "ruby_sanctum.h" @@ -1501,3 +1502,4 @@ void AddSC_boss_halion() new spell_halion_twilight_division(); new spell_halion_twilight_mending(); } + diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp index 986c7ba77..39afa96a6 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "ruby_sanctum.h" enum Texts @@ -244,3 +245,4 @@ void AddSC_boss_saviana_ragefire() new spell_saviana_conflagration_init(); new spell_saviana_conflagration_throwback(); } + diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp index bd38226f0..c08535c23 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" +#include "SpellScriptLoader.h" #include "TemporarySummon.h" #include "WorldPacket.h" #include "ruby_sanctum.h" @@ -279,3 +281,4 @@ void AddSC_instance_ruby_sanctum() new instance_ruby_sanctum(); new spell_ruby_sanctum_rallying_shout(); } + diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp index fb1c34a10..2cbe8078c 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "trial_of_the_champion.h" enum EadricSpells @@ -844,3 +845,4 @@ void AddSC_boss_argent_challenge() new spell_toc5_light_rain(); new spell_reflective_shield(); } + diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp index 81ae2cb8d..dec97a49e 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "SpellInfo.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp index 83e97383a..e48f714c2 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "SpellInfo.h" 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 11345c86d..9b5c29d30 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 @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Group.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Vehicle.h" #include "trial_of_the_champion.h" @@ -1310,3 +1311,4 @@ void AddSC_instance_trial_of_the_champion() { new instance_trial_of_the_champion(); } + diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp index 4713f9f43..bda082188 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp @@ -16,8 +16,8 @@ */ #include "trial_of_the_champion.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp index 5028e6945..45a189ad9 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "trial_of_the_crusader.h" enum AnubTexts @@ -952,3 +953,4 @@ void AddSC_boss_anubarak_trial() new spell_gen_leeching_swarm(); new spell_gen_leeching_swarm_dmg(); } + diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp index f0617de21..26a49edc7 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "trial_of_the_crusader.h" enum eAIs @@ -2495,3 +2496,4 @@ void AddSC_boss_faction_champions() new npc_toc_pet_hunter(); new spell_faction_champion_warl_unstable_affliction(); } + diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp index 2ea3e2813..21be9eb91 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "trial_of_the_crusader.h" enum JaraxxusTexts @@ -523,3 +524,4 @@ void AddSC_boss_jaraxxus() new spell_toc25_mistress_kiss(); new spell_mistress_kiss_area(); } + diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index 984e4b25e..0beb019b3 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Vehicle.h" #include "trial_of_the_crusader.h" diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index f09617a47..d15aa40b2 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -15,18 +15,18 @@ * with this program. If not, see . */ -/* - (!) ACTUALLY FJOLA CONTROLLS THE WHOLE FIGHT (SPECIAL ABILITIES, SHARED HEALTH, ETC.) SINCE THEY DIE SIMULTANEOUSLY -*/ - +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "trial_of_the_crusader.h" +/* + (!) ACTUALLY FJOLA CONTROLLS THE WHOLE FIGHT (SPECIAL ABILITIES, SHARED HEALTH, ETC.) SINCE THEY DIE SIMULTANEOUSLY +*/ enum Yells { @@ -929,3 +929,4 @@ void AddSC_boss_twin_valkyr() new spell_valkyr_touch(); new spell_valkyr_ball_periodic_dummy(); } + 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 18df8c460..2da2df08d 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 @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameTime.h" #include "Group.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "trial_of_the_crusader.h" @@ -1695,3 +1696,4 @@ void AddSC_instance_trial_of_the_crusader() { new instance_trial_of_the_crusader(); } + diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp index 8861705ba..697aba6d0 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp @@ -16,8 +16,8 @@ */ #include "trial_of_the_crusader.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp index 206cfa9ff..4a99eb18e 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "drak_tharon_keep.h" enum Spells diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp index 7a7cabec9..0c46d4e2b 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "drak_tharon_keep.h" enum Yells diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp index 928255505..45987b505 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "drak_tharon_keep.h" enum Yells @@ -310,3 +311,4 @@ void AddSC_boss_tharon_ja() new spell_tharon_ja_dummy(); new spell_tharon_ja_clear_gift_of_tharon_ja(); } + diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp index f521cf9f1..66238c2ee 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuras.h" +#include "SpellScriptLoader.h" #include "drak_tharon_keep.h" enum Yells diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp index 5c29b7eca..bfac4e97c 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "drak_tharon_keep.h" DoorData const doorData[] = diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp index 959a790d7..f02ba7c95 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "forge_of_souls.h" enum Yells @@ -405,3 +406,4 @@ void AddSC_boss_bronjahm() new spell_bronjahm_soulstorm_visual(); new spell_bronjahm_soulstorm_targeting(); } + diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp index b51d43f65..e2759b624 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "forge_of_souls.h" enum eTexts @@ -376,3 +377,4 @@ void AddSC_boss_devourer_of_souls() new boss_devourer_of_souls(); new spell_wailing_souls_periodic(); } + diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp index 1ab5b52c5..337c51f5f 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ -#include "forge_of_souls.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "forge_of_souls.h" enum Yells { @@ -303,3 +304,4 @@ void AddSC_forge_of_souls() new npc_fos_leader_second(); new spell_shield_of_bones(); } + diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp index 8d7a416f2..6b242b1b9 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "forge_of_souls.h" @@ -218,3 +219,4 @@ void AddSC_instance_forge_of_souls() { new instance_forge_of_souls(); } + diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp index 561d5f0c0..5d999d927 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "halls_of_reflection.h" enum Yells @@ -182,3 +183,4 @@ void AddSC_boss_falric() { new boss_falric(); } + diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp index 05628e00b..62be17b3e 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp @@ -15,6 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "SpellScriptLoader.h" #include "halls_of_reflection.h" enum Yells diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index e45dd47fd..0d814ddda 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -15,8 +15,11 @@ * with this program. If not, see . */ -#include "halls_of_reflection.h" +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "MotionMaster.h" +#include "SpellScriptLoader.h" +#include "halls_of_reflection.h" enum Events { diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h index ee52a31a9..0f78df2c1 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h @@ -19,9 +19,9 @@ #define DEF_HALLS_OF_REFLECTION_H #include "CreatureAIImpl.h" +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp index 62bcd08af..f37361ebb 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "InstanceMapScript.h" #include "MapMgr.h" #include "Transport.h" #include "halls_of_reflection.h" @@ -1211,3 +1212,4 @@ void AddSC_instance_halls_of_reflection() { new instance_halls_of_reflection(); } + diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index 3a049872f..0de585646 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -16,12 +16,13 @@ */ #include "CreatureGroups.h" +#include "CreatureScript.h" #include "Opcodes.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "WorldSession.h" #include "pit_of_saron.h" @@ -380,3 +381,4 @@ void AddSC_boss_garfrost() new spell_garfrost_permafrost(); } + diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp index 9e9ecd905..0379a72db 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp @@ -15,13 +15,14 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Opcodes.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "WorldSession.h" #include "pit_of_saron.h" @@ -537,3 +538,4 @@ void AddSC_boss_ick() new spell_krick_explosive_barrage(); new spell_exploding_orb_auto_grow(); } + diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp index b676e06d7..acbe71b8a 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "Vehicle.h" #include "pit_of_saron.h" diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index fe28bcc4f..6d71865c4 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "pit_of_saron.h" @@ -408,3 +409,4 @@ void AddSC_instance_pit_of_saron() { new instance_pit_of_saron(); } + diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp index 77c961099..6ce6c7661 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp @@ -15,16 +15,18 @@ * with this program. If not, see . */ -#include "pit_of_saron.h" +#include "AreaTriggerScript.h" #include "CreatureGroups.h" +#include "CreatureScript.h" #include "MapMgr.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SmartAI.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "pit_of_saron.h" class npc_pos_leader : public CreatureScript { diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index 4f75bad64..f8680b99d 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "gundrak.h" enum Spells @@ -497,3 +498,4 @@ void AddSC_boss_drakkari_colossus() new spell_drakkari_colossus_surge(); new spell_drakkari_colossus_face_me(); } + diff --git a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp index 85ca42519..45b3029a2 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "gundrak.h" diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp index 2a248c177..4c9f70f9f 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "gundrak.h" enum Spells diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp index c9a520721..178c8e68b 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "gundrak.h" enum eSpells diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp index 828c97e40..9bb8b57ad 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "gundrak.h" enum Spells diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index 494e0a093..f1c508364 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "ScriptedCreature.h" #include "gundrak.h" @@ -219,3 +220,4 @@ void AddSC_instance_gundrak() { new instance_gundrak(); } + diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp index 644f07862..f61ccaaf3 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" +#include "SpellScriptLoader.h" #include "icecrown_citadel.h" enum Texts @@ -1814,3 +1815,4 @@ void AddSC_boss_blood_prince_council() new spell_valanar_kinetic_bomb_summon(); new spell_blood_council_summon_shadow_resonance(); } + diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp index 87447c1a9..275b5f25b 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp @@ -15,12 +15,14 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "GridNotifiers.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" #include "SpellAuraEffects.h" +#include "SpellScriptLoader.h" #include "icecrown_citadel.h" enum Texts diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 1c8a70b33..c99a924a0 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -15,12 +15,14 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuras.h" +#include "SpellScriptLoader.h" #include "icecrown_citadel.h" enum ScriptTexts diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp index 84bd056af..0bd29e02c 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp @@ -15,10 +15,12 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" +#include "SpellScriptLoader.h" #include "icecrown_citadel.h" enum ScriptTexts diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp index 2863c14e2..3f151ab85 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -15,12 +15,14 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "CreatureTextMgr.h" #include "GameTime.h" #include "MoveSpline.h" #include "MoveSplineInit.h" -#include "ScriptMgr.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Transport.h" #include "TransportMgr.h" #include "Vehicle.h" diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index 02c097af3..cc62e50a9 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -15,12 +15,14 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "Group.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" +#include "SpellScriptLoader.h" #include "icecrown_citadel.h" #include diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp index fb525b616..3c6c04ed0 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp @@ -15,13 +15,14 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "MapMgr.h" #include "ObjectMgr.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "icecrown_citadel.h" #include @@ -710,3 +711,4 @@ void AddSC_boss_lord_marrowgar() new spell_marrowgar_bone_storm(); new spell_marrowgar_bone_slice(); } + diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index aa8f61b87..491d951c5 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -15,13 +15,14 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GridNotifiers.h" #include "Group.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" #include "SpellAuraEffects.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "icecrown_citadel.h" @@ -1729,3 +1730,4 @@ void AddSC_boss_professor_putricide() new spell_putricide_eat_ooze(); new spell_putricide_regurgitated_ooze(); } + diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp index 5e005e115..9fa5a9354 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GridNotifiers.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" +#include "SpellScriptLoader.h" #include "icecrown_citadel.h" enum Texts @@ -978,3 +979,4 @@ void AddSC_boss_rotface() new npc_precious_icc(); } + diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 4634b1552..b1ab5028e 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -15,12 +15,15 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "GameTime.h" #include "GridNotifiers.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "icecrown_citadel.h" enum Texts 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 8db7c0c14..111d92d8f 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -15,21 +15,24 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" #include "Cell.h" #include "CellImpl.h" +#include "CreatureScript.h" #include "CreatureTextMgr.h" #include "GameTime.h" #include "GridNotifiers.h" -#include "GridNotifiersImpl.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Unit.h" #include "Vehicle.h" +#include "Weather.h" #include "icecrown_citadel.h" +#include "GridNotifiersImpl.h" enum Texts { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp index 2cf62db2b..035d4bf34 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp @@ -15,15 +15,17 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" #include "Cell.h" #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" -#include "GridNotifiersImpl.h" #include "ObjectMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" +#include "SpellScriptLoader.h" #include "icecrown_citadel.h" +#include "GridNotifiersImpl.h" enum Texts { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index d9ca0f992..cc9516d3a 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -15,20 +15,22 @@ * with this program. If not, see . */ -#include "icecrown_citadel.h" #include "AccountMgr.h" +#include "AreaTriggerScript.h" #include "Cell.h" #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" -#include "GridNotifiersImpl.h" #include "Group.h" #include "ObjectMgr.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "SmartAI.h" #include "SpellAuraEffects.h" +#include "SpellScriptLoader.h" +#include "icecrown_citadel.h" +#include "GridNotifiersImpl.h" enum Texts { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index 7b52e6ee4..3b429b6eb 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -20,17 +20,18 @@ #include "Chat.h" #include "Creature.h" +#include "CreatureScript.h" #include "InstanceScript.h" #include "Map.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellAuras.h" #include "SpellMgr.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #define DataHeader "IC" diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp index fa786f5b7..831fc1a4c 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedGossip.h" #include "Spell.h" #include "icecrown_citadel.h" @@ -133,3 +135,4 @@ void AddSC_icecrown_citadel_teleport() new icecrown_citadel_teleport(); new at_frozen_throne_teleport(); } + diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index a092c425a..32c3c03ac 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -16,13 +16,14 @@ */ #include "AccountMgr.h" +#include "CreatureScript.h" #include "CreatureTextMgr.h" #include "Group.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Map.h" #include "ObjectMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Transport.h" #include "WorldPacket.h" diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp index 8077b64d2..3a0b3edd0 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "naxxramas.h" diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp index 33702aae4..243622c3e 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "naxxramas.h" diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index 2dfa3eec2..572849a9b 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "naxxramas.h" enum Spells @@ -458,3 +459,4 @@ void AddSC_boss_four_horsemen() new spell_four_horsemen_mark(); RegisterSpellScript(spell_four_horsemen_consumption); } + diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp index 821cf99c9..9f98655d0 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "naxxramas.h" enum Spells @@ -282,3 +283,4 @@ void AddSC_boss_gluth() new boss_gluth(); new spell_gluth_decimate(); } + diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index 85025b183..43bc0090f 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -16,10 +16,11 @@ */ #include "CombatAI.h" +#include "CreatureScript.h" #include "GridNotifiers.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "naxxramas.h" enum Yells @@ -719,3 +720,4 @@ void AddSC_boss_gothik() new npc_boss_gothik_minion(); new spell_gothik_shadow_bolt_volley(); } + diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp index a3843fb69..d0abfad0b 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "naxxramas.h" enum Spells @@ -326,3 +327,4 @@ void AddSC_boss_grobbulus() new spell_grobbulus_mutating_injection(); new spell_grobbulus_poison(); } + diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp index fc88c167c..6ed38b2c5 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "naxxramas.h" diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index 257124412..4ec9cf976 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "naxxramas.h" enum Yells @@ -750,3 +751,4 @@ void AddSC_boss_kelthuzad() new spell_kelthuzad_frost_blast(); new spell_kelthuzad_detonate_mana(); } + diff --git a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp index 07087a736..fb15e6e42 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "naxxramas.h" diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp index 375f1f9e7..2776c6879 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "naxxramas.h" diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp index be3a04c27..be528f529 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "naxxramas.h" diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp index 842623250..0ae9feaf5 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "naxxramas.h" diff --git a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp index f50d9a8be..9264e851f 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "naxxramas.h" diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index fb30603e3..47cccd7e2 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "naxxramas.h" enum Yells @@ -463,3 +464,4 @@ void AddSC_boss_sapphiron() new boss_sapphiron(); new spell_sapphiron_frost_explosion(); } + diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index b7c09c499..b2bf2a727 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -15,10 +15,12 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "naxxramas.h" enum Says diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index 0a762318f..256568430 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -15,11 +15,13 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" #include "CellImpl.h" +#include "CreatureScript.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" +#include "InstanceMapScript.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "naxxramas.h" @@ -1211,3 +1213,4 @@ void AddSC_instance_naxxramas() new boss_naxxramas_misc(); new at_naxxramas_hub_portal(); } + diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index 782e20299..a0eaab998 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -16,6 +16,8 @@ */ #include "CombatAI.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "MoveSpline.h" #include "MoveSplineInit.h" #include "Opcodes.h" @@ -24,6 +26,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "eye_of_eternity.h" diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index 07023e5cc..8b3d6813c 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Vehicle.h" #include "eye_of_eternity.h" @@ -251,3 +252,4 @@ void AddSC_instance_eye_of_eternity() { new instance_eye_of_eternity(); } + diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp index e9a3c2d71..68003f5dd 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "nexus.h" @@ -222,3 +223,4 @@ void AddSC_boss_anomalus() new boss_anomalus(); new achievement_chaos_theory(); } + diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard_kolurg.cpp index 3efb78ed4..3f6f1a5b2 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard_kolurg.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard_kolurg.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "nexus.h" diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp index 6c5dfe95e..50a559761 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp @@ -16,7 +16,8 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "nexus.h" @@ -213,3 +214,4 @@ void AddSC_boss_keristrasza() new boss_keristrasza(); new achievement_intense_cold(); } + diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp index 8a6571759..4f4274f64 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "nexus.h" enum Spells diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp index 0f883430c..f0d5212ee 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "nexus.h" diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index ee01108e9..14e3acddb 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "ScriptedCreature.h" #include "nexus.h" @@ -271,3 +272,4 @@ void AddSC_instance_nexus() new instance_nexus(); new npc_crystalline_frayer(); } + diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp index b39666efd..e6c9d06a8 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "oculus.h" diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp index 593f2546a..308349b7e 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "oculus.h" diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index 39d9adebb..f5547129e 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "oculus.h" diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp index deaf65ff1..58e3f4c90 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "oculus.h" diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index 3c10df6e5..d7b67076b 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Group.h" +#include "InstanceMapScript.h" #include "LFGMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "oculus.h" @@ -295,3 +296,4 @@ void AddSC_instance_oculus() { new instance_oculus(); } + diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index 5d931e9c4..426addc55 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -15,19 +15,20 @@ * with this program. If not, see . */ -#include "oculus.h" #include "CombatAI.h" +#include "CreatureScript.h" #include "InstanceScript.h" #include "MotionMaster.h" #include "ObjectAccessor.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" +#include "oculus.h" #include enum Drakes @@ -1034,3 +1035,4 @@ void AddSC_oculus() new spell_oculus_rider_aura(); new spell_oculus_drake_flag(); } + diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp index f3a92aad9..919cdbcc8 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "halls_of_lightning.h" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index e8bada84a..2624f55ad 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "halls_of_lightning.h" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp index 8cd10eb99..005cc0e19 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "halls_of_lightning.h" enum LokenSpells @@ -289,3 +290,4 @@ void AddSC_boss_loken() new boss_loken(); new spell_loken_pulsing_shockwave(); } + diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index 5f4043dde..0f8403d9e 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "halls_of_lightning.h" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp index aefa0995a..33bfedcae 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "ScriptedCreature.h" #include "halls_of_lightning.h" @@ -217,3 +218,4 @@ void AddSC_instance_halls_of_lightning() { new instance_halls_of_lightning(); } + diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp index c7305d330..6027e9369 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "halls_of_stone.h" enum spells @@ -250,3 +251,4 @@ void AddSC_boss_krystallus() new spell_krystallus_shatter(); new spell_krystallus_shatter_effect(); } + diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp index c2104f0b0..231504ad4 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "halls_of_stone.h" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp index 7c4215d81..da0e324ca 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "halls_of_stone.h" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp index 7c4f991f6..59a264650 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/brann_bronzebeard.cpp @@ -15,12 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "halls_of_stone.h" #define GOSSIP_ITEM_1 "Brann, it would be our honor!" @@ -898,3 +899,4 @@ void AddSC_brann_bronzebeard() new iron_golem_custodian(); new spell_hos_dark_matter(); } + diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp index 96f24a0f4..0f59da8f4 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "ScriptedCreature.h" #include "halls_of_stone.h" @@ -267,3 +268,4 @@ void AddSC_instance_halls_of_stone() { new instance_halls_of_stone(); } + diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index 1f90c584a..98b178480 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -15,15 +15,18 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" #include "MapMgr.h" #include "MoveSplineInit.h" #include "ObjectMgr.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ulduar.h" enum Spells diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp index 27c7fe498..c8f049a50 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp @@ -15,11 +15,13 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ulduar.h" enum AssemblySpells diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp index f968a7f0f..904e01a8f 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp @@ -15,11 +15,13 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ulduar.h" enum AuriayaSpells diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index 2c7dc1eda..02b7569b7 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -15,18 +15,21 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" #include "CombatAI.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "GridNotifiers.h" #include "Opcodes.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "Spell.h" #include "SpellAuraEffects.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "ulduar.h" diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index 17920a8a5..4d3610adb 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "ulduar.h" @@ -1298,3 +1299,4 @@ void AddSC_boss_freya() new achievement_freya_knock_on_wood("achievement_freya_knock_knock_on_wood", 2); new achievement_freya_knock_on_wood("achievement_freya_knock_knock_knock_on_wood", 3); } + diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp index 15e20ee8d..2fa09a604 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp @@ -16,12 +16,15 @@ */ #include "AccountMgr.h" +#include "AchievementCriteriaScript.h" #include "BanMgr.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "WorldSession.h" #include "ulduar.h" diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp index 14f788053..d3f8de2eb 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp @@ -15,13 +15,15 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ulduar.h" enum HodirSpellData diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp index 90556a415..e7e21fa99 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp @@ -15,13 +15,15 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "GameTime.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "ulduar.h" diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp index f6f3020bc..6af801f54 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp @@ -15,12 +15,14 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "ulduar.h" diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index deb302153..00ba652b4 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -15,15 +15,18 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "GameTime.h" #include "MapMgr.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "ulduar.h" diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp index 1ab35a6a1..c92f5db29 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuras.h" @@ -1179,3 +1181,4 @@ void AddSC_boss_razorscale() new achievement_quick_shave(); new achievement_iron_dwarf_medium_rare(); } + diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp index 1803f4dcc..5894409be 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp @@ -15,13 +15,16 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ulduar.h" enum ThorimSpells diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp index b52f13e85..9168fa4b5 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp @@ -15,13 +15,15 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" +#include "CreatureScript.h" #include "Opcodes.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "ulduar.h" diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp index 99f2c7d6c..e0f2c14ee 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp @@ -15,16 +15,18 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" #include "CreatureAI.h" +#include "CreatureScript.h" #include "Object.h" #include "Opcodes.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "ulduar.h" enum YoggSpells diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index 1b73cc425..809f4d984 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameTime.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Transport.h" #include "Vehicle.h" @@ -1281,3 +1282,4 @@ void AddSC_instance_ulduar() { new instance_ulduar(); } + diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp index b9c27e0d0..218bb84bf 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp @@ -15,16 +15,19 @@ * with this program. If not, see . */ -#include "ulduar.h" +#include "AreaTriggerScript.h" #include "CombatAI.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "Vehicle.h" +#include "ulduar.h" enum Texts { 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 bbe4375ec..56734e140 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 @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "utgarde_keep.h" diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp index 0cf889b6e..c4b99d783 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "utgarde_keep.h" enum eTexts @@ -378,3 +379,4 @@ void AddSC_boss_keleseth() new npc_vrykul_skeleton(); new spell_frost_tomb(); } + diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp index 9a4b9afa7..4acb81dbd 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "utgarde_keep.h" diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp index e034b7ef1..173a939f8 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "utgarde_keep.h" @@ -347,3 +348,4 @@ void AddSC_instance_utgarde_keep() { new instance_utgarde_keep(); } + diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp index 82211cf33..2224becfd 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ -#include "utgarde_keep.h" +#include "CreatureScript.h" #include "GameObjectAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" +#include "utgarde_keep.h" class npc_dragonflayer_forge_master : public CreatureScript { @@ -248,3 +249,4 @@ void AddSC_utgarde_keep() new spell_ticking_time_bomb(); } + diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp index 99f2b744b..7e9d5db51 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "ScriptedCreature.h" #include "utgarde_pinnacle.h" @@ -820,3 +821,4 @@ void AddSC_boss_palehoof() new npc_frenzied_worgen(); new go_palehoof_sphere(); } + diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index 09e879eb9..d5639c6dd 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -16,8 +16,9 @@ */ #include "CombatAI.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "Vehicle.h" @@ -532,3 +533,4 @@ void AddSC_boss_skadi() new boss_skadi_grauf(); new go_harpoon_canon(); } + diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index b58427058..3dc2daa59 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "utgarde_pinnacle.h" enum Misc @@ -454,3 +455,4 @@ void AddSC_boss_svala() new npc_ritual_channeler(); new spell_svala_ritual_strike(); } + diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index 696fde9ff..aacaf7f8e 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "utgarde_pinnacle.h" diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp index 40101acd6..34b85bf36 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp @@ -15,7 +15,8 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "ScriptedCreature.h" #include "utgarde_pinnacle.h" @@ -270,3 +271,4 @@ void AddSC_instance_utgarde_pinnacle() { new instance_utgarde_pinnacle(); } + diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.cpp index 7d675e395..2bd8ddb1a 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ -#include "utgarde_pinnacle.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Unit.h" +#include "utgarde_pinnacle.h" enum UtgardeSpells { @@ -72,3 +73,4 @@ void AddSC_utgarde_pinnacle() { RegisterSpellScript(spell_utgarde_pinnacle_beast_mark); } + diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp index ff502e23f..a706bdfc5 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "vault_of_archavon.h" enum Archavon @@ -234,3 +235,4 @@ void AddSC_boss_archavon() new boss_archavon(); new spell_archavon_rock_shards(); } + diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp index 4d2558754..7ff02cc96 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "vault_of_archavon.h" enum Spells @@ -277,3 +278,4 @@ void AddSC_boss_emalon() new spell_voa_overcharge(); new spell_voa_lightning_nova(); } + diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp index b8583f8c2..519861f82 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "vault_of_archavon.h" enum Events @@ -262,3 +263,4 @@ void AddSC_boss_koralon() new spell_koralon_meteor_fists(); new spell_flame_warder_meteor_fists(); } + diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp index ac3fb0f7a..b5a749b32 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "vault_of_archavon.h" diff --git a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp index b3980021b..3cbb74cf2 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp @@ -17,9 +17,10 @@ #include "Battlefield.h" #include "BattlefieldMgr.h" +#include "CreatureScript.h" #include "GameTime.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "vault_of_archavon.h" @@ -268,3 +269,4 @@ void AddSC_instance_vault_of_archavon() { new instance_vault_of_archavon(); } + diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp index 7bc8ff4b8..3aa2cf6e6 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "violet_hold.h" diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp index 72cdb60a8..ad6986e8a 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "violet_hold.h" diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp index 78cb5f677..6a078ba64 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "violet_hold.h" diff --git a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp index 77ab0fabe..b609e4a36 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "violet_hold.h" diff --git a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp index cb91ad314..3954527a9 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "violet_hold.h" enum eSpells @@ -165,3 +166,4 @@ void AddSC_boss_moragg() new boss_moragg(); new spell_optic_link(); } + diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp index c61dcfeae..bd2cf323e 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "violet_hold.h" diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp index 562f890ce..b5ec59197 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "violet_hold.h" diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index fda7a2fe4..2a0594a4e 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "violet_hold.h" @@ -676,3 +677,4 @@ void AddSC_instance_violet_hold() { new instance_violet_hold(); } + diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 72c88e7bc..cad20b90a 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -15,14 +15,16 @@ * with this program. If not, see . */ -#include "violet_hold.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "violet_hold.h" /// @todo: Missing Sinclari Trigger announcements (32204) Look at its creature_text for more info. /// @todo: Activation Crystals (go_vh_activation_crystal) (193611) are spammable, should be a 1 time use per crystal. diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp index 2a401c4c9..d4410e4fa 100644 --- a/src/server/scripts/Northrend/isle_of_conquest.cpp +++ b/src/server/scripts/Northrend/isle_of_conquest.cpp @@ -17,12 +17,13 @@ #include "BattlegroundIC.h" #include "CombatAI.h" +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" enum eIoCTurrent { @@ -514,3 +515,4 @@ void AddSC_isle_of_conquest() new spell_ioc_parachute_ic(); new spell_ioc_launch(); } + diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index f4c5ab4bd..566b58066 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" @@ -25,6 +25,7 @@ #include "SpellAuras.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "WorldSession.h" // Ours @@ -2083,3 +2084,4 @@ void AddSC_borean_tundra() new spell_q11719_bloodspore_ruination_45997(); new npc_bloodmage_laurith(); } + diff --git a/src/server/scripts/Northrend/zone_crystalsong_forest.cpp b/src/server/scripts/Northrend/zone_crystalsong_forest.cpp index a796714f1..1b190b461 100644 --- a/src/server/scripts/Northrend/zone_crystalsong_forest.cpp +++ b/src/server/scripts/Northrend/zone_crystalsong_forest.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SmartScriptMgr.h" #include "Transport.h" diff --git a/src/server/scripts/Northrend/zone_dalaran.cpp b/src/server/scripts/Northrend/zone_dalaran.cpp index b874144a1..ce86dfd62 100644 --- a/src/server/scripts/Northrend/zone_dalaran.cpp +++ b/src/server/scripts/Northrend/zone_dalaran.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "World.h" diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp index 577e911c8..d4d9bd824 100644 --- a/src/server/scripts/Northrend/zone_dragonblight.cpp +++ b/src/server/scripts/Northrend/zone_dragonblight.cpp @@ -15,20 +15,23 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" #include "CellImpl.h" #include "Chat.h" #include "CombatAI.h" +#include "CreatureScript.h" #include "CreatureTextMgr.h" -#include "GridNotifiersImpl.h" +#include "GameObjectScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" +#include "GridNotifiersImpl.h" // Ours /******** diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp index 26ea9d7b3..57dddf632 100644 --- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp +++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp @@ -16,14 +16,15 @@ */ #include "CombatAI.h" +#include "CreatureScript.h" #include "CreatureTextMgr.h" #include "Pet.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" // Theirs @@ -1346,3 +1347,4 @@ void AddSC_grizzly_hills() RegisterSpellScript(spell_q12227_camera_shake); RegisterSpellScript(spell_frog_kiss); } + diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp index 9c24f46ca..5c258276e 100644 --- a/src/server/scripts/Northrend/zone_howling_fjord.cpp +++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 901279dd1..6810c369d 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -16,16 +16,17 @@ */ #include "CombatAI.h" +#include "CreatureScript.h" #include "MoveSplineInit.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SmartScriptMgr.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" // Ours @@ -2203,3 +2204,4 @@ void AddSC_icecrown() new npc_blessed_banner(); new npc_frostbrood_skytalon(); } + diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index b799fe5fa..24e92b9d2 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -16,16 +16,19 @@ */ #include "CombatAI.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "WaypointMgr.h" + // Ours enum songOfWindandWater { @@ -1542,3 +1545,4 @@ void AddSC_sholazar_basin() RegisterSpellScript(spell_q12611_deathbolt); } + diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index 9c735d4a3..9ef54c165 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -16,13 +16,14 @@ */ #include "CombatAI.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "WaypointMgr.h" #include "WorldSession.h" @@ -1104,3 +1105,4 @@ void AddSC_storm_peaks() new spell_close_rift(); RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura); } + diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp index dde665692..fd925a1fb 100644 --- a/src/server/scripts/Northrend/zone_wintergrasp.cpp +++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp @@ -15,20 +15,23 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" #include "Battlefield.h" #include "BattlefieldMgr.h" #include "BattlefieldWG.h" #include "CombatAI.h" +#include "CreatureScript.h" #include "GameGraveyard.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" #include "GameTime.h" #include "ObjectMgr.h" #include "Player.h" #include "PoolMgr.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Vehicle.h" #include "World.h" diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp index 51f44e548..1b4af9044 100644 --- a/src/server/scripts/Northrend/zone_zuldrak.cpp +++ b/src/server/scripts/Northrend/zone_zuldrak.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuras.h" diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp index b7575681a..83eec57e2 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp @@ -16,6 +16,7 @@ */ #include "OutdoorPvPEP.h" +#include "CreatureScript.h" #include "GameGraveyard.h" #include "GameObject.h" #include "Language.h" @@ -23,8 +24,8 @@ #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "OutdoorPvPMgr.h" +#include "OutdoorPvPScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "World.h" #include "WorldPacket.h" @@ -775,3 +776,4 @@ void AddSC_outdoorpvp_ep() { new OutdoorPvP_eastern_plaguelands(); } + diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp index 4783209b7..9906fa10c 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp @@ -16,11 +16,12 @@ */ #include "OutdoorPvPGH.h" +#include "CreatureScript.h" #include "GameEventMgr.h" #include "MapMgr.h" #include "OutdoorPvPMgr.h" +#include "OutdoorPvPScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "WorldPacket.h" OutdoorPvPGH::OutdoorPvPGH() @@ -130,3 +131,4 @@ void AddSC_outdoorpvp_gh() { new OutdoorPvP_grizzly_hills(); } + diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp index c66679b38..e1c0cb247 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp @@ -16,13 +16,14 @@ */ #include "OutdoorPvPHP.h" +#include "CreatureScript.h" #include "Language.h" #include "MapMgr.h" #include "ObjectMgr.h" #include "OutdoorPvP.h" #include "OutdoorPvPMgr.h" +#include "OutdoorPvPScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "World.h" #include "WorldPacket.h" @@ -368,3 +369,4 @@ void AddSC_outdoorpvp_hp() { new OutdoorPvP_hellfire_peninsula(); } + diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp index 4e7aefb20..fe17a7759 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp @@ -16,13 +16,14 @@ */ #include "OutdoorPvPNA.h" +#include "CreatureScript.h" #include "GameGraveyard.h" #include "Language.h" #include "MapMgr.h" #include "ObjectMgr.h" #include "OutdoorPvPMgr.h" +#include "OutdoorPvPScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "World.h" #include "WorldPacket.h" @@ -679,3 +680,4 @@ void AddSC_outdoorpvp_na() { new OutdoorPvP_nagrand(); } + diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index c3acb40fb..11bc49a34 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -16,14 +16,15 @@ */ #include "OutdoorPvPSI.h" +#include "CreatureScript.h" #include "GameObject.h" #include "Language.h" #include "MapMgr.h" #include "ObjectMgr.h" #include "OutdoorPvPMgr.h" +#include "OutdoorPvPScript.h" #include "Player.h" #include "ReputationMgr.h" -#include "ScriptMgr.h" #include "Transport.h" #include "World.h" #include "WorldPacket.h" @@ -263,3 +264,4 @@ void AddSC_outdoorpvp_si() { new OutdoorPvP_silithus(); } + diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp index 5961de5b1..b41be0b63 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp @@ -16,13 +16,14 @@ */ #include "OutdoorPvPTF.h" +#include "CreatureScript.h" #include "GameTime.h" #include "Language.h" #include "MapMgr.h" #include "ObjectMgr.h" #include "OutdoorPvP.h" +#include "OutdoorPvPScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "World.h" #include "WorldPacket.h" @@ -485,3 +486,4 @@ void AddSC_outdoorpvp_tf() { new OutdoorPvP_terokkar_forest(); } + diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp index 2b6b23300..72e9ec529 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp @@ -17,12 +17,13 @@ #include "OutdoorPvPZM.h" #include "Creature.h" +#include "CreatureScript.h" #include "GameGraveyard.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "OutdoorPvPMgr.h" +#include "OutdoorPvPScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "World.h" #include "WorldPacket.h" @@ -470,3 +471,4 @@ void AddSC_outdoorpvp_zm() { new OutdoorPvP_zangarmarsh(); } + diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp index fc6253e80..8e29442a2 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "auchenai_crypts.h" diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp index 06c96b7cf..9acc357fa 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "auchenai_crypts.h" enum Spells @@ -241,3 +242,4 @@ void AddSC_boss_shirrak_the_dead_watcher() RegisterAuchenaiCryptsCreatureAI(boss_shirrak_the_dead_watcher); RegisterSpellScript(spell_auchenai_possess); } + diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp index 3294874d9..db120335d 100644 --- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp +++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Map.h" -#include "ScriptMgr.h" #include "auchenai_crypts.h" class instance_auchenai_crypts : public InstanceMapScript diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp index 9552279b8..07f5762e5 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "mana_tombs.h" diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp index 0bb09ab1e..e859d4d76 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "mana_tombs.h" diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp index e06751164..4adf08be0 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "mana_tombs.h" diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp index 3407aacf8..6c106add3 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Map.h" -#include "ScriptMgr.h" #include "mana_tombs.h" class instance_mana_tombs : public InstanceMapScript diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp index fe184a9c7..794b5fb07 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "Unit.h" diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp index 3ee4ea9fc..46f00e2c1 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "sethekk_halls.h" diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp index 54ee89e29..7a8962da9 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "sethekk_halls.h" enum Text @@ -179,3 +180,4 @@ void AddSC_boss_talon_king_ikiss() RegisterSethekkHallsCreatureAI(boss_talon_king_ikiss); RegisterSpellScript(spell_talon_king_ikiss_blink); } + diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp index 248b607ee..f85d55563 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "sethekk_halls.h" DoorData const doorData[] = diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp index f54b9ad81..a9afd481c 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "shadow_labyrinth.h" diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp index f4b0edeb7..76717e97a 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "shadow_labyrinth.h" diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp index 7fce6bb3b..fc59e7c3d 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "shadow_labyrinth.h" diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index b1cd844c7..3024cc6d9 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellInfo.h" +#include "SpellScriptLoader.h" #include "shadow_labyrinth.h" enum Spells @@ -257,3 +258,4 @@ void AddSC_boss_murmur() RegisterSpellScript(spell_shockwave_knockback); RegisterSpellScript(spell_murmur_sonic_boom_effect); } + diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp index ebef16e7b..44c984da0 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" +#include "SpellScriptLoader.h" #include "shadow_labyrinth.h" DoorData const doorData[] = @@ -136,3 +138,4 @@ void AddSC_instance_shadow_labyrinth() new instance_shadow_labyrinth(); RegisterSpellScript(spell_mark_of_malice); } + diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp index d2a67850b..6d97a0fe6 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "black_temple.h" enum Says @@ -266,3 +267,4 @@ void AddSC_boss_gurtogg_bloodboil() new spell_gurtogg_bloodboil(); new spell_gurtogg_eject(); } + diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 95a77b1e6..c860ef94d 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" +#include "SpellScriptLoader.h" #include "black_temple.h" enum Says @@ -1426,3 +1427,4 @@ void AddSC_boss_illidan() new spell_illidan_cage_trap(); new spell_illidan_cage_trap_stun(); } + diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index 16ec52b3f..d54cedf3a 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "black_temple.h" enum Says @@ -379,3 +380,4 @@ void AddSC_boss_mother_shahraz() new spell_mother_shahraz_fatal_attraction_dummy(); new spell_mother_shahraz_fatal_attraction_aura(); } + diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index b638c1926..4ca74ecae 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "Spell.h" +#include "SpellScriptLoader.h" #include "black_temple.h" enum Says @@ -790,3 +791,4 @@ void AddSC_boss_reliquary_of_souls() new spell_reliquary_of_souls_aura_of_anger(); new spell_reliquary_of_souls_spite(); } + diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index 2a081dcbc..691c345e0 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "black_temple.h" enum Says @@ -564,3 +565,4 @@ void AddSC_boss_shade_of_akama() RegisterSpellScript(spell_shade_of_akama_shade_soul_channel); RegisterSpellScript(spell_shade_of_akama_akama_soul_expel); } + diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp index bafbbcadc..d5259faec 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "black_temple.h" diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index 5f2f602fc..00034a60f 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "black_temple.h" enum Says @@ -280,3 +281,4 @@ void AddSC_boss_teron_gorefiend() RegisterSpellScript(spell_teron_gorefiend_spiritual_vengeance); RegisterSpellScript(spell_teron_gorefiend_shadowy_construct); } + diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 7c18911a3..58680039f 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "black_temple.h" enum Yells @@ -155,3 +156,4 @@ void AddSC_boss_najentus() RegisterSpellScript(spell_najentus_needle_spine); RegisterSpellScript(spell_najentus_hurl_spine); } + diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index c791d4448..247b61311 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "black_temple.h" enum Says @@ -766,3 +767,4 @@ void AddSC_boss_illidari_council() new spell_illidari_council_judgement(); new spell_illidari_council_deadly_strike(); } + diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 97abe7ca8..ab447cdcb 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" +#include "SpellScriptLoader.h" #include "black_temple.h" DoorData const doorData[] = @@ -657,3 +659,4 @@ void AddSC_instance_black_temple() new spell_black_temple_curse_of_vitality(); new spell_black_temple_dementia(); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 92a22a121..1c9d7e59f 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "serpent_shrine.h" @@ -576,3 +577,4 @@ void AddSC_boss_fathomlord_karathress() RegisterSpellScript(spell_karathress_power_of_tidalvess); RegisterSpellScript(spell_karathress_power_of_caribdis); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp index 67e5e7d85..625b06283 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "serpent_shrine.h" enum Talk @@ -356,3 +357,4 @@ void AddSC_boss_hydross_the_unstable() RegisterSpellScript(spell_hydross_cleansing_field_command); RegisterSpellScript(spell_hydross_mark_of_hydross); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index e596f819b..1dd408d93 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" +#include "SpellScriptLoader.h" #include "WorldSession.h" #include "serpent_shrine.h" @@ -338,3 +339,4 @@ void AddSC_boss_lady_vashj() RegisterSpellScript(spell_lady_vashj_summon_sporebat); RegisterSpellScript(spell_lady_vashj_spore_drop_effect); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index f47db3a1a..e4f70a926 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -16,9 +16,10 @@ */ #include "CreatureGroups.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "serpent_shrine.h" @@ -434,3 +435,4 @@ void AddSC_boss_leotheras_the_blind() RegisterSpellScript(spell_leotheras_demon_link); RegisterSpellScript(spell_leotheras_clear_consuming_madness); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index b91d66158..39c5a278f 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "serpent_shrine.h" enum Spells diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index fc03a32e9..b365495ec 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "serpent_shrine.h" enum Yells @@ -202,3 +203,4 @@ void AddSC_boss_morogrim_tidewalker() RegisterSpellScript(spell_morogrim_tidewalker_watery_grave); RegisterSpellScript(spell_morogrim_tidewalker_water_globule_new_target); } + 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 2ca167733..0fea5ed40 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" +#include "SpellScriptLoader.h" #include "TemporarySummon.h" #include "serpent_shrine.h" @@ -341,3 +343,4 @@ void AddSC_instance_serpentshrine_cavern() RegisterSpellScript(spell_serpentshrine_cavern_infection); RegisterSpellScript(spell_serpentshrine_cavern_coilfang_water); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp index 20183553b..3ecf8123e 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp @@ -15,11 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "Group.h" #include "LFGMgr.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "the_slave_pens.h" @@ -403,3 +404,4 @@ void AddSC_boss_ahune() new go_ahune_ice_stone(); RegisterTheSlavePensCreatureAI(boss_ahune); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_mennu_the_betrayer.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_mennu_the_betrayer.cpp index 42b3d63e4..dadbb878d 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_mennu_the_betrayer.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_mennu_the_betrayer.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_slave_pens.h" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp index 136348fa6..cc7d98dce 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_quagmirran.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_slave_pens.h" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_rokmar_the_crackler.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_rokmar_the_crackler.cpp index 04253f8d4..1486bf0bd 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_rokmar_the_crackler.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_rokmar_the_crackler.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_slave_pens.h" @@ -30,7 +30,7 @@ enum Spells struct boss_rokmar_the_crackler : public BossAI { - boss_rokmar_the_crackler(Creature* creature) : BossAI(creature, DATA_ROKMAR_THE_CRACKLER) + explicit boss_rokmar_the_crackler(Creature* creature) : BossAI(creature, DATA_ROKMAR_THE_CRACKLER) { scheduler.SetValidator([this] { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp index f57f94830..43182eb38 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp @@ -23,9 +23,10 @@ */ #include "Creature.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Map.h" -#include "ScriptMgr.h" #include "the_slave_pens.h" ObjectData const creatureData[] = diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.cpp index 631a80847..f430e1ec1 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/the_slave_pens.cpp @@ -16,8 +16,10 @@ */ #include "the_slave_pens.h" +#include "AreaTriggerScript.h" +#include "CreatureScript.h" +#include "InstanceScript.h" #include "Player.h" -#include "ScriptMgr.h" class at_quagmirran_lair : public AreaTriggerScript { @@ -42,3 +44,4 @@ void AddSC_the_slave_pens() { new at_quagmirran_lair(); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp index 3a83692b8..c4fe9170b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "steam_vault.h" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp index b075d17df..731afca6a 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "steam_vault.h" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp index def888bda..3330f26ea 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "steam_vault.h" enum Texts @@ -171,3 +172,4 @@ void AddSC_boss_warlord_kalithresh() RegisterSteamvaultCreatureAI(boss_warlord_kalithresh); RegisterSpellScript(spell_warlords_rage); } + 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 f171e8d7f..2ff3db9fd 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "steam_vault.h" enum MainChambersAccessPanelSays @@ -187,3 +189,4 @@ void AddSC_instance_steam_vault() new go_main_chambers_access_panel(); new instance_steam_vault(); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp index cba57f85e..ea086048b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "the_underbog.h" @@ -158,3 +159,4 @@ void AddSC_boss_ghazan() RegisterUnderbogCreatureAI(boss_ghazan); new at_underbog_ghazan(); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp index 38b76287b..21b48dc35 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "the_underbog.h" @@ -188,3 +189,4 @@ void AddSC_boss_hungarfen() RegisterSpellScript(spell_spore_cloud); RegisterSpellScript(spell_despawn_underbog_mushrooms); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_swamplord_muselek.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_swamplord_muselek.cpp index 58e401a28..5954a07b5 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_swamplord_muselek.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_swamplord_muselek.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "TaskScheduler.h" #include "the_underbog.h" diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp index 5a0297c34..f102a99f8 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "the_underbog.h" /* @@ -216,3 +217,4 @@ void AddSC_boss_the_black_stalker() RegisterSpellScript(spell_the_black_stalker_someone_grab_me); RegisterSpellScript(spell_the_black_stalker_magnetic_pull); } + diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp index 557afea8d..b09acbd79 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Map.h" -#include "ScriptMgr.h" #include "the_underbog.h" ObjectData const creatureData[] = diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/underbog.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/underbog.cpp index 9892a67da..b467076ce 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/underbog.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/underbog.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "the_underbog.h" @@ -122,3 +123,4 @@ void AddSC_underbog() RegisterSpellScript(spell_fungal_decay); RegisterSpellScript(spell_allergies); } + diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp index 630782c74..773ec71d3 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "gruuls_lair.h" enum Yells @@ -313,3 +314,4 @@ void AddSC_boss_gruul() RegisterSpellScript(spell_gruul_shatter); RegisterSpellScript(spell_gruul_shatter_effect); } + diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp index a2b6471bf..011e26c29 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "TaskScheduler.h" #include "gruuls_lair.h" diff --git a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp index a826f8857..763a6e752 100644 --- a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp +++ b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "gruuls_lair.h" DoorData const doorData[] = diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp index 6b2b5b01c..edebbebc6 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp @@ -15,10 +15,12 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "blood_furnace.h" enum Say diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index 51d72a28b..dd13bb88a 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuras.h" #include "blood_furnace.h" diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp index 77bb5ef91..67d2c0da9 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "blood_furnace.h" diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp index 81d436922..87f841f41 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp @@ -16,8 +16,9 @@ */ #include "CreatureAI.h" +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "blood_furnace.h" DoorData const doorData[] = diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp index 4abd908e3..ac1c47f95 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "hellfire_ramparts.h" diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 9683d04dc..e47c11657 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "hellfire_ramparts.h" @@ -363,3 +364,4 @@ void AddSC_boss_vazruden_the_herald() RegisterSpellScript(spell_vazruden_fireball); RegisterSpellScript(spell_vazruden_call_nazan); } + diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp index 91a59b4f6..ea4a66c1e 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "hellfire_ramparts.h" enum Says @@ -169,3 +170,4 @@ void AddSC_boss_watchkeeper_gargolmar() RegisterHellfireRampartsCreatureAI(boss_watchkeeper_gargolmar); RegisterSpellScript(spell_gargolmar_retalliation); } + diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp index 07bdac483..be7275eac 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "hellfire_ramparts.h" class instance_hellfire_ramparts : public InstanceMapScript diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index baee42732..1994fefce 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -15,10 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "magtheridons_lair.h" diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp index 25cd929b7..971f03e00 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "magtheridons_lair.h" BossBoundaryData const boundaries = diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp index 104b09ae2..bcdc68443 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "shattered_halls.h" enum Texts diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_porung.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_porung.cpp index 3f1f78624..6db279c30 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_porung.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_porung.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "shattered_halls.h" @@ -316,3 +317,4 @@ void AddSC_boss_porung() RegisterShatteredHallsCreatureAI(npc_shattered_hand_scout); RegisterSpellScript(spell_tsh_shoot_flame_arrow); } + diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp index 46d074148..af9c20bca 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "shattered_halls.h" @@ -287,3 +288,4 @@ void AddSC_boss_warbringer_omrogg() RegisterShatteredHallsCreatureAI(boss_warbringer_omrogg); RegisterSpellScript(spell_burning_maul); } + diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp index 0550943f1..55979fb1c 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "shattered_halls.h" @@ -321,3 +322,4 @@ void AddSC_boss_warchief_kargath_bladefist() RegisterShatteredHallsCreatureAI(npc_warchief_portal); RegisterSpellScript(spell_blade_dance_targeting); } + diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp index 3d27937cb..53df0a4e4 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "CreatureTextMgr.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "shattered_halls.h" ObjectData const creatureData[] = @@ -205,3 +207,4 @@ void AddSC_instance_shattered_halls() new instance_shattered_halls(); new at_shattered_halls_execution(); } + diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 726e2523b..7264a07ae 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "MoveSplineInit.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "WaypointMgr.h" #include "the_eye.h" @@ -501,3 +502,4 @@ void AddSC_boss_alar() new spell_alar_ember_blast_death(); new spell_alar_dive_bomb(); } + diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index be88f5647..05d7a2049 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "the_eye.h" enum Yells @@ -294,3 +295,4 @@ void AddSC_boss_high_astromancer_solarian() new spell_astromancer_wrath_of_the_astromancer(); new spell_astromancer_solarian_transform(); } + diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index e02f2a244..62a6ee730 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Opcodes.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "WorldPacket.h" #include "the_eye.h" @@ -1062,3 +1063,4 @@ void AddSC_boss_kaelthas() new spell_kaelthas_nether_beam(); new spell_kaelthas_summon_nether_vapor(); } + diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp index 1e92cfdfa..271f06cdf 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_eye.h" diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp index ff9c4f096..8d39a2248 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp @@ -15,8 +15,10 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" +#include "SpellScriptLoader.h" #include "the_eye.h" class instance_the_eye : public InstanceMapScript @@ -150,3 +152,4 @@ void AddSC_instance_the_eye() new instance_the_eye(); new spell_the_eye_countercharge(); } + diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp index be106c502..87293b9d0 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "mechanar.h" diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp index 2b93adb58..2443e40e9 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "mechanar.h" 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 6000cfec0..c12f9f5cb 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 @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "mechanar.h" enum Spells @@ -222,3 +223,4 @@ void AddSC_boss_mechano_lord_capacitus() RegisterSpellScript(spell_capacitus_polarity_charge_aura); RegisterSpellScript(spell_capacitus_polarity_shift); } + diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp index 7d01e77d4..547874097 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "mechanar.h" enum Says @@ -210,3 +211,4 @@ void AddSC_boss_nethermancer_sepethrea() RegisterMechanarCreatureAI(npc_raging_flames); RegisterSpellScript(spell_ragin_flames_inferno); } + diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp index 02d76f62e..c5c867506 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "mechanar.h" diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp index 74793de2c..d3cd320aa 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "mechanar.h" static DoorData const doorData[] = diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index 38d3de610..424e3b1e2 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "arcatraz.h" -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" +#include "arcatraz.h" enum MillhouseSays { @@ -625,3 +626,4 @@ void AddSC_arcatraz() new spell_arcatraz_soul_steal(); } + diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp index 74daf78ad..b7c56e122 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "arcatraz.h" diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp index 20dad346c..bb199edba 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "arcatraz.h" diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp index 9567eca85..799272204 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "arcatraz.h" diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp index 2f5fdefa7..29994ec1d 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScriptLoader.h" #include "arcatraz.h" enum Say @@ -111,3 +112,4 @@ void AddSC_boss_zereketh_the_unbound() RegisterArcatrazCreatureAI(boss_zereketh_the_unbound); RegisterSpellScript(spell_zereketh_seed_of_corruption); } + diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp index 7f8ea0ebd..c03b7b7b7 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" #include "arcatraz.h" DoorData const doorData[] = diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp index 1d6e1c4bd..a11278339 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "the_botanica.h" enum Says @@ -161,3 +162,4 @@ void AddSC_boss_commander_sarannis() RegisterSpellScript(spell_commander_sarannis_arcane_devastation); RegisterSpellScript(spell_commander_sarannis_summon_reinforcements); } + diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp index 732eb4901..e58063225 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_botanica.h" diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp index 4d2f4ad9d..aea7b72d3 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_botanica.h" diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp index 84e842b56..2d900d519 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_botanica.h" diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp index dd85decc7..052f6f932 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "the_botanica.h" diff --git a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp index c7a1f4d76..b4687846b 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp @@ -15,9 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameTime.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ScriptMgr.h" +#include "SpellScriptLoader.h" #include "the_botanica.h" class instance_the_botanica : public InstanceMapScript @@ -172,3 +174,4 @@ void AddSC_instance_the_botanica() new spell_botanica_call_of_the_falcon(); new spell_botanica_shift_form(); } + diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp index 56bf98e16..be738c9a1 100644 --- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp +++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" enum Texts { @@ -199,3 +200,4 @@ void AddSC_boss_doomlordkazzak() new boss_doomlord_kazzak(); new spell_mark_of_kazzak(); } + diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp index 771ddab91..198e68172 100644 --- a/src/server/scripts/Outland/boss_doomwalker.cpp +++ b/src/server/scripts/Outland/boss_doomwalker.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" enum Texts diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp index f43d1027d..d470ffdf8 100644 --- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp @@ -15,6 +15,18 @@ * with this program. If not, see . */ +#include "Cell.h" +#include "CellImpl.h" +#include "CreatureScript.h" +#include "GameObjectScript.h" +#include "GridNotifiers.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "SpellAuraEffects.h" +#include "SpellAuras.h" +#include "SpellInfo.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* ScriptData SDName: Blades_Edge_Mountains SD%Complete: 90 @@ -28,17 +40,6 @@ npc_daranelle go_legion_obelisk EndContentData */ -#include "Cell.h" -#include "CellImpl.h" -#include "GridNotifiers.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "SpellAuraEffects.h" -#include "SpellAuras.h" -#include "SpellInfo.h" -#include "SpellScript.h" - /// @todo: this import is not necessary for compilation and marked as unused by the IDE // however, for some reasons removing it would cause a damn linking issue // there is probably some underlying problem with imports which should properly addressed diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index 231d94680..e66a3f7f6 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -15,13 +15,15 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" // Ours diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp index 5b8590169..1439b72f8 100644 --- a/src/server/scripts/Outland/zone_nagrand.cpp +++ b/src/server/scripts/Outland/zone_nagrand.cpp @@ -15,6 +15,13 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" +#include "SpellInfo.h" /* ScriptData SDName: Nagrand SD%Complete: 90 @@ -27,13 +34,6 @@ npc_maghar_captive npc_creditmarker_visit_with_ancestors EndContentData */ -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedEscortAI.h" -#include "ScriptedGossip.h" -#include "SpellInfo.h" - /*##### ## npc_maghar_captive #####*/ @@ -490,3 +490,4 @@ void AddSC_nagrand() new npc_kurenai_captive(); new go_warmaul_prison(); } + diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp index 15f5a072c..bdaa848d8 100644 --- a/src/server/scripts/Outland/zone_netherstorm.cpp +++ b/src/server/scripts/Outland/zone_netherstorm.cpp @@ -15,9 +15,10 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" #include "GameObjectAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" @@ -962,3 +963,4 @@ void AddSC_netherstorm() new npc_maxx_a_million_escort(); RegisterSpellAndAuraScriptPair(spell_q10190_battery_recharging_blaster, spell_q10190_battery_recharging_blaster_aura); } + diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 5880815d9..20450a647 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -15,6 +15,14 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" +#include "Group.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* ScriptData SDName: Shadowmoon_Valley SD%Complete: 100 @@ -36,13 +44,6 @@ go_crystal_prison npc_enraged_spirit EndContentData */ -#include "Group.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "SpellScript.h" - // Ours class spell_q10612_10613_the_fel_and_the_furious : public SpellScriptLoader { diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp index 8aaaf8580..34ca2c9e0 100644 --- a/src/server/scripts/Outland/zone_shattrath_city.cpp +++ b/src/server/scripts/Outland/zone_shattrath_city.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp index 9cef1070b..b9a183576 100644 --- a/src/server/scripts/Outland/zone_terokkar_forest.cpp +++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp @@ -15,14 +15,16 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" #include "Group.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" // Ours enum fumping diff --git a/src/server/scripts/Pet/pet_dk.cpp b/src/server/scripts/Pet/pet_dk.cpp index b5e638af0..e95c5c109 100644 --- a/src/server/scripts/Pet/pet_dk.cpp +++ b/src/server/scripts/Pet/pet_dk.cpp @@ -15,21 +15,21 @@ * with this program. If not, see . */ +#include "Cell.h" +#include "CellImpl.h" +#include "CombatAI.h" +#include "CreatureScript.h" +#include "GridNotifiers.h" +#include "PassiveAI.h" +#include "ScriptedCreature.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "npc_pet_dk_". */ -#include "Cell.h" -#include "CellImpl.h" -#include "CombatAI.h" -#include "GridNotifiers.h" -#include "PassiveAI.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" - /// @todo: this import is not necessary for compilation and marked as unused by the IDE // however, for some reasons removing it would cause a damn linking issue // there is probably some underlying problem with imports which should properly addressed @@ -375,3 +375,4 @@ void AddSC_deathknight_pet_scripts() new npc_pet_dk_dancing_rune_weapon(); RegisterSpellScript(spell_pet_dk_gargoyle_strike); } + diff --git a/src/server/scripts/Pet/pet_generic.cpp b/src/server/scripts/Pet/pet_generic.cpp index 7ecae8d6b..4aae7ba20 100644 --- a/src/server/scripts/Pet/pet_generic.cpp +++ b/src/server/scripts/Pet/pet_generic.cpp @@ -15,20 +15,20 @@ * with this program. If not, see . */ -/* - * Ordered alphabetically using scriptname. - * Scriptnames of files in this file should be prefixed with "npc_pet_gen_". - */ - +#include "CreatureScript.h" #include "CreatureTextMgr.h" #include "Group.h" #include "PassiveAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" +/* + * Ordered alphabetically using scriptname. + * Scriptnames of files in this file should be prefixed with "npc_pet_gen_". + */ enum soulTrader { @@ -833,3 +833,4 @@ void AddSC_generic_pet_scripts() RegisterCreatureAI(npc_pet_gen_moth); RegisterCreatureAI(npc_pet_darting_hatchling); } + diff --git a/src/server/scripts/Pet/pet_hunter.cpp b/src/server/scripts/Pet/pet_hunter.cpp index 1e9298759..5864a928b 100644 --- a/src/server/scripts/Pet/pet_hunter.cpp +++ b/src/server/scripts/Pet/pet_hunter.cpp @@ -20,7 +20,8 @@ * Scriptnames of files in this file should be prefixed with "npc_pet_hun_". */ -#include "ScriptMgr.h" +#include "CreatureScript.h" +#include "PetDefines.h" #include "ScriptedCreature.h" enum HunterSpells diff --git a/src/server/scripts/Pet/pet_mage.cpp b/src/server/scripts/Pet/pet_mage.cpp index d426b6b31..2bb4f209c 100644 --- a/src/server/scripts/Pet/pet_mage.cpp +++ b/src/server/scripts/Pet/pet_mage.cpp @@ -21,9 +21,9 @@ */ #include "CombatAI.h" +#include "CreatureScript.h" #include "Pet.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellAuras.h" diff --git a/src/server/scripts/Pet/pet_priest.cpp b/src/server/scripts/Pet/pet_priest.cpp index d3f56a7c8..88bcfc05a 100644 --- a/src/server/scripts/Pet/pet_priest.cpp +++ b/src/server/scripts/Pet/pet_priest.cpp @@ -20,9 +20,9 @@ * Scriptnames of files in this file should be prefixed with "npc_pet_pri_". */ +#include "CreatureScript.h" #include "PassiveAI.h" #include "PetAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "TotemAI.h" diff --git a/src/server/scripts/Pet/pet_shaman.cpp b/src/server/scripts/Pet/pet_shaman.cpp index 1112cf190..d5266ea04 100644 --- a/src/server/scripts/Pet/pet_shaman.cpp +++ b/src/server/scripts/Pet/pet_shaman.cpp @@ -20,8 +20,8 @@ * Scriptnames of files in this file should be prefixed with "npc_pet_sha_". */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" enum ShamanSpells diff --git a/src/server/scripts/ScriptPCH.h b/src/server/scripts/ScriptPCH.h index 2f6934840..874925eca 100644 --- a/src/server/scripts/ScriptPCH.h +++ b/src/server/scripts/ScriptPCH.h @@ -18,20 +18,26 @@ #ifndef SC_PRECOMPILED_H #define SC_PRECOMPILED_H +#include "AchievementCriteriaScript.h" +#include "AreaTriggerScript.h" #include "Cell.h" #include "CellImpl.h" #include "Chat.h" #include "CombatAI.h" +#include "CreatureScript.h" #include "DBCStores.h" #include "DBCStructure.h" #include "GameEventMgr.h" #include "GameObject.h" +#include "GameObjectScript.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" +#include "InstanceMapScript.h" #include "InstanceScript.h" +#include "ItemScript.h" #include "ObjectMgr.h" #include "PassiveAI.h" -#include "ScriptMgr.h" +#include "PlayerScript.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 7a829a517..88a938c40 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -15,22 +15,22 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "PetDefines.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellInfo.h" +#include "SpellMgr.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "Totem.h" +#include "UnitAI.h" /* * Scripts for spells with SPELLFAMILY_DEATHKNIGHT and SPELLFAMILY_GENERIC spells used by deathknight players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_dk_". */ -#include "PetDefines.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "SpellAuraEffects.h" -#include "SpellInfo.h" -#include "SpellMgr.h" -#include "SpellScript.h" -#include "Totem.h" -#include "UnitAI.h" - enum DeathKnightSpells { SPELL_DK_DEATH_AND_DECAY_TRIGGER = 52212, @@ -2251,3 +2251,4 @@ void AddSC_deathknight_spell_scripts() RegisterSpellScript(spell_dk_will_of_the_necropolis); RegisterSpellScript(spell_dk_ghoul_thrash); } + diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index fafeb286a..0b5970313 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -15,20 +15,20 @@ * with this program. If not, see . */ +#include "Containers.h" +#include "CreatureScript.h" +#include "GridNotifiers.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellMgr.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* * Scripts for spells with SPELLFAMILY_DRUID and SPELLFAMILY_GENERIC spells used by druid players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_dru_". */ -#include "Containers.h" -#include "GridNotifiers.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "SpellAuraEffects.h" -#include "SpellMgr.h" -#include "SpellScript.h" - enum DruidSpells { SPELL_DRUID_GLYPH_OF_WILD_GROWTH = 62970, @@ -1230,3 +1230,4 @@ void AddSC_druid_spell_scripts() RegisterSpellScript(spell_dru_wild_growth); RegisterSpellScript(spell_dru_moonkin_form_passive_proc); } + diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index b3e9210a3..26309ed69 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -15,13 +15,6 @@ * with this program. If not, see . */ -/* - * Scripts for spells with SPELLFAMILY_GENERIC which cannot be included in AI script file - * of creature using it or can't be bound to any player class. - * Ordered alphabetically using scriptname. - * Scriptnames of files in this file should be prefixed with "spell_gen_" - */ - #include "Battlefield.h" #include "BattlefieldMgr.h" #include "Battleground.h" @@ -29,18 +22,25 @@ #include "Cell.h" #include "CellImpl.h" #include "Chat.h" +#include "CreatureScript.h" #include "GameTime.h" #include "GridNotifiers.h" #include "Group.h" #include "Pet.h" #include "ReputationMgr.h" -#include "ScriptMgr.h" #include "SkillDiscovery.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "Unit.h" #include "Vehicle.h" #include +/* + * Scripts for spells with SPELLFAMILY_GENERIC which cannot be included in AI script file + * of creature using it or can't be bound to any player class. + * Ordered alphabetically using scriptname. + * Scriptnames of files in this file should be prefixed with "spell_gen_" + */ /// @todo: this import is not necessary for compilation and marked as unused by the IDE // however, for some reasons removing it would cause a damn linking issue @@ -5290,3 +5290,4 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_yehkinya_bramble); RegisterSpellScript(spell_gen_choking_vines); } + diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index fafe6bfd2..96ee8185a 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -15,22 +15,22 @@ * with this program. If not, see . */ +#include "Cell.h" +#include "CellImpl.h" +#include "CreatureScript.h" +#include "GridNotifiers.h" +#include "Pet.h" +#include "SpellAuraEffects.h" +#include "SpellAuras.h" +#include "SpellMgr.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* * Scripts for spells with SPELLFAMILY_HUNTER, SPELLFAMILY_PET and SPELLFAMILY_GENERIC spells used by hunter players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_hun_". */ -#include "Cell.h" -#include "CellImpl.h" -#include "GridNotifiers.h" -#include "Pet.h" -#include "ScriptMgr.h" -#include "SpellAuraEffects.h" -#include "SpellAuras.h" -#include "SpellMgr.h" -#include "SpellScript.h" - /// @todo: this import is not necessary for compilation and marked as unused by the IDE // however, for some reasons removing it would cause a damn linking issue // there is probably some underlying problem with imports which should properly addressed @@ -1378,3 +1378,4 @@ void AddSC_hunter_spell_scripts() RegisterSpellScript(spell_hun_bestial_wrath); RegisterSpellScript(spell_hun_target_self_and_pet); } + diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 5ca50fbe0..f516def07 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -15,24 +15,24 @@ * with this program. If not, see . */ +#include "Battleground.h" +#include "CreatureScript.h" +#include "GameTime.h" +#include "ObjectMgr.h" +#include "Pet.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "SkillDiscovery.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "WorldSession.h" /* * Scripts for spells with SPELLFAMILY_GENERIC spells used by items. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_item_". */ -#include "Battleground.h" -#include "GameTime.h" -#include "ObjectMgr.h" -#include "Pet.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SkillDiscovery.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" -#include "WorldSession.h" - enum MassiveSeaforiumCharge { ITEM_MASSIVE_SEAFORIUM_CHARGE = 39213, @@ -4061,3 +4061,4 @@ void AddSC_item_spell_scripts() RegisterSpellScript(spell_item_venomhide_feed); RegisterSpellScript(spell_item_scroll_of_retribution); } + diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index f28d691d3..4b2243baa 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -15,20 +15,20 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "Pet.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellMgr.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "TemporarySummon.h" /* * Scripts for spells with SPELLFAMILY_MAGE and SPELLFAMILY_GENERIC spells used by mage players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_mage_". */ -#include "Pet.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "SpellAuraEffects.h" -#include "SpellMgr.h" -#include "SpellScript.h" -#include "TemporarySummon.h" - enum MageSpells { // Ours @@ -1083,3 +1083,4 @@ void AddSC_mage_spell_scripts() RegisterSpellScript(spell_mage_fingers_of_frost_proc_aura); RegisterSpellScript(spell_mage_fingers_of_frost_proc); } + diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index b033b0600..d6dc98fa6 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -15,20 +15,20 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "Group.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellMgr.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "UnitAI.h" /* * Scripts for spells with SPELLFAMILY_PALADIN and SPELLFAMILY_GENERIC spells used by paladin players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_pal_". */ -#include "Group.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "SpellAuraEffects.h" -#include "SpellMgr.h" -#include "SpellScript.h" -#include "UnitAI.h" - enum PaladinSpells { SPELL_PALADIN_DIVINE_PLEA = 54428, @@ -1134,3 +1134,4 @@ void AddSC_paladin_spell_scripts() RegisterSpellScript(spell_pal_righteous_defense); RegisterSpellScript(spell_pal_seal_of_righteousness); } + diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 14deba616..116b5cd21 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -15,20 +15,20 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GridNotifiers.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellMgr.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "TemporarySummon.h" /* * Scripts for spells with SPELLFAMILY_PRIEST and SPELLFAMILY_GENERIC spells used by priest players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_pri_". */ -#include "GridNotifiers.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "SpellAuraEffects.h" -#include "SpellMgr.h" -#include "SpellScript.h" -#include "TemporarySummon.h" - enum PriestSpells { SPELL_PRIEST_DIVINE_AEGIS = 47753, @@ -974,3 +974,4 @@ void AddSC_priest_spell_scripts() RegisterSpellScript(spell_pri_mind_control); RegisterSpellScript(spell_pri_t4_4p_bonus); } + diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 9561f8f41..c2bfac4eb 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -15,23 +15,23 @@ * with this program. If not, see . */ +#include "CellImpl.h" +#include "CreatureScript.h" +#include "CreatureTextMgr.h" +#include "GridNotifiers.h" +#include "MapMgr.h" +#include "ScriptedCreature.h" +#include "SpellAuraEffects.h" +#include "SpellAuras.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "Vehicle.h" /* * Scripts for spells with SPELLFAMILY_GENERIC spells used for quests. * Ordered alphabetically using questId and scriptname. * Scriptnames of files in this file should be prefixed with "spell_q#questID_". */ -#include "CellImpl.h" -#include "CreatureTextMgr.h" -#include "GridNotifiers.h" -#include "MapMgr.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SpellAuraEffects.h" -#include "SpellAuras.h" -#include "SpellScript.h" -#include "Vehicle.h" - class spell_q11065_wrangle_some_aether_rays : public SpellScript { PrepareSpellScript(spell_q11065_wrangle_some_aether_rays); @@ -2569,3 +2569,4 @@ void AddSC_quest_spell_scripts() RegisterSpellScript(spell_q10651_q10692_book_of_fel_names); RegisterSpellScript(spell_q9847_a_spirit_ally); } + diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index b5965edf3..5bb10a6ff 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -15,19 +15,19 @@ * with this program. If not, see . */ +#include "CellImpl.h" +#include "CreatureScript.h" +#include "GridNotifiers.h" +#include "SpellAuraEffects.h" +#include "SpellMgr.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* * Scripts for spells with SPELLFAMILY_ROGUE and SPELLFAMILY_GENERIC spells used by rogue players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_rog_". */ -#include "CellImpl.h" -#include "GridNotifiers.h" -#include "ScriptMgr.h" -#include "SpellAuraEffects.h" -#include "SpellMgr.h" -#include "SpellScript.h" - enum RogueSpells { SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK = 22482, @@ -710,3 +710,4 @@ void AddSC_rogue_spell_scripts() RegisterSpellScript(spell_rog_tricks_of_the_trade_proc); RegisterSpellScript(spell_rog_pickpocket); } + diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index d0045cb4b..9fd557adb 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -15,20 +15,20 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GridNotifiers.h" +#include "SpellAuraEffects.h" +#include "SpellMgr.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "TemporarySummon.h" +#include "Unit.h" /* * Scripts for spells with SPELLFAMILY_SHAMAN and SPELLFAMILY_GENERIC spells used by shaman players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_sha_". */ -#include "GridNotifiers.h" -#include "ScriptMgr.h" -#include "SpellAuraEffects.h" -#include "SpellMgr.h" -#include "SpellScript.h" -#include "TemporarySummon.h" -#include "Unit.h" - enum ShamanSpells { SPELL_SHAMAN_GLYPH_OF_FERAL_SPIRIT = 63271, @@ -1178,3 +1178,4 @@ void AddSC_shaman_spell_scripts() RegisterSpellScript(spell_sha_flurry_proc); RegisterSpellScript(spell_sha_t8_electrified); } + diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index b32ddc360..73d053a3d 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -15,21 +15,21 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "Pet.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellInfo.h" +#include "SpellMgr.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" +#include "TemporarySummon.h" /* * Scripts for spells with SPELLFAMILY_WARLOCK and SPELLFAMILY_GENERIC spells used by warlock players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_warl_". */ -#include "Pet.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "SpellAuraEffects.h" -#include "SpellInfo.h" -#include "SpellMgr.h" -#include "SpellScript.h" -#include "TemporarySummon.h" - enum WarlockSpells { SPELL_WARLOCK_DRAIN_SOUL_R1 = 1120, @@ -1355,3 +1355,4 @@ void AddSC_warlock_spell_scripts() RegisterSpellScript(spell_warl_glyph_of_felguard); RegisterSpellScript(spell_warl_glyph_of_voidwalker); } + diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index b430b0315..675907e02 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -15,19 +15,19 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellInfo.h" +#include "SpellMgr.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" /* * Scripts for spells with SPELLFAMILY_WARRIOR and SPELLFAMILY_GENERIC spells used by warrior players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_warr_". */ -#include "Player.h" -#include "ScriptMgr.h" -#include "SpellAuraEffects.h" -#include "SpellInfo.h" -#include "SpellMgr.h" -#include "SpellScript.h" - enum WarriorSpells { SPELL_WARRIOR_INTERVENE_TRIGGER = 59667, @@ -923,3 +923,4 @@ void AddSC_warrior_spell_scripts() RegisterSpellScript(spell_warr_vigilance_trigger); RegisterSpellScript(spell_warr_t3_prot_8p_bonus); } + diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index 30ccb2223..36be187d1 100644 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "AchievementCriteriaScript.h" #include "BattlegroundAB.h" #include "BattlegroundAV.h" #include "BattlegroundIC.h" @@ -22,7 +23,6 @@ #include "BattlegroundWS.h" #include "Creature.h" #include "Player.h" -#include "ScriptMgr.h" #include "Vehicle.h" class achievement_resilient_victory : public AchievementCriteriaScript diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp index 1977217fb..c99639974 100644 --- a/src/server/scripts/World/action_ip_logger.cpp +++ b/src/server/scripts/World/action_ip_logger.cpp @@ -15,10 +15,12 @@ * with this program. If not, see . */ +#include "AccountScript.h" #include "Channel.h" +#include "CreatureScript.h" #include "Group.h" #include "Guild.h" -#include "ScriptMgr.h" +#include "PlayerScript.h" enum IPLoggingTypes { diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index 9b8fdf62e..bb835c607 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -15,6 +15,12 @@ * with this program. If not, see . */ +#include "AreaTriggerScript.h" +#include "CreatureScript.h" +#include "GameTime.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "SpellMgr.h" /* ScriptData SDName: Areatrigger_Scripts SD%Complete: 100 @@ -34,12 +40,6 @@ at_brewfest at_area_52_entrance EndContentData */ -#include "GameTime.h" -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "SpellMgr.h" - // Ours class AreaTrigger_at_voltarus_middle : public AreaTriggerScript { @@ -496,3 +496,4 @@ void AddSC_areatrigger_scripts() new AreaTrigger_at_brewfest(); new AreaTrigger_at_area_52_entrance(); } + diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp index cd98b970b..55495c4f0 100644 --- a/src/server/scripts/World/boss_emerald_dragons.cpp +++ b/src/server/scripts/World/boss_emerald_dragons.cpp @@ -15,13 +15,14 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GridNotifiers.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "Spell.h" #include "SpellAuraEffects.h" #include "SpellScript.h" +#include "SpellScriptLoader.h" #include "TaskScheduler.h" // @@ -881,3 +882,4 @@ void AddSC_emerald_dragons() new spell_mark_of_nature(); RegisterSpellScript(spell_shadow_bolt_whirl); }; + diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp index ab73b658f..f2ef910e4 100644 --- a/src/server/scripts/World/chat_log.cpp +++ b/src/server/scripts/World/chat_log.cpp @@ -16,10 +16,11 @@ */ #include "Channel.h" +#include "CreatureScript.h" #include "Group.h" #include "Guild.h" #include "Log.h" -#include "ScriptMgr.h" +#include "PlayerScript.h" class ChatLogScript : public PlayerScript { @@ -142,3 +143,4 @@ void AddSC_chat_log() { new ChatLogScript(); } + diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 7c173713d..30d49c40e 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -16,10 +16,12 @@ */ #include "CellImpl.h" +#include "CreatureScript.h" +#include "GameEventMgr.h" #include "GameObjectAI.h" +#include "GameObjectScript.h" #include "GridNotifiersImpl.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Spell.h" @@ -1936,3 +1938,4 @@ void AddSC_go_scripts() new go_veil_skith_cage(); new go_bells(); } + diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp index 41a24c556..b9384dc63 100644 --- a/src/server/scripts/World/guards.cpp +++ b/src/server/scripts/World/guards.cpp @@ -28,9 +28,9 @@ guard_shattrath_aldor guard_shattrath_scryer EndContentData */ +#include "CreatureScript.h" #include "GuardAI.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index c7f59a982..571c65d70 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -15,6 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "ItemScript.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "Spell.h" /* ScriptData SDName: Item_Scripts SD%Complete: 100 @@ -28,11 +33,6 @@ item_gor_dreks_ointment(i30175) Protecting Our Own(q10488) item_only_for_flight Items which should only useable while flying EndContentData */ -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "Spell.h" - /*##### # item_only_for_flight #####*/ @@ -256,3 +256,4 @@ void AddSC_item_scripts() new item_captured_frog(); new item_generic_limit_chance_above_60(); } + diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp index 6c6e1130f..cd8708dc4 100644 --- a/src/server/scripts/World/mob_generic_creature.cpp +++ b/src/server/scripts/World/mob_generic_creature.cpp @@ -22,8 +22,8 @@ SDComment: Should be replaced with core based AI SDCategory: Creatures EndScriptData */ +#include "CreatureScript.h" #include "PassiveAI.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #define GENERIC_CREATURE_COOLDOWN 5000 diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp index f70468479..46b447bdb 100644 --- a/src/server/scripts/World/npc_innkeeper.cpp +++ b/src/server/scripts/World/npc_innkeeper.cpp @@ -15,9 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "GameEventMgr.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 020268ef6..78783d1ab 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -15,6 +15,12 @@ * with this program. If not, see . */ +#include "CreatureScript.h" +#include "GameObjectScript.h" +#include "Player.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "SpellInfo.h" /* ScriptData SDName: Npc_Professions SD%Complete: 80 @@ -22,12 +28,6 @@ SDComment: Provides learn/unlearn/relearn-options for professions. Not supported SDCategory: NPCs EndScriptData */ -#include "Player.h" -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "SpellInfo.h" - /* A few notes for future developement: - A full implementation of gossip for GO's is required. They must have the same scripting capabilities as creatures. Basically, @@ -1375,3 +1375,4 @@ void AddSC_npc_professions() new npc_prof_tailor(); new go_evil_book_for_dummies(); } + diff --git a/src/server/scripts/World/npc_stave_of_ancients.cpp b/src/server/scripts/World/npc_stave_of_ancients.cpp index 4f01542af..8793f5b54 100644 --- a/src/server/scripts/World/npc_stave_of_ancients.cpp +++ b/src/server/scripts/World/npc_stave_of_ancients.cpp @@ -17,9 +17,9 @@ #include "npc_stave_of_ancients.h" #include "CreatureGroups.h" +#include "CreatureScript.h" #include "GameTime.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Spell.h" diff --git a/src/server/scripts/World/npc_stave_of_ancients.h b/src/server/scripts/World/npc_stave_of_ancients.h index 719499c9e..fcdc51ef7 100644 --- a/src/server/scripts/World/npc_stave_of_ancients.h +++ b/src/server/scripts/World/npc_stave_of_ancients.h @@ -18,7 +18,7 @@ #ifndef NPC_STAVE_OF_ANCIENTS_H #define NPC_STAVE_OF_ANCIENTS_H -#include "ScriptMgr.h" +#include "CreatureScript.h" #include "ScriptedCreature.h" enum Common diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp index 1fead6c3f..42bcd1cfa 100644 --- a/src/server/scripts/World/npc_taxi.cpp +++ b/src/server/scripts/World/npc_taxi.cpp @@ -15,8 +15,8 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index d6e223dd7..025c42916 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -18,6 +18,7 @@ #include "CellImpl.h" #include "Chat.h" #include "CombatAI.h" +#include "CreatureScript.h" #include "CreatureTextMgr.h" #include "GameEventMgr.h" #include "GameTime.h" @@ -25,7 +26,6 @@ #include "ObjectMgr.h" #include "PassiveAI.h" #include "Pet.h" -#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" diff --git a/src/server/scripts/World/player_scripts.cpp b/src/server/scripts/World/player_scripts.cpp index cc98f2b37..0ec18509b 100644 --- a/src/server/scripts/World/player_scripts.cpp +++ b/src/server/scripts/World/player_scripts.cpp @@ -15,8 +15,9 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "Player.h" -#include "ScriptMgr.h" +#include "PlayerScript.h" enum ApprenticeAnglerQuestEnum { @@ -70,3 +71,4 @@ void AddSC_player_scripts() { new QuestApprenticeAnglerPlayerScript(); } + diff --git a/src/server/scripts/World/server_mail.cpp b/src/server/scripts/World/server_mail.cpp index 245fd7b36..12e4b44ac 100644 --- a/src/server/scripts/World/server_mail.cpp +++ b/src/server/scripts/World/server_mail.cpp @@ -15,10 +15,11 @@ * with this program. If not, see . */ +#include "CreatureScript.h" #include "ObjectMgr.h" #include "Player.h" +#include "PlayerScript.h" #include "QueryResult.h" -#include "ScriptMgr.h" class ServerMailReward : public PlayerScript { @@ -49,3 +50,4 @@ void AddSC_server_mail() { new ServerMailReward(); } + diff --git a/src/server/shared/DataStores/DBCEnums.h b/src/server/shared/DataStores/DBCEnums.h index 63c0b4066..28874b0fe 100644 --- a/src/server/shared/DataStores/DBCEnums.h +++ b/src/server/shared/DataStores/DBCEnums.h @@ -18,6 +18,8 @@ #ifndef DBCENUMS_H #define DBCENUMS_H +#include "Define.h" + #pragma pack(push, 1) struct DBCPosition2D @@ -48,7 +50,7 @@ struct DBCPosition3D // also see MAX_LEVEL and GT_MAX_LEVEL define #define STRONG_MAX_LEVEL 255 -enum BattlegroundBracketId // bracketId for level ranges +enum BattlegroundBracketId : uint8 // bracketId for level ranges { BG_BRACKET_ID_FIRST = 0, BG_BRACKET_ID_LAST = 15 @@ -268,7 +270,7 @@ enum AreaFlags AREA_FLAG_NO_FLY_ZONE = 0x20000000 // Marks zones where you cannot fly }; -enum Difficulty +enum Difficulty : uint8 { REGULAR_DIFFICULTY = 0, diff --git a/src/server/shared/SharedDefines.h b/src/server/shared/SharedDefines.h index 998c56cc0..02729cc1b 100644 --- a/src/server/shared/SharedDefines.h +++ b/src/server/shared/SharedDefines.h @@ -18,6 +18,7 @@ #ifndef ACORE_SHAREDDEFINES_H #define ACORE_SHAREDDEFINES_H +#include "DBCEnums.h" #include "Define.h" #include "EnumFlag.h" #include @@ -25,7 +26,7 @@ float const GROUND_HEIGHT_TOLERANCE = 0.05f; // Extra tolerance to z position to check if it is in air or on ground. constexpr float Z_OFFSET_FIND_HEIGHT = 2.0f; -enum SpellEffIndex +enum SpellEffIndex : uint8 { EFFECT_0 = 0, EFFECT_1 = 1, @@ -174,7 +175,7 @@ enum UnitClass #define PLAYER_MAX_BATTLEGROUND_QUEUES 2 -enum ReputationRank +enum ReputationRank : uint8 { REP_HATED = 0, REP_HOSTILE = 1, @@ -754,7 +755,7 @@ enum Language #define LANGUAGES_COUNT 19 -enum TeamId +enum TeamId : uint8 { TEAM_ALLIANCE = 0, TEAM_HORDE, @@ -3572,7 +3573,7 @@ enum TradeStatus TRADE_STATUS_NOT_ELIGIBLE = 23 // Related to trading soulbound loot items }; -enum XPColorChar +enum XPColorChar : uint8 { XP_RED, XP_ORANGE, @@ -3581,7 +3582,7 @@ enum XPColorChar XP_GRAY }; -enum RemoveMethod +enum RemoveMethod : uint8 { GROUP_REMOVEMETHOD_DEFAULT = 0, GROUP_REMOVEMETHOD_KICK = 1, diff --git a/src/test/server/game/Miscellaneous/FormulasTest.cpp b/src/test/server/game/Miscellaneous/FormulasTest.cpp index 3f773b3d8..803fd72cb 100644 --- a/src/test/server/game/Miscellaneous/FormulasTest.cpp +++ b/src/test/server/game/Miscellaneous/FormulasTest.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "DBCStores.h" #include "Formulas.h" #include "WorldMock.h" #include "gtest/gtest.h"