diff options
author | Naios <naios-dev@live.de> | 2016-03-11 16:37:14 +0100 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-03-24 01:31:51 +0100 |
commit | bf33159a7009f64a78cf2a1309eb5182fcd3f7e3 (patch) | |
tree | 69396ea652eed2d43002600577e7b6c7c070581f | |
parent | 25b0e743b1a823b636ffc1ba17062f8d5ebe35ab (diff) |
Core/Game: Converted the game library to a shared library.
* There is still the possibility to static link against game.
165 files changed, 929 insertions, 827 deletions
diff --git a/src/server/game/AI/CoreAI/CombatAI.h b/src/server/game/AI/CoreAI/CombatAI.h index 55b91b6969e..f1718fbdb6a 100644 --- a/src/server/game/AI/CoreAI/CombatAI.h +++ b/src/server/game/AI/CoreAI/CombatAI.h @@ -25,7 +25,7 @@ class Creature; -class AggressorAI : public CreatureAI +class TC_GAME_API AggressorAI : public CreatureAI { public: explicit AggressorAI(Creature* c) : CreatureAI(c) { } @@ -36,7 +36,7 @@ class AggressorAI : public CreatureAI typedef std::vector<uint32> SpellVct; -class CombatAI : public CreatureAI +class TC_GAME_API CombatAI : public CreatureAI { public: explicit CombatAI(Creature* c) : CreatureAI(c) { } @@ -55,7 +55,7 @@ class CombatAI : public CreatureAI SpellVct spells; }; -class CasterAI : public CombatAI +class TC_GAME_API CasterAI : public CombatAI { public: explicit CasterAI(Creature* c) : CombatAI(c) { m_attackDist = MELEE_RANGE; } @@ -67,7 +67,7 @@ class CasterAI : public CombatAI float m_attackDist; }; -struct ArcherAI : public CreatureAI +struct TC_GAME_API ArcherAI : public CreatureAI { public: explicit ArcherAI(Creature* c); @@ -80,7 +80,7 @@ struct ArcherAI : public CreatureAI float m_minRange; }; -struct TurretAI : public CreatureAI +struct TC_GAME_API TurretAI : public CreatureAI { public: explicit TurretAI(Creature* c); @@ -97,7 +97,7 @@ struct TurretAI : public CreatureAI #define VEHICLE_CONDITION_CHECK_TIME 1000 #define VEHICLE_DISMISS_TIME 5000 -struct VehicleAI : public CreatureAI +struct TC_GAME_API VehicleAI : public CreatureAI { public: explicit VehicleAI(Creature* creature); diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h index 4f256a5de31..7a2f23ac804 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.h +++ b/src/server/game/AI/CoreAI/GameObjectAI.h @@ -26,7 +26,7 @@ #include "GameObject.h" #include "CreatureAI.h" -class GameObjectAI +class TC_GAME_API GameObjectAI { protected: GameObject* const go; @@ -63,7 +63,7 @@ class GameObjectAI virtual void EventInform(uint32 /*eventId*/) { } }; -class NullGameObjectAI : public GameObjectAI +class TC_GAME_API NullGameObjectAI : public GameObjectAI { public: explicit NullGameObjectAI(GameObject* g); diff --git a/src/server/game/AI/CoreAI/GuardAI.h b/src/server/game/AI/CoreAI/GuardAI.h index 63f2750a5d4..a6aa4b6624a 100644 --- a/src/server/game/AI/CoreAI/GuardAI.h +++ b/src/server/game/AI/CoreAI/GuardAI.h @@ -23,7 +23,7 @@ class Creature; -class GuardAI : public ScriptedAI +class TC_GAME_API GuardAI : public ScriptedAI { public: explicit GuardAI(Creature* creature); diff --git a/src/server/game/AI/CoreAI/PassiveAI.h b/src/server/game/AI/CoreAI/PassiveAI.h index bd72cd7fbe7..5a6dba7046d 100644 --- a/src/server/game/AI/CoreAI/PassiveAI.h +++ b/src/server/game/AI/CoreAI/PassiveAI.h @@ -21,7 +21,7 @@ #include "CreatureAI.h" -class PassiveAI : public CreatureAI +class TC_GAME_API PassiveAI : public CreatureAI { public: explicit PassiveAI(Creature* c); @@ -33,7 +33,7 @@ class PassiveAI : public CreatureAI static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; } }; -class PossessedAI : public CreatureAI +class TC_GAME_API PossessedAI : public CreatureAI { public: explicit PossessedAI(Creature* c); @@ -49,7 +49,7 @@ class PossessedAI : public CreatureAI static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; } }; -class NullCreatureAI : public CreatureAI +class TC_GAME_API NullCreatureAI : public CreatureAI { public: explicit NullCreatureAI(Creature* c); @@ -63,7 +63,7 @@ class NullCreatureAI : public CreatureAI static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; } }; -class CritterAI : public PassiveAI +class TC_GAME_API CritterAI : public PassiveAI { public: explicit CritterAI(Creature* c) : PassiveAI(c) { } @@ -72,7 +72,7 @@ class CritterAI : public PassiveAI void EnterEvadeMode(EvadeReason why) override; }; -class TriggerAI : public NullCreatureAI +class TC_GAME_API TriggerAI : public NullCreatureAI { public: explicit TriggerAI(Creature* c) : NullCreatureAI(c) { } diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h index 9c33baa9a9f..3ad34047b01 100644 --- a/src/server/game/AI/CoreAI/PetAI.h +++ b/src/server/game/AI/CoreAI/PetAI.h @@ -25,7 +25,7 @@ class Creature; class Spell; -class PetAI : public CreatureAI +class TC_GAME_API PetAI : public CreatureAI { public: diff --git a/src/server/game/AI/CoreAI/ReactorAI.h b/src/server/game/AI/CoreAI/ReactorAI.h index e5abaac2f00..d281ca11fdf 100644 --- a/src/server/game/AI/CoreAI/ReactorAI.h +++ b/src/server/game/AI/CoreAI/ReactorAI.h @@ -23,7 +23,7 @@ class Unit; -class ReactorAI : public CreatureAI +class TC_GAME_API ReactorAI : public CreatureAI { public: diff --git a/src/server/game/AI/CoreAI/TotemAI.h b/src/server/game/AI/CoreAI/TotemAI.h index e1d1618037f..a0e796ed7e0 100644 --- a/src/server/game/AI/CoreAI/TotemAI.h +++ b/src/server/game/AI/CoreAI/TotemAI.h @@ -25,7 +25,7 @@ class Creature; class Totem; -class TotemAI : public CreatureAI +class TC_GAME_API TotemAI : public CreatureAI { public: diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index b43e61b6c6e..ea001ceda32 100644 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -40,7 +40,7 @@ enum SelectAggroTarget }; // default predicate function to select target based on distance, player and/or aura criteria -struct DefaultTargetSelector : public std::unary_function<Unit*, bool> +struct TC_GAME_API DefaultTargetSelector : public std::unary_function<Unit*, bool> { const Unit* me; float m_dist; @@ -90,7 +90,7 @@ struct DefaultTargetSelector : public std::unary_function<Unit*, bool> // Target selector for spell casts checking range, auras and attributes /// @todo Add more checks from Spell::CheckCast -struct SpellTargetSelector : public std::unary_function<Unit*, bool> +struct TC_GAME_API SpellTargetSelector : public std::unary_function<Unit*, bool> { public: SpellTargetSelector(Unit* caster, uint32 spellId); @@ -104,7 +104,7 @@ struct SpellTargetSelector : public std::unary_function<Unit*, bool> // Very simple target selector, will just skip main target // NOTE: When passing to UnitAI::SelectTarget remember to use 0 as position for random selection // because tank will not be in the temporary list -struct NonTankTargetSelector : public std::unary_function<Unit*, bool> +struct TC_GAME_API NonTankTargetSelector : public std::unary_function<Unit*, bool> { public: NonTankTargetSelector(Creature* source, bool playerOnly = true) : _source(source), _playerOnly(playerOnly) { } @@ -115,7 +115,7 @@ struct NonTankTargetSelector : public std::unary_function<Unit*, bool> bool _playerOnly; }; -class UnitAI +class TC_GAME_API UnitAI { protected: Unit* const me; @@ -264,7 +264,7 @@ class UnitAI UnitAI& operator=(UnitAI const& right) = delete; }; -class PlayerAI : public UnitAI +class TC_GAME_API PlayerAI : public UnitAI { protected: Player* const me; @@ -274,7 +274,7 @@ class PlayerAI : public UnitAI void OnCharmed(bool apply) override; }; -class SimpleCharmedAI : public PlayerAI +class TC_GAME_API SimpleCharmedAI : public PlayerAI { public: void UpdateAI(uint32 diff) override; diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index f250a79ea25..59f954c691d 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -65,7 +65,7 @@ enum SCEquip }; typedef std::set<AreaBoundary const*> CreatureBoundary; -class CreatureAI : public UnitAI +class TC_GAME_API CreatureAI : public UnitAI { protected: Creature* const me; diff --git a/src/server/game/AI/CreatureAISelector.h b/src/server/game/AI/CreatureAISelector.h index 7c7bc705ade..0e3be1a8604 100644 --- a/src/server/game/AI/CreatureAISelector.h +++ b/src/server/game/AI/CreatureAISelector.h @@ -27,9 +27,9 @@ class GameObject; namespace FactorySelector { - CreatureAI* selectAI(Creature*); - MovementGenerator* selectMovementGenerator(Creature*); - GameObjectAI* SelectGameObjectAI(GameObject*); + TC_GAME_API CreatureAI* selectAI(Creature*); + TC_GAME_API MovementGenerator* selectMovementGenerator(Creature*); + TC_GAME_API GameObjectAI* SelectGameObjectAI(GameObject*); } #endif diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 0e6836ca538..87c7f2083af 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -608,27 +608,27 @@ void WorldBossAI::UpdateAI(uint32 diff) } // SD2 grid searchers. -Creature* GetClosestCreatureWithEntry(WorldObject* source, uint32 entry, float maxSearchRange, bool alive /*= true*/) +TC_GAME_API Creature* GetClosestCreatureWithEntry(WorldObject* source, uint32 entry, float maxSearchRange, bool alive /*= true*/) { return source->FindNearestCreature(entry, maxSearchRange, alive); } -GameObject* GetClosestGameObjectWithEntry(WorldObject* source, uint32 entry, float maxSearchRange) +TC_GAME_API GameObject* GetClosestGameObjectWithEntry(WorldObject* source, uint32 entry, float maxSearchRange) { return source->FindNearestGameObject(entry, maxSearchRange); } -void GetCreatureListWithEntryInGrid(std::list<Creature*>& list, WorldObject* source, uint32 entry, float maxSearchRange) +TC_GAME_API void GetCreatureListWithEntryInGrid(std::list<Creature*>& list, WorldObject* source, uint32 entry, float maxSearchRange) { source->GetCreatureListWithEntryInGrid(list, entry, maxSearchRange); } -void GetGameObjectListWithEntryInGrid(std::list<GameObject*>& list, WorldObject* source, uint32 entry, float maxSearchRange) +TC_GAME_API void GetGameObjectListWithEntryInGrid(std::list<GameObject*>& list, WorldObject* source, uint32 entry, float maxSearchRange) { source->GetGameObjectListWithEntryInGrid(list, entry, maxSearchRange); } -void GetPlayerListInGrid(std::list<Player*>& list, WorldObject* source, float maxSearchRange) +TC_GAME_API void GetPlayerListInGrid(std::list<Player*>& list, WorldObject* source, float maxSearchRange) { source->GetPlayerListInGrid(list, maxSearchRange); } diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index d3e20e8b886..56e4b8bf780 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -38,7 +38,7 @@ T* EnsureAI(U* ai) class InstanceScript; -class SummonList +class TC_GAME_API SummonList { public: typedef GuidList StorageType; @@ -123,7 +123,7 @@ private: StorageType storage_; }; -class EntryCheckPredicate +class TC_GAME_API EntryCheckPredicate { public: EntryCheckPredicate(uint32 entry) : _entry(entry) { } @@ -133,13 +133,13 @@ class EntryCheckPredicate uint32 _entry; }; -class DummyEntryCheckPredicate +class TC_GAME_API DummyEntryCheckPredicate { public: bool operator()(ObjectGuid) { return true; } }; -struct ScriptedAI : public CreatureAI +struct TC_GAME_API ScriptedAI : public CreatureAI { explicit ScriptedAI(Creature* creature); virtual ~ScriptedAI() { } @@ -331,7 +331,7 @@ struct ScriptedAI : public CreatureAI bool _isHeroic; }; -class BossAI : public ScriptedAI +class TC_GAME_API BossAI : public ScriptedAI { public: BossAI(Creature* creature, uint32 bossId); @@ -374,7 +374,7 @@ class BossAI : public ScriptedAI uint32 const _bossId; }; -class WorldBossAI : public ScriptedAI +class TC_GAME_API WorldBossAI : public ScriptedAI { public: WorldBossAI(Creature* creature); @@ -405,10 +405,10 @@ class WorldBossAI : public ScriptedAI }; // SD2 grid searchers. -Creature* GetClosestCreatureWithEntry(WorldObject* source, uint32 entry, float maxSearchRange, bool alive = true); -GameObject* GetClosestGameObjectWithEntry(WorldObject* source, uint32 entry, float maxSearchRange); -void GetCreatureListWithEntryInGrid(std::list<Creature*>& list, WorldObject* source, uint32 entry, float maxSearchRange); -void GetGameObjectListWithEntryInGrid(std::list<GameObject*>& list, WorldObject* source, uint32 entry, float maxSearchRange); -void GetPlayerListInGrid(std::list<Player*>& list, WorldObject* source, float maxSearchRange); +TC_GAME_API Creature* GetClosestCreatureWithEntry(WorldObject* source, uint32 entry, float maxSearchRange, bool alive = true); +TC_GAME_API GameObject* GetClosestGameObjectWithEntry(WorldObject* source, uint32 entry, float maxSearchRange); +TC_GAME_API void GetCreatureListWithEntryInGrid(std::list<Creature*>& list, WorldObject* source, uint32 entry, float maxSearchRange); +TC_GAME_API void GetGameObjectListWithEntryInGrid(std::list<GameObject*>& list, WorldObject* source, uint32 entry, float maxSearchRange); +TC_GAME_API void GetPlayerListInGrid(std::list<Player*>& list, WorldObject* source, float maxSearchRange); #endif // SCRIPTEDCREATURE_H_ diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h index 673f3e671a0..37a1464d812 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h @@ -49,7 +49,7 @@ enum eEscortState STATE_ESCORT_PAUSED = 0x004 //will not proceed with waypoints before state is removed }; -struct npc_escortAI : public ScriptedAI +struct TC_GAME_API npc_escortAI : public ScriptedAI { public: explicit npc_escortAI(Creature* creature); diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h index d1c976b45c8..e17fb7c8507 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h @@ -32,7 +32,7 @@ enum eFollowState STATE_FOLLOW_POSTEVENT = 0x020 //can be set at complete and allow post event to run }; -class FollowerAI : public ScriptedAI +class TC_GAME_API FollowerAI : public ScriptedAI { public: explicit FollowerAI(Creature* creature); diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index 3abe1e5774c..aa7c9ace0b3 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -42,7 +42,7 @@ enum SmartEscortVars SMART_MAX_AID_DIST = SMART_ESCORT_MAX_PLAYER_DIST / 2 }; -class SmartAI : public CreatureAI +class TC_GAME_API SmartAI : public CreatureAI { public: ~SmartAI(){ } @@ -230,7 +230,7 @@ class SmartAI : public CreatureAI bool mJustReset; }; -class SmartGameObjectAI : public GameObjectAI +class TC_GAME_API SmartGameObjectAI : public GameObjectAI { public: SmartGameObjectAI(GameObject* g) : GameObjectAI(g) { } diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index 95792fead3c..0ea3afa08f9 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -28,7 +28,7 @@ #include "SmartScriptMgr.h" //#include "SmartAI.h" -class SmartScript +class TC_GAME_API SmartScript { public: SmartScript(); diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 5f627e4021d..87d23b077b1 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1435,7 +1435,7 @@ public: }; typedef std::unordered_map<uint32, ObjectGuidList*> ObjectListMap; -class SmartWaypointMgr +class TC_GAME_API SmartWaypointMgr { private: SmartWaypointMgr() { } @@ -1467,7 +1467,7 @@ typedef std::unordered_map<int64, SmartAIEventList> SmartAIEventMap; typedef std::map<uint32 /*entry*/, std::pair<uint32 /*spellId*/, SpellEffIndex /*effIndex*/> > CacheSpellContainer; typedef std::pair<CacheSpellContainer::const_iterator, CacheSpellContainer::const_iterator> CacheSpellContainerBounds; -class SmartAIMgr +class TC_GAME_API SmartAIMgr { private: SmartAIMgr() { } diff --git a/src/server/game/Accounts/AccountMgr.h b/src/server/game/Accounts/AccountMgr.h index 09ab140d07c..d0a80f983db 100644 --- a/src/server/game/Accounts/AccountMgr.h +++ b/src/server/game/Accounts/AccountMgr.h @@ -50,7 +50,7 @@ typedef std::map<uint32, rbac::RBACPermission*> RBACPermissionsContainer; typedef std::map<uint8, rbac::RBACPermissionContainer> RBACDefaultPermissionsContainer; } -class AccountMgr +class TC_GAME_API AccountMgr { private: AccountMgr(); diff --git a/src/server/game/Accounts/BattlenetAccountMgr.h b/src/server/game/Accounts/BattlenetAccountMgr.h index ef47a3e5c93..1888e782616 100644 --- a/src/server/game/Accounts/BattlenetAccountMgr.h +++ b/src/server/game/Accounts/BattlenetAccountMgr.h @@ -29,18 +29,18 @@ namespace Battlenet { namespace AccountMgr { - AccountOpResult CreateBattlenetAccount(std::string email, std::string password, bool withGameAccount = true); - AccountOpResult ChangePassword(uint32 accountId, std::string newPassword); - bool CheckPassword(uint32 accountId, std::string password); - AccountOpResult LinkWithGameAccount(std::string const& email, std::string const& gameAccountName); - AccountOpResult UnlinkGameAccount(std::string const& gameAccountName); - - uint32 GetId(std::string const& username); - bool GetName(uint32 accountId, std::string& name); - uint32 GetIdByGameAccount(uint32 gameAccountId); - uint8 GetMaxIndex(uint32 accountId); - - std::string CalculateShaPassHash(std::string const& name, std::string const& password); + TC_GAME_API AccountOpResult CreateBattlenetAccount(std::string email, std::string password, bool withGameAccount = true); + TC_GAME_API AccountOpResult ChangePassword(uint32 accountId, std::string newPassword); + TC_GAME_API bool CheckPassword(uint32 accountId, std::string password); + TC_GAME_API AccountOpResult LinkWithGameAccount(std::string const& email, std::string const& gameAccountName); + TC_GAME_API AccountOpResult UnlinkGameAccount(std::string const& gameAccountName); + + TC_GAME_API uint32 GetId(std::string const& username); + TC_GAME_API bool GetName(uint32 accountId, std::string& name); + TC_GAME_API uint32 GetIdByGameAccount(uint32 gameAccountId); + TC_GAME_API uint8 GetMaxIndex(uint32 accountId); + + TC_GAME_API std::string CalculateShaPassHash(std::string const& name, std::string const& password); } } diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h index 5dc0c0867ea..07ad2a2fd4b 100644 --- a/src/server/game/Accounts/RBAC.h +++ b/src/server/game/Accounts/RBAC.h @@ -745,7 +745,7 @@ enum RBACCommandResult typedef std::set<uint32> RBACPermissionContainer; -class RBACPermission +class TC_GAME_API RBACPermission { public: RBACPermission(uint32 id = 0, std::string const& name = ""): @@ -780,7 +780,7 @@ class RBACPermission * - Granted permissions: through linked permissions and directly assigned * - Denied permissions: through linked permissions and directly assigned */ -class RBACData +class TC_GAME_API RBACData { public: RBACData(uint32 id, std::string const& name, int32 realmId, uint8 secLevel = 255): diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 7a70b23077f..f1801100b25 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -525,6 +525,12 @@ void AchievementMgr<Guild>::DeleteFromDB(ObjectGuid guid) CharacterDatabase.CommitTransaction(trans); } +template TRINITY_GAME_API +void AchievementMgr<Player>::DeleteFromDB(ObjectGuid /*guid*/); + +template TRINITY_GAME_API +void AchievementMgr<Guild>::DeleteFromDB(ObjectGuid /*guid*/); + template<class T> void AchievementMgr<T>::SaveToDB(SQLTransaction& /*trans*/) { @@ -2584,6 +2590,9 @@ bool AchievementMgr<T>::AdditionalRequirementsSatisfied(ModifierTreeNode const* return true; } +template class TC_GAME_API AchievementMgr<Player>; +template class TC_GAME_API AchievementMgr<Guild>; + char const* AchievementGlobalMgr::GetCriteriaTypeString(uint32 type) { return GetCriteriaTypeString(AchievementCriteriaTypes(type)); @@ -2887,9 +2896,6 @@ char const* AchievementGlobalMgr::GetCriteriaTypeString(AchievementCriteriaTypes return "MISSING_TYPE"; } -template class AchievementMgr<Guild>; -template class AchievementMgr<Player>; - AchievementGlobalMgr* AchievementGlobalMgr::instance() { static AchievementGlobalMgr instance; diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h index 5ee8574559a..2d4aef490c4 100644 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -233,7 +233,7 @@ struct AchievementCriteriaData bool Meets(uint32 criteria_id, Player const* source, Unit const* target, uint32 miscValue1 = 0) const; }; -struct AchievementCriteriaDataSet +struct TC_GAME_API AchievementCriteriaDataSet { AchievementCriteriaDataSet() : criteria_id(0) { } typedef std::vector<AchievementCriteriaData> Storage; @@ -285,7 +285,7 @@ enum ProgressType }; template<class T> -class AchievementMgr +class TC_GAME_API AchievementMgr { public: AchievementMgr(T* owner); @@ -335,7 +335,7 @@ class AchievementMgr uint32 _achievementPoints; }; -class AchievementGlobalMgr +class TC_GAME_API AchievementGlobalMgr { AchievementGlobalMgr() { } ~AchievementGlobalMgr(); diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h index 62b6838a6e6..ae9a6c1e894 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.h +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h @@ -64,7 +64,7 @@ enum MailAuctionAnswers AUCTION_SALE_PENDING = 6 }; -struct AuctionEntry +struct TC_GAME_API AuctionEntry { uint32 Id; ObjectGuid::LowType auctioneer; // creature low guid @@ -97,7 +97,7 @@ struct AuctionEntry }; //this class is used as auctionhouse instance -class AuctionHouseObject +class TC_GAME_API AuctionHouseObject { public: ~AuctionHouseObject() @@ -135,7 +135,7 @@ class AuctionHouseObject AuctionEntryMap AuctionsMap; }; -class AuctionHouseMgr +class TC_GAME_API AuctionHouseMgr { private: AuctionHouseMgr(); diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBot.h b/src/server/game/AuctionHouseBot/AuctionHouseBot.h index 8f90e8fa76f..1a438e01cdb 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBot.h +++ b/src/server/game/AuctionHouseBot/AuctionHouseBot.h @@ -196,7 +196,7 @@ enum AuctionBotConfigFloatValues }; // All basic config data used by other AHBot classes for self-configure. -class AuctionBotConfig +class TC_GAME_API AuctionBotConfig { private: AuctionBotConfig(): _itemsPerCycleBoost(1000), _itemsPerCycleNormal(20) {} @@ -270,7 +270,7 @@ typedef AuctionHouseBotStatusInfoPerType AuctionHouseBotStatusInfo[MAX_AUCTION_H // This class handle both Selling and Buying method // (holder of AuctionBotBuyer and AuctionBotSeller objects) -class AuctionHouseBot +class TC_GAME_API AuctionHouseBot { private: AuctionHouseBot(); diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.h b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.h index e1b6b425c48..979f73c0099 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.h +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.h @@ -67,7 +67,7 @@ private: // This class handle all Buyer method // (holder of AuctionBotConfig for each auction house type) -class AuctionBotBuyer : public AuctionBotAgent +class TC_GAME_API AuctionBotBuyer : public AuctionBotAgent { public: AuctionBotBuyer(); diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h index 05782ee84b8..3e6f263707f 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h @@ -115,7 +115,7 @@ private: // This class handle all Selling method // (holder of AHB_Seller_Config data for each auction house type) -class AuctionBotSeller : public AuctionBotAgent +class TC_GAME_API AuctionBotSeller : public AuctionBotAgent { public: typedef std::vector<uint32> ItemPool; diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h index 0159ba95eeb..ad5770e2ad0 100644 --- a/src/server/game/Battlefield/Battlefield.h +++ b/src/server/game/Battlefield/Battlefield.h @@ -78,7 +78,7 @@ class BfGraveyard; typedef std::vector<BfGraveyard*> GraveyardVect; typedef std::map<ObjectGuid, time_t> PlayerTimerMap; -class BfCapturePoint +class TC_GAME_API BfCapturePoint { public: BfCapturePoint(Battlefield* bf); @@ -146,7 +146,7 @@ class BfCapturePoint ObjectGuid m_capturePointGUID; }; -class BfGraveyard +class TC_GAME_API BfGraveyard { public: BfGraveyard(Battlefield* Bf); @@ -193,7 +193,7 @@ class BfGraveyard Battlefield* m_Bf; }; -class Battlefield : public ZoneScript +class TC_GAME_API Battlefield : public ZoneScript { friend class BattlefieldMgr; diff --git a/src/server/game/Battlefield/BattlefieldMgr.h b/src/server/game/Battlefield/BattlefieldMgr.h index 2d3b9d06470..623f1dadb91 100644 --- a/src/server/game/Battlefield/BattlefieldMgr.h +++ b/src/server/game/Battlefield/BattlefieldMgr.h @@ -24,7 +24,7 @@ class Player; class ZoneScript; // class to handle player enter / leave / areatrigger / GO use events -class BattlefieldMgr +class TC_GAME_API BattlefieldMgr { public: static BattlefieldMgr* instance(); diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 087f20e9224..e849c2f33d1 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -266,7 +266,7 @@ class WintergraspCapturePoint : public BfCapturePoint * WinterGrasp Battlefield * * ######################### */ -class BattlefieldWG : public Battlefield +class TC_GAME_API BattlefieldWG : public Battlefield { public: ~BattlefieldWG(); @@ -1098,7 +1098,7 @@ StaticWintergraspWorkshopInfo const WorkshopData[WG_MAX_WORKSHOP] = // ******************************************************************** // Structure for different buildings that can be destroyed during battle -struct BfWGGameObjectBuilding +struct TC_GAME_API BfWGGameObjectBuilding { private: // WG object @@ -1150,7 +1150,7 @@ public: }; // Structure for the 6 workshop -struct WintergraspWorkshop +struct TC_GAME_API WintergraspWorkshop { private: BattlefieldWG* _wg; // Pointer to wintergrasp diff --git a/src/server/game/Battlegrounds/Arena.h b/src/server/game/Battlegrounds/Arena.h index d0ed3a86af7..80745d2658c 100644 --- a/src/server/game/Battlegrounds/Arena.h +++ b/src/server/game/Battlegrounds/Arena.h @@ -36,7 +36,7 @@ enum ArenaWorldStates ARENA_WORLD_STATE_ALIVE_PLAYERS_GOLD = 3601 }; -class Arena : public Battleground +class TC_GAME_API Arena : public Battleground { protected: Arena(); diff --git a/src/server/game/Battlegrounds/ArenaScore.h b/src/server/game/Battlegrounds/ArenaScore.h index 683b216dd42..c9a9419dc2c 100644 --- a/src/server/game/Battlegrounds/ArenaScore.h +++ b/src/server/game/Battlegrounds/ArenaScore.h @@ -23,7 +23,7 @@ #include "Player.h" #include "ObjectAccessor.h" -struct ArenaScore : public BattlegroundScore +struct TC_GAME_API ArenaScore : public BattlegroundScore { friend class Arena; @@ -43,7 +43,7 @@ struct ArenaScore : public BattlegroundScore uint8 TeamId; // BattlegroundTeamId }; -struct ArenaTeamScore +struct TC_GAME_API ArenaTeamScore { friend class Arena; friend class Battleground; diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h index db5d63a8915..df966a632cb 100644 --- a/src/server/game/Battlegrounds/ArenaTeam.h +++ b/src/server/game/Battlegrounds/ArenaTeam.h @@ -81,7 +81,7 @@ enum ArenaTeamTypes ARENA_TEAM_5v5 = 5 }; -struct ArenaTeamMember +struct TC_GAME_API ArenaTeamMember { ObjectGuid Guid; std::string Name; @@ -109,7 +109,7 @@ struct ArenaTeamStats #define MAX_ARENA_SLOT 3 // 0..2 slots -class ArenaTeam +class TC_GAME_API ArenaTeam { public: ArenaTeam(); diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.h b/src/server/game/Battlegrounds/ArenaTeamMgr.h index 23197ad869f..131a2cc8899 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.h +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.h @@ -20,7 +20,7 @@ #include "ArenaTeam.h" -class ArenaTeamMgr +class TC_GAME_API ArenaTeamMgr { private: ArenaTeamMgr(); diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 1f33b0d5d7c..cb2fb68d9dd 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -232,7 +232,7 @@ This class is used to: 3. some certain cases, same for all battlegrounds 4. It has properties same for all battlegrounds */ -class Battleground +class TC_GAME_API Battleground { public: Battleground(); diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h index 85a2358c9d1..d35b239a725 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.h +++ b/src/server/game/Battlegrounds/BattlegroundMgr.h @@ -67,7 +67,7 @@ namespace WorldPackets } } -class BattlegroundMgr +class TC_GAME_API BattlegroundMgr { private: BattlegroundMgr(); diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h index 9291adf9e8d..5eac6a8f51a 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.h +++ b/src/server/game/Battlegrounds/BattlegroundQueue.h @@ -72,7 +72,7 @@ enum BattlegroundQueueInvitationType }; class Battleground; -class BattlegroundQueue +class TC_GAME_API BattlegroundQueue { public: BattlegroundQueue(); @@ -142,7 +142,7 @@ class BattlegroundQueue This class is used to invite player to BG again, when minute lasts from his first invitation it is capable to solve all possibilities */ -class BGQueueInviteEvent : public BasicEvent +class TC_GAME_API BGQueueInviteEvent : public BasicEvent { public: BGQueueInviteEvent(ObjectGuid pl_guid, uint32 BgInstanceGUID, BattlegroundTypeId BgTypeId, uint8 arenaType, uint32 removeTime) : @@ -165,7 +165,7 @@ class BGQueueInviteEvent : public BasicEvent We must store removeInvite time in case player left queue and joined and is invited again We must store bgQueueTypeId, because battleground can be deleted already, when player entered it */ -class BGQueueRemoveEvent : public BasicEvent +class TC_GAME_API BGQueueRemoveEvent : public BasicEvent { public: BGQueueRemoveEvent(ObjectGuid pl_guid, uint32 bgInstanceGUID, BattlegroundTypeId BgTypeId, uint8 arenaType, BattlegroundQueueTypeId bgQueueTypeId, uint32 removeTime) diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt index bba0614d421..06d4c403909 100644 --- a/src/server/game/CMakeLists.txt +++ b/src/server/game/CMakeLists.txt @@ -21,6 +21,8 @@ endif () GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) +add_definitions(-DTRINITY_API_EXPORT_GAME) + add_library(game ${PRIVATE_SOURCES} ${PRIVATE_PCH_SOURCE} @@ -48,6 +50,18 @@ set_target_properties(game FOLDER "server") +if( BUILD_SHARED_LIBS ) + if( UNIX ) + install(TARGETS game + LIBRARY + DESTINATION lib) + elseif( WIN32 ) + install(TARGETS game + RUNTIME + DESTINATION "${CMAKE_INSTALL_PREFIX}") + endif() +endif() + # Generate precompiled header if (USE_COREPCH) add_cxx_pch(game ${PRIVATE_PCH_HEADER} ${PRIVATE_PCH_SOURCE}) diff --git a/src/server/game/Calendar/CalendarMgr.h b/src/server/game/Calendar/CalendarMgr.h index 3eae74a02b5..e7594823d51 100644 --- a/src/server/game/Calendar/CalendarMgr.h +++ b/src/server/game/Calendar/CalendarMgr.h @@ -128,7 +128,7 @@ enum CalendarError #define CALENDAR_MAX_INVITES 100 #define CALENDAR_DEFAULT_RESPONSE_TIME 946684800 // 01/01/2000 00:00:00 -struct CalendarInvite +struct TC_GAME_API CalendarInvite { public: CalendarInvite(CalendarInvite const& calendarInvite, uint64 inviteId, uint64 eventId) @@ -188,7 +188,7 @@ struct CalendarInvite std::string _note; }; -struct CalendarEvent +struct TC_GAME_API CalendarEvent { public: CalendarEvent(CalendarEvent const& calendarEvent, uint64 eventId) @@ -268,7 +268,7 @@ typedef std::vector<CalendarInvite*> CalendarInviteStore; typedef std::set<CalendarEvent*> CalendarEventStore; typedef std::map<uint64 /* eventID */, CalendarInviteStore > CalendarEventInviteStore; -class CalendarMgr +class TC_GAME_API CalendarMgr { private: CalendarMgr(); diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h index 5683a876f6d..f309f3c7936 100644 --- a/src/server/game/Chat/Channels/Channel.h +++ b/src/server/game/Chat/Channels/Channel.h @@ -123,7 +123,7 @@ enum ChannelMemberFlags // 0x80 }; -class Channel +class TC_GAME_API Channel { struct PlayerInfo { diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h index 835a4cdcaaa..cdaf6b8565c 100644 --- a/src/server/game/Chat/Channels/ChannelMgr.h +++ b/src/server/game/Chat/Channels/ChannelMgr.h @@ -24,7 +24,7 @@ #define MAX_CHANNEL_NAME_STR 0x31 #define MAX_CHANNEL_PASS_STR 31 -class ChannelMgr +class TC_GAME_API ChannelMgr { typedef std::map<std::wstring, Channel*> ChannelMap; diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index 63166b6ae91..226ec1fe6ad 100644 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -37,7 +37,7 @@ class WorldObject; struct GameTele; -class ChatCommand +class TC_GAME_API ChatCommand { typedef bool(*pHandler)(ChatHandler*, char const*); @@ -53,7 +53,7 @@ class ChatCommand std::vector<ChatCommand> ChildCommands; }; -class ChatHandler +class TC_GAME_API ChatHandler { public: WorldSession* GetSession() { return m_session; } @@ -154,7 +154,7 @@ class ChatHandler bool sentErrorMessage; }; -class CliHandler : public ChatHandler +class TC_GAME_API CliHandler : public ChatHandler { public: typedef void Print(void*, char const*); diff --git a/src/server/game/Chat/ChatLink.h b/src/server/game/Chat/ChatLink.h index 1a0310118d2..ae6932b5d27 100644 --- a/src/server/game/Chat/ChatLink.h +++ b/src/server/game/Chat/ChatLink.h @@ -35,7 +35,7 @@ class Quest; /////////////////////////////////////////////////////////////////////////////////////////////////// // ChatLink - abstract base class for various links -class ChatLink +class TC_GAME_API ChatLink { public: ChatLink() : _color(0), _startPos(0), _endPos(0) { } @@ -55,7 +55,7 @@ protected: }; // ItemChatLink - link to item -class ItemChatLink : public ChatLink +class TC_GAME_API ItemChatLink : public ChatLink { public: ItemChatLink() : ChatLink(), _item(NULL), _suffix(NULL), _property(NULL) @@ -76,7 +76,7 @@ protected: }; // QuestChatLink - link to quest -class QuestChatLink : public ChatLink +class TC_GAME_API QuestChatLink : public ChatLink { public: QuestChatLink() : ChatLink(), _quest(nullptr), _questLevel(0) { } @@ -89,7 +89,7 @@ protected: }; // SpellChatLink - link to quest -class SpellChatLink : public ChatLink +class TC_GAME_API SpellChatLink : public ChatLink { public: SpellChatLink() : ChatLink(), _spell(nullptr) { } @@ -101,7 +101,7 @@ protected: }; // AchievementChatLink - link to quest -class AchievementChatLink : public ChatLink +class TC_GAME_API AchievementChatLink : public ChatLink { public: AchievementChatLink() : ChatLink(), _guid(0), _achievement(NULL) @@ -118,7 +118,7 @@ protected: }; // TradeChatLink - link to trade info -class TradeChatLink : public SpellChatLink +class TC_GAME_API TradeChatLink : public SpellChatLink { public: TradeChatLink() : SpellChatLink(), _minSkillLevel(0), _maxSkillLevel(0), _guid(0) { } @@ -131,7 +131,7 @@ private: }; // TalentChatLink - link to talent -class TalentChatLink : public SpellChatLink +class TC_GAME_API TalentChatLink : public SpellChatLink { public: TalentChatLink() : SpellChatLink(), _talentId(0), _rankId(0) { } @@ -143,7 +143,7 @@ private: }; // EnchantmentChatLink - link to enchantment -class EnchantmentChatLink : public SpellChatLink +class TC_GAME_API EnchantmentChatLink : public SpellChatLink { public: EnchantmentChatLink() : SpellChatLink() { } @@ -151,7 +151,7 @@ public: }; // GlyphChatLink - link to glyph -class GlyphChatLink : public SpellChatLink +class TC_GAME_API GlyphChatLink : public SpellChatLink { public: GlyphChatLink() : SpellChatLink(), _slotId(0), _glyph(NULL) { } @@ -161,7 +161,7 @@ private: GlyphPropertiesEntry const* _glyph; }; -class LinkExtractor +class TC_GAME_API LinkExtractor { public: explicit LinkExtractor(const char* msg); diff --git a/src/server/game/Combat/HostileRefManager.h b/src/server/game/Combat/HostileRefManager.h index 96152ed46f7..855f9e3d272 100644 --- a/src/server/game/Combat/HostileRefManager.h +++ b/src/server/game/Combat/HostileRefManager.h @@ -29,7 +29,7 @@ class SpellInfo; //================================================= -class HostileRefManager : public RefManager<Unit, ThreatManager> +class TC_GAME_API HostileRefManager : public RefManager<Unit, ThreatManager> { private: Unit* iOwner; diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h index 7d20e99c128..8b28779569a 100644 --- a/src/server/game/Combat/ThreatManager.h +++ b/src/server/game/Combat/ThreatManager.h @@ -39,14 +39,14 @@ class SpellInfo; //============================================================== // Class to calculate the real threat based -struct ThreatCalcHelper +struct TC_GAME_API ThreatCalcHelper { static float calcThreat(Unit* hatedUnit, Unit* hatingUnit, float threat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* threatSpell = NULL); static bool isValidProcess(Unit* hatedUnit, Unit* hatingUnit, SpellInfo const* threatSpell = NULL); }; //============================================================== -class HostileReference : public Reference<Unit, ThreatManager> +class TC_GAME_API HostileReference : public Reference<Unit, ThreatManager> { public: HostileReference(Unit* refUnit, ThreatManager* threatManager, float threat); @@ -141,7 +141,7 @@ class HostileReference : public Reference<Unit, ThreatManager> //============================================================== class ThreatManager; -class ThreatContainer +class TC_GAME_API ThreatContainer { friend class ThreatManager; @@ -198,7 +198,7 @@ class ThreatContainer //================================================= -class ThreatManager +class TC_GAME_API ThreatManager { public: friend class HostileReference; diff --git a/src/server/game/Combat/UnitEvents.h b/src/server/game/Combat/UnitEvents.h index e501cdaa4a2..f50edcf3c7d 100644 --- a/src/server/game/Combat/UnitEvents.h +++ b/src/server/game/Combat/UnitEvents.h @@ -81,7 +81,7 @@ class UnitBaseEvent //============================================================== -class ThreatRefStatusChangeEvent : public UnitBaseEvent +class TC_GAME_API ThreatRefStatusChangeEvent : public UnitBaseEvent { private: HostileReference* iHostileReference; diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index e973d56dade..db5b78215b3 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -178,7 +178,7 @@ enum MaxConditionTargets MAX_CONDITION_TARGETS = 3 }; -struct ConditionSourceInfo +struct TC_GAME_API ConditionSourceInfo { WorldObject* mConditionTargets[MAX_CONDITION_TARGETS]; // an array of targets available for conditions Condition const* mLastFailedCondition; @@ -191,7 +191,7 @@ struct ConditionSourceInfo } }; -struct Condition +struct TC_GAME_API Condition { ConditionSourceType SourceType; //SourceTypeOrReferenceId uint32 SourceGroup; @@ -243,7 +243,7 @@ typedef std::unordered_map<uint32, ConditionsByEntryMap> ConditionEntriesByCreat typedef std::unordered_map<std::pair<int32, uint32 /*SAI source_type*/>, ConditionsByEntryMap> SmartEventConditionContainer; typedef std::unordered_map<uint32, ConditionContainer> ConditionReferenceContainer;//only used for references -class ConditionMgr +class TC_GAME_API ConditionMgr { private: ConditionMgr(); diff --git a/src/server/game/Conditions/DisableMgr.h b/src/server/game/Conditions/DisableMgr.h index e74b7a9c319..cae1e0329e8 100644 --- a/src/server/game/Conditions/DisableMgr.h +++ b/src/server/game/Conditions/DisableMgr.h @@ -57,11 +57,11 @@ enum MMapDisableTypes namespace DisableMgr { - void LoadDisables(); - bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags = 0); - void CheckQuestDisables(); - bool IsVMAPDisabledFor(uint32 entry, uint8 flags); - bool IsPathfindingEnabled(uint32 mapId); + TC_GAME_API void LoadDisables(); + TC_GAME_API bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags = 0); + TC_GAME_API void CheckQuestDisables(); + TC_GAME_API bool IsVMAPDisabledFor(uint32 entry, uint8 flags); + TC_GAME_API bool IsPathfindingEnabled(uint32 mapId); } #endif //TRINITY_DISABLEMGR_H diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index aec278e7675..5088b750de4 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -24,96 +24,96 @@ #include <boost/regex.hpp> #include <array> -extern DB2Storage<AchievementEntry> sAchievementStore; -extern DB2Storage<AuctionHouseEntry> sAuctionHouseStore; -extern DB2Storage<BarberShopStyleEntry> sBarberShopStyleStore; -extern DB2Storage<BattlePetBreedQualityEntry> sBattlePetBreedQualityStore; -extern DB2Storage<BattlePetBreedStateEntry> sBattlePetBreedStateStore; -extern DB2Storage<BattlePetSpeciesEntry> sBattlePetSpeciesStore; -extern DB2Storage<BattlePetSpeciesStateEntry> sBattlePetSpeciesStateStore; -extern DB2Storage<BroadcastTextEntry> sBroadcastTextStore; -extern DB2Storage<CharStartOutfitEntry> sCharStartOutfitStore; -extern DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore; -extern DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore; -extern DB2Storage<CreatureTypeEntry> sCreatureTypeStore; -extern DB2Storage<CriteriaEntry> sCriteriaStore; -extern DB2Storage<CriteriaTreeEntry> sCriteriaTreeStore; -extern DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore; -extern DB2Storage<DestructibleModelDataEntry> sDestructibleModelDataStore; -extern DB2Storage<DurabilityQualityEntry> sDurabilityQualityStore; -extern DB2Storage<GameObjectsEntry> sGameObjectsStore; -extern DB2Storage<GameTablesEntry> sGameTablesStore; -extern DB2Storage<GarrAbilityEntry> sGarrAbilityStore; -extern DB2Storage<GarrBuildingEntry> sGarrBuildingStore; -extern DB2Storage<GarrBuildingPlotInstEntry> sGarrBuildingPlotInstStore; -extern DB2Storage<GarrClassSpecEntry> sGarrClassSpecStore; -extern DB2Storage<GarrFollowerEntry> sGarrFollowerStore; -extern DB2Storage<GarrFollowerXAbilityEntry> sGarrFollowerXAbilityStore; -extern DB2Storage<GarrPlotBuildingEntry> sGarrPlotBuildingStore; -extern DB2Storage<GarrPlotEntry> sGarrPlotStore; -extern DB2Storage<GarrPlotInstanceEntry> sGarrPlotInstanceStore; -extern DB2Storage<GarrSiteLevelEntry> sGarrSiteLevelStore; -extern DB2Storage<GarrSiteLevelPlotInstEntry> sGarrSiteLevelPlotInstStore; -extern DB2Storage<GlyphSlotEntry> sGlyphSlotStore; -extern DB2Storage<GuildPerkSpellsEntry> sGuildPerkSpellsStore; -extern DB2Storage<HeirloomEntry> sHeirloomStore; -extern DB2Storage<HolidaysEntry> sHolidaysStore; -extern DB2Storage<ImportPriceArmorEntry> sImportPriceArmorStore; -extern DB2Storage<ImportPriceQualityEntry> sImportPriceQualityStore; -extern DB2Storage<ImportPriceShieldEntry> sImportPriceShieldStore; -extern DB2Storage<ImportPriceWeaponEntry> sImportPriceWeaponStore; -extern DB2Storage<ItemClassEntry> sItemClassStore; -extern DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore; -extern DB2Storage<ItemDisenchantLootEntry> sItemDisenchantLootStore; -extern DB2Storage<ItemEffectEntry> sItemEffectStore; -extern DB2Storage<ItemEntry> sItemStore; -extern DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore; -extern DB2Storage<ItemLimitCategoryEntry> sItemLimitCategoryStore; -extern DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore; -extern DB2Storage<ItemRandomPropertiesEntry> sItemRandomPropertiesStore; -extern DB2Storage<ItemRandomSuffixEntry> sItemRandomSuffixStore; -extern DB2Storage<ItemSparseEntry> sItemSparseStore; -extern DB2Storage<ItemSpecEntry> sItemSpecStore; -extern DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore; -extern DB2Storage<ItemToBattlePetSpeciesEntry> sItemToBattlePetSpeciesStore; -extern DB2Storage<MailTemplateEntry> sMailTemplateStore; -extern DB2Storage<ModifierTreeEntry> sModifierTreeStore; -extern DB2Storage<MountCapabilityEntry> sMountCapabilityStore; -extern DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore; -extern DB2Storage<PlayerConditionEntry> sPlayerConditionStore; -extern DB2Storage<QuestMoneyRewardEntry> sQuestMoneyRewardStore; -extern DB2Storage<QuestSortEntry> sQuestSortStore; -extern DB2Storage<QuestXPEntry> sQuestXPStore; -extern DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore; -extern DB2Storage<SoundEntriesEntry> sSoundEntriesStore; -extern DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore; -extern DB2Storage<SpellCastTimesEntry> sSpellCastTimesStore; -extern DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore; -extern DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore; -extern DB2Storage<SpellDurationEntry> sSpellDurationStore; -extern DB2Storage<SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore; -extern DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore; -extern DB2Storage<SpellMiscEntry> sSpellMiscStore; -extern DB2Storage<SpellPowerEntry> sSpellPowerStore; -extern DB2Storage<SpellRadiusEntry> sSpellRadiusStore; -extern DB2Storage<SpellRangeEntry> sSpellRangeStore; -extern DB2Storage<SpellReagentsEntry> sSpellReagentsStore; -extern DB2Storage<SpellRuneCostEntry> sSpellRuneCostStore; -extern DB2Storage<SpellTotemsEntry> sSpellTotemsStore; -extern DB2Storage<SpellXSpellVisualEntry> sSpellXSpellVisualStore; -extern DB2Storage<TaxiNodesEntry> sTaxiNodesStore; -extern DB2Storage<TaxiPathEntry> sTaxiPathStore; -extern DB2Storage<TotemCategoryEntry> sTotemCategoryStore; -extern DB2Storage<ToyEntry> sToyStore; -extern DB2Storage<UnitPowerBarEntry> sUnitPowerBarStore; -extern DB2Storage<WorldMapOverlayEntry> sWorldMapOverlayStore; - -extern TaxiMask sTaxiNodesMask; -extern TaxiMask sOldContinentsNodesMask; -extern TaxiMask sHordeTaxiNodesMask; -extern TaxiMask sAllianceTaxiNodesMask; -extern TaxiPathSetBySource sTaxiPathSetBySource; -extern TaxiPathNodesByPath sTaxiPathNodesByPath; +TC_GAME_API extern DB2Storage<AchievementEntry> sAchievementStore; +TC_GAME_API extern DB2Storage<AuctionHouseEntry> sAuctionHouseStore; +TC_GAME_API extern DB2Storage<BarberShopStyleEntry> sBarberShopStyleStore; +TC_GAME_API extern DB2Storage<BattlePetBreedQualityEntry> sBattlePetBreedQualityStore; +TC_GAME_API extern DB2Storage<BattlePetBreedStateEntry> sBattlePetBreedStateStore; +TC_GAME_API extern DB2Storage<BattlePetSpeciesEntry> sBattlePetSpeciesStore; +TC_GAME_API extern DB2Storage<BattlePetSpeciesStateEntry> sBattlePetSpeciesStateStore; +TC_GAME_API extern DB2Storage<BroadcastTextEntry> sBroadcastTextStore; +TC_GAME_API extern DB2Storage<CharStartOutfitEntry> sCharStartOutfitStore; +TC_GAME_API extern DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore; +TC_GAME_API extern DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore; +TC_GAME_API extern DB2Storage<CreatureTypeEntry> sCreatureTypeStore; +TC_GAME_API extern DB2Storage<CriteriaEntry> sCriteriaStore; +TC_GAME_API extern DB2Storage<CriteriaTreeEntry> sCriteriaTreeStore; +TC_GAME_API extern DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore; +TC_GAME_API extern DB2Storage<DestructibleModelDataEntry> sDestructibleModelDataStore; +TC_GAME_API extern DB2Storage<DurabilityQualityEntry> sDurabilityQualityStore; +TC_GAME_API extern DB2Storage<GameObjectsEntry> sGameObjectsStore; +TC_GAME_API extern DB2Storage<GameTablesEntry> sGameTablesStore; +TC_GAME_API extern DB2Storage<GarrAbilityEntry> sGarrAbilityStore; +TC_GAME_API extern DB2Storage<GarrBuildingEntry> sGarrBuildingStore; +TC_GAME_API extern DB2Storage<GarrBuildingPlotInstEntry> sGarrBuildingPlotInstStore; +TC_GAME_API extern DB2Storage<GarrClassSpecEntry> sGarrClassSpecStore; +TC_GAME_API extern DB2Storage<GarrFollowerEntry> sGarrFollowerStore; +TC_GAME_API extern DB2Storage<GarrFollowerXAbilityEntry> sGarrFollowerXAbilityStore; +TC_GAME_API extern DB2Storage<GarrPlotBuildingEntry> sGarrPlotBuildingStore; +TC_GAME_API extern DB2Storage<GarrPlotEntry> sGarrPlotStore; +TC_GAME_API extern DB2Storage<GarrPlotInstanceEntry> sGarrPlotInstanceStore; +TC_GAME_API extern DB2Storage<GarrSiteLevelEntry> sGarrSiteLevelStore; +TC_GAME_API extern DB2Storage<GarrSiteLevelPlotInstEntry> sGarrSiteLevelPlotInstStore; +TC_GAME_API extern DB2Storage<GlyphSlotEntry> sGlyphSlotStore; +TC_GAME_API extern DB2Storage<GuildPerkSpellsEntry> sGuildPerkSpellsStore; +TC_GAME_API extern DB2Storage<HeirloomEntry> sHeirloomStore; +TC_GAME_API extern DB2Storage<HolidaysEntry> sHolidaysStore; +TC_GAME_API extern DB2Storage<ImportPriceArmorEntry> sImportPriceArmorStore; +TC_GAME_API extern DB2Storage<ImportPriceQualityEntry> sImportPriceQualityStore; +TC_GAME_API extern DB2Storage<ImportPriceShieldEntry> sImportPriceShieldStore; +TC_GAME_API extern DB2Storage<ImportPriceWeaponEntry> sImportPriceWeaponStore; +TC_GAME_API extern DB2Storage<ItemClassEntry> sItemClassStore; +TC_GAME_API extern DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore; +TC_GAME_API extern DB2Storage<ItemDisenchantLootEntry> sItemDisenchantLootStore; +TC_GAME_API extern DB2Storage<ItemEffectEntry> sItemEffectStore; +TC_GAME_API extern DB2Storage<ItemEntry> sItemStore; +TC_GAME_API extern DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore; +TC_GAME_API extern DB2Storage<ItemLimitCategoryEntry> sItemLimitCategoryStore; +TC_GAME_API extern DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore; +TC_GAME_API extern DB2Storage<ItemRandomPropertiesEntry> sItemRandomPropertiesStore; +TC_GAME_API extern DB2Storage<ItemRandomSuffixEntry> sItemRandomSuffixStore; +TC_GAME_API extern DB2Storage<ItemSparseEntry> sItemSparseStore; +TC_GAME_API extern DB2Storage<ItemSpecEntry> sItemSpecStore; +TC_GAME_API extern DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore; +TC_GAME_API extern DB2Storage<ItemToBattlePetSpeciesEntry> sItemToBattlePetSpeciesStore; +TC_GAME_API extern DB2Storage<MailTemplateEntry> sMailTemplateStore; +TC_GAME_API extern DB2Storage<ModifierTreeEntry> sModifierTreeStore; +TC_GAME_API extern DB2Storage<MountCapabilityEntry> sMountCapabilityStore; +TC_GAME_API extern DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore; +TC_GAME_API extern DB2Storage<PlayerConditionEntry> sPlayerConditionStore; +TC_GAME_API extern DB2Storage<QuestMoneyRewardEntry> sQuestMoneyRewardStore; +TC_GAME_API extern DB2Storage<QuestSortEntry> sQuestSortStore; +TC_GAME_API extern DB2Storage<QuestXPEntry> sQuestXPStore; +TC_GAME_API extern DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore; +TC_GAME_API extern DB2Storage<SoundEntriesEntry> sSoundEntriesStore; +TC_GAME_API extern DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore; +TC_GAME_API extern DB2Storage<SpellCastTimesEntry> sSpellCastTimesStore; +TC_GAME_API extern DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore; +TC_GAME_API extern DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore; +TC_GAME_API extern DB2Storage<SpellDurationEntry> sSpellDurationStore; +TC_GAME_API extern DB2Storage<SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore; +TC_GAME_API extern DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore; +TC_GAME_API extern DB2Storage<SpellMiscEntry> sSpellMiscStore; +TC_GAME_API extern DB2Storage<SpellPowerEntry> sSpellPowerStore; +TC_GAME_API extern DB2Storage<SpellRadiusEntry> sSpellRadiusStore; +TC_GAME_API extern DB2Storage<SpellRangeEntry> sSpellRangeStore; +TC_GAME_API extern DB2Storage<SpellReagentsEntry> sSpellReagentsStore; +TC_GAME_API extern DB2Storage<SpellRuneCostEntry> sSpellRuneCostStore; +TC_GAME_API extern DB2Storage<SpellTotemsEntry> sSpellTotemsStore; +TC_GAME_API extern DB2Storage<SpellXSpellVisualEntry> sSpellXSpellVisualStore; +TC_GAME_API extern DB2Storage<TaxiNodesEntry> sTaxiNodesStore; +TC_GAME_API extern DB2Storage<TaxiPathEntry> sTaxiPathStore; +TC_GAME_API extern DB2Storage<TotemCategoryEntry> sTotemCategoryStore; +TC_GAME_API extern DB2Storage<ToyEntry> sToyStore; +TC_GAME_API extern DB2Storage<UnitPowerBarEntry> sUnitPowerBarStore; +TC_GAME_API extern DB2Storage<WorldMapOverlayEntry> sWorldMapOverlayStore; + +TC_GAME_API extern TaxiMask sTaxiNodesMask; +TC_GAME_API extern TaxiMask sOldContinentsNodesMask; +TC_GAME_API extern TaxiMask sHordeTaxiNodesMask; +TC_GAME_API extern TaxiMask sAllianceTaxiNodesMask; +TC_GAME_API extern TaxiPathSetBySource sTaxiPathSetBySource; +TC_GAME_API extern TaxiPathNodesByPath sTaxiPathNodesByPath; struct HotfixNotify { @@ -131,7 +131,7 @@ typedef std::vector<HotfixNotify> HotfixData; static bool Compare(structure const* left, structure const* right); \ }; -class DB2Manager +class TC_GAME_API DB2Manager { public: DEFINE_DB2_SET_COMPARATOR(ChrClassesXPowerTypesEntry); diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index d8af7418be4..2f30a00d3c0 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -25,50 +25,50 @@ #include "SharedDefines.h" // CharSections -CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color); +TC_GAME_API CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color); // ChrClasses -char const* GetClassName(uint8 class_, uint8 locale); +TC_GAME_API char const* GetClassName(uint8 class_, uint8 locale); // ChrRaces -char const* GetRaceName(uint8 race, uint8 locale); +TC_GAME_API char const* GetRaceName(uint8 race, uint8 locale); // ChrSpecialization typedef ChrSpecializationEntry const* ChrSpecializationByIndexArray[MAX_CLASSES][MAX_SPECIALIZATIONS]; // CreatureFamilty -char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 locale); +TC_GAME_API char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 locale); // Faction -std::vector<uint32> const* GetFactionTeamList(uint32 faction); +TC_GAME_API std::vector<uint32> const* GetFactionTeamList(uint32 faction); // ItemSetSpells typedef std::vector<ItemSetSpellEntry const*> ItemSetSpells; typedef std::unordered_map<uint32, ItemSetSpells> ItemSetSpellsStore; // LfgDungeons -LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty); +TC_GAME_API LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty); // Light -uint32 GetDefaultMapLight(uint32 mapId); +TC_GAME_API uint32 GetDefaultMapLight(uint32 mapId); // LiquidType -uint32 GetLiquidFlags(uint32 liquidType); +TC_GAME_API uint32 GetLiquidFlags(uint32 liquidType); // MapDifficulty typedef std::unordered_map<uint32, std::unordered_map<uint32, MapDifficultyEntry const*>> MapDifficultyMap; -MapDifficultyEntry const* GetDefaultMapDifficulty(uint32 mapId, Difficulty* difficulty = nullptr); -MapDifficultyEntry const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty); -MapDifficultyEntry const* GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty); +TC_GAME_API MapDifficultyEntry const* GetDefaultMapDifficulty(uint32 mapId, Difficulty* difficulty = nullptr); +TC_GAME_API MapDifficultyEntry const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty); +TC_GAME_API MapDifficultyEntry const* GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty); // PvpDifficulty -PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level); -PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id); +TC_GAME_API PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level); +TC_GAME_API PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id); // SkillRaceClassInfo typedef std::unordered_multimap<uint32, SkillRaceClassInfoEntry const*> SkillRaceClassInfoMap; typedef std::pair<SkillRaceClassInfoMap::iterator, SkillRaceClassInfoMap::iterator> SkillRaceClassInfoBounds; -SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, uint8 class_); +TC_GAME_API SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, uint8 class_); // SpellEffectScaling typedef std::unordered_map<uint32, uint32> SpellEffectScallingByEffectId; @@ -77,21 +77,21 @@ typedef std::unordered_map<uint32, uint32> SpellEffectScallingByEffectId; typedef std::vector<TalentEntry const*> TalentsByPosition[MAX_CLASSES][MAX_TALENT_TIERS][MAX_TALENT_COLUMNS]; // TotemCategory -bool IsTotemCategoryCompatibleWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId); +TC_GAME_API bool IsTotemCategoryCompatibleWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId); // WMOAreaTable -WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid); +TC_GAME_API WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid); // WorldMapArea -uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId); -void Zone2MapCoordinates(float &x, float &y, uint32 worldMapAreaId); -void Map2ZoneCoordinates(float &x, float &y, uint32 worldMapAreaId); +TC_GAME_API uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId); +TC_GAME_API void Zone2MapCoordinates(float &x, float &y, uint32 worldMapAreaId); +TC_GAME_API void Map2ZoneCoordinates(float &x, float &y, uint32 worldMapAreaId); // WorldMapTransforms -void DeterminaAlternateMapPosition(uint32 mapId, float x, float y, float z, uint32* newMapId = nullptr, DBCPosition2D* newPos = nullptr); +TC_GAME_API void DeterminaAlternateMapPosition(uint32 mapId, float x, float y, float z, uint32* newMapId = nullptr, DBCPosition2D* newPos = nullptr); -uint32 GetMaxLevelForExpansion(uint32 expansion); -uint32 GetExpansionForLevel(uint32 level); +TC_GAME_API uint32 GetMaxLevelForExpansion(uint32 expansion); +TC_GAME_API uint32 GetExpansionForLevel(uint32 level); template<class T> class GameTable @@ -121,111 +121,111 @@ private: GameTablesEntry const* _gtEntry; }; -extern DBCStorage<AnimKitEntry> sAnimKitStore; -extern DBCStorage<AreaTableEntry> sAreaTableStore; -extern DBCStorage<AreaTriggerEntry> sAreaTriggerStore; -extern DBCStorage<ArmorLocationEntry> sArmorLocationStore; -extern DBCStorage<BankBagSlotPricesEntry> sBankBagSlotPricesStore; -extern DBCStorage<BannedAddOnsEntry> sBannedAddOnsStore; -extern DBCStorage<BattlemasterListEntry> sBattlemasterListStore; -extern DBCStorage<CharSectionsEntry> sCharSectionsStore; -extern DBCStorage<CharTitlesEntry> sCharTitlesStore; -extern DBCStorage<ChatChannelsEntry> sChatChannelsStore; -extern DBCStorage<ChrClassesEntry> sChrClassesStore; -extern DBCStorage<ChrRacesEntry> sChrRacesStore; -extern DBCStorage<ChrSpecializationEntry> sChrSpecializationStore; -extern ChrSpecializationByIndexArray sChrSpecializationByIndexStore; -extern DBCStorage<CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore; -extern DBCStorage<CreatureFamilyEntry> sCreatureFamilyStore; -extern DBCStorage<CreatureModelDataEntry> sCreatureModelDataStore; -extern DBCStorage<DifficultyEntry> sDifficultyStore; -extern DBCStorage<DungeonEncounterEntry> sDungeonEncounterStore; -extern DBCStorage<DurabilityCostsEntry> sDurabilityCostsStore; -extern DBCStorage<EmotesEntry> sEmotesStore; -extern DBCStorage<EmotesTextEntry> sEmotesTextStore; -extern DBCStorage<FactionEntry> sFactionStore; -extern DBCStorage<FactionTemplateEntry> sFactionTemplateStore; -extern DBCStorage<GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore; -extern DBCStorage<GemPropertiesEntry> sGemPropertiesStore; -extern DBCStorage<GlyphPropertiesEntry> sGlyphPropertiesStore; -extern DBCStorage<GuildColorBackgroundEntry> sGuildColorBackgroundStore; -extern DBCStorage<GuildColorBorderEntry> sGuildColorBorderStore; -extern DBCStorage<GuildColorEmblemEntry> sGuildColorEmblemStore; -extern DBCStorage<ItemArmorQualityEntry> sItemArmorQualityStore; -extern DBCStorage<ItemArmorShieldEntry> sItemArmorShieldStore; -extern DBCStorage<ItemArmorTotalEntry> sItemArmorTotalStore; -extern DBCStorage<ItemBagFamilyEntry> sItemBagFamilyStore; -extern DBCStorage<ItemDamageEntry> sItemDamageAmmoStore; -extern DBCStorage<ItemDamageEntry> sItemDamageOneHandCasterStore; -extern DBCStorage<ItemDamageEntry> sItemDamageOneHandStore; -extern DBCStorage<ItemDamageEntry> sItemDamageRangedStore; -extern DBCStorage<ItemDamageEntry> sItemDamageThrownStore; -extern DBCStorage<ItemDamageEntry> sItemDamageTwoHandCasterStore; -extern DBCStorage<ItemDamageEntry> sItemDamageTwoHandStore; -extern DBCStorage<ItemDamageEntry> sItemDamageWandStore; -extern DBCStorage<ItemSetEntry> sItemSetStore; -extern DBCStorage<ItemSetSpellEntry> sItemSetSpellStore; -extern ItemSetSpellsStore sItemSetSpellsStore; -extern DBCStorage<LFGDungeonEntry> sLFGDungeonStore; -extern DBCStorage<LiquidTypeEntry> sLiquidTypeStore; -extern DBCStorage<LockEntry> sLockStore; -extern DBCStorage<MapEntry> sMapStore; -extern MapDifficultyMap sMapDifficultyMap; -extern DBCStorage<MovieEntry> sMovieStore; -extern DBCStorage<PhaseEntry> sPhaseStore; -extern DBCStorage<PowerDisplayEntry> sPowerDisplayStore; -extern DBCStorage<QuestFactionRewEntry> sQuestFactionRewardStore; -extern DBCStorage<RandomPropertiesPointsEntry> sRandomPropertiesPointsStore; -extern DBCStorage<SkillLineAbilityEntry> sSkillLineAbilityStore; -extern DBCStorage<SkillLineEntry> sSkillLineStore; -extern DBCStorage<SkillRaceClassInfoEntry> sSkillRaceClassInfoStore; -extern DBCStorage<SpellAuraOptionsEntry> sSpellAuraOptionsStore; -extern DBCStorage<SpellCategoriesEntry> sSpellCategoriesStore; -extern DBCStorage<SpellCategoryEntry> sSpellCategoryStore; -extern DBCStorage<SpellCooldownsEntry> sSpellCooldownsStore; -extern DBCStorage<SpellEffectEntry> sSpellEffectStore; -extern DBCStorage<SpellEffectScalingEntry> sSpellEffectScalingStore; -extern SpellEffectScallingByEffectId sSpellEffectScallingByEffectId; -extern DBCStorage<SpellEntry> sSpellStore; -extern DBCStorage<SpellEquippedItemsEntry> sSpellEquippedItemsStore; -extern DBCStorage<SpellFocusObjectEntry> sSpellFocusObjectStore; -extern DBCStorage<SpellInterruptsEntry> sSpellInterruptsStore; -extern DBCStorage<SpellItemEnchantmentEntry> sSpellItemEnchantmentStore; -extern DBCStorage<SpellLevelsEntry> sSpellLevelsStore; -extern DBCStorage<SpellScalingEntry> sSpellScalingStore; -extern DBCStorage<SpellShapeshiftEntry> sSpellShapeshiftStore; -extern DBCStorage<SpellShapeshiftFormEntry> sSpellShapeshiftFormStore; -extern DBCStorage<SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore; -extern DBCStorage<SummonPropertiesEntry> sSummonPropertiesStore; -extern DBCStorage<TalentEntry> sTalentStore; -extern TalentsByPosition sTalentByPos; -extern DBCStorage<VehicleEntry> sVehicleStore; -extern DBCStorage<VehicleSeatEntry> sVehicleSeatStore; -extern DBCStorage<WMOAreaTableEntry> sWMOAreaTableStore; -extern DBCStorage<WorldSafeLocsEntry> sWorldSafeLocsStore; - -extern GameTable<GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore; -extern GameTable<GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore; -extern GameTable<GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore; -extern GameTable<GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore; -extern GameTable<GtChanceToSpellCritEntry> sGtChanceToSpellCritStore; -extern GameTable<GtCombatRatingsEntry> sGtCombatRatingsStore; -extern GameTable<GtItemSocketCostPerLevelEntry> sGtItemSocketCostPerLevelStore; -extern GameTable<GtNPCManaCostScalerEntry> sGtNPCManaCostScalerStore; -extern GameTable<GtNpcTotalHpEntry> sGtNpcTotalHpStore; -extern GameTable<GtNpcTotalHpExp1Entry> sGtNpcTotalHpExp1Store; -extern GameTable<GtNpcTotalHpExp2Entry> sGtNpcTotalHpExp2Store; -extern GameTable<GtNpcTotalHpExp3Entry> sGtNpcTotalHpExp3Store; -extern GameTable<GtNpcTotalHpExp4Entry> sGtNpcTotalHpExp4Store; -extern GameTable<GtNpcTotalHpExp5Entry> sGtNpcTotalHpExp5Store; -extern GameTable<GtOCTBaseHPByClassEntry> sGtOCTBaseHPByClassStore; -extern GameTable<GtOCTBaseMPByClassEntry> sGtOCTBaseMPByClassStore; -extern GameTable<GtOCTLevelExperienceEntry> sGtOCTLevelExperienceStore; -extern GameTable<GtRegenMPPerSptEntry> sGtRegenMPPerSptStore; -extern GameTable<GtSpellScalingEntry> sGtSpellScalingStore; -extern GameTable<GtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore; - -void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale); -void LoadGameTables(const std::string& dataPath, uint32 defaultLocale); +TC_GAME_API extern DBCStorage<AnimKitEntry> sAnimKitStore; +TC_GAME_API extern DBCStorage<AreaTableEntry> sAreaTableStore; +TC_GAME_API extern DBCStorage<AreaTriggerEntry> sAreaTriggerStore; +TC_GAME_API extern DBCStorage<ArmorLocationEntry> sArmorLocationStore; +TC_GAME_API extern DBCStorage<BankBagSlotPricesEntry> sBankBagSlotPricesStore; +TC_GAME_API extern DBCStorage<BannedAddOnsEntry> sBannedAddOnsStore; +TC_GAME_API extern DBCStorage<BattlemasterListEntry> sBattlemasterListStore; +TC_GAME_API extern DBCStorage<CharSectionsEntry> sCharSectionsStore; +TC_GAME_API extern DBCStorage<CharTitlesEntry> sCharTitlesStore; +TC_GAME_API extern DBCStorage<ChatChannelsEntry> sChatChannelsStore; +TC_GAME_API extern DBCStorage<ChrClassesEntry> sChrClassesStore; +TC_GAME_API extern DBCStorage<ChrRacesEntry> sChrRacesStore; +TC_GAME_API extern DBCStorage<ChrSpecializationEntry> sChrSpecializationStore; +TC_GAME_API extern ChrSpecializationByIndexArray sChrSpecializationByIndexStore; +TC_GAME_API extern DBCStorage<CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore; +TC_GAME_API extern DBCStorage<CreatureFamilyEntry> sCreatureFamilyStore; +TC_GAME_API extern DBCStorage<CreatureModelDataEntry> sCreatureModelDataStore; +TC_GAME_API extern DBCStorage<DifficultyEntry> sDifficultyStore; +TC_GAME_API extern DBCStorage<DungeonEncounterEntry> sDungeonEncounterStore; +TC_GAME_API extern DBCStorage<DurabilityCostsEntry> sDurabilityCostsStore; +TC_GAME_API extern DBCStorage<EmotesEntry> sEmotesStore; +TC_GAME_API extern DBCStorage<EmotesTextEntry> sEmotesTextStore; +TC_GAME_API extern DBCStorage<FactionEntry> sFactionStore; +TC_GAME_API extern DBCStorage<FactionTemplateEntry> sFactionTemplateStore; +TC_GAME_API extern DBCStorage<GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore; +TC_GAME_API extern DBCStorage<GemPropertiesEntry> sGemPropertiesStore; +TC_GAME_API extern DBCStorage<GlyphPropertiesEntry> sGlyphPropertiesStore; +TC_GAME_API extern DBCStorage<GuildColorBackgroundEntry> sGuildColorBackgroundStore; +TC_GAME_API extern DBCStorage<GuildColorBorderEntry> sGuildColorBorderStore; +TC_GAME_API extern DBCStorage<GuildColorEmblemEntry> sGuildColorEmblemStore; +TC_GAME_API extern DBCStorage<ItemArmorQualityEntry> sItemArmorQualityStore; +TC_GAME_API extern DBCStorage<ItemArmorShieldEntry> sItemArmorShieldStore; +TC_GAME_API extern DBCStorage<ItemArmorTotalEntry> sItemArmorTotalStore; +TC_GAME_API extern DBCStorage<ItemBagFamilyEntry> sItemBagFamilyStore; +TC_GAME_API extern DBCStorage<ItemDamageEntry> sItemDamageAmmoStore; +TC_GAME_API extern DBCStorage<ItemDamageEntry> sItemDamageOneHandCasterStore; +TC_GAME_API extern DBCStorage<ItemDamageEntry> sItemDamageOneHandStore; +TC_GAME_API extern DBCStorage<ItemDamageEntry> sItemDamageRangedStore; +TC_GAME_API extern DBCStorage<ItemDamageEntry> sItemDamageThrownStore; +TC_GAME_API extern DBCStorage<ItemDamageEntry> sItemDamageTwoHandCasterStore; +TC_GAME_API extern DBCStorage<ItemDamageEntry> sItemDamageTwoHandStore; +TC_GAME_API extern DBCStorage<ItemDamageEntry> sItemDamageWandStore; +TC_GAME_API extern DBCStorage<ItemSetEntry> sItemSetStore; +TC_GAME_API extern DBCStorage<ItemSetSpellEntry> sItemSetSpellStore; +TC_GAME_API extern ItemSetSpellsStore sItemSetSpellsStore; +TC_GAME_API extern DBCStorage<LFGDungeonEntry> sLFGDungeonStore; +TC_GAME_API extern DBCStorage<LiquidTypeEntry> sLiquidTypeStore; +TC_GAME_API extern DBCStorage<LockEntry> sLockStore; +TC_GAME_API extern DBCStorage<MapEntry> sMapStore; +TC_GAME_API extern MapDifficultyMap sMapDifficultyMap; +TC_GAME_API extern DBCStorage<MovieEntry> sMovieStore; +TC_GAME_API extern DBCStorage<PhaseEntry> sPhaseStore; +TC_GAME_API extern DBCStorage<PowerDisplayEntry> sPowerDisplayStore; +TC_GAME_API extern DBCStorage<QuestFactionRewEntry> sQuestFactionRewardStore; +TC_GAME_API extern DBCStorage<RandomPropertiesPointsEntry> sRandomPropertiesPointsStore; +TC_GAME_API extern DBCStorage<SkillLineAbilityEntry> sSkillLineAbilityStore; +TC_GAME_API extern DBCStorage<SkillLineEntry> sSkillLineStore; +TC_GAME_API extern DBCStorage<SkillRaceClassInfoEntry> sSkillRaceClassInfoStore; +TC_GAME_API extern DBCStorage<SpellAuraOptionsEntry> sSpellAuraOptionsStore; +TC_GAME_API extern DBCStorage<SpellCategoriesEntry> sSpellCategoriesStore; +TC_GAME_API extern DBCStorage<SpellCategoryEntry> sSpellCategoryStore; +TC_GAME_API extern DBCStorage<SpellCooldownsEntry> sSpellCooldownsStore; +TC_GAME_API extern DBCStorage<SpellEffectEntry> sSpellEffectStore; +TC_GAME_API extern DBCStorage<SpellEffectScalingEntry> sSpellEffectScalingStore; +TC_GAME_API extern SpellEffectScallingByEffectId sSpellEffectScallingByEffectId; +TC_GAME_API extern DBCStorage<SpellEntry> sSpellStore; +TC_GAME_API extern DBCStorage<SpellEquippedItemsEntry> sSpellEquippedItemsStore; +TC_GAME_API extern DBCStorage<SpellFocusObjectEntry> sSpellFocusObjectStore; +TC_GAME_API extern DBCStorage<SpellInterruptsEntry> sSpellInterruptsStore; +TC_GAME_API extern DBCStorage<SpellItemEnchantmentEntry> sSpellItemEnchantmentStore; +TC_GAME_API extern DBCStorage<SpellLevelsEntry> sSpellLevelsStore; +TC_GAME_API extern DBCStorage<SpellScalingEntry> sSpellScalingStore; +TC_GAME_API extern DBCStorage<SpellShapeshiftEntry> sSpellShapeshiftStore; +TC_GAME_API extern DBCStorage<SpellShapeshiftFormEntry> sSpellShapeshiftFormStore; +TC_GAME_API extern DBCStorage<SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore; +TC_GAME_API extern DBCStorage<SummonPropertiesEntry> sSummonPropertiesStore; +TC_GAME_API extern DBCStorage<TalentEntry> sTalentStore; +TC_GAME_API extern TalentsByPosition sTalentByPos; +TC_GAME_API extern DBCStorage<VehicleEntry> sVehicleStore; +TC_GAME_API extern DBCStorage<VehicleSeatEntry> sVehicleSeatStore; +TC_GAME_API extern DBCStorage<WMOAreaTableEntry> sWMOAreaTableStore; +TC_GAME_API extern DBCStorage<WorldSafeLocsEntry> sWorldSafeLocsStore; + +TC_GAME_API extern GameTable<GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore; +TC_GAME_API extern GameTable<GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore; +TC_GAME_API extern GameTable<GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore; +TC_GAME_API extern GameTable<GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore; +TC_GAME_API extern GameTable<GtChanceToSpellCritEntry> sGtChanceToSpellCritStore; +TC_GAME_API extern GameTable<GtCombatRatingsEntry> sGtCombatRatingsStore; +TC_GAME_API extern GameTable<GtItemSocketCostPerLevelEntry> sGtItemSocketCostPerLevelStore; +TC_GAME_API extern GameTable<GtNPCManaCostScalerEntry> sGtNPCManaCostScalerStore; +TC_GAME_API extern GameTable<GtNpcTotalHpEntry> sGtNpcTotalHpStore; +TC_GAME_API extern GameTable<GtNpcTotalHpExp1Entry> sGtNpcTotalHpExp1Store; +TC_GAME_API extern GameTable<GtNpcTotalHpExp2Entry> sGtNpcTotalHpExp2Store; +TC_GAME_API extern GameTable<GtNpcTotalHpExp3Entry> sGtNpcTotalHpExp3Store; +TC_GAME_API extern GameTable<GtNpcTotalHpExp4Entry> sGtNpcTotalHpExp4Store; +TC_GAME_API extern GameTable<GtNpcTotalHpExp5Entry> sGtNpcTotalHpExp5Store; +TC_GAME_API extern GameTable<GtOCTBaseHPByClassEntry> sGtOCTBaseHPByClassStore; +TC_GAME_API extern GameTable<GtOCTBaseMPByClassEntry> sGtOCTBaseMPByClassStore; +TC_GAME_API extern GameTable<GtOCTLevelExperienceEntry> sGtOCTLevelExperienceStore; +TC_GAME_API extern GameTable<GtRegenMPPerSptEntry> sGtRegenMPPerSptStore; +TC_GAME_API extern GameTable<GtSpellScalingEntry> sGtSpellScalingStore; +TC_GAME_API extern GameTable<GtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore; + +TC_GAME_API void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale); +TC_GAME_API void LoadGameTables(const std::string& dataPath, uint32 defaultLocale); #endif diff --git a/src/server/game/DungeonFinding/LFG.h b/src/server/game/DungeonFinding/LFG.h index 9aae994f168..b76c5e08d32 100644 --- a/src/server/game/DungeonFinding/LFG.h +++ b/src/server/game/DungeonFinding/LFG.h @@ -99,7 +99,7 @@ enum LfgAnswer LFG_ANSWER_AGREE = 1 }; -struct LfgLockInfoData +struct TC_GAME_API LfgLockInfoData { LfgLockInfoData(uint32 _lockStatus = 0, uint16 _requiredItemLevel = 0, float _currentItemLevel = 0) : lockStatus(_lockStatus), requiredItemLevel(_requiredItemLevel), currentItemLevel(_currentItemLevel) { } @@ -115,9 +115,9 @@ typedef std::map<ObjectGuid, LfgLockMap> LfgLockPartyMap; typedef std::map<ObjectGuid, uint8> LfgRolesMap; typedef std::map<ObjectGuid, ObjectGuid> LfgGroupsMap; -std::string ConcatenateDungeons(LfgDungeonSet const& dungeons); -std::string GetRolesString(uint8 roles); -std::string GetStateString(LfgState state); +TC_GAME_API std::string ConcatenateDungeons(LfgDungeonSet const& dungeons); +TC_GAME_API std::string GetRolesString(uint8 roles); +TC_GAME_API std::string GetStateString(LfgState state); } // namespace lfg diff --git a/src/server/game/DungeonFinding/LFGGroupData.h b/src/server/game/DungeonFinding/LFGGroupData.h index 7ae4777cd4d..62a41b6b350 100644 --- a/src/server/game/DungeonFinding/LFGGroupData.h +++ b/src/server/game/DungeonFinding/LFGGroupData.h @@ -31,7 +31,7 @@ enum LfgGroupEnum /** Stores all lfg data needed about a group. */ -class LfgGroupData +class TC_GAME_API LfgGroupData { public: LfgGroupData(); diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index 813be0afa4f..f38812549a6 100644 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -295,7 +295,7 @@ struct LFGDungeonData uint32 Entry() const { return id + (type << 24); } }; -class LFGMgr +class TC_GAME_API LFGMgr { private: LFGMgr(); diff --git a/src/server/game/DungeonFinding/LFGPlayerData.h b/src/server/game/DungeonFinding/LFGPlayerData.h index 859317ca956..91e4153a6d5 100644 --- a/src/server/game/DungeonFinding/LFGPlayerData.h +++ b/src/server/game/DungeonFinding/LFGPlayerData.h @@ -26,7 +26,7 @@ namespace lfg /** Stores all lfg data needed about the player. */ -class LfgPlayerData +class TC_GAME_API LfgPlayerData { public: LfgPlayerData(); diff --git a/src/server/game/DungeonFinding/LFGQueue.h b/src/server/game/DungeonFinding/LFGQueue.h index c9e2af7f480..c69b3cecb64 100644 --- a/src/server/game/DungeonFinding/LFGQueue.h +++ b/src/server/game/DungeonFinding/LFGQueue.h @@ -83,7 +83,7 @@ typedef std::map<ObjectGuid, LfgQueueData> LfgQueueDataContainer; /** Stores all data related to queue */ -class LFGQueue +class TC_GAME_API LFGQueue { public: diff --git a/src/server/game/DungeonFinding/LFGScripts.h b/src/server/game/DungeonFinding/LFGScripts.h index 377614bc55d..ec64604a282 100644 --- a/src/server/game/DungeonFinding/LFGScripts.h +++ b/src/server/game/DungeonFinding/LFGScripts.h @@ -29,7 +29,7 @@ class Group; namespace lfg { -class LFGPlayerScript : public PlayerScript +class TC_GAME_API LFGPlayerScript : public PlayerScript { public: LFGPlayerScript(); @@ -40,7 +40,7 @@ class LFGPlayerScript : public PlayerScript void OnMapChanged(Player* player) override; }; -class LFGGroupScript : public GroupScript +class TC_GAME_API LFGGroupScript : public GroupScript { public: LFGGroupScript(); diff --git a/src/server/game/Entities/AreaTrigger/AreaTrigger.h b/src/server/game/Entities/AreaTrigger/AreaTrigger.h index 7a6581e13c4..e3caa6d2e95 100644 --- a/src/server/game/Entities/AreaTrigger/AreaTrigger.h +++ b/src/server/game/Entities/AreaTrigger/AreaTrigger.h @@ -23,7 +23,7 @@ class Unit; class SpellInfo; -class AreaTrigger : public WorldObject, public GridObject<AreaTrigger> +class TC_GAME_API AreaTrigger : public WorldObject, public GridObject<AreaTrigger> { public: AreaTrigger(); diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h index 4d2775789eb..f961a966796 100644 --- a/src/server/game/Entities/Corpse/Corpse.h +++ b/src/server/game/Entities/Corpse/Corpse.h @@ -46,7 +46,7 @@ enum CorpseFlags CORPSE_FLAG_LOOTABLE = 0x20 }; -class Corpse : public WorldObject, public GridObject<Corpse> +class TC_GAME_API Corpse : public WorldObject, public GridObject<Corpse> { public: explicit Corpse(CorpseType type = CORPSE_BONES); diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 8ea2c3aa77e..96b04b32f84 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -74,7 +74,7 @@ enum CreatureFlagsExtra #define MAX_CREATURE_DIFFICULTIES 3 // from `creature_template` table -struct CreatureTemplate +struct TC_GAME_API CreatureTemplate { uint32 Entry; uint32 DifficultyEntry[MAX_CREATURE_DIFFICULTIES]; @@ -213,7 +213,7 @@ typedef std::unordered_map<uint32, CreatureTemplate> CreatureTemplateContainer; #pragma pack(push, 1) // Defines base stats for creatures (used to calculate HP/mana/armor/attackpower/rangedattackpower/all damage). -struct CreatureBaseStats +struct TC_GAME_API CreatureBaseStats { uint32 BaseHealth[MAX_EXPANSIONS]; uint32 BaseMana; @@ -440,7 +440,7 @@ struct TrainerSpell typedef std::unordered_map<uint32 /*spellid*/, TrainerSpell> TrainerSpellMap; -struct TrainerSpellData +struct TC_GAME_API TrainerSpellData { TrainerSpellData() : trainerType(0) { } ~TrainerSpellData() { spellList.clear(); } @@ -462,7 +462,7 @@ typedef std::map<uint32, time_t> CreatureSpellCooldowns; typedef std::vector<uint8> CreatureTextRepeatIds; typedef std::unordered_map<uint8, CreatureTextRepeatIds> CreatureTextRepeatGroup; -class Creature : public Unit, public GridObject<Creature>, public MapObject +class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public MapObject { public: @@ -783,7 +783,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject CreatureTextRepeatGroup m_textRepeat; }; -class AssistDelayEvent : public BasicEvent +class TC_GAME_API AssistDelayEvent : public BasicEvent { public: AssistDelayEvent(ObjectGuid victim, Unit& owner) : BasicEvent(), m_victim(victim), m_owner(owner) { } @@ -798,7 +798,7 @@ class AssistDelayEvent : public BasicEvent Unit& m_owner; }; -class ForcedDespawnDelayEvent : public BasicEvent +class TC_GAME_API ForcedDespawnDelayEvent : public BasicEvent { public: ForcedDespawnDelayEvent(Creature& owner) : BasicEvent(), m_owner(owner) { } diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h index 207cf6c2c95..36e72b66753 100644 --- a/src/server/game/Entities/Creature/CreatureGroups.h +++ b/src/server/game/Entities/Creature/CreatureGroups.h @@ -38,7 +38,7 @@ struct FormationInfo typedef std::unordered_map<ObjectGuid::LowType/*memberDBGUID*/, FormationInfo*> CreatureGroupInfoType; -class FormationMgr +class TC_GAME_API FormationMgr { private: FormationMgr() { } @@ -53,7 +53,7 @@ class FormationMgr CreatureGroupInfoType CreatureGroupMap; }; -class CreatureGroup +class TC_GAME_API CreatureGroup { private: Creature* m_leader; //Important do not forget sometimes to work with pointers instead synonims :D:D diff --git a/src/server/game/Entities/Creature/GossipDef.h b/src/server/game/Entities/Creature/GossipDef.h index ba5a2e1f6ba..ebd3045be67 100644 --- a/src/server/game/Entities/Creature/GossipDef.h +++ b/src/server/game/Entities/Creature/GossipDef.h @@ -158,7 +158,7 @@ struct QuestMenuItem typedef std::vector<QuestMenuItem> QuestMenuItemList; -class GossipMenu +class TC_GAME_API GossipMenu { public: GossipMenu(); @@ -216,7 +216,7 @@ class GossipMenu LocaleConstant _locale; }; -class QuestMenu +class TC_GAME_API QuestMenu { public: QuestMenu(); @@ -233,7 +233,7 @@ class QuestMenu QuestMenuItemList _questMenuItems; }; -class PlayerMenu +class TC_GAME_API PlayerMenu { public: explicit PlayerMenu(WorldSession* session); diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h index f3c7b0eda2e..d43e7fcf626 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.h +++ b/src/server/game/Entities/Creature/TemporarySummon.h @@ -37,7 +37,7 @@ struct TempSummonData uint32 time; ///< Despawn time, usable only with certain temp summon types }; -class TempSummon : public Creature +class TC_GAME_API TempSummon : public Creature { public: explicit TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject); @@ -63,7 +63,7 @@ class TempSummon : public Creature ObjectGuid m_summonerGUID; }; -class Minion : public TempSummon +class TC_GAME_API Minion : public TempSummon { public: Minion(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject); @@ -80,7 +80,7 @@ class Minion : public TempSummon float m_followAngle; }; -class Guardian : public Minion +class TC_GAME_API Guardian : public Minion { public: Guardian(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject); @@ -104,7 +104,7 @@ class Guardian : public Minion float m_statFromOwner[MAX_STATS]; }; -class Puppet : public Minion +class TC_GAME_API Puppet : public Minion { public: Puppet(SummonPropertiesEntry const* properties, Unit* owner); @@ -114,7 +114,7 @@ class Puppet : public Minion void RemoveFromWorld() override; }; -class ForcedUnsummonDelayEvent : public BasicEvent +class TC_GAME_API ForcedUnsummonDelayEvent : public BasicEvent { public: ForcedUnsummonDelayEvent(TempSummon& owner) : BasicEvent(), m_owner(owner) { } diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.h b/src/server/game/Entities/DynamicObject/DynamicObject.h index 78ef5ca935f..09426a3c044 100644 --- a/src/server/game/Entities/DynamicObject/DynamicObject.h +++ b/src/server/game/Entities/DynamicObject/DynamicObject.h @@ -32,7 +32,7 @@ enum DynamicObjectType DYNAMIC_OBJECT_FARSIGHT_FOCUS = 0x2 }; -class DynamicObject : public WorldObject, public GridObject<DynamicObject>, public MapObject +class TC_GAME_API DynamicObject : public WorldObject, public GridObject<DynamicObject>, public MapObject { public: DynamicObject(bool isWorldObject); diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index 010ea09347f..47d06e1492b 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -877,7 +877,7 @@ class GameObjectModel; // 5 sec for bobber catch #define FISHING_BOBBER_READY_TIME 5 -class GameObject : public WorldObject, public GridObject<GameObject>, public MapObject +class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject>, public MapObject { public: explicit GameObject(); diff --git a/src/server/game/Entities/Item/Container/Bag.h b/src/server/game/Entities/Item/Container/Bag.h index 449301ee5ce..128213af4b4 100644 --- a/src/server/game/Entities/Item/Container/Bag.h +++ b/src/server/game/Entities/Item/Container/Bag.h @@ -25,7 +25,7 @@ #include "Item.h" #include "ItemTemplate.h" -class Bag : public Item +class TC_GAME_API Bag : public Item { public: diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h index 7d1c3761430..4836c7b7246 100644 --- a/src/server/game/Entities/Item/Item.h +++ b/src/server/game/Entities/Item/Item.h @@ -256,7 +256,7 @@ struct BonusData void AddBonus(uint32 type, int32 const (&values)[2]); }; -class Item : public Object +class TC_GAME_API Item : public Object { public: static Item* CreateItem(uint32 itemEntry, uint32 count, Player const* player = NULL); diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index 99fe78bea2f..daf3473c5a8 100644 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -44,7 +44,7 @@ typedef std::unordered_map<uint32, EnchStoreList> EnchantmentStore; static EnchantmentStore RandomItemEnch; -void LoadRandomEnchantmentsTable() +TC_GAME_API void LoadRandomEnchantmentsTable() { uint32 oldMSTime = getMSTime(); @@ -77,7 +77,7 @@ void LoadRandomEnchantmentsTable() TC_LOG_ERROR("server.loading", ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty."); } -uint32 GetItemEnchantMod(int32 entry) +TC_GAME_API uint32 GetItemEnchantMod(int32 entry) { if (!entry) return 0; @@ -118,7 +118,7 @@ uint32 GetItemEnchantMod(int32 entry) return 0; } -uint32 GenerateEnchSuffixFactor(uint32 item_id) +TC_GAME_API uint32 GenerateEnchSuffixFactor(uint32 item_id) { ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(item_id); @@ -130,7 +130,7 @@ uint32 GenerateEnchSuffixFactor(uint32 item_id) return GetRandomPropertyPoints(itemProto->GetBaseItemLevel(), itemProto->GetQuality(), itemProto->GetInventoryType(), itemProto->GetSubClass()); } -uint32 GetRandomPropertyPoints(uint32 itemLevel, uint32 quality, uint32 inventoryType, uint32 subClass) +TC_GAME_API uint32 GetRandomPropertyPoints(uint32 itemLevel, uint32 quality, uint32 inventoryType, uint32 subClass) { uint32 propIndex; diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.h b/src/server/game/Entities/Item/ItemEnchantmentMgr.h index 25278caa512..ec84b13dec5 100644 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.h +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.h @@ -21,9 +21,9 @@ #include "Common.h" -void LoadRandomEnchantmentsTable(); -uint32 GetItemEnchantMod(int32 entry); -uint32 GenerateEnchSuffixFactor(uint32 item_id); -uint32 GetRandomPropertyPoints(uint32 itemLevel, uint32 quality, uint32 inventoryType, uint32 subclass); +TC_GAME_API void LoadRandomEnchantmentsTable(); +TC_GAME_API uint32 GetItemEnchantMod(int32 entry); +TC_GAME_API uint32 GenerateEnchSuffixFactor(uint32 item_id); +TC_GAME_API uint32 GetRandomPropertyPoints(uint32 itemLevel, uint32 quality, uint32 inventoryType, uint32 subclass); #endif diff --git a/src/server/game/Entities/Item/ItemTemplate.h b/src/server/game/Entities/Item/ItemTemplate.h index 46584e1b5d3..aa65fdd3d6e 100644 --- a/src/server/game/Entities/Item/ItemTemplate.h +++ b/src/server/game/Entities/Item/ItemTemplate.h @@ -644,7 +644,7 @@ const uint32 MaxItemSubclassValues[MAX_ITEM_CLASS] = class Player; -struct ItemTemplate +struct TC_GAME_API ItemTemplate { ItemEntry const* BasicData; ItemSparseEntry const* ExtendedData; diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 4d54de20277..e3f22a41275 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -92,7 +92,7 @@ class ZoneScript; typedef std::unordered_map<Player*, UpdateData> UpdateDataMapType; -class Object +class TC_GAME_API Object { public: virtual ~Object(); @@ -395,7 +395,7 @@ enum MapObjectCellMoveState MAP_OBJECT_CELL_MOVE_INACTIVE, //in move list but should not move }; -class MapObject +class TC_GAME_API MapObject { friend class Map; //map for moving creatures friend class ObjectGridLoader; //grid loader for loading creatures @@ -420,7 +420,7 @@ class MapObject } }; -class WorldObject : public Object, public WorldLocation +class TC_GAME_API WorldObject : public Object, public WorldLocation { protected: explicit WorldObject(bool isWorldObject); //note: here it means if it is in grid object list or world object list diff --git a/src/server/game/Entities/Object/ObjectGuid.cpp b/src/server/game/Entities/Object/ObjectGuid.cpp index 5d7c19d48e7..6d063a901bd 100644 --- a/src/server/game/Entities/Object/ObjectGuid.cpp +++ b/src/server/game/Entities/Object/ObjectGuid.cpp @@ -177,3 +177,29 @@ void ObjectGuidGeneratorBase::HandleCounterOverflow(HighGuid high) TC_LOG_ERROR("misc", "%s guid overflow!! Can't continue, shutting down server. ", ObjectGuid::GetTypeName(high)); World::StopNow(ERROR_EXIT_CODE); } + +#define GUID_TRAIT_INSTANTIATE_GUID( HIGH_GUID ) \ + template class TC_GAME_API ObjectGuidGenerator< HIGH_GUID >; + +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Player) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Item) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Transport) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Guild) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Conversation) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Creature) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Vehicle) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Pet) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::GameObject) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::DynamicObject) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::AreaTrigger) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Corpse) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::LootObject) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::SceneObject) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Scenario) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::AIGroup) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::DynamicDoor) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::Vignette) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::CallForHelp) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::AIResource) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::AILock) +GUID_TRAIT_INSTANTIATE_GUID(HighGuid::AILockTicket) diff --git a/src/server/game/Entities/Object/ObjectGuid.h b/src/server/game/Entities/Object/ObjectGuid.h index def19abca78..8bc2ee4df28 100644 --- a/src/server/game/Entities/Object/ObjectGuid.h +++ b/src/server/game/Entities/Object/ObjectGuid.h @@ -180,11 +180,11 @@ class PackedGuid; #pragma pack(push, 1) -class ObjectGuid +class TC_GAME_API ObjectGuid { - friend std::ostream& operator<<(std::ostream& stream, ObjectGuid const& guid); - friend ByteBuffer& operator<<(ByteBuffer& buf, ObjectGuid const& guid); - friend ByteBuffer& operator>>(ByteBuffer& buf, ObjectGuid& guid); + friend TC_GAME_API std::ostream& operator<<(std::ostream& stream, ObjectGuid const& guid); + friend TC_GAME_API ByteBuffer& operator<<(ByteBuffer& buf, ObjectGuid const& guid); + friend TC_GAME_API ByteBuffer& operator>>(ByteBuffer& buf, ObjectGuid& guid); public: static ObjectGuid const Empty; @@ -332,9 +332,9 @@ typedef std::unordered_set<ObjectGuid> GuidUnorderedSet; // maximum buffer size for packed guid is 18 bytes #define PACKED_GUID_MIN_BUFFER_SIZE 18 -class PackedGuid +class TC_GAME_API PackedGuid { - friend ByteBuffer& operator<<(ByteBuffer& buf, PackedGuid const& guid); + friend TC_GAME_API ByteBuffer& operator<<(ByteBuffer& buf, PackedGuid const& guid); public: explicit PackedGuid() : _packedGuid(PACKED_GUID_MIN_BUFFER_SIZE) { _packedGuid << uint16(0); } @@ -348,7 +348,7 @@ class PackedGuid ByteBuffer _packedGuid; }; -class ObjectGuidGeneratorBase +class TC_GAME_API ObjectGuidGeneratorBase { public: ObjectGuidGeneratorBase(ObjectGuid::LowType start = UI64LIT(1)) : _nextGuid(start) { } @@ -363,7 +363,7 @@ protected: }; template<HighGuid high> -class ObjectGuidGenerator : public ObjectGuidGeneratorBase +class TC_GAME_API ObjectGuidGenerator : public ObjectGuidGeneratorBase { public: explicit ObjectGuidGenerator(ObjectGuid::LowType start = UI64LIT(1)) : ObjectGuidGeneratorBase(start) { } @@ -376,12 +376,12 @@ public: } }; -ByteBuffer& operator<<(ByteBuffer& buf, ObjectGuid const& guid); -ByteBuffer& operator>>(ByteBuffer& buf, ObjectGuid& guid); +TC_GAME_API ByteBuffer& operator<<(ByteBuffer& buf, ObjectGuid const& guid); +TC_GAME_API ByteBuffer& operator>>(ByteBuffer& buf, ObjectGuid& guid); -ByteBuffer& operator<<(ByteBuffer& buf, PackedGuid const& guid); +TC_GAME_API ByteBuffer& operator<<(ByteBuffer& buf, PackedGuid const& guid); -std::ostream& operator<<(std::ostream& stream, ObjectGuid const& guid); +TC_GAME_API std::ostream& operator<<(std::ostream& stream, ObjectGuid const& guid); namespace std { diff --git a/src/server/game/Entities/Object/ObjectPosSelector.h b/src/server/game/Entities/Object/ObjectPosSelector.h index 26a23678009..84c694abf08 100644 --- a/src/server/game/Entities/Object/ObjectPosSelector.h +++ b/src/server/game/Entities/Object/ObjectPosSelector.h @@ -30,7 +30,7 @@ inline UsedPosType operator ~(UsedPosType uptype) return uptype==USED_POS_PLUS ? USED_POS_MINUS : USED_POS_PLUS; } -struct ObjectPosSelector +struct TC_GAME_API ObjectPosSelector { struct UsedPos { diff --git a/src/server/game/Entities/Object/Position.h b/src/server/game/Entities/Object/Position.h index cc528b973f8..a941a2141f1 100644 --- a/src/server/game/Entities/Object/Position.h +++ b/src/server/game/Entities/Object/Position.h @@ -24,7 +24,7 @@ class ByteBuffer; -struct Position +struct TC_GAME_API Position { Position(float x = 0, float y = 0, float z = 0, float o = 0) : m_positionX(x), m_positionY(y), m_positionZ(z), m_orientation(NormalizeOrientation(o)) { } @@ -225,7 +225,7 @@ public: #define MAPID_INVALID 0xFFFFFFFF -class WorldLocation : public Position +class TC_GAME_API WorldLocation : public Position { public: explicit WorldLocation(uint32 mapId = MAPID_INVALID, float x = 0.f, float y = 0.f, float z = 0.f, float o = 0.f) @@ -256,11 +256,11 @@ public: uint32 m_mapId; }; -ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYStreamer const& streamer); -ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYStreamer const& streamer); -ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer); -ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer); -ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer); -ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer); +TC_GAME_API ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYStreamer const& streamer); +TC_GAME_API ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYStreamer const& streamer); +TC_GAME_API ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer); +TC_GAME_API ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer); +TC_GAME_API ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer); +TC_GAME_API ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer); #endif // Trinity_game_Position_h__ diff --git a/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h b/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h index 6d0d2fecca5..046916ea9d1 100644 --- a/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h +++ b/src/server/game/Entities/Object/Updates/UpdateFieldFlags.h @@ -37,17 +37,17 @@ enum UpdatefieldFlags UF_FLAG_URGENT_SELF_ONLY = 0x400 }; -extern uint32 ItemUpdateFieldFlags[CONTAINER_END]; -extern uint32 ItemDynamicUpdateFieldFlags[CONTAINER_DYNAMIC_END]; -extern uint32 UnitUpdateFieldFlags[PLAYER_END]; -extern uint32 UnitDynamicUpdateFieldFlags[PLAYER_DYNAMIC_END]; -extern uint32 GameObjectUpdateFieldFlags[GAMEOBJECT_END]; -extern uint32 GameObjectDynamicUpdateFieldFlags[GAMEOBJECT_DYNAMIC_END]; -extern uint32 DynamicObjectUpdateFieldFlags[DYNAMICOBJECT_END]; -extern uint32 CorpseUpdateFieldFlags[CORPSE_END]; -extern uint32 AreaTriggerUpdateFieldFlags[AREATRIGGER_END]; -extern uint32 SceneObjectUpdateFieldFlags[SCENEOBJECT_END]; -extern uint32 ConversationUpdateFieldFlags[CONVERSATION_END]; -extern uint32 ConversationDynamicUpdateFieldFlags[CONVERSATION_DYNAMIC_END]; +TC_GAME_API extern uint32 ItemUpdateFieldFlags[CONTAINER_END]; +TC_GAME_API extern uint32 ItemDynamicUpdateFieldFlags[CONTAINER_DYNAMIC_END]; +TC_GAME_API extern uint32 UnitUpdateFieldFlags[PLAYER_END]; +TC_GAME_API extern uint32 UnitDynamicUpdateFieldFlags[PLAYER_DYNAMIC_END]; +TC_GAME_API extern uint32 GameObjectUpdateFieldFlags[GAMEOBJECT_END]; +TC_GAME_API extern uint32 GameObjectDynamicUpdateFieldFlags[GAMEOBJECT_DYNAMIC_END]; +TC_GAME_API extern uint32 DynamicObjectUpdateFieldFlags[DYNAMICOBJECT_END]; +TC_GAME_API extern uint32 CorpseUpdateFieldFlags[CORPSE_END]; +TC_GAME_API extern uint32 AreaTriggerUpdateFieldFlags[AREATRIGGER_END]; +TC_GAME_API extern uint32 SceneObjectUpdateFieldFlags[SCENEOBJECT_END]; +TC_GAME_API extern uint32 ConversationUpdateFieldFlags[CONVERSATION_END]; +TC_GAME_API extern uint32 ConversationDynamicUpdateFieldFlags[CONVERSATION_DYNAMIC_END]; #endif // _UPDATEFIELDFLAGS_H diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h index bc989b515eb..170b881fa50 100644 --- a/src/server/game/Entities/Pet/Pet.h +++ b/src/server/game/Entities/Pet/Pet.h @@ -43,7 +43,7 @@ typedef std::vector<uint32> AutoSpellList; class Player; -class Pet : public Guardian +class TC_GAME_API Pet : public Guardian { public: explicit Pet(Player* owner, PetType type = MAX_PET_TYPE); diff --git a/src/server/game/Entities/Player/CollectionMgr.h b/src/server/game/Entities/Player/CollectionMgr.h index 6870cd5732d..aa2f70d4df9 100644 --- a/src/server/game/Entities/Player/CollectionMgr.h +++ b/src/server/game/Entities/Player/CollectionMgr.h @@ -45,7 +45,7 @@ struct HeirloomData typedef std::map<uint32, bool> ToyBoxContainer; typedef std::map<uint32, HeirloomData> HeirloomContainer; -class CollectionMgr +class TC_GAME_API CollectionMgr { public: explicit CollectionMgr(WorldSession* owner) : _owner(owner) { } diff --git a/src/server/game/Entities/Player/KillRewarder.h b/src/server/game/Entities/Player/KillRewarder.h index 08530de900c..210e5ff0246 100644 --- a/src/server/game/Entities/Player/KillRewarder.h +++ b/src/server/game/Entities/Player/KillRewarder.h @@ -24,7 +24,7 @@ class Player; class Unit; class Group; -class KillRewarder +class TC_GAME_API KillRewarder { public: KillRewarder(Player* killer, Unit* victim, bool isBattleGround); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index a381c2dd351..3fc5a7d76fd 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -115,7 +115,7 @@ struct PlayerSpell bool disabled : 1; // first rank has been learned in result talent learn but currently talent unlearned, save max learned ranks }; -extern uint32 const MasterySpells[MAX_CLASSES]; +TC_GAME_API extern uint32 const MasterySpells[MAX_CLASSES]; enum TalentSpecialization // talent tabs { @@ -1012,7 +1012,7 @@ enum PlayerDelayedOperations // Player summoning auto-decline time (in secs) #define MAX_PLAYER_SUMMON_DELAY (2*MINUTE) // Maximum money amount : 2^31 - 1 -extern uint64 const MAX_MONEY_AMOUNT; +TC_GAME_API extern uint64 const MAX_MONEY_AMOUNT; struct InstancePlayerBind { @@ -1146,7 +1146,7 @@ struct ResurrectionData static uint32 const DefaultTalentRowLevels[MAX_TALENT_TIERS] = { 15, 30, 45, 60, 75, 90, 100 }; static uint32 const DKTalentRowLevels[MAX_TALENT_TIERS] = { 57, 58, 59, 60, 75, 90, 100 }; -struct PlayerTalentInfo +struct TC_GAME_API PlayerTalentInfo { PlayerTalentInfo() : ResetTalentsCost(0), ResetTalentsTime(0), @@ -1182,7 +1182,7 @@ private: PlayerTalentInfo(PlayerTalentInfo const&); }; -class Player : public Unit, public GridObject<Player> +class TC_GAME_API Player : public Unit, public GridObject<Player> { friend class WorldSession; friend void Item::AddToUpdateQueueOf(Player* player); @@ -2837,8 +2837,8 @@ class Player : public Unit, public GridObject<Player> WorldLocation _corpseLocation; }; -void AddItemsSetItem(Player* player, Item* item); -void RemoveItemsSetItem(Player* player, ItemTemplate const* proto); +TC_GAME_API void AddItemsSetItem(Player* player, Item* item); +TC_GAME_API void RemoveItemsSetItem(Player* player, ItemTemplate const* proto); // "the bodies of template functions must be made available in a header file" template <class T> T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell* spell) diff --git a/src/server/game/Entities/Player/PlayerTaxi.h b/src/server/game/Entities/Player/PlayerTaxi.h index fb73042cb84..13aeed19ef8 100644 --- a/src/server/game/Entities/Player/PlayerTaxi.h +++ b/src/server/game/Entities/Player/PlayerTaxi.h @@ -6,7 +6,7 @@ #include "WorldSession.h" #include <map> -class PlayerTaxi +class TC_GAME_API PlayerTaxi { public: PlayerTaxi() { m_taximask.fill(0); } diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h index aa022d383d9..df409106bdc 100644 --- a/src/server/game/Entities/Player/SocialMgr.h +++ b/src/server/game/Entities/Player/SocialMgr.h @@ -100,7 +100,7 @@ enum FriendsResult : uint8 #define SOCIALMGR_FRIEND_LIMIT 50u #define SOCIALMGR_IGNORE_LIMIT 50u -class PlayerSocial +class TC_GAME_API PlayerSocial { friend class SocialMgr; diff --git a/src/server/game/Entities/Player/TradeData.h b/src/server/game/Entities/Player/TradeData.h index 0dfded6c4aa..365f7a9fa82 100644 --- a/src/server/game/Entities/Player/TradeData.h +++ b/src/server/game/Entities/Player/TradeData.h @@ -31,7 +31,7 @@ enum TradeSlots class Item; class Player; -class TradeData +class TC_GAME_API TradeData { public: TradeData(Player* player, Player* trader) : diff --git a/src/server/game/Entities/Taxi/TaxiPathGraph.h b/src/server/game/Entities/Taxi/TaxiPathGraph.h index 434440acaef..24ec3ce9a7e 100644 --- a/src/server/game/Entities/Taxi/TaxiPathGraph.h +++ b/src/server/game/Entities/Taxi/TaxiPathGraph.h @@ -25,7 +25,7 @@ class Player; struct TaxiNodesEntry; -class TaxiPathGraph +class TC_GAME_API TaxiPathGraph { public: static TaxiPathGraph& Instance(); diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h index f0a4af3a3d7..14bb60f916f 100644 --- a/src/server/game/Entities/Totem/Totem.h +++ b/src/server/game/Entities/Totem/Totem.h @@ -35,7 +35,7 @@ enum TotemSpells SPELL_TOTEMIC_WRATH = 77747 }; -class Totem : public Minion +class TC_GAME_API Totem : public Minion { public: Totem(SummonPropertiesEntry const* properties, Unit* owner); diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h index 9385d262ad8..f4d2866fbb3 100644 --- a/src/server/game/Entities/Transport/Transport.h +++ b/src/server/game/Entities/Transport/Transport.h @@ -25,7 +25,7 @@ struct CreatureData; -class Transport : public GameObject, public TransportBase +class TC_GAME_API Transport : public GameObject, public TransportBase { friend Transport* TransportMgr::CreateTransport(uint32, ObjectGuid::LowType, Map*, uint32, uint32); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index a371f08ce70..d6e3d01b09a 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -609,8 +609,8 @@ enum UnitMoveType #define MAX_MOVE_TYPE 9 -extern float baseMoveSpeed[MAX_MOVE_TYPE]; -extern float playerBaseMoveSpeed[MAX_MOVE_TYPE]; +TC_GAME_API extern float baseMoveSpeed[MAX_MOVE_TYPE]; +TC_GAME_API extern float playerBaseMoveSpeed[MAX_MOVE_TYPE]; enum WeaponAttackType : uint16 { @@ -918,7 +918,7 @@ struct CleanDamage struct CalcDamageInfo; -class DamageInfo +class TC_GAME_API DamageInfo { private: Unit* const m_attacker; @@ -981,7 +981,7 @@ public: SpellSchoolMask GetSchoolMask() const { return _schoolMask; }; }; -class ProcEventInfo +class TC_GAME_API ProcEventInfo { public: ProcEventInfo(Unit* actor, Unit* actionTarget, Unit* procTarget, uint32 typeMask, @@ -1039,7 +1039,7 @@ struct CalcDamageInfo }; // Spell damage info structure based on structure sending in SMSG_SPELLNONMELEEDAMAGELOG opcode -struct SpellNonMeleeDamage +struct TC_GAME_API SpellNonMeleeDamage { SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, uint32 _schoolMask); @@ -1198,7 +1198,7 @@ enum ActionBarIndex #define MAX_UNIT_ACTION_BAR_INDEX (ACTION_BAR_INDEX_END-ACTION_BAR_INDEX_START) -struct CharmInfo +struct TC_GAME_API CharmInfo { public: explicit CharmInfo(Unit* unit); @@ -1302,7 +1302,7 @@ enum PlayerTotemType struct SpellProcEventEntry; // used only privately -class Unit : public WorldObject +class TC_GAME_API Unit : public WorldObject { public: typedef std::set<Unit*> AttackerSet; diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h index 10341a7c029..dbaaa3b7b9f 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.h +++ b/src/server/game/Entities/Vehicle/Vehicle.h @@ -29,7 +29,7 @@ struct VehicleEntry; class Unit; class VehicleJoinEvent; -class Vehicle : public TransportBase +class TC_GAME_API Vehicle : public TransportBase { protected: friend bool Unit::CreateVehicleKit(uint32 id, uint32 creatureEntry, bool); @@ -118,7 +118,7 @@ class Vehicle : public TransportBase PendingJoinEventContainer _pendingJoinEvents; ///< Collection of delayed join events for prospective passengers }; -class VehicleJoinEvent : public BasicEvent +class TC_GAME_API VehicleJoinEvent : public BasicEvent { friend class Vehicle; protected: diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h index a01d361fc68..312f4de4b80 100644 --- a/src/server/game/Events/GameEventMgr.h +++ b/src/server/game/Events/GameEventMgr.h @@ -94,7 +94,7 @@ class Player; class Creature; class Quest; -class GameEventMgr +class TC_GAME_API GameEventMgr { private: GameEventMgr(); @@ -183,8 +183,8 @@ class GameEventMgr #define sGameEventMgr GameEventMgr::instance() -bool IsHolidayActive(HolidayIds id); -bool IsEventActive(uint16 event_id); +TC_GAME_API bool IsHolidayActive(HolidayIds id); +TC_GAME_API bool IsEventActive(uint16 event_id); #endif diff --git a/src/server/game/Garrison/Garrison.h b/src/server/game/Garrison/Garrison.h index e35df29997b..2aa38ee6ad3 100644 --- a/src/server/game/Garrison/Garrison.h +++ b/src/server/game/Garrison/Garrison.h @@ -80,7 +80,7 @@ enum GarrisonFollowerStatus class GameObject; class Map; -class Garrison +class TC_GAME_API Garrison { public: struct Building diff --git a/src/server/game/Garrison/GarrisonMap.h b/src/server/game/Garrison/GarrisonMap.h index 57bc114970c..c04cf9d9a24 100644 --- a/src/server/game/Garrison/GarrisonMap.h +++ b/src/server/game/Garrison/GarrisonMap.h @@ -23,7 +23,7 @@ class Garrison; class Player; -class GarrisonMap : public Map +class TC_GAME_API GarrisonMap : public Map { public: GarrisonMap(uint32 id, time_t, uint32 instanceId, Map* parent, ObjectGuid const& owner); diff --git a/src/server/game/Garrison/GarrisonMgr.h b/src/server/game/Garrison/GarrisonMgr.h index d09cb9c0930..6130fd67b25 100644 --- a/src/server/game/Garrison/GarrisonMgr.h +++ b/src/server/game/Garrison/GarrisonMgr.h @@ -38,7 +38,7 @@ struct GarrAbilities std::unordered_set<GarrAbilityEntry const*> Traits; }; -class GarrisonMgr +class TC_GAME_API GarrisonMgr { public: static GarrisonMgr& Instance(); diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index 695591fb1c7..7cb21321f04 100644 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -34,6 +34,48 @@ #include <boost/thread/shared_mutex.hpp> #include <boost/thread/locks.hpp> +template<class T> +void HashMapHolder<T>::Insert(T* o) +{ + boost::unique_lock<boost::shared_mutex> lock(*GetLock()); + + GetContainer()[o->GetGUID()] = o; +} + +template<class T> +void HashMapHolder<T>::Remove(T* o) +{ + boost::unique_lock<boost::shared_mutex> lock(*GetLock()); + + GetContainer().erase(o->GetGUID()); +} + +template<class T> +T* HashMapHolder<T>::Find(ObjectGuid guid) +{ + boost::shared_lock<boost::shared_mutex> lock(*GetLock()); + + typename MapType::iterator itr = GetContainer().find(guid); + return (itr != GetContainer().end()) ? itr->second : NULL; +} + +template<class T> +auto HashMapHolder<T>::GetContainer() -> MapType& +{ + static MapType _objectMap; + return _objectMap; +} + +template<class T> +boost::shared_mutex* HashMapHolder<T>::GetLock() +{ + static boost::shared_mutex _lock; + return &_lock; +} + +template class TC_GAME_API HashMapHolder<Player>; +template class TC_GAME_API HashMapHolder<Transport>; + WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, ObjectGuid const& guid) { switch (guid.GetHigh()) @@ -226,12 +268,3 @@ void ObjectAccessor::SaveAllPlayers() for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr) itr->second->SaveToDB(); } - -/// Define the static members of HashMapHolder - -template <class T> typename HashMapHolder<T>::MapType HashMapHolder<T>::_objectMap; -template <class T> boost::shared_mutex HashMapHolder<T>::_lock; - -/// Global definitions for the hashmap storage -template class HashMapHolder<Player>; -template class HashMapHolder<Transport>; diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index 1c1ec6b3451..83bbdf42239 100644 --- a/src/server/game/Globals/ObjectAccessor.h +++ b/src/server/game/Globals/ObjectAccessor.h @@ -42,77 +42,57 @@ class WorldRunnable; class Transport; template <class T> -class HashMapHolder +class TC_GAME_API HashMapHolder { - public: - static_assert(std::is_same<Player, T>::value - || std::is_same<Transport, T>::value, - "Only Player and Transport can be registered in global HashMapHolder"); + //Non instanceable only static + HashMapHolder() { } - typedef std::unordered_map<ObjectGuid, T*> MapType; +public: + static_assert(std::is_same<Player, T>::value + || std::is_same<Transport, T>::value, + "Only Player and Transport can be registered in global HashMapHolder"); - static void Insert(T* o) - { - boost::unique_lock<boost::shared_mutex> lock(_lock); + typedef std::unordered_map<ObjectGuid, T*> MapType; - _objectMap[o->GetGUID()] = o; - } + static void Insert(T* o); - static void Remove(T* o) - { - boost::unique_lock<boost::shared_mutex> lock(_lock); + static void Remove(T* o); - _objectMap.erase(o->GetGUID()); - } + static T* Find(ObjectGuid guid); - static T* Find(ObjectGuid guid) - { - boost::shared_lock<boost::shared_mutex> lock(_lock); + static MapType& GetContainer(); - typename MapType::iterator itr = _objectMap.find(guid); - return (itr != _objectMap.end()) ? itr->second : NULL; - } - - static MapType& GetContainer() { return _objectMap; } - - static boost::shared_mutex* GetLock() { return &_lock; } - - private: - //Non instanceable only static - HashMapHolder() { } - - static boost::shared_mutex _lock; - static MapType _objectMap; + static boost::shared_mutex* GetLock(); }; namespace ObjectAccessor { // these functions return objects only if in map of specified object - WorldObject* GetWorldObject(WorldObject const&, ObjectGuid const&); - Object* GetObjectByTypeMask(WorldObject const&, ObjectGuid const&, uint32 typemask); - Corpse* GetCorpse(WorldObject const& u, ObjectGuid const& guid); - GameObject* GetGameObject(WorldObject const& u, ObjectGuid const& guid); - Transport* GetTransport(WorldObject const& u, ObjectGuid const& guid); - DynamicObject* GetDynamicObject(WorldObject const& u, ObjectGuid const& guid); - AreaTrigger* GetAreaTrigger(WorldObject const& u, ObjectGuid const& guid); - Unit* GetUnit(WorldObject const&, ObjectGuid const& guid); - Creature* GetCreature(WorldObject const& u, ObjectGuid const& guid); - Pet* GetPet(WorldObject const&, ObjectGuid const& guid); - Player* GetPlayer(Map const*, ObjectGuid const& guid); - Player* GetPlayer(WorldObject const&, ObjectGuid const& guid); - Creature* GetCreatureOrPetOrVehicle(WorldObject const&, ObjectGuid const&); + TC_GAME_API WorldObject* GetWorldObject(WorldObject const&, ObjectGuid const&); + TC_GAME_API Object* GetObjectByTypeMask(WorldObject const&, ObjectGuid const&, uint32 typemask); + TC_GAME_API Corpse* GetCorpse(WorldObject const& u, ObjectGuid const& guid); + TC_GAME_API GameObject* GetGameObject(WorldObject const& u, ObjectGuid const& guid); + TC_GAME_API Transport* GetTransport(WorldObject const& u, ObjectGuid const& guid); + TC_GAME_API DynamicObject* GetDynamicObject(WorldObject const& u, ObjectGuid const& guid); + TC_GAME_API AreaTrigger* GetAreaTrigger(WorldObject const& u, ObjectGuid const& guid); + TC_GAME_API Unit* GetUnit(WorldObject const&, ObjectGuid const& guid); + TC_GAME_API Creature* GetCreature(WorldObject const& u, ObjectGuid const& guid); + TC_GAME_API Pet* GetPet(WorldObject const&, ObjectGuid const& guid); + TC_GAME_API Player* GetPlayer(Map const*, ObjectGuid const& guid); + TC_GAME_API Player* GetPlayer(WorldObject const&, ObjectGuid const& guid); + TC_GAME_API Creature* GetCreatureOrPetOrVehicle(WorldObject const&, ObjectGuid const&); // these functions return objects if found in whole world // ACCESS LIKE THAT IS NOT THREAD SAFE - Player* FindPlayer(ObjectGuid const&); - Player* FindPlayerByName(std::string const& name); + TC_GAME_API Player* FindPlayer(ObjectGuid const&); + TC_GAME_API Player* FindPlayerByName(std::string const& name); // this returns Player even if he is not in world, for example teleporting - Player* FindConnectedPlayer(ObjectGuid const&); - Player* FindConnectedPlayerByName(std::string const& name); + TC_GAME_API Player* FindConnectedPlayer(ObjectGuid const&); + TC_GAME_API Player* FindConnectedPlayerByName(std::string const& name); // when using this, you must use the hashmapholder's lock - HashMapHolder<Player>::MapType const& GetPlayers(); + TC_GAME_API HashMapHolder<Player>::MapType const& GetPlayers(); template<class T> void AddObject(T* object) @@ -126,7 +106,8 @@ namespace ObjectAccessor HashMapHolder<T>::Remove(object); } - void SaveAllPlayers(); + TC_GAME_API void SaveAllPlayers(); }; #endif + diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 3bbbb2e7b19..f67d753cf7c 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -376,15 +376,15 @@ typedef std::multimap<uint32, ScriptInfo> ScriptMap; typedef std::map<uint32, ScriptMap > ScriptMapMap; typedef std::multimap<uint32, uint32> SpellScriptsContainer; typedef std::pair<SpellScriptsContainer::iterator, SpellScriptsContainer::iterator> SpellScriptsBounds; -extern ScriptMapMap sSpellScripts; -extern ScriptMapMap sEventScripts; -extern ScriptMapMap sWaypointScripts; +TC_GAME_API extern ScriptMapMap sSpellScripts; +TC_GAME_API extern ScriptMapMap sEventScripts; +TC_GAME_API extern ScriptMapMap sWaypointScripts; std::string GetScriptsTableNameByType(ScriptsType type); ScriptMapMap* GetScriptsMapByType(ScriptsType type); std::string GetScriptCommandName(ScriptCommands command); -struct SpellClickInfo +struct TC_GAME_API SpellClickInfo { uint32 spellId; uint8 castFlags; @@ -646,7 +646,7 @@ SkillRangeType GetSkillRangeType(SkillRaceClassInfoEntry const* rcEntry); #define MAX_PET_NAME 12 // max allowed by client name length #define MAX_CHARTER_NAME 24 // max allowed by client name length -bool normalizePlayerName(std::string& name); +TC_GAME_API bool normalizePlayerName(std::string& name); struct ExtendedPlayerName { @@ -664,7 +664,7 @@ struct LanguageDesc uint32 skill_id; }; -extern LanguageDesc lang_description[LANGUAGES_COUNT]; +TC_GAME_API extern LanguageDesc lang_description[LANGUAGES_COUNT]; LanguageDesc const* GetLanguageDescByID(uint32 lang); enum EncounterCreditType @@ -699,7 +699,7 @@ typedef std::unordered_map<uint32, std::vector<PhaseInfoStruct>> PhaseInfo; // p class PlayerDumpReader; -class ObjectMgr +class TC_GAME_API ObjectMgr { friend class PlayerDumpReader; diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h index 9420bef4b9d..b567da43b69 100644 --- a/src/server/game/Grids/GridStates.h +++ b/src/server/game/Grids/GridStates.h @@ -24,32 +24,32 @@ class Map; -class GridState +class TC_GAME_API GridState { public: virtual ~GridState() { }; virtual void Update(Map &, NGridType&, GridInfo &, uint32 t_diff) const = 0; }; -class InvalidState : public GridState +class TC_GAME_API InvalidState : public GridState { public: void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; }; -class ActiveState : public GridState +class TC_GAME_API ActiveState : public GridState { public: void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; }; -class IdleState : public GridState +class TC_GAME_API IdleState : public GridState { public: void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; }; -class RemovalState : public GridState +class TC_GAME_API RemovalState : public GridState { public: void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override; diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 553de2f1a1f..66540add24b 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -40,7 +40,7 @@ class Player; namespace Trinity { - struct VisibleNotifier + struct TC_GAME_API VisibleNotifier { Player &i_player; UpdateData i_data; @@ -63,7 +63,7 @@ namespace Trinity void Visit(DynamicObjectMapType &); }; - struct PlayerRelocationNotifier : public VisibleNotifier + struct TC_GAME_API PlayerRelocationNotifier : public VisibleNotifier { PlayerRelocationNotifier(Player &player) : VisibleNotifier(player) { } @@ -72,7 +72,7 @@ namespace Trinity void Visit(PlayerMapType &); }; - struct CreatureRelocationNotifier + struct TC_GAME_API CreatureRelocationNotifier { Creature &i_creature; CreatureRelocationNotifier(Creature &c) : i_creature(c) { } @@ -81,7 +81,7 @@ namespace Trinity void Visit(PlayerMapType &); }; - struct DelayedUnitRelocation + struct TC_GAME_API DelayedUnitRelocation { Map &i_map; Cell &cell; @@ -94,7 +94,7 @@ namespace Trinity void Visit(PlayerMapType &); }; - struct AIRelocationNotifier + struct TC_GAME_API AIRelocationNotifier { Unit &i_unit; bool isCreature; @@ -123,7 +123,7 @@ namespace Trinity void Visit(AreaTriggerMapType &m) { updateObjects<AreaTrigger>(m); } }; - struct MessageDistDeliverer + struct TC_GAME_API MessageDistDeliverer { WorldObject* i_source; WorldPacket const* i_message; @@ -580,7 +580,7 @@ namespace Trinity // WorldObject check classes - class AnyDeadUnitObjectInRangeCheck + class TC_GAME_API AnyDeadUnitObjectInRangeCheck { public: AnyDeadUnitObjectInRangeCheck(Unit* searchObj, float range) : i_searchObj(searchObj), i_range(range) { } @@ -593,7 +593,7 @@ namespace Trinity float i_range; }; - class AnyDeadUnitSpellTargetInRangeCheck : public AnyDeadUnitObjectInRangeCheck + class TC_GAME_API AnyDeadUnitSpellTargetInRangeCheck : public AnyDeadUnitObjectInRangeCheck { public: AnyDeadUnitSpellTargetInRangeCheck(Unit* searchObj, float range, SpellInfo const* spellInfo, SpellTargetCheckTypes check) diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h index 11a54a3e7b0..d70f830ea68 100644 --- a/src/server/game/Grids/ObjectGridLoader.h +++ b/src/server/game/Grids/ObjectGridLoader.h @@ -27,7 +27,7 @@ class ObjectWorldLoader; -class ObjectGridLoader +class TC_GAME_API ObjectGridLoader { friend class ObjectWorldLoader; @@ -56,7 +56,7 @@ class ObjectGridLoader }; //Stop the creatures before unloading the NGrid -class ObjectGridStoper +class TC_GAME_API ObjectGridStoper { public: void Visit(CreatureMapType &m); @@ -64,7 +64,7 @@ class ObjectGridStoper }; //Move the foreign creatures back to respawn positions before unloading the NGrid -class ObjectGridEvacuator +class TC_GAME_API ObjectGridEvacuator { public: void Visit(CreatureMapType &m); diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index ba11dcff200..3c75bf6739f 100644 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -188,7 +188,7 @@ struct RaidMarker /** request member stats checken **/ /// @todo uninvite people that not accepted invite -class Group +class TC_GAME_API Group { public: struct MemberSlot diff --git a/src/server/game/Groups/GroupMgr.h b/src/server/game/Groups/GroupMgr.h index d9f39c1fbd9..f3031493782 100644 --- a/src/server/game/Groups/GroupMgr.h +++ b/src/server/game/Groups/GroupMgr.h @@ -20,7 +20,7 @@ #include "Group.h" -class GroupMgr +class TC_GAME_API GroupMgr { private: GroupMgr(); diff --git a/src/server/game/Groups/GroupReference.h b/src/server/game/Groups/GroupReference.h index 4718dda1832..6e7373de7d7 100644 --- a/src/server/game/Groups/GroupReference.h +++ b/src/server/game/Groups/GroupReference.h @@ -24,7 +24,7 @@ class Group; class Player; -class GroupReference : public Reference<Group, Player> +class TC_GAME_API GroupReference : public Reference<Group, Player> { protected: uint8 iSubGroup; diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index e5ecef91649..d41a4f7c726 100644 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -261,7 +261,7 @@ const uint32 GuildChallengeMaxLevelGoldReward[GUILD_CHALLENGES_TYPES] = { 0, 125 const uint32 GuildChallengesMaxCount[GUILD_CHALLENGES_TYPES] = { 0, 7, 1, 3, 0, 3 }; // Emblem info -class EmblemInfo +class TC_GAME_API EmblemInfo { public: EmblemInfo() : m_style(0), m_color(0), m_borderStyle(0), m_borderColor(0), m_backgroundColor(0) { } @@ -317,7 +317,7 @@ typedef std::vector <GuildBankRightsAndSlots> GuildBankRightsAndSlotsVec; typedef std::set <uint8> SlotIds; -class Guild +class TC_GAME_API Guild { private: // Class representing guild member diff --git a/src/server/game/Guilds/GuildMgr.h b/src/server/game/Guilds/GuildMgr.h index 16786757a6d..66aed6ad1a7 100644 --- a/src/server/game/Guilds/GuildMgr.h +++ b/src/server/game/Guilds/GuildMgr.h @@ -20,7 +20,7 @@ #include "Guild.h" -class GuildMgr +class TC_GAME_API GuildMgr { private: GuildMgr(); diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h index 699b6aec574..21b5c3ca5c3 100644 --- a/src/server/game/Instances/InstanceSaveMgr.h +++ b/src/server/game/Instances/InstanceSaveMgr.h @@ -41,7 +41,7 @@ class Group; - player-instance binds for permanent heroic/raid saves - group-instance binds (both solo and permanent) cache the player binds for the group leader */ -class InstanceSave +class TC_GAME_API InstanceSave { friend class InstanceSaveManager; public: @@ -147,7 +147,7 @@ class InstanceSave typedef std::unordered_map<uint64 /*PAIR64(map, difficulty)*/, time_t /*resetTime*/> ResetTimeByMapDifficultyMap; -class InstanceSaveManager +class TC_GAME_API InstanceSaveManager { friend class InstanceSave; diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index e2620c85504..2bb2f14ca12 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -83,7 +83,7 @@ struct BossBoundaryEntry AreaBoundary const* Boundary; }; -struct BossBoundaryData +struct TC_GAME_API BossBoundaryData { typedef std::vector<BossBoundaryEntry> StorageType; typedef StorageType::const_iterator const_iterator; @@ -138,7 +138,7 @@ typedef std::map<uint32 /*entry*/, MinionInfo> MinionInfoMap; typedef std::map<uint32 /*type*/, ObjectGuid /*guid*/> ObjectGuidMap; typedef std::map<uint32 /*entry*/, uint32 /*type*/> ObjectInfoMap; -class InstanceScript : public ZoneScript +class TC_GAME_API InstanceScript : public ZoneScript { public: explicit InstanceScript(Map* map) : instance(map), completedEncounters(0) { } diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index e57bf681b8a..a7e11e81970 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1877,3 +1877,20 @@ void LoadLootTemplates_Reference() TC_LOG_INFO("server.loading", ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime)); } + +void LoadLootTables() +{ + LoadLootTemplates_Creature(); + LoadLootTemplates_Fishing(); + LoadLootTemplates_Gameobject(); + LoadLootTemplates_Item(); + LoadLootTemplates_Mail(); + LoadLootTemplates_Milling(); + LoadLootTemplates_Pickpocketing(); + LoadLootTemplates_Skinning(); + LoadLootTemplates_Disenchant(); + LoadLootTemplates_Prospecting(); + LoadLootTemplates_Spell(); + + LoadLootTemplates_Reference(); +} diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h index 05e045f4a2f..db12250f443 100644 --- a/src/server/game/Loot/LootMgr.h +++ b/src/server/game/Loot/LootMgr.h @@ -131,7 +131,7 @@ enum LootSlotType class Player; class LootStore; -struct LootStoreItem +struct TC_GAME_API LootStoreItem { uint32 itemid; // id of the item uint32 reference; // referenced TemplateleId @@ -154,7 +154,7 @@ struct LootStoreItem bool IsValid(LootStore const& store, uint32 entry) const; // Checks correctness of values }; -struct LootItem +struct TC_GAME_API LootItem { uint32 itemid; uint32 randomSuffix; @@ -210,7 +210,7 @@ typedef std::unordered_map<uint32, LootTemplate*> LootTemplateMap; typedef std::set<uint32> LootIdSet; -class LootStore +class TC_GAME_API LootStore { public: explicit LootStore(char const* name, char const* entryName, bool ratesAllowed) @@ -247,7 +247,7 @@ class LootStore bool m_ratesAllowed; }; -class LootTemplate +class TC_GAME_API LootTemplate { class LootGroup; // A set of loot definitions for items (refs are not allowed inside) typedef std::vector<LootGroup*> LootGroups; @@ -311,7 +311,7 @@ class LootValidatorRefManager : public RefManager<Loot, LootValidatorRef> //===================================================== -struct Loot +struct TC_GAME_API Loot { QuestItemMap const& GetPlayerQuestItems() const { return PlayerQuestItems; } QuestItemMap const& GetPlayerFFAItems() const { return PlayerFFAItems; } @@ -414,48 +414,33 @@ private: uint32 _difficultyBonusTreeMod; }; -extern LootStore LootTemplates_Creature; -extern LootStore LootTemplates_Fishing; -extern LootStore LootTemplates_Gameobject; -extern LootStore LootTemplates_Item; -extern LootStore LootTemplates_Mail; -extern LootStore LootTemplates_Milling; -extern LootStore LootTemplates_Pickpocketing; -extern LootStore LootTemplates_Reference; -extern LootStore LootTemplates_Skinning; -extern LootStore LootTemplates_Disenchant; -extern LootStore LootTemplates_Prospecting; -extern LootStore LootTemplates_Spell; - -void LoadLootTemplates_Creature(); -void LoadLootTemplates_Fishing(); -void LoadLootTemplates_Gameobject(); -void LoadLootTemplates_Item(); -void LoadLootTemplates_Mail(); -void LoadLootTemplates_Milling(); -void LoadLootTemplates_Pickpocketing(); -void LoadLootTemplates_Skinning(); -void LoadLootTemplates_Disenchant(); -void LoadLootTemplates_Prospecting(); - -void LoadLootTemplates_Spell(); -void LoadLootTemplates_Reference(); - -inline void LoadLootTables() -{ - LoadLootTemplates_Creature(); - LoadLootTemplates_Fishing(); - LoadLootTemplates_Gameobject(); - LoadLootTemplates_Item(); - LoadLootTemplates_Mail(); - LoadLootTemplates_Milling(); - LoadLootTemplates_Pickpocketing(); - LoadLootTemplates_Skinning(); - LoadLootTemplates_Disenchant(); - LoadLootTemplates_Prospecting(); - LoadLootTemplates_Spell(); - - LoadLootTemplates_Reference(); -} +TC_GAME_API extern LootStore LootTemplates_Creature; +TC_GAME_API extern LootStore LootTemplates_Fishing; +TC_GAME_API extern LootStore LootTemplates_Gameobject; +TC_GAME_API extern LootStore LootTemplates_Item; +TC_GAME_API extern LootStore LootTemplates_Mail; +TC_GAME_API extern LootStore LootTemplates_Milling; +TC_GAME_API extern LootStore LootTemplates_Pickpocketing; +TC_GAME_API extern LootStore LootTemplates_Reference; +TC_GAME_API extern LootStore LootTemplates_Skinning; +TC_GAME_API extern LootStore LootTemplates_Disenchant; +TC_GAME_API extern LootStore LootTemplates_Prospecting; +TC_GAME_API extern LootStore LootTemplates_Spell; + +TC_GAME_API void LoadLootTemplates_Creature(); +TC_GAME_API void LoadLootTemplates_Fishing(); +TC_GAME_API void LoadLootTemplates_Gameobject(); +TC_GAME_API void LoadLootTemplates_Item(); +TC_GAME_API void LoadLootTemplates_Mail(); +TC_GAME_API void LoadLootTemplates_Milling(); +TC_GAME_API void LoadLootTemplates_Pickpocketing(); +TC_GAME_API void LoadLootTemplates_Skinning(); +TC_GAME_API void LoadLootTemplates_Disenchant(); +TC_GAME_API void LoadLootTemplates_Prospecting(); + +TC_GAME_API void LoadLootTemplates_Spell(); +TC_GAME_API void LoadLootTemplates_Reference(); + +TC_GAME_API void LoadLootTables(); #endif diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h index 8bbd378f5d7..0031d3f7c3e 100644 --- a/src/server/game/Mails/Mail.h +++ b/src/server/game/Mails/Mail.h @@ -80,7 +80,7 @@ enum MailShowFlags MAIL_SHOW_RETURN = 0x0010 }; -class MailSender +class TC_GAME_API MailSender { public: // Constructors MailSender(MailMessageType messageType, ObjectGuid::LowType sender_guidlow_or_entry, MailStationery stationery = MAIL_STATIONERY_DEFAULT) @@ -101,7 +101,7 @@ class MailSender MailStationery m_stationery; }; -class MailReceiver +class TC_GAME_API MailReceiver { public: // Constructors explicit MailReceiver(ObjectGuid::LowType receiver_lowguid) : m_receiver(NULL), m_receiver_lowguid(receiver_lowguid) { } @@ -115,7 +115,7 @@ class MailReceiver ObjectGuid::LowType m_receiver_lowguid; }; -class MailDraft +class TC_GAME_API MailDraft { typedef std::map<ObjectGuid::LowType, Item*> MailItemMap; @@ -163,7 +163,7 @@ struct MailItemInfo }; typedef std::vector<MailItemInfo> MailItemInfoVec; -struct Mail +struct TC_GAME_API Mail { uint32 messageID; uint8 messageType; diff --git a/src/server/game/Maps/AreaBoundary.h b/src/server/game/Maps/AreaBoundary.h index a134b783ca6..a8780ddb60f 100644 --- a/src/server/game/Maps/AreaBoundary.h +++ b/src/server/game/Maps/AreaBoundary.h @@ -20,7 +20,7 @@ #include "Position.h" -class AreaBoundary +class TC_GAME_API AreaBoundary { public: enum BoundaryType @@ -66,7 +66,7 @@ class AreaBoundary bool m_isInvertedBoundary; }; -class RectangleBoundary : public AreaBoundary +class TC_GAME_API RectangleBoundary : public AreaBoundary { public: // X axis is north/south, Y axis is east/west, larger values are northwest @@ -79,7 +79,7 @@ class RectangleBoundary : public AreaBoundary const float _minX, _maxX, _minY, _maxY; }; -class CircleBoundary : public AreaBoundary +class TC_GAME_API CircleBoundary : public AreaBoundary { public: CircleBoundary(Position const& center, double radius, bool isInverted = false); @@ -95,7 +95,7 @@ class CircleBoundary : public AreaBoundary const double _radiusSq; }; -class EllipseBoundary : public AreaBoundary +class TC_GAME_API EllipseBoundary : public AreaBoundary { public: EllipseBoundary(Position const& center, double radiusX, double radiusY, bool isInverted = false); @@ -109,7 +109,7 @@ class EllipseBoundary : public AreaBoundary const double _radiusYSq, _scaleXSq; }; -class TriangleBoundary : public AreaBoundary +class TC_GAME_API TriangleBoundary : public AreaBoundary { public: TriangleBoundary(Position const& pointA, Position const& pointB, Position const& pointC, bool isInverted = false); @@ -123,7 +123,7 @@ class TriangleBoundary : public AreaBoundary const double _abx, _bcx, _cax, _aby, _bcy, _cay; }; -class ParallelogramBoundary : public AreaBoundary +class TC_GAME_API ParallelogramBoundary : public AreaBoundary { public: // Note: AB must be orthogonal to AD @@ -138,7 +138,7 @@ class ParallelogramBoundary : public AreaBoundary const double _abx, _dax, _aby, _day; }; -class ZRangeBoundary : public AreaBoundary +class TC_GAME_API ZRangeBoundary : public AreaBoundary { public: ZRangeBoundary(float minZ, float maxZ, bool isInverted = false); diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index d1beee19ac3..d1d13e428f9 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -3019,17 +3019,17 @@ void Map::RemoveFromActive(DynamicObject* obj) RemoveFromActiveHelper(obj); } -template bool Map::AddToMap(Corpse*); -template bool Map::AddToMap(Creature*); -template bool Map::AddToMap(GameObject*); -template bool Map::AddToMap(DynamicObject*); -template bool Map::AddToMap(AreaTrigger*); - -template void Map::RemoveFromMap(Corpse*, bool); -template void Map::RemoveFromMap(Creature*, bool); -template void Map::RemoveFromMap(GameObject*, bool); -template void Map::RemoveFromMap(DynamicObject*, bool); -template void Map::RemoveFromMap(AreaTrigger*, bool); +template TC_GAME_API bool Map::AddToMap(Corpse*); +template TC_GAME_API bool Map::AddToMap(Creature*); +template TC_GAME_API bool Map::AddToMap(GameObject*); +template TC_GAME_API bool Map::AddToMap(DynamicObject*); +template TC_GAME_API bool Map::AddToMap(AreaTrigger*); + +template TC_GAME_API void Map::RemoveFromMap(Corpse*, bool); +template TC_GAME_API void Map::RemoveFromMap(Creature*, bool); +template TC_GAME_API void Map::RemoveFromMap(GameObject*, bool); +template TC_GAME_API void Map::RemoveFromMap(DynamicObject*, bool); +template TC_GAME_API void Map::RemoveFromMap(AreaTrigger*, bool); /* ******* Dungeon Instance Maps ******* */ diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index d51f05bc32a..75d184b19a6 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -156,7 +156,7 @@ struct LiquidData float depth_level; }; -class GridMap +class TC_GAME_API GridMap { uint32 _flags; union{ @@ -256,7 +256,7 @@ typedef std::unordered_map<uint32 /*zoneId*/, ZoneDynamicInfo> ZoneDynamicInfoMa typedef TypeUnorderedMapContainer<AllMapStoredObjectTypes, ObjectGuid> MapStoredObjectTypesContainer; -class Map : public GridRefManager<NGridType> +class TC_GAME_API Map : public GridRefManager<NGridType> { friend class MapReference; public: @@ -280,6 +280,7 @@ class Map : public GridRefManager<NGridType> virtual bool AddPlayerToMap(Player* player, bool initPlayer = true); virtual void RemovePlayerFromMap(Player*, bool); + template<class T> bool AddToMap(T *); template<class T> void RemoveFromMap(T *, bool); @@ -295,7 +296,8 @@ class Map : public GridRefManager<NGridType> void GameObjectRelocation(GameObject* go, float x, float y, float z, float orientation, bool respawnRelocationOnFail = true); void DynamicObjectRelocation(DynamicObject* go, float x, float y, float z, float orientation); - template<class T, class CONTAINER> void Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER> &visitor); + template<class T, class CONTAINER> + void Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER> &visitor); bool IsRemovalGrid(float x, float y) const { @@ -753,7 +755,7 @@ enum InstanceResetMethod INSTANCE_RESET_RESPAWN_DELAY }; -class InstanceMap : public Map +class TC_GAME_API InstanceMap : public Map { public: InstanceMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent); @@ -782,7 +784,7 @@ class InstanceMap : public Map uint32 i_script_id; }; -class BattlegroundMap : public Map +class TC_GAME_API BattlegroundMap : public Map { public: BattlegroundMap(uint32 id, time_t, uint32 InstanceId, Map* _parent, uint8 spawnMode); diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h index 4fb334cb0ce..7d89d446846 100644 --- a/src/server/game/Maps/MapInstanced.h +++ b/src/server/game/Maps/MapInstanced.h @@ -25,7 +25,7 @@ class GarrisonMap; -class MapInstanced : public Map +class TC_GAME_API MapInstanced : public Map { friend class MapManager; public: diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h index 5d679cbe4d9..a4075f73563 100644 --- a/src/server/game/Maps/MapManager.h +++ b/src/server/game/Maps/MapManager.h @@ -28,7 +28,7 @@ class Transport; struct TransportCreatureProto; -class MapManager +class TC_GAME_API MapManager { public: static MapManager* instance(); diff --git a/src/server/game/Maps/MapUpdater.h b/src/server/game/Maps/MapUpdater.h index fce4a26c36a..7fdcc24d530 100644 --- a/src/server/game/Maps/MapUpdater.h +++ b/src/server/game/Maps/MapUpdater.h @@ -28,7 +28,7 @@ class MapUpdateRequest; class Map; -class MapUpdater +class TC_GAME_API MapUpdater { public: diff --git a/src/server/game/Maps/TransportMgr.h b/src/server/game/Maps/TransportMgr.h index b034751a6b4..d058c0bb111 100644 --- a/src/server/game/Maps/TransportMgr.h +++ b/src/server/game/Maps/TransportMgr.h @@ -83,7 +83,7 @@ struct TransportTemplate typedef std::map<uint32, TransportAnimationEntry const*> TransportPathContainer; typedef std::map<uint32, TransportRotationEntry const*> TransportPathRotationContainer; -struct TransportAnimation +struct TC_GAME_API TransportAnimation { TransportAnimation() : TotalTime(0) { } @@ -97,7 +97,7 @@ struct TransportAnimation typedef std::map<uint32, TransportAnimation> TransportAnimationContainer; -class TransportMgr +class TC_GAME_API TransportMgr { friend void DB2Manager::LoadStores(std::string const&, uint32); diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h index 3cb56e7d9d9..da1f9ef90f3 100644 --- a/src/server/game/Movement/MotionMaster.h +++ b/src/server/game/Movement/MotionMaster.h @@ -79,7 +79,7 @@ enum RotateDirection // assume it is 25 yard per 0.6 second #define SPEED_CHARGE 42.0f -class MotionMaster //: private std::stack<MovementGenerator *> +class TC_GAME_API MotionMaster //: private std::stack<MovementGenerator *> { private: //typedef std::stack<MovementGenerator *> Impl; diff --git a/src/server/game/Movement/MovementGenerator.h b/src/server/game/Movement/MovementGenerator.h index 56e5dc7058a..d9dd17fabc2 100755 --- a/src/server/game/Movement/MovementGenerator.h +++ b/src/server/game/Movement/MovementGenerator.h @@ -27,7 +27,7 @@ class Unit; -class MovementGenerator +class TC_GAME_API MovementGenerator { public: virtual ~MovementGenerator(); diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h index 9aa778c5651..161f9e3e970 100755 --- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h @@ -32,7 +32,7 @@ class IdleMovementGenerator : public MovementGenerator MovementGeneratorType GetMovementGeneratorType() const override { return IDLE_MOTION_TYPE; } }; -extern IdleMovementGenerator si_idleMovement; +TC_GAME_API extern IdleMovementGenerator si_idleMovement; class RotateMovementGenerator : public MovementGenerator { diff --git a/src/server/game/Movement/PathGenerator.h b/src/server/game/Movement/PathGenerator.h index 71e0e88f0b2..3cad62abf25 100644 --- a/src/server/game/Movement/PathGenerator.h +++ b/src/server/game/Movement/PathGenerator.h @@ -49,7 +49,7 @@ enum PathType PATHFIND_SHORT = 0x20, // path is longer or equal to its limited path length }; -class PathGenerator +class TC_GAME_API PathGenerator { public: explicit PathGenerator(Unit const* owner); diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h index 439cd9a14a4..24a6d85fcbc 100644 --- a/src/server/game/Movement/Spline/MoveSpline.h +++ b/src/server/game/Movement/Spline/MoveSpline.h @@ -46,7 +46,7 @@ namespace Movement // MoveSpline represents smooth catmullrom or linear curve and point that moves belong it // curve can be cyclic - in this case movement will be cyclic // point can have vertical acceleration motion component (used in fall, parabolic movement) - class MoveSpline + class TC_GAME_API MoveSpline { friend class WorldPackets::Movement::CommonMovement; friend class WorldPackets::Movement::MonsterMove; diff --git a/src/server/game/Movement/Spline/MoveSplineInit.h b/src/server/game/Movement/Spline/MoveSplineInit.h index c968f660f58..421a8d6b06c 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.h +++ b/src/server/game/Movement/Spline/MoveSplineInit.h @@ -35,7 +35,7 @@ namespace Movement }; // Transforms coordinates from global to transport offsets - class TransportPathTransform + class TC_GAME_API TransportPathTransform { public: TransportPathTransform(Unit* owner, bool transformForTransport) @@ -49,7 +49,7 @@ namespace Movement /* Initializes and launches spline movement */ - class MoveSplineInit + class TC_GAME_API MoveSplineInit { public: diff --git a/src/server/game/Movement/Spline/MovementTypedefs.h b/src/server/game/Movement/Spline/MovementTypedefs.h index 927707bfd56..56d8842e700 100644 --- a/src/server/game/Movement/Spline/MovementTypedefs.h +++ b/src/server/game/Movement/Spline/MovementTypedefs.h @@ -77,10 +77,10 @@ namespace Movement typedef counter<uint32, 0xFFFFFFFF> UInt32Counter; - extern float gravity; - extern UInt32Counter splineIdGen; - extern std::string MovementFlags_ToString(uint32 flags); - extern std::string MovementFlagsExtra_ToString(uint32 flags); + TC_GAME_API extern float gravity; + TC_GAME_API extern UInt32Counter splineIdGen; + TC_GAME_API extern std::string MovementFlags_ToString(uint32 flags); + TC_GAME_API extern std::string MovementFlagsExtra_ToString(uint32 flags); } #endif // TRINITYSERVER_TYPEDEFS_H diff --git a/src/server/game/Movement/Waypoints/WaypointManager.h b/src/server/game/Movement/Waypoints/WaypointManager.h index a1f98c52b0b..63dc4184308 100644 --- a/src/server/game/Movement/Waypoints/WaypointManager.h +++ b/src/server/game/Movement/Waypoints/WaypointManager.h @@ -44,7 +44,7 @@ struct WaypointData typedef std::vector<WaypointData*> WaypointPath; typedef std::unordered_map<uint32, WaypointPath> WaypointPathContainer; -class WaypointMgr +class TC_GAME_API WaypointMgr { public: static WaypointMgr* instance(); diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h index 2be74279ae7..5996b4126e4 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.h +++ b/src/server/game/OutdoorPvP/OutdoorPvP.h @@ -84,7 +84,7 @@ class Unit; struct GossipMenuItems; class OutdoorPvP; -class OPvPCapturePoint +class TC_GAME_API OPvPCapturePoint { public: @@ -185,7 +185,7 @@ class OPvPCapturePoint }; // base class for specific outdoor pvp handlers -class OutdoorPvP : public ZoneScript +class TC_GAME_API OutdoorPvP : public ZoneScript { friend class OutdoorPvPMgr; diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h index b1158075c57..e53a78ac271 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h @@ -35,7 +35,7 @@ struct OutdoorPvPData }; // class to handle player enter / leave / areatrigger / GO use events -class OutdoorPvPMgr +class TC_GAME_API OutdoorPvPMgr { private: OutdoorPvPMgr(); diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index 3461813f7c4..4e51641c502 100644 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -60,6 +60,11 @@ bool ActivePoolData::IsActiveObject<Quest>(uint64 quest_id) const return mActiveQuests.find(quest_id) != mActiveQuests.end(); } +template TC_GAME_API bool ActivePoolData::IsActiveObject<Creature>(uint64) const; +template TC_GAME_API bool ActivePoolData::IsActiveObject<GameObject>(uint64) const; +template TC_GAME_API bool ActivePoolData::IsActiveObject<Pool>(uint64) const; +template TC_GAME_API bool ActivePoolData::IsActiveObject<Quest>(uint64) const; + template<> void ActivePoolData::ActivateObject<Creature>(uint64 db_guid, uint32 pool_id) { diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h index 5491d7d2069..b38d27f9c94 100644 --- a/src/server/game/Pools/PoolMgr.h +++ b/src/server/game/Pools/PoolMgr.h @@ -43,7 +43,7 @@ class Pool // for Pool of Pool typedef std::set<uint64> ActivePoolObjects; typedef std::map<uint64, uint32> ActivePoolPools; -class ActivePoolData +class TC_GAME_API ActivePoolData { public: template<typename T> @@ -66,7 +66,7 @@ class ActivePoolData }; template <class T> -class PoolGroup +class TC_GAME_API PoolGroup { typedef std::vector<PoolObject> PoolObjectList; public: @@ -101,7 +101,7 @@ typedef std::multimap<uint32, uint32> PooledQuestRelation; typedef std::pair<PooledQuestRelation::const_iterator, PooledQuestRelation::const_iterator> PooledQuestRelationBounds; typedef std::pair<PooledQuestRelation::iterator, PooledQuestRelation::iterator> PooledQuestRelationBoundsNC; -class PoolMgr +class TC_GAME_API PoolMgr { private: PoolMgr(); diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index 8b27be40c20..b0df26f1ca5 100644 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -276,7 +276,7 @@ typedef std::vector<QuestObjective> QuestObjectives; // This Quest class provides a convenient way to access a few pretotaled (cached) quest details, // all base quest information, and any utility functions such as generating the amount of // xp to give -class Quest +class TC_GAME_API Quest { friend class ObjectMgr; friend class Player; diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h index 224a928bbac..f2a5f3ba1f3 100644 --- a/src/server/game/Reputation/ReputationMgr.h +++ b/src/server/game/Reputation/ReputationMgr.h @@ -61,7 +61,7 @@ typedef std::map<uint32, ReputationRank> ForcedReactions; class Player; -class ReputationMgr +class TC_GAME_API ReputationMgr { public: // constructors and global modifiers explicit ReputationMgr(Player* owner) : _player(owner), diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 2184899de02..9b403e608c1 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1691,32 +1691,32 @@ template<class TScript> std::vector<TScript*> ScriptRegistry<TScript>::Scripts; template<class TScript> uint32 ScriptRegistry<TScript>::_scriptIdCounter = 0; // Specialize for each script type class like so: -template class ScriptRegistry<SpellScriptLoader>; -template class ScriptRegistry<ServerScript>; -template class ScriptRegistry<WorldScript>; -template class ScriptRegistry<FormulaScript>; -template class ScriptRegistry<WorldMapScript>; -template class ScriptRegistry<InstanceMapScript>; -template class ScriptRegistry<BattlegroundMapScript>; -template class ScriptRegistry<ItemScript>; -template class ScriptRegistry<CreatureScript>; -template class ScriptRegistry<GameObjectScript>; -template class ScriptRegistry<AreaTriggerScript>; -template class ScriptRegistry<BattlegroundScript>; -template class ScriptRegistry<OutdoorPvPScript>; -template class ScriptRegistry<CommandScript>; -template class ScriptRegistry<WeatherScript>; -template class ScriptRegistry<AuctionHouseScript>; -template class ScriptRegistry<ConditionScript>; -template class ScriptRegistry<VehicleScript>; -template class ScriptRegistry<DynamicObjectScript>; -template class ScriptRegistry<TransportScript>; -template class ScriptRegistry<AchievementCriteriaScript>; -template class ScriptRegistry<PlayerScript>; -template class ScriptRegistry<GuildScript>; -template class ScriptRegistry<GroupScript>; -template class ScriptRegistry<UnitScript>; -template class ScriptRegistry<AccountScript>; +template class TC_GAME_API ScriptRegistry<SpellScriptLoader>; +template class TC_GAME_API ScriptRegistry<ServerScript>; +template class TC_GAME_API ScriptRegistry<WorldScript>; +template class TC_GAME_API ScriptRegistry<FormulaScript>; +template class TC_GAME_API ScriptRegistry<WorldMapScript>; +template class TC_GAME_API ScriptRegistry<InstanceMapScript>; +template class TC_GAME_API ScriptRegistry<BattlegroundMapScript>; +template class TC_GAME_API ScriptRegistry<ItemScript>; +template class TC_GAME_API ScriptRegistry<CreatureScript>; +template class TC_GAME_API ScriptRegistry<GameObjectScript>; +template class TC_GAME_API ScriptRegistry<AreaTriggerScript>; +template class TC_GAME_API ScriptRegistry<BattlegroundScript>; +template class TC_GAME_API ScriptRegistry<OutdoorPvPScript>; +template class TC_GAME_API ScriptRegistry<CommandScript>; +template class TC_GAME_API ScriptRegistry<WeatherScript>; +template class TC_GAME_API ScriptRegistry<AuctionHouseScript>; +template class TC_GAME_API ScriptRegistry<ConditionScript>; +template class TC_GAME_API ScriptRegistry<VehicleScript>; +template class TC_GAME_API ScriptRegistry<DynamicObjectScript>; +template class TC_GAME_API ScriptRegistry<TransportScript>; +template class TC_GAME_API ScriptRegistry<AchievementCriteriaScript>; +template class TC_GAME_API ScriptRegistry<PlayerScript>; +template class TC_GAME_API ScriptRegistry<GuildScript>; +template class TC_GAME_API ScriptRegistry<GroupScript>; +template class TC_GAME_API ScriptRegistry<UnitScript>; +template class TC_GAME_API ScriptRegistry<AccountScript>; // Undefine utility macros. #undef GET_SCRIPT_RET diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 79c1bc3f60f..f75446048ff 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -146,7 +146,7 @@ struct OutdoorPvPData; event on all registered scripts of that type. */ -class ScriptObject +class TC_GAME_API ScriptObject { friend class ScriptMgr; @@ -185,7 +185,7 @@ template<class TObject> class UpdatableScript virtual void OnUpdate(TObject* /*obj*/, uint32 /*diff*/) { } }; -class SpellScriptLoader : public ScriptObject +class TC_GAME_API SpellScriptLoader : public ScriptObject { protected: @@ -200,7 +200,7 @@ class SpellScriptLoader : public ScriptObject virtual AuraScript* GetAuraScript() const { return NULL; } }; -class ServerScript : public ScriptObject +class TC_GAME_API ServerScript : public ScriptObject { protected: @@ -330,14 +330,14 @@ template<class TMap> class MapScript : public UpdatableScript<TMap> virtual void OnPlayerLeave(TMap* /*map*/, Player* /*player*/) { } }; -class WorldMapScript : public ScriptObject, public MapScript<Map> +class TC_GAME_API WorldMapScript : public ScriptObject, public MapScript<Map> { protected: WorldMapScript(const char* name, uint32 mapId); }; -class InstanceMapScript : public ScriptObject, public MapScript<InstanceMap> +class TC_GAME_API InstanceMapScript : public ScriptObject, public MapScript<InstanceMap> { protected: @@ -349,14 +349,14 @@ class InstanceMapScript : public ScriptObject, public MapScript<InstanceMap> virtual InstanceScript* GetInstanceScript(InstanceMap* /*map*/) const { return NULL; } }; -class BattlegroundMapScript : public ScriptObject, public MapScript<BattlegroundMap> +class TC_GAME_API BattlegroundMapScript : public ScriptObject, public MapScript<BattlegroundMap> { protected: BattlegroundMapScript(const char* name, uint32 mapId); }; -class ItemScript : public ScriptObject +class TC_GAME_API ItemScript : public ScriptObject { protected: @@ -380,7 +380,7 @@ class ItemScript : public ScriptObject virtual bool OnRemove(Player* /*player*/, Item* /*item*/) { return false; } }; -class UnitScript : public ScriptObject +class TC_GAME_API UnitScript : public ScriptObject { protected: @@ -403,7 +403,7 @@ class UnitScript : public ScriptObject virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/) { } }; -class CreatureScript : public UnitScript, public UpdatableScript<Creature> +class TC_GAME_API CreatureScript : public UnitScript, public UpdatableScript<Creature> { protected: @@ -439,7 +439,7 @@ class CreatureScript : public UnitScript, public UpdatableScript<Creature> virtual CreatureAI* GetAI(Creature* /*creature*/) const { return NULL; } }; -class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject> +class TC_GAME_API GameObjectScript : public ScriptObject, public UpdatableScript<GameObject> { protected: @@ -484,7 +484,7 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject> virtual GameObjectAI* GetAI(GameObject* /*go*/) const { return NULL; } }; -class AreaTriggerScript : public ScriptObject +class TC_GAME_API AreaTriggerScript : public ScriptObject { protected: @@ -496,7 +496,7 @@ class AreaTriggerScript : public ScriptObject virtual bool OnTrigger(Player* /*player*/, AreaTriggerEntry const* /*trigger*/, bool /*entered*/) { return false; } }; -class BattlegroundScript : public ScriptObject +class TC_GAME_API BattlegroundScript : public ScriptObject { protected: @@ -508,7 +508,7 @@ class BattlegroundScript : public ScriptObject virtual Battleground* GetBattleground() const = 0; }; -class OutdoorPvPScript : public ScriptObject +class TC_GAME_API OutdoorPvPScript : public ScriptObject { protected: @@ -520,7 +520,7 @@ class OutdoorPvPScript : public ScriptObject virtual OutdoorPvP* GetOutdoorPvP() const = 0; }; -class CommandScript : public ScriptObject +class TC_GAME_API CommandScript : public ScriptObject { protected: @@ -532,7 +532,7 @@ class CommandScript : public ScriptObject virtual std::vector<ChatCommand> GetCommands() const = 0; }; -class WeatherScript : public ScriptObject, public UpdatableScript<Weather> +class TC_GAME_API WeatherScript : public ScriptObject, public UpdatableScript<Weather> { protected: @@ -544,7 +544,7 @@ class WeatherScript : public ScriptObject, public UpdatableScript<Weather> virtual void OnChange(Weather* /*weather*/, WeatherState /*state*/, float /*grade*/) { } }; -class AuctionHouseScript : public ScriptObject +class TC_GAME_API AuctionHouseScript : public ScriptObject { protected: @@ -565,7 +565,7 @@ class AuctionHouseScript : public ScriptObject virtual void OnAuctionExpire(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { } }; -class ConditionScript : public ScriptObject +class TC_GAME_API ConditionScript : public ScriptObject { protected: @@ -577,7 +577,7 @@ class ConditionScript : public ScriptObject virtual bool OnConditionCheck(Condition const* /*condition*/, ConditionSourceInfo& /*sourceInfo*/) { return true; } }; -class VehicleScript : public ScriptObject +class TC_GAME_API VehicleScript : public ScriptObject { protected: @@ -604,14 +604,14 @@ class VehicleScript : public ScriptObject virtual void OnRemovePassenger(Vehicle* /*veh*/, Unit* /*passenger*/) { } }; -class DynamicObjectScript : public ScriptObject, public UpdatableScript<DynamicObject> +class TC_GAME_API DynamicObjectScript : public ScriptObject, public UpdatableScript<DynamicObject> { protected: DynamicObjectScript(const char* name); }; -class TransportScript : public ScriptObject, public UpdatableScript<Transport> +class TC_GAME_API TransportScript : public ScriptObject, public UpdatableScript<Transport> { protected: @@ -632,7 +632,7 @@ class TransportScript : public ScriptObject, public UpdatableScript<Transport> virtual void OnRelocate(Transport* /*transport*/, uint32 /*waypointId*/, uint32 /*mapId*/, float /*x*/, float /*y*/, float /*z*/) { } }; -class AchievementCriteriaScript : public ScriptObject +class TC_GAME_API AchievementCriteriaScript : public ScriptObject { protected: @@ -644,7 +644,7 @@ class AchievementCriteriaScript : public ScriptObject virtual bool OnCheck(Player* source, Unit* target) = 0; }; -class PlayerScript : public UnitScript +class TC_GAME_API PlayerScript : public UnitScript { protected: @@ -741,7 +741,7 @@ class PlayerScript : public UnitScript virtual void OnQuestStatusChange(Player* /*player*/, uint32 /*questId*/, QuestStatus /*status*/) { } }; -class AccountScript : public ScriptObject +class TC_GAME_API AccountScript : public ScriptObject { protected: @@ -768,7 +768,7 @@ class AccountScript : public ScriptObject virtual void OnFailedPasswordChange(uint32 /*accountId*/) {} }; -class GuildScript : public ScriptObject +class TC_GAME_API GuildScript : public ScriptObject { protected: @@ -809,7 +809,7 @@ class GuildScript : public ScriptObject virtual void OnBankEvent(Guild* /*guild*/, uint8 /*eventType*/, uint8 /*tabId*/, ObjectGuid::LowType /*playerGuid*/, uint64 /*itemOrMoney*/, uint16 /*itemStackCount*/, uint8 /*destTabId*/) { } }; -class GroupScript : public ScriptObject +class TC_GAME_API GroupScript : public ScriptObject { protected: @@ -839,11 +839,11 @@ class GroupScript : public ScriptObject // namespace // { typedef std::list<std::string> UnusedScriptNamesContainer; - extern UnusedScriptNamesContainer UnusedScriptNames; + TC_GAME_API extern UnusedScriptNamesContainer UnusedScriptNames; // } // Manages registration, loading, and execution of scripts. -class ScriptMgr +class TC_GAME_API ScriptMgr { friend class ScriptObject; diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index 309838a919e..52c5c1640af 100644 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -21,7 +21,7 @@ #include "DatabaseEnv.h" #include "ScriptMgr.h" -ScriptPointVector const SystemMgr::_empty; +TC_GAME_API ScriptPointVector const SystemMgr::_empty; SystemMgr* SystemMgr::instance() { diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h index 99eb1610991..1b79c29d643 100644 --- a/src/server/game/Scripting/ScriptSystem.h +++ b/src/server/game/Scripting/ScriptSystem.h @@ -59,7 +59,7 @@ struct ScriptPointMove typedef std::vector<ScriptPointMove> ScriptPointVector; -class SystemMgr +class TC_GAME_API SystemMgr { private: SystemMgr() { } diff --git a/src/server/game/Server/Packet.h b/src/server/game/Server/Packet.h index ed9c1cc0afd..4bf9f2be688 100644 --- a/src/server/game/Server/Packet.h +++ b/src/server/game/Server/Packet.h @@ -22,7 +22,7 @@ namespace WorldPackets { - class Packet + class TC_GAME_API Packet { public: Packet(WorldPacket&& worldPacket) : _worldPacket(std::move(worldPacket)) { } diff --git a/src/server/game/Server/Packets/ChatPackets.h b/src/server/game/Server/Packets/ChatPackets.h index faa060b3c0f..590fa930845 100644 --- a/src/server/game/Server/Packets/ChatPackets.h +++ b/src/server/game/Server/Packets/ChatPackets.h @@ -147,7 +147,7 @@ namespace WorldPackets }; // SMSG_CHAT - class Chat final : public ServerPacket + class TC_GAME_API Chat final : public ServerPacket { public: Chat() : ServerPacket(SMSG_CHAT, 100) { } @@ -217,7 +217,7 @@ namespace WorldPackets int32 EmoteID = 0; }; - class PrintNotification final : public ServerPacket + class TC_GAME_API PrintNotification final : public ServerPacket { public: PrintNotification(std::string const& notifyText) : ServerPacket(SMSG_PRINT_NOTIFICATION, 2 + notifyText.size()), NotifyText(notifyText) { } diff --git a/src/server/game/Server/Packets/MiscPackets.h b/src/server/game/Server/Packets/MiscPackets.h index ebf920e2787..cef9a810213 100644 --- a/src/server/game/Server/Packets/MiscPackets.h +++ b/src/server/game/Server/Packets/MiscPackets.h @@ -397,7 +397,7 @@ namespace WorldPackets WorldPacket const* Write() override { return &_worldPacket; } }; - class Weather final : public ServerPacket + class TC_GAME_API Weather final : public ServerPacket { public: Weather(); @@ -598,7 +598,7 @@ namespace WorldPackets ObjectGuid ObjectGUID; }; - class PlaySound final : public ServerPacket + class TC_GAME_API PlaySound final : public ServerPacket { public: PlaySound() : ServerPacket(SMSG_PLAY_SOUND, 20) { } diff --git a/src/server/game/Server/Packets/MovementPackets.h b/src/server/game/Server/Packets/MovementPackets.h index e8fc4586ac4..018e0d5fe1a 100644 --- a/src/server/game/Server/Packets/MovementPackets.h +++ b/src/server/game/Server/Packets/MovementPackets.h @@ -42,7 +42,7 @@ namespace WorldPackets MovementInfo movementInfo; }; - class MoveUpdate final : public ServerPacket + class TC_GAME_API MoveUpdate final : public ServerPacket { public: MoveUpdate() : ServerPacket(SMSG_MOVE_UPDATE) { } @@ -427,7 +427,7 @@ namespace WorldPackets ObjectGuid SummonerGUID; }; - class ControlUpdate final : public ServerPacket + class TC_GAME_API ControlUpdate final : public ServerPacket { public: ControlUpdate() : ServerPacket(SMSG_CONTROL_UPDATE, 16 + 1) { } diff --git a/src/server/game/Server/Packets/NPCPackets.h b/src/server/game/Server/Packets/NPCPackets.h index 28444e87e75..d5c1b9da118 100644 --- a/src/server/game/Server/Packets/NPCPackets.h +++ b/src/server/game/Server/Packets/NPCPackets.h @@ -207,7 +207,7 @@ namespace WorldPackets ObjectGuid Healer; }; - class SpiritHealerConfirm final : public ServerPacket + class TC_GAME_API SpiritHealerConfirm final : public ServerPacket { public: SpiritHealerConfirm() : ServerPacket(SMSG_SPIRIT_HEALER_CONFIRM, 16) { } diff --git a/src/server/game/Server/Packets/ScenePackets.h b/src/server/game/Server/Packets/ScenePackets.h index 02fca2d5fe9..df6a1f0957e 100644 --- a/src/server/game/Server/Packets/ScenePackets.h +++ b/src/server/game/Server/Packets/ScenePackets.h @@ -25,7 +25,7 @@ namespace WorldPackets { namespace Scenes { - class PlayScene final : public ServerPacket + class TC_GAME_API PlayScene final : public ServerPacket { public: PlayScene() : ServerPacket(SMSG_PLAY_SCENE, 34) { } diff --git a/src/server/game/Server/Packets/SpellPackets.h b/src/server/game/Server/Packets/SpellPackets.h index e6c0fedd221..b1cb39251de 100644 --- a/src/server/game/Server/Packets/SpellPackets.h +++ b/src/server/game/Server/Packets/SpellPackets.h @@ -419,7 +419,7 @@ namespace WorldPackets uint8 CastID = 0; }; - class CastFailed final : public ServerPacket + class TC_GAME_API CastFailed final : public ServerPacket { public: CastFailed(OpcodeServer opcode) : ServerPacket(opcode, 4+4+4+4+1) { } @@ -445,7 +445,7 @@ namespace WorldPackets std::vector<SpellModifierData> ModifierData; }; - class SetSpellModifier final : public ServerPacket + class TC_GAME_API SetSpellModifier final : public ServerPacket { public: SetSpellModifier(OpcodeServer opcode) : ServerPacket(opcode, 20) { } diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index 138cb7c1dd5..1aa6e4afd1c 100644 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -1765,7 +1765,7 @@ class OpcodeTable ServerOpcodeHandler* _internalTableServer[NUM_OPCODE_HANDLERS]; }; -extern OpcodeTable opcodeTable; +TC_GAME_API extern OpcodeTable opcodeTable; #pragma pack(pop) diff --git a/src/server/game/Server/Protocol/PacketLog.h b/src/server/game/Server/Protocol/PacketLog.h index 5bfac184e61..329658f0789 100644 --- a/src/server/game/Server/Protocol/PacketLog.h +++ b/src/server/game/Server/Protocol/PacketLog.h @@ -32,7 +32,7 @@ enum Direction class WorldPacket; -class PacketLog +class TC_GAME_API PacketLog { private: PacketLog(); diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 9655968dcb3..1bcc9d0b373 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -863,7 +863,7 @@ struct PacketCounter }; /// Player session in the World -class WorldSession +class TC_GAME_API WorldSession { public: WorldSession(uint32 id, std::string&& name, uint32 battlenetAccountId, std::shared_ptr<WorldSocket> sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter); diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h index 0191d4d04d5..b3d4c9491f8 100644 --- a/src/server/game/Server/WorldSocket.h +++ b/src/server/game/Server/WorldSocket.h @@ -67,7 +67,7 @@ union ClientPktHeader #pragma pack(pop) -class WorldSocket : public Socket<WorldSocket> +class TC_GAME_API WorldSocket : public Socket<WorldSocket> { static std::string const ServerConnectionInitialize; static std::string const ClientConnectionInitialize; diff --git a/src/server/game/Server/WorldSocketMgr.h b/src/server/game/Server/WorldSocketMgr.h index c6d5e4e6ef3..fd86d3b7931 100644 --- a/src/server/game/Server/WorldSocketMgr.h +++ b/src/server/game/Server/WorldSocketMgr.h @@ -30,7 +30,7 @@ class WorldSocket; /// Manages all sockets connected to peers and network threads -class WorldSocketMgr : public SocketMgr<WorldSocket> +class TC_GAME_API WorldSocketMgr : public SocketMgr<WorldSocket> { typedef SocketMgr<WorldSocket> BaseSocketMgr; diff --git a/src/server/game/Skills/SkillDiscovery.h b/src/server/game/Skills/SkillDiscovery.h index b7fe1cdc8b2..c2020e5b075 100644 --- a/src/server/game/Skills/SkillDiscovery.h +++ b/src/server/game/Skills/SkillDiscovery.h @@ -23,8 +23,9 @@ class Player; -void LoadSkillDiscoveryTable(); -uint32 GetSkillDiscoverySpell(uint32 skillId, uint32 spellId, Player* player); -bool HasDiscoveredAllSpells(uint32 spellId, Player* player); -uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player); +TC_GAME_API void LoadSkillDiscoveryTable(); +TC_GAME_API uint32 GetSkillDiscoverySpell(uint32 skillId, uint32 spellId, Player* player); +TC_GAME_API bool HasDiscoveredAllSpells(uint32 spellId, Player* player); +TC_GAME_API uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player); + #endif diff --git a/src/server/game/Skills/SkillExtraItems.h b/src/server/game/Skills/SkillExtraItems.h index 2889b221600..5a477b65f0b 100644 --- a/src/server/game/Skills/SkillExtraItems.h +++ b/src/server/game/Skills/SkillExtraItems.h @@ -23,12 +23,14 @@ // predef classes used in functions class Player; + // returns true and sets the appropriate info if the player can create a perfect item with the given spellId -bool CanCreatePerfectItem(Player* player, uint32 spellId, float &perfectCreateChance, uint32 &perfectItemType); +TC_GAME_API bool CanCreatePerfectItem(Player* player, uint32 spellId, float &perfectCreateChance, uint32 &perfectItemType); // load perfection proc info from DB -void LoadSkillPerfectItemTable(); +TC_GAME_API void LoadSkillPerfectItemTable(); // returns true and sets the appropriate info if the player can create extra items with the given spellId -bool CanCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax); +TC_GAME_API bool CanCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax); // function to load the extra item creation info from DB -void LoadSkillExtraItemTable(); +TC_GAME_API void LoadSkillExtraItemTable(); + #endif diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index 95ace9c7a32..0d907e4148c 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -27,7 +27,7 @@ class Aura; typedef void(AuraEffect::*pAuraEffectHandler)(AuraApplication const* aurApp, uint8 mode, bool apply) const; -class AuraEffect +class TC_GAME_API AuraEffect { friend void Aura::_InitEffects(uint32 effMask, Unit* caster, int32 *baseAmount); friend Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint32 effMask, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index 7ad36c58956..65cdbced339 100644 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -47,7 +47,7 @@ class ChargeDropEvent; // update aura target map every 500 ms instead of every update - reduce amount of grid searcher calls #define UPDATE_TARGET_MAP_INTERVAL 500 -class AuraApplication +class TC_GAME_API AuraApplication { friend void Unit::_ApplyAura(AuraApplication * aurApp, uint32 effMask); friend void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMode); @@ -113,7 +113,7 @@ struct AuraLoadEffectInfo }; #pragma pack(pop) -class Aura +class TC_GAME_API Aura { friend Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint32 effMask, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); public: @@ -326,7 +326,7 @@ class Aura SpellEffectInfoVector _spelEffectInfos; }; -class UnitAura : public Aura +class TC_GAME_API UnitAura : public Aura { friend Aura* Aura::Create(SpellInfo const* spellproto, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); public: @@ -347,7 +347,7 @@ class UnitAura : public Aura DiminishingGroup m_AuraDRGroup:8; // Diminishing }; -class DynObjAura : public Aura +class TC_GAME_API DynObjAura : public Aura { friend Aura* Aura::Create(SpellInfo const* spellproto, uint32 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, ObjectGuid casterGUID, int32 castItemLevel); public: @@ -358,7 +358,7 @@ class DynObjAura : public Aura void FillTargetMap(std::map<Unit*, uint32> & targets, Unit* caster) override; }; -class ChargeDropEvent : public BasicEvent +class TC_GAME_API ChargeDropEvent : public BasicEvent { friend class Aura; protected: diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index a7c9b91a31f..dd6d39f6030 100644 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -115,7 +115,7 @@ enum SpellRangeFlag SPELL_RANGE_RANGED = 2 //hunter range and ranged weapon }; -struct SpellDestination +struct TC_GAME_API SpellDestination { SpellDestination(); SpellDestination(float x, float y, float z, float orientation = 0.0f, uint32 mapId = MAPID_INVALID); @@ -167,7 +167,7 @@ struct SpellLogEffectFeedPetParams int32 ItemID = 0; }; -class SpellCastTargets +class TC_GAME_API SpellCastTargets { public: SpellCastTargets(); @@ -291,7 +291,7 @@ enum SpellEffectHandleMode typedef std::list<std::pair<uint32, ObjectGuid>> DispelList; -class Spell +class TC_GAME_API Spell { friend void Unit::SetCurrentCastSpell(Spell* pSpell); friend class SpellScript; @@ -851,7 +851,7 @@ class Spell namespace Trinity { - struct WorldObjectSpellTargetCheck + struct TC_GAME_API WorldObjectSpellTargetCheck { Unit* _caster; Unit* _referer; @@ -866,7 +866,7 @@ namespace Trinity bool operator()(WorldObject* target); }; - struct WorldObjectSpellNearbyTargetCheck : public WorldObjectSpellTargetCheck + struct TC_GAME_API WorldObjectSpellNearbyTargetCheck : public WorldObjectSpellTargetCheck { float _range; Position const* _position; @@ -875,7 +875,7 @@ namespace Trinity bool operator()(WorldObject* target); }; - struct WorldObjectSpellAreaTargetCheck : public WorldObjectSpellTargetCheck + struct TC_GAME_API WorldObjectSpellAreaTargetCheck : public WorldObjectSpellTargetCheck { float _range; Position const* _position; @@ -884,7 +884,7 @@ namespace Trinity bool operator()(WorldObject* target); }; - struct WorldObjectSpellConeTargetCheck : public WorldObjectSpellAreaTargetCheck + struct TC_GAME_API WorldObjectSpellConeTargetCheck : public WorldObjectSpellAreaTargetCheck { float _coneAngle; WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit* caster, @@ -892,7 +892,7 @@ namespace Trinity bool operator()(WorldObject* target); }; - struct WorldObjectSpellTrajTargetCheck : public WorldObjectSpellAreaTargetCheck + struct TC_GAME_API WorldObjectSpellTrajTargetCheck : public WorldObjectSpellAreaTargetCheck { WorldObjectSpellTrajTargetCheck(float range, Position const* position, Unit* caster, SpellInfo const* spellInfo); bool operator()(WorldObject* target); @@ -901,7 +901,7 @@ namespace Trinity typedef void(Spell::*pEffect)(SpellEffIndex effIndex); -class SpellEvent : public BasicEvent +class TC_GAME_API SpellEvent : public BasicEvent { public: SpellEvent(Spell* spell); diff --git a/src/server/game/Spells/SpellHistory.h b/src/server/game/Spells/SpellHistory.h index c63fdc63e47..f2a3d346fdf 100644 --- a/src/server/game/Spells/SpellHistory.h +++ b/src/server/game/Spells/SpellHistory.h @@ -39,7 +39,7 @@ enum SpellCooldownFlags SPELL_COOLDOWN_FLAG_INCLUDE_EVENT_COOLDOWNS = 0x2 ///< Starts GCD for spells that should start their cooldown on events, requires SPELL_COOLDOWN_FLAG_INCLUDE_GCD set }; -class SpellHistory +class TC_GAME_API SpellHistory { public: typedef std::chrono::system_clock Clock; diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index 8f321bccc6d..b8e9b10efc4 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -204,7 +204,7 @@ enum SpellCustomAttributes uint32 GetTargetFlagMask(SpellTargetObjectTypes objType); -class SpellImplicitTargetInfo +class TC_GAME_API SpellImplicitTargetInfo { private: Targets _target; @@ -235,7 +235,7 @@ private: static StaticData _data[TOTAL_SPELL_TARGETS]; }; -class SpellEffectInfo +class TC_GAME_API SpellEffectInfo { SpellInfo const* _spellInfo; public: @@ -323,7 +323,7 @@ typedef std::unordered_map<uint32, SpellVisualVector> SpellVisualMap; typedef std::vector<AuraEffect*> AuraEffectVector; -class SpellInfo +class TC_GAME_API SpellInfo { public: uint32 Id; diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 38dc65c5421..79721235c17 100644 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -430,7 +430,7 @@ enum EffectRadiusIndex }; // Spell pet auras -class PetAura +class TC_GAME_API PetAura { private: typedef std::unordered_map<uint32, uint32> PetAuraMap; @@ -477,7 +477,7 @@ class PetAura }; typedef std::map<uint32, PetAura> SpellPetAuraMap; -struct SpellArea +struct TC_GAME_API SpellArea { uint32 spellId; uint32 areaId; // zone/subzone/or 0 is not limited to zone @@ -590,14 +590,14 @@ inline bool IsProfessionOrRidingSkill(uint32 skill) bool IsPartOfSkillLine(uint32 skillId, uint32 spellId); // spell diminishing returns -DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto); -DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group); -DiminishingLevels GetDiminishingReturnsMaxLevel(DiminishingGroup group); -int32 GetDiminishingReturnsLimitDuration(SpellInfo const* spellproto); +TC_GAME_API DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto); +TC_GAME_API DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group); +TC_GAME_API DiminishingLevels GetDiminishingReturnsMaxLevel(DiminishingGroup group); +TC_GAME_API int32 GetDiminishingReturnsLimitDuration(SpellInfo const* spellproto); -extern PetFamilySpellsStore sPetFamilySpellsStore; +TC_GAME_API extern PetFamilySpellsStore sPetFamilySpellsStore; -class SpellMgr +class TC_GAME_API SpellMgr { // Constructors private: diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index 02eaa2ef92f..aca3e074b9a 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -52,7 +52,7 @@ enum SpellScriptState #define SPELL_SCRIPT_STATE_END SPELL_SCRIPT_STATE_UNLOADING + 1 // helper class from which SpellScript and SpellAura derive, use these classes instead -class _SpellScript +class TC_GAME_API _SpellScript { // internal use classes & functions // DO NOT OVERRIDE THESE IN SCRIPTS @@ -68,7 +68,7 @@ class _SpellScript std::string const* _GetScriptName() const; protected: - class EffectHook + class TC_GAME_API EffectHook { public: EffectHook(uint8 _effIndex); @@ -82,7 +82,7 @@ class _SpellScript uint8 effIndex; }; - class EffectNameCheck + class TC_GAME_API EffectNameCheck { public: EffectNameCheck(uint16 _effName) { effName = _effName; } @@ -92,7 +92,7 @@ class _SpellScript uint16 effName; }; - class EffectAuraNameCheck + class TC_GAME_API EffectAuraNameCheck { public: EffectAuraNameCheck(uint16 _effAurName) { effAurName = _effAurName; } @@ -149,7 +149,7 @@ enum SpellScriptHookType #define HOOK_SPELL_END SPELL_SCRIPT_HOOK_CHECK_CAST + 1 #define HOOK_SPELL_COUNT HOOK_SPELL_END - HOOK_SPELL_START -class SpellScript : public _SpellScript +class TC_GAME_API SpellScript : public _SpellScript { // internal use classes & functions // DO NOT OVERRIDE THESE IN SCRIPTS @@ -165,7 +165,7 @@ class SpellScript : public _SpellScript SPELLSCRIPT_FUNCTION_TYPE_DEFINES(SpellScript) - class CastHandler + class TC_GAME_API CastHandler { public: CastHandler(SpellCastFnType _pCastHandlerScript); @@ -174,7 +174,7 @@ class SpellScript : public _SpellScript SpellCastFnType pCastHandlerScript; }; - class CheckCastHandler + class TC_GAME_API CheckCastHandler { public: CheckCastHandler(SpellCheckCastFnType checkCastHandlerScript); @@ -183,7 +183,7 @@ class SpellScript : public _SpellScript SpellCheckCastFnType _checkCastHandlerScript; }; - class EffectHandler : public _SpellScript::EffectNameCheck, public _SpellScript::EffectHook + class TC_GAME_API EffectHandler : public _SpellScript::EffectNameCheck, public _SpellScript::EffectHook { public: EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); @@ -194,7 +194,7 @@ class SpellScript : public _SpellScript SpellEffectFnType pEffectHandlerScript; }; - class HitHandler + class TC_GAME_API HitHandler { public: HitHandler(SpellHitFnType _pHitHandlerScript); @@ -203,7 +203,7 @@ class SpellScript : public _SpellScript SpellHitFnType pHitHandlerScript; }; - class TargetHook : public _SpellScript::EffectHook + class TC_GAME_API TargetHook : public _SpellScript::EffectHook { public: TargetHook(uint8 _effectIndex, uint16 _targetType, bool _area, bool _dest); @@ -216,7 +216,7 @@ class SpellScript : public _SpellScript bool dest; }; - class ObjectAreaTargetSelectHandler : public TargetHook + class TC_GAME_API ObjectAreaTargetSelectHandler : public TargetHook { public: ObjectAreaTargetSelectHandler(SpellObjectAreaTargetSelectFnType _pObjectAreaTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType); @@ -225,7 +225,7 @@ class SpellScript : public _SpellScript SpellObjectAreaTargetSelectFnType pObjectAreaTargetSelectHandlerScript; }; - class ObjectTargetSelectHandler : public TargetHook + class TC_GAME_API ObjectTargetSelectHandler : public TargetHook { public: ObjectTargetSelectHandler(SpellObjectTargetSelectFnType _pObjectTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType); @@ -234,7 +234,7 @@ class SpellScript : public _SpellScript SpellObjectTargetSelectFnType pObjectTargetSelectHandlerScript; }; - class DestinationTargetSelectHandler : public TargetHook + class TC_GAME_API DestinationTargetSelectHandler : public TargetHook { public: DestinationTargetSelectHandler(SpellDestinationTargetSelectFnType _DestinationTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType); @@ -472,7 +472,7 @@ enum AuraScriptHookType #define HOOK_AURA_EFFECT_END HOOK_AURA_EFFECT_CALC_SPELLMOD + 1 #define HOOK_AURA_EFFECT_COUNT HOOK_AURA_EFFECT_END - HOOK_AURA_EFFECT_START */ -class AuraScript : public _SpellScript +class TC_GAME_API AuraScript : public _SpellScript { // internal use classes & functions // DO NOT OVERRIDE THESE IN SCRIPTS @@ -495,7 +495,7 @@ class AuraScript : public _SpellScript AURASCRIPT_FUNCTION_TYPE_DEFINES(AuraScript) - class CheckAreaTargetHandler + class TC_GAME_API CheckAreaTargetHandler { public: CheckAreaTargetHandler(AuraCheckAreaTargetFnType pHandlerScript); @@ -503,7 +503,7 @@ class AuraScript : public _SpellScript private: AuraCheckAreaTargetFnType pHandlerScript; }; - class AuraDispelHandler + class TC_GAME_API AuraDispelHandler { public: AuraDispelHandler(AuraDispelFnType pHandlerScript); @@ -511,14 +511,14 @@ class AuraScript : public _SpellScript private: AuraDispelFnType pHandlerScript; }; - class EffectBase : public _SpellScript::EffectAuraNameCheck, public _SpellScript::EffectHook + class TC_GAME_API EffectBase : public _SpellScript::EffectAuraNameCheck, public _SpellScript::EffectHook { public: EffectBase(uint8 _effIndex, uint16 _effName); std::string ToString(); bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) override; }; - class EffectPeriodicHandler : public EffectBase + class TC_GAME_API EffectPeriodicHandler : public EffectBase { public: EffectPeriodicHandler(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); @@ -526,7 +526,7 @@ class AuraScript : public _SpellScript private: AuraEffectPeriodicFnType pEffectHandlerScript; }; - class EffectUpdatePeriodicHandler : public EffectBase + class TC_GAME_API EffectUpdatePeriodicHandler : public EffectBase { public: EffectUpdatePeriodicHandler(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); @@ -534,7 +534,7 @@ class AuraScript : public _SpellScript private: AuraEffectUpdatePeriodicFnType pEffectHandlerScript; }; - class EffectCalcAmountHandler : public EffectBase + class TC_GAME_API EffectCalcAmountHandler : public EffectBase { public: EffectCalcAmountHandler(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); @@ -542,7 +542,7 @@ class AuraScript : public _SpellScript private: AuraEffectCalcAmountFnType pEffectHandlerScript; }; - class EffectCalcPeriodicHandler : public EffectBase + class TC_GAME_API EffectCalcPeriodicHandler : public EffectBase { public: EffectCalcPeriodicHandler(AuraEffectCalcPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); @@ -550,7 +550,7 @@ class AuraScript : public _SpellScript private: AuraEffectCalcPeriodicFnType pEffectHandlerScript; }; - class EffectCalcSpellModHandler : public EffectBase + class TC_GAME_API EffectCalcSpellModHandler : public EffectBase { public: EffectCalcSpellModHandler(AuraEffectCalcSpellModFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); @@ -558,7 +558,7 @@ class AuraScript : public _SpellScript private: AuraEffectCalcSpellModFnType pEffectHandlerScript; }; - class EffectApplyHandler : public EffectBase + class TC_GAME_API EffectApplyHandler : public EffectBase { public: EffectApplyHandler(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode); @@ -567,7 +567,7 @@ class AuraScript : public _SpellScript AuraEffectApplicationModeFnType pEffectHandlerScript; AuraEffectHandleModes mode; }; - class EffectAbsorbHandler : public EffectBase + class TC_GAME_API EffectAbsorbHandler : public EffectBase { public: EffectAbsorbHandler(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex); @@ -575,7 +575,7 @@ class AuraScript : public _SpellScript private: AuraEffectAbsorbFnType pEffectHandlerScript; }; - class EffectManaShieldHandler : public EffectBase + class TC_GAME_API EffectManaShieldHandler : public EffectBase { public: EffectManaShieldHandler(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex); @@ -583,7 +583,7 @@ class AuraScript : public _SpellScript private: AuraEffectAbsorbFnType pEffectHandlerScript; }; - class EffectSplitHandler : public EffectBase + class TC_GAME_API EffectSplitHandler : public EffectBase { public: EffectSplitHandler(AuraEffectSplitFnType _pEffectHandlerScript, uint8 _effIndex); @@ -591,7 +591,7 @@ class AuraScript : public _SpellScript private: AuraEffectSplitFnType pEffectHandlerScript; }; - class CheckProcHandler + class TC_GAME_API CheckProcHandler { public: CheckProcHandler(AuraCheckProcFnType handlerScript); @@ -599,7 +599,7 @@ class AuraScript : public _SpellScript private: AuraCheckProcFnType _HandlerScript; }; - class AuraProcHandler + class TC_GAME_API AuraProcHandler { public: AuraProcHandler(AuraProcFnType handlerScript); @@ -607,7 +607,7 @@ class AuraScript : public _SpellScript private: AuraProcFnType _HandlerScript; }; - class EffectProcHandler : public EffectBase + class TC_GAME_API EffectProcHandler : public EffectBase { public: EffectProcHandler(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName); @@ -647,7 +647,7 @@ class AuraScript : public _SpellScript AuraApplication const* m_auraApplication; bool m_defaultActionPrevented; - class ScriptStateStore + class TC_GAME_API ScriptStateStore { public: AuraApplication const* _auraApplication; diff --git a/src/server/game/Support/SupportMgr.cpp b/src/server/game/Support/SupportMgr.cpp index 142904fcae3..97a828f44d6 100644 --- a/src/server/game/Support/SupportMgr.cpp +++ b/src/server/game/Support/SupportMgr.cpp @@ -409,6 +409,10 @@ SuggestionTicket* SupportMgr::GetTicket<SuggestionTicket>(uint32 suggestionId) } +template TC_GAME_API BugTicket* SupportMgr::GetTicket<BugTicket>(uint32); +template TC_GAME_API ComplaintTicket* SupportMgr::GetTicket<ComplaintTicket>(uint32); +template TC_GAME_API SuggestionTicket* SupportMgr::GetTicket<SuggestionTicket>(uint32); + template<> uint32 SupportMgr::GetOpenTicketCount<BugTicket>() const { return _openBugTicketCount; } @@ -418,6 +422,10 @@ uint32 SupportMgr::GetOpenTicketCount<ComplaintTicket>() const { return _openCom template<> uint32 SupportMgr::GetOpenTicketCount<SuggestionTicket>() const { return _openSuggestionTicketCount; } +template TC_GAME_API uint32 SupportMgr::GetOpenTicketCount<BugTicket>() const; +template TC_GAME_API uint32 SupportMgr::GetOpenTicketCount<ComplaintTicket>() const; +template TC_GAME_API uint32 SupportMgr::GetOpenTicketCount<SuggestionTicket>() const; + void SupportMgr::LoadBugTickets() { uint32 oldMSTime = getMSTime(); @@ -613,6 +621,10 @@ void SupportMgr::RemoveTicket<SuggestionTicket>(uint32 ticketId) } } +template TC_GAME_API void SupportMgr::RemoveTicket<BugTicket>(uint32); +template TC_GAME_API void SupportMgr::RemoveTicket<ComplaintTicket>(uint32); +template TC_GAME_API void SupportMgr::RemoveTicket<SuggestionTicket>(uint32); + template<> void SupportMgr::CloseTicket<BugTicket>(uint32 ticketId, ObjectGuid closedBy) { @@ -649,6 +661,10 @@ void SupportMgr::CloseTicket<SuggestionTicket>(uint32 ticketId, ObjectGuid close } } +template TC_GAME_API void SupportMgr::CloseTicket<BugTicket>(uint32, ObjectGuid); +template TC_GAME_API void SupportMgr::CloseTicket<ComplaintTicket>(uint32, ObjectGuid); +template TC_GAME_API void SupportMgr::CloseTicket<SuggestionTicket>(uint32, ObjectGuid); + template<> void SupportMgr::ResetTickets<BugTicket>() { @@ -690,6 +706,10 @@ void SupportMgr::ResetTickets<SuggestionTicket>() CharacterDatabase.Execute(stmt); } +template TC_GAME_API void SupportMgr::ResetTickets<BugTicket>(); +template TC_GAME_API void SupportMgr::ResetTickets<ComplaintTicket>(); +template TC_GAME_API void SupportMgr::ResetTickets<SuggestionTicket>(); + template<> void SupportMgr::ShowList<BugTicket>(ChatHandler& handler) const { @@ -717,6 +737,10 @@ void SupportMgr::ShowList<SuggestionTicket>(ChatHandler& handler) const handler.SendSysMessage(itr->second->FormatViewMessageString(handler).c_str()); } +template TC_GAME_API void SupportMgr::ShowList<BugTicket>(ChatHandler&) const; +template TC_GAME_API void SupportMgr::ShowList<ComplaintTicket>(ChatHandler&) const; +template TC_GAME_API void SupportMgr::ShowList<SuggestionTicket>(ChatHandler&) const; + template<> void SupportMgr::ShowClosedList<BugTicket>(ChatHandler& handler) const { @@ -743,3 +767,7 @@ void SupportMgr::ShowClosedList<SuggestionTicket>(ChatHandler& handler) const if (itr->second->IsClosed()) handler.SendSysMessage(itr->second->FormatViewMessageString(handler).c_str()); } + +template TC_GAME_API void SupportMgr::ShowClosedList<BugTicket>(ChatHandler&) const; +template TC_GAME_API void SupportMgr::ShowClosedList<ComplaintTicket>(ChatHandler&) const; +template TC_GAME_API void SupportMgr::ShowClosedList<SuggestionTicket>(ChatHandler&) const; diff --git a/src/server/game/Support/SupportMgr.h b/src/server/game/Support/SupportMgr.h index 86f5b223a86..aafbbc2dd20 100644 --- a/src/server/game/Support/SupportMgr.h +++ b/src/server/game/Support/SupportMgr.h @@ -50,7 +50,7 @@ enum SupportSpamType using ChatLog = WorldPackets::Ticket::SupportTicketSubmitComplaint::SupportTicketChatLog; -class Ticket +class TC_GAME_API Ticket { public: Ticket(); @@ -116,7 +116,7 @@ protected: std::string _comment; }; -class BugTicket : public Ticket +class TC_GAME_API BugTicket : public Ticket { public: BugTicket(); @@ -140,7 +140,7 @@ private: std::string _note; }; -class ComplaintTicket : public Ticket +class TC_GAME_API ComplaintTicket : public Ticket { public: ComplaintTicket(); @@ -176,7 +176,7 @@ private: std::string _note; }; -class SuggestionTicket : public Ticket +class TC_GAME_API SuggestionTicket : public Ticket { public: SuggestionTicket(); @@ -204,7 +204,7 @@ typedef std::map<uint32, BugTicket*> BugTicketList; typedef std::map<uint32, ComplaintTicket*> ComplaintTicketList; typedef std::map<uint32, SuggestionTicket*> SuggestionTicketList; -class SupportMgr +class TC_GAME_API SupportMgr { private: SupportMgr(); diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h index 0feacd47539..5bff16ad812 100644 --- a/src/server/game/Texts/CreatureTextMgr.h +++ b/src/server/game/Texts/CreatureTextMgr.h @@ -76,7 +76,7 @@ typedef std::unordered_map<uint32, CreatureTextHolder> CreatureTextMap; // a typedef std::map<CreatureTextId, CreatureTextLocale> LocaleCreatureTextMap; -class CreatureTextMgr +class TC_GAME_API CreatureTextMgr { private: CreatureTextMgr() { } diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.h b/src/server/game/Tools/CharacterDatabaseCleaner.h index ecbd6d0a790..f1e6900a6bb 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.h +++ b/src/server/game/Tools/CharacterDatabaseCleaner.h @@ -30,20 +30,20 @@ namespace CharacterDatabaseCleaner CLEANING_FLAG_QUESTSTATUS = 0x10 }; - void CleanDatabase(); + TC_GAME_API void CleanDatabase(); - void CheckUnique(const char* column, const char* table, bool (*check)(uint32)); + TC_GAME_API void CheckUnique(const char* column, const char* table, bool (*check)(uint32)); - bool AchievementProgressCheck(uint32 criteria); - bool SkillCheck(uint32 skill); - bool SpellCheck(uint32 spell_id); - bool TalentCheck(uint32 talent_id); + TC_GAME_API bool AchievementProgressCheck(uint32 criteria); + TC_GAME_API bool SkillCheck(uint32 skill); + TC_GAME_API bool SpellCheck(uint32 spell_id); + TC_GAME_API bool TalentCheck(uint32 talent_id); - void CleanCharacterAchievementProgress(); - void CleanCharacterSkills(); - void CleanCharacterSpell(); - void CleanCharacterTalent(); - void CleanCharacterQuestStatus(); + TC_GAME_API void CleanCharacterAchievementProgress(); + TC_GAME_API void CleanCharacterSkills(); + TC_GAME_API void CleanCharacterSpell(); + TC_GAME_API void CleanCharacterTalent(); + TC_GAME_API void CleanCharacterQuestStatus(); } #endif diff --git a/src/server/game/Tools/PlayerDump.h b/src/server/game/Tools/PlayerDump.h index 9f95572fd8c..66f4fd3fe13 100644 --- a/src/server/game/Tools/PlayerDump.h +++ b/src/server/game/Tools/PlayerDump.h @@ -65,7 +65,7 @@ enum DumpReturn DUMP_CHARACTER_DELETED }; -class PlayerDump +class TC_GAME_API PlayerDump { public: typedef std::set<ObjectGuid::LowType> DumpGuidSet; @@ -75,7 +75,7 @@ class PlayerDump PlayerDump() { } }; -class PlayerDumpWriter : public PlayerDump +class TC_GAME_API PlayerDumpWriter : public PlayerDump { public: PlayerDumpWriter() { } @@ -94,7 +94,7 @@ class PlayerDumpWriter : public PlayerDump DumpGuidSet items; }; -class PlayerDumpReader : public PlayerDump +class TC_GAME_API PlayerDumpReader : public PlayerDump { public: PlayerDumpReader() { } diff --git a/src/server/game/Warden/Warden.h b/src/server/game/Warden/Warden.h index 35ee18d4c02..b0aa496cbe8 100644 --- a/src/server/game/Warden/Warden.h +++ b/src/server/game/Warden/Warden.h @@ -92,7 +92,7 @@ struct ClientWardenModule class WorldSession; -class Warden +class TC_GAME_API Warden { friend class WardenWin; friend class WardenMac; diff --git a/src/server/game/Warden/WardenCheckMgr.h b/src/server/game/Warden/WardenCheckMgr.h index a09dc3a6dbb..7349fd5b589 100644 --- a/src/server/game/Warden/WardenCheckMgr.h +++ b/src/server/game/Warden/WardenCheckMgr.h @@ -48,7 +48,7 @@ struct WardenCheckResult BigNumber Result; // MEM_CHECK }; -class WardenCheckMgr +class TC_GAME_API WardenCheckMgr { private: WardenCheckMgr(); diff --git a/src/server/game/Warden/WardenMac.h b/src/server/game/Warden/WardenMac.h index 26a2d86524e..c7435502f63 100644 --- a/src/server/game/Warden/WardenMac.h +++ b/src/server/game/Warden/WardenMac.h @@ -28,7 +28,7 @@ class WorldSession; class Warden; -class WardenMac : public Warden +class TC_GAME_API WardenMac : public Warden { public: WardenMac(); diff --git a/src/server/game/Warden/WardenWin.h b/src/server/game/Warden/WardenWin.h index 4bf1af77c47..b3e6d7c586c 100644 --- a/src/server/game/Warden/WardenWin.h +++ b/src/server/game/Warden/WardenWin.h @@ -62,7 +62,7 @@ struct WardenInitModuleRequest class WorldSession; class Warden; -class WardenWin : public Warden +class TC_GAME_API WardenWin : public Warden { public: WardenWin(); diff --git a/src/server/game/Weather/Weather.h b/src/server/game/Weather/Weather.h index 0135b28522f..e0330b85a60 100644 --- a/src/server/game/Weather/Weather.h +++ b/src/server/game/Weather/Weather.h @@ -62,7 +62,7 @@ enum WeatherState : uint32 }; /// Weather for one zone -class Weather +class TC_GAME_API Weather { public: diff --git a/src/server/game/Weather/WeatherMgr.h b/src/server/game/Weather/WeatherMgr.h index 97c541fd3c0..e3dd4ac9ec4 100644 --- a/src/server/game/Weather/WeatherMgr.h +++ b/src/server/game/Weather/WeatherMgr.h @@ -30,15 +30,15 @@ class Player; namespace WeatherMgr { - void LoadWeatherData(); + TC_GAME_API void LoadWeatherData(); - Weather* FindWeather(uint32 id); - Weather* AddWeather(uint32 zone_id); - void RemoveWeather(uint32 zone_id); + TC_GAME_API Weather* FindWeather(uint32 id); + TC_GAME_API Weather* AddWeather(uint32 zone_id); + TC_GAME_API void RemoveWeather(uint32 zone_id); - void SendFineWeatherUpdateToPlayer(Player* player); + TC_GAME_API void SendFineWeatherUpdateToPlayer(Player* player); - void Update(uint32 diff); + TC_GAME_API void Update(uint32 diff); } #endif diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index bb675720d23..be9b48a81f3 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -74,17 +74,18 @@ #include <boost/algorithm/string.hpp> -std::atomic<bool> World::m_stopEvent(false); -uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE; -std::atomic<uint32> World::m_worldLoopCounter(0); +TC_GAME_API std::atomic<bool> World::m_stopEvent(false); +TC_GAME_API uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE; -float World::m_MaxVisibleDistanceOnContinents = DEFAULT_VISIBILITY_DISTANCE; -float World::m_MaxVisibleDistanceInInstances = DEFAULT_VISIBILITY_INSTANCE; -float World::m_MaxVisibleDistanceInBGArenas = DEFAULT_VISIBILITY_BGARENAS; +TC_GAME_API std::atomic<uint32> World::m_worldLoopCounter(0); -int32 World::m_visibility_notify_periodOnContinents = DEFAULT_VISIBILITY_NOTIFY_PERIOD; -int32 World::m_visibility_notify_periodInInstances = DEFAULT_VISIBILITY_NOTIFY_PERIOD; -int32 World::m_visibility_notify_periodInBGArenas = DEFAULT_VISIBILITY_NOTIFY_PERIOD; +TC_GAME_API float World::m_MaxVisibleDistanceOnContinents = DEFAULT_VISIBILITY_DISTANCE; +TC_GAME_API float World::m_MaxVisibleDistanceInInstances = DEFAULT_VISIBILITY_INSTANCE; +TC_GAME_API float World::m_MaxVisibleDistanceInBGArenas = DEFAULT_VISIBILITY_BGARENAS; + +TC_GAME_API int32 World::m_visibility_notify_periodOnContinents = DEFAULT_VISIBILITY_NOTIFY_PERIOD; +TC_GAME_API int32 World::m_visibility_notify_periodInInstances = DEFAULT_VISIBILITY_NOTIFY_PERIOD; +TC_GAME_API int32 World::m_visibility_notify_periodInBGArenas = DEFAULT_VISIBILITY_NOTIFY_PERIOD; /// World constructor World::World() diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 88baac9abf3..24a23f4f853 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -556,7 +556,7 @@ struct CharacterInfo }; /// The World -class World +class TC_GAME_API World { public: static World* instance(); @@ -895,8 +895,9 @@ class World std::deque<PreparedQueryResultFuture> m_realmCharCallbacks; }; -extern Realm realm; -uint32 GetVirtualRealmAddress(); +TC_GAME_API extern Realm realm; + +TC_GAME_API uint32 GetVirtualRealmAddress(); #define sWorld World::instance() |