diff --git a/src/framework/GameSystem/GridReference.h b/src/framework/GameSystem/GridReference.h index a08472bdc..f344caa9e 100644 --- a/src/framework/GameSystem/GridReference.h +++ b/src/framework/GameSystem/GridReference.h @@ -27,7 +27,7 @@ template class GridRefManager; template -class MANGOS_DLL_SPEC GridReference : public Reference, OBJECT> +class GridReference : public Reference, OBJECT> { protected: diff --git a/src/framework/Platform/Define.h b/src/framework/Platform/Define.h index de5414862..6145c1f36 100644 --- a/src/framework/Platform/Define.h +++ b/src/framework/Platform/Define.h @@ -42,64 +42,16 @@ # endif //ACE_BYTE_ORDER #endif //MANGOS_ENDIAN -typedef ACE_SHLIB_HANDLE MANGOS_LIBRARY_HANDLE; - -#define MANGOS_SCRIPT_NAME "mangosscript" -#define MANGOS_SCRIPT_SUFFIX ACE_DLL_SUFFIX -#define MANGOS_SCRIPT_PREFIX ACE_DLL_PREFIX -#define MANGOS_LOAD_LIBRARY(libname) ACE_OS::dlopen(libname) -#define MANGOS_CLOSE_LIBRARY(hlib) ACE_OS::dlclose(hlib) -#define MANGOS_GET_PROC_ADDR(hlib,name) ACE_OS::dlsym(hlib,name) - #define MANGOS_PATH_MAX PATH_MAX // ace/os_include/os_limits.h -> ace/Basic_Types.h #if PLATFORM == PLATFORM_WINDOWS -# define MANGOS_EXPORT __declspec(dllexport) -# define MANGOS_IMPORT __cdecl -#else //PLATFORM != PLATFORM_WINDOWS -# define MANGOS_EXPORT export -# if defined(__APPLE_CC__) && defined(BIG_ENDIAN) -# define MANGOS_IMPORT __attribute__ ((longcall)) -# elif defined(__x86_64__) -# define MANGOS_IMPORT -# else -# define MANGOS_IMPORT __attribute__ ((cdecl)) -# endif //__APPLE_CC__ && BIG_ENDIAN -#endif //PLATFORM - -#if PLATFORM == PLATFORM_WINDOWS -# define MANGOS_DLL_SPEC __declspec(dllexport) # ifndef DECLSPEC_NORETURN # define DECLSPEC_NORETURN __declspec(noreturn) # endif //DECLSPEC_NORETURN #else //PLATFORM != PLATFORM_WINDOWS -# define MANGOS_DLL_SPEC # define DECLSPEC_NORETURN #endif //PLATFORM -#if defined(__clang__) || defined (__GNUC__) -# define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize("address"))) -# define ATTRIBUTE_NO_SANITIZE_VPTR __attribute__((no_sanitize("vptr"))) -# define ATTRIBUTE_NO_SANITIZE_BOUNDS __attribute__((no_sanitize("bounds"))) -# define ATTRIBUTE_NO_SANITIZE_SHIFT __attribute__((no_sanitize("shift"))) -# define ATTRIBUTE_NO_SANITIZE_RETURN __attribute__((no_sanitize("return"))) -#else -# define ATTRIBUTE_NO_SANITIZE_ADDRESS -# define ATTRIBUTE_NO_SANITIZE_VPTR -# define ATTRIBUTE_NO_SANITIZE_BOUNDS -# define ATTRIBUTE_NO_SANITIZE_SHIFT -# define ATTRIBUTE_NO_SANITIZE_RETURN -#endif - -#if !defined(DEBUG) -# define MANGOS_INLINE inline -#else //DEBUG -# if !defined(MANGOS_DEBUG) -# define MANGOS_DEBUG -# endif //MANGOS_DEBUG -# define MANGOS_INLINE -#endif //!DEBUG - #if COMPILER == COMPILER_GNU # define ATTR_NORETURN __attribute__((noreturn)) # define ATTR_PRINTF(F,V) __attribute__ ((format (printf, F, V))) @@ -122,12 +74,6 @@ typedef uint16 WORD; typedef uint32 DWORD; #endif //COMPILER -#if COMPILER == COMPILER_GNU -# if !defined(__GXX_EXPERIMENTAL_CXX0X__) || (__GNUC__ < 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) -# define override -# endif -#endif - typedef uint64 OBJECT_HANDLE; #endif //MANGOS_DEFINE_H diff --git a/src/framework/Policies/ObjectLifeTime.cpp b/src/framework/Policies/ObjectLifeTime.cpp index b282879dc..84e91cde3 100644 --- a/src/framework/Policies/ObjectLifeTime.cpp +++ b/src/framework/Policies/ObjectLifeTime.cpp @@ -29,7 +29,7 @@ namespace MaNGOS std::atexit((void (*)())p); } - void MANGOS_DLL_SPEC at_exit(void (*func)()) + void at_exit(void (*func)()) { external_wrapper((void*)func); } diff --git a/src/framework/Policies/ObjectLifeTime.h b/src/framework/Policies/ObjectLifeTime.h index c4160c851..5d1ec57c8 100644 --- a/src/framework/Policies/ObjectLifeTime.h +++ b/src/framework/Policies/ObjectLifeTime.h @@ -29,7 +29,7 @@ typedef void (* Destroyer)(void); namespace MaNGOS { - void MANGOS_DLL_SPEC at_exit(void (*func)()); + void at_exit(void (*func)()); template class ObjectLifeTime diff --git a/src/game/AI/CreatureAI.h b/src/game/AI/CreatureAI.h index 82bdbad10..e14bf8120 100644 --- a/src/game/AI/CreatureAI.h +++ b/src/game/AI/CreatureAI.h @@ -63,7 +63,7 @@ struct CreatureAISpellsEntry : CreatureSpellsEntry CreatureAISpellsEntry(CreatureSpellsEntry const& EntryStruct) : CreatureSpellsEntry(EntryStruct), cooldown(urand(EntryStruct.delayInitialMin, EntryStruct.delayInitialMax)) {} }; -class MANGOS_DLL_SPEC CreatureAI +class CreatureAI { public: explicit CreatureAI(Creature* creature) : m_creature(creature), m_bUseAiAtControl(false), m_bMeleeAttack(true), m_bCombatMovement(true), m_uiCastingDelay(0), m_uLastAlertTime(0) diff --git a/src/game/AI/CreatureEventAI.h b/src/game/AI/CreatureEventAI.h index 49e6ea2fe..8ac22b6bf 100644 --- a/src/game/AI/CreatureEventAI.h +++ b/src/game/AI/CreatureEventAI.h @@ -281,7 +281,7 @@ struct CreatureEventAIHolder bool UpdateRepeatTimer(Creature* creature, uint32 repeatMin, uint32 repeatMax); }; -class MANGOS_DLL_SPEC CreatureEventAI : public CreatureAI +class CreatureEventAI : public CreatureAI { public: explicit CreatureEventAI(Creature* c); diff --git a/src/game/AI/GameObjectAI.h b/src/game/AI/GameObjectAI.h index b574b7b0f..c42843a9b 100644 --- a/src/game/AI/GameObjectAI.h +++ b/src/game/AI/GameObjectAI.h @@ -5,7 +5,7 @@ class GameObject; -class MANGOS_DLL_SPEC GameObjectAI +class GameObjectAI { public: explicit GameObjectAI(GameObject* pGo): me(pGo) {} diff --git a/src/game/AI/GenericSpellAI.cpp b/src/game/AI/GenericSpellAI.cpp index 5542cb14c..45bc0fb3c 100644 --- a/src/game/AI/GenericSpellAI.cpp +++ b/src/game/AI/GenericSpellAI.cpp @@ -421,7 +421,7 @@ void LoadSpellCacheData(GenericAISpell* spellToModify, SpellEntry const* spellIn #endif // Check de la portee - SpellRangeEntry const* rangeEntry = GetSpellRangeStore()->LookupEntry(spellInfos->rangeIndex); + SpellRangeEntry const* rangeEntry = sSpellRangeStore.LookupEntry(spellInfos->rangeIndex); if (spellInfos->rangeIndex != 0 && rangeEntry) { spellToModify->minRange = rangeEntry->minRange; diff --git a/src/game/AI/PlayerAI.h b/src/game/AI/PlayerAI.h index ecd2e93bd..8f3646e19 100644 --- a/src/game/AI/PlayerAI.h +++ b/src/game/AI/PlayerAI.h @@ -33,7 +33,7 @@ class Creature; class Player; class SpellEntry; -class MANGOS_DLL_SPEC PlayerAI +class PlayerAI { public: explicit PlayerAI(Player* pPlayer) : me(pPlayer), enablePositiveSpells(false) {} @@ -55,7 +55,7 @@ class MANGOS_DLL_SPEC PlayerAI bool enablePositiveSpells; }; -class MANGOS_DLL_SPEC PlayerControlledAI: public PlayerAI +class PlayerControlledAI: public PlayerAI { public: explicit PlayerControlledAI(Player* pPlayer, Unit* caster = nullptr); diff --git a/src/game/Camera.h b/src/game/Camera.h index 7ea914aa4..d4e13d6ba 100644 --- a/src/game/Camera.h +++ b/src/game/Camera.h @@ -32,7 +32,7 @@ class WorldPacket; class Player; /// Camera - object-receiver. Receives broadcast packets from nearby worldobjects, object visibility changes and sends them to client -class MANGOS_DLL_SPEC Camera +class Camera { friend class ViewPoint; public: @@ -80,7 +80,7 @@ class MANGOS_DLL_SPEC Camera }; /// Object-observer, notifies farsight object state to cameras that attached to it -class MANGOS_DLL_SPEC ViewPoint +class ViewPoint { friend class Camera; diff --git a/src/game/Chat/Chat.h b/src/game/Chat/Chat.h index 5bbf52edb..78aa7b1c0 100644 --- a/src/game/Chat/Chat.h +++ b/src/game/Chat/Chat.h @@ -87,7 +87,7 @@ enum PlayerChatTag class PartyBotAI; class BattleBotAI; -class MANGOS_DLL_SPEC ChatHandler +class ChatHandler { friend class PartyBotAI; friend class BattleBotAI; diff --git a/src/game/Database/DBCStores.cpp b/src/game/Database/DBCStores.cpp index fc5d2d3c8..f7afa8ea5 100644 --- a/src/game/Database/DBCStores.cpp +++ b/src/game/Database/DBCStores.cpp @@ -651,24 +651,6 @@ bool IsPointInAreaTriggerZone(AreaTriggerEntry const* atEntry, uint32 mapid, flo return true; } -// script support functions -MANGOS_DLL_SPEC DBCStorage const* GetSpellRangeStore() -{ - return &sSpellRangeStore; -} -MANGOS_DLL_SPEC DBCStorage const* GetCreatureDisplayStore() -{ - return &sCreatureDisplayInfoStore; -} -MANGOS_DLL_SPEC DBCStorage const* GetEmotesStore() -{ - return &sEmotesStore; -} -MANGOS_DLL_SPEC DBCStorage const* GetEmotesTextStore() -{ - return &sEmotesTextStore; -} - SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, uint8 class_) { SkillRaceClassInfoBounds bounds = SkillRaceClassInfoBySkill.equal_range(skill); diff --git a/src/game/Database/DBCStores.h b/src/game/Database/DBCStores.h index ac8b9e696..eb96bafe4 100644 --- a/src/game/Database/DBCStores.h +++ b/src/game/Database/DBCStores.h @@ -107,12 +107,6 @@ extern DBCStorage sWorldSafeLocsStore; void LoadDBCStores(std::string const& dataPath); -// script support functions -MANGOS_DLL_SPEC DBCStorage const* GetSpellRangeStore(); -MANGOS_DLL_SPEC DBCStorage const* GetCreatureDisplayStore(); -MANGOS_DLL_SPEC DBCStorage const* GetEmotesStore(); -MANGOS_DLL_SPEC DBCStorage const* GetEmotesTextStore(); - char const* GetRaceName(uint8 race, uint8 locale); char const* GetClassName(uint8 class_, uint8 locale); diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp index afc0f2042..1054e46e6 100644 --- a/src/game/GameEventMgr.cpp +++ b/src/game/GameEventMgr.cpp @@ -1124,11 +1124,6 @@ bool GameEventMgr::IsActiveHoliday(HolidayIds id) return false; } -MANGOS_DLL_SPEC bool IsHolidayActive(HolidayIds id) -{ - return sGameEventMgr.IsActiveHoliday(id); -} - /* * Silithus PvP */ diff --git a/src/game/GameEventMgr.h b/src/game/GameEventMgr.h index 93e1d0648..5204025ce 100644 --- a/src/game/GameEventMgr.h +++ b/src/game/GameEventMgr.h @@ -169,6 +169,4 @@ class GameEventMgr #define sGameEventMgr MaNGOS::Singleton::Instance() -MANGOS_DLL_SPEC bool IsHolidayActive(HolidayIds id); - #endif diff --git a/src/game/GossipDef.h b/src/game/GossipDef.h index b7fee0e50..0ba7aca83 100644 --- a/src/game/GossipDef.h +++ b/src/game/GossipDef.h @@ -185,7 +185,7 @@ struct QuestMenuItem typedef std::vector QuestMenuItemList; -class MANGOS_DLL_SPEC GossipMenu +class GossipMenu { public: explicit GossipMenu(WorldSession* session); @@ -277,7 +277,7 @@ class QuestMenu QuestMenuItemList m_qItems; }; -class MANGOS_DLL_SPEC PlayerMenu +class PlayerMenu { private: GossipMenu mGossipMenu; diff --git a/src/game/Group/Group.h b/src/game/Group/Group.h index 5577a37f7..fc8ec4b32 100644 --- a/src/game/Group/Group.h +++ b/src/game/Group/Group.h @@ -170,7 +170,7 @@ struct InstanceGroupBind /** request member stats checken **/ /** todo: uninvite people that not accepted invite **/ -class MANGOS_DLL_SPEC Group +class Group { public: struct MemberSlot diff --git a/src/game/Group/GroupReference.h b/src/game/Group/GroupReference.h index 82ef87657..ad12736d0 100644 --- a/src/game/Group/GroupReference.h +++ b/src/game/Group/GroupReference.h @@ -27,7 +27,7 @@ class Group; class Player; -class MANGOS_DLL_SPEC GroupReference : public Reference +class GroupReference : public Reference { protected: uint8 iSubGroup; diff --git a/src/game/Maps/GridMap.h b/src/game/Maps/GridMap.h index 4e836b239..ac0556ea4 100644 --- a/src/game/Maps/GridMap.h +++ b/src/game/Maps/GridMap.h @@ -108,7 +108,7 @@ class GridMap }; template -class MANGOS_DLL_SPEC Referencable +class Referencable { public: Referencable() { m_count = 0; } @@ -134,7 +134,7 @@ typedef ACE_Atomic_Op AtomicLong; #define DEFAULT_WATER_SEARCH 50.0f // default search distance to case detection water level // class for sharing and managin GridMap objects -class MANGOS_DLL_SPEC TerrainInfo : public Referencable +class TerrainInfo : public Referencable { public: TerrainInfo(uint32 mapid); diff --git a/src/game/Maps/InstanceData.h b/src/game/Maps/InstanceData.h index 210e47d3a..cf74d2b81 100644 --- a/src/game/Maps/InstanceData.h +++ b/src/game/Maps/InstanceData.h @@ -33,7 +33,7 @@ class GameObject; class Creature; class WorldObject; -class MANGOS_DLL_SPEC InstanceData : public ZoneScript +class InstanceData : public ZoneScript { public: diff --git a/src/game/Maps/Map.h b/src/game/Maps/Map.h index ad1f3549d..4591f6b40 100644 --- a/src/game/Maps/Map.h +++ b/src/game/Maps/Map.h @@ -324,7 +324,7 @@ struct ScriptedEvent ScriptedEvent(ScriptedEvent const&) = delete; }; -class MANGOS_DLL_SPEC Map : public GridRefManager, public MaNGOS::ObjectLevelLockable +class Map : public GridRefManager, public MaNGOS::ObjectLevelLockable { friend class MapReference; friend class ObjectGridLoader; @@ -1001,7 +1001,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager, public MaNGOS::Obj uint32 GetLastPlayerLeftTime() const { return _lastPlayerLeftTime; } }; -class MANGOS_DLL_SPEC WorldMap : public Map +class WorldMap : public Map { using Map::GetPersistentState; // hide in subclass for overwrite @@ -1013,7 +1013,7 @@ class MANGOS_DLL_SPEC WorldMap : public Map WorldPersistentState* GetPersistanceState() const; }; -class MANGOS_DLL_SPEC DungeonMap : public Map +class DungeonMap : public Map { using Map::GetPersistentState; // hide in subclass for overwrite @@ -1042,7 +1042,7 @@ class MANGOS_DLL_SPEC DungeonMap : public Map bool m_unloadWhenEmpty; }; -class MANGOS_DLL_SPEC BattleGroundMap : public Map +class BattleGroundMap : public Map { using Map::GetPersistentState; // hide in subclass for overwrite diff --git a/src/game/Maps/MapReference.h b/src/game/Maps/MapReference.h index 8814f8e24..9a7fe093f 100644 --- a/src/game/Maps/MapReference.h +++ b/src/game/Maps/MapReference.h @@ -27,7 +27,7 @@ class Map; class Player; -class MANGOS_DLL_SPEC MapReference : public Reference +class MapReference : public Reference { protected: void targetObjectBuildLink() override; diff --git a/src/game/Movement/ConfusedMovementGenerator.h b/src/game/Movement/ConfusedMovementGenerator.h index 3fccbd850..93f7999c1 100644 --- a/src/game/Movement/ConfusedMovementGenerator.h +++ b/src/game/Movement/ConfusedMovementGenerator.h @@ -23,7 +23,7 @@ #include "Timer.h" template -class MANGOS_DLL_SPEC ConfusedMovementGenerator : public MovementGeneratorMedium< T, ConfusedMovementGenerator > +class ConfusedMovementGenerator : public MovementGeneratorMedium< T, ConfusedMovementGenerator > { public: explicit ConfusedMovementGenerator(): i_x(0.0f), i_y(0.0f), i_z(0.0f) {} diff --git a/src/game/Movement/FearMovementGenerator.h b/src/game/Movement/FearMovementGenerator.h index 17c84c003..d526ced40 100644 --- a/src/game/Movement/FearMovementGenerator.h +++ b/src/game/Movement/FearMovementGenerator.h @@ -20,7 +20,7 @@ #define NEXT_CHECK_TIME_UPPER_BOUND 500 template -class MANGOS_DLL_SPEC FearMovementGenerator : public MovementGeneratorMedium< T, FearMovementGenerator > +class FearMovementGenerator : public MovementGeneratorMedium< T, FearMovementGenerator > { public: explicit FearMovementGenerator(ObjectGuid fright) : @@ -56,7 +56,7 @@ private: bool _forceUpdate; }; -class MANGOS_DLL_SPEC TimedFearMovementGenerator : public FearMovementGenerator +class TimedFearMovementGenerator : public FearMovementGenerator { public: TimedFearMovementGenerator(ObjectGuid fright, uint32 time); diff --git a/src/game/Movement/FleeingMovementGenerator.h b/src/game/Movement/FleeingMovementGenerator.h index 0cf527de3..6eb57e5c4 100644 --- a/src/game/Movement/FleeingMovementGenerator.h +++ b/src/game/Movement/FleeingMovementGenerator.h @@ -23,7 +23,7 @@ #include "ObjectGuid.h" template -class MANGOS_DLL_SPEC FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovementGenerator > +class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovementGenerator > { public: explicit FleeingMovementGenerator(ObjectGuid fright) : _forceWalking(false), _customSpeed(-1.0f), i_frightGuid(fright), i_nextCheckTime(0), _forceUpdate(false) {} @@ -49,7 +49,7 @@ class MANGOS_DLL_SPEC FleeingMovementGenerator : public MovementGeneratorMedium< bool _forceUpdate; }; -class MANGOS_DLL_SPEC TimedFleeingMovementGenerator : public FleeingMovementGenerator +class TimedFleeingMovementGenerator : public FleeingMovementGenerator { public: TimedFleeingMovementGenerator(ObjectGuid fright, uint32 time) : diff --git a/src/game/Movement/FollowerReference.h b/src/game/Movement/FollowerReference.h index 5a57fd14a..bd10b604f 100644 --- a/src/game/Movement/FollowerReference.h +++ b/src/game/Movement/FollowerReference.h @@ -27,7 +27,7 @@ class TargetedMovementGeneratorBase; class Unit; -class MANGOS_DLL_SPEC FollowerReference : public Reference +class FollowerReference : public Reference { protected: void targetObjectBuildLink() override; diff --git a/src/game/Movement/HomeMovementGenerator.h b/src/game/Movement/HomeMovementGenerator.h index bc29c152f..3da14b0b9 100644 --- a/src/game/Movement/HomeMovementGenerator.h +++ b/src/game/Movement/HomeMovementGenerator.h @@ -24,10 +24,10 @@ class Creature; template < class T > -class MANGOS_DLL_SPEC HomeMovementGenerator; +class HomeMovementGenerator; template <> -class MANGOS_DLL_SPEC HomeMovementGenerator +class HomeMovementGenerator : public MovementGeneratorMedium< Creature, HomeMovementGenerator > { public: diff --git a/src/game/Movement/IdleMovementGenerator.h b/src/game/Movement/IdleMovementGenerator.h index eea86010f..bd7ba5a5b 100644 --- a/src/game/Movement/IdleMovementGenerator.h +++ b/src/game/Movement/IdleMovementGenerator.h @@ -24,7 +24,7 @@ #include "MovementGenerator.h" -class MANGOS_DLL_SPEC IdleMovementGenerator : public MovementGenerator +class IdleMovementGenerator : public MovementGenerator { public: @@ -38,7 +38,7 @@ class MANGOS_DLL_SPEC IdleMovementGenerator : public MovementGenerator extern IdleMovementGenerator si_idleMovement; -class MANGOS_DLL_SPEC DistractMovementGenerator : public MovementGenerator +class DistractMovementGenerator : public MovementGenerator { public: explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) {} @@ -54,7 +54,7 @@ class MANGOS_DLL_SPEC DistractMovementGenerator : public MovementGenerator uint32 m_timer; }; -class MANGOS_DLL_SPEC AssistanceDistractMovementGenerator : public DistractMovementGenerator +class AssistanceDistractMovementGenerator : public DistractMovementGenerator { public: AssistanceDistractMovementGenerator(uint32 timer) : diff --git a/src/game/Movement/MotionMaster.h b/src/game/Movement/MotionMaster.h index 793444b99..ba351b452 100644 --- a/src/game/Movement/MotionMaster.h +++ b/src/game/Movement/MotionMaster.h @@ -82,7 +82,7 @@ enum MoveOptions MOVE_STRAIGHT_PATH = 0x100, }; -class MANGOS_DLL_SPEC MotionMaster : std::stack +class MotionMaster : std::stack { typedef stack Impl; typedef std::vector ExpireList; diff --git a/src/game/Movement/MovementGenerator.h b/src/game/Movement/MovementGenerator.h index a4e4191fb..ecbae4020 100644 --- a/src/game/Movement/MovementGenerator.h +++ b/src/game/Movement/MovementGenerator.h @@ -31,7 +31,7 @@ class Unit; -class MANGOS_DLL_SPEC MovementGenerator +class MovementGenerator { public: virtual ~MovementGenerator(); @@ -69,7 +69,7 @@ class MANGOS_DLL_SPEC MovementGenerator }; template -class MANGOS_DLL_SPEC MovementGeneratorMedium : public MovementGenerator +class MovementGeneratorMedium : public MovementGenerator { public: void Initialize(Unit &u) override diff --git a/src/game/Movement/PointMovementGenerator.h b/src/game/Movement/PointMovementGenerator.h index bbf92bd59..26df99a01 100644 --- a/src/game/Movement/PointMovementGenerator.h +++ b/src/game/Movement/PointMovementGenerator.h @@ -25,7 +25,7 @@ #include "PathFinder.h" template -class MANGOS_DLL_SPEC PointMovementGenerator +class PointMovementGenerator : public MovementGeneratorMedium< T, PointMovementGenerator > { public: @@ -55,7 +55,7 @@ class MANGOS_DLL_SPEC PointMovementGenerator }; template -class MANGOS_DLL_SPEC DistancingMovementGenerator +class DistancingMovementGenerator : public PointMovementGenerator { public: @@ -70,7 +70,7 @@ class MANGOS_DLL_SPEC DistancingMovementGenerator using PointMovementGenerator::Initialize; }; -class MANGOS_DLL_SPEC AssistanceMovementGenerator +class AssistanceMovementGenerator : public PointMovementGenerator { public: @@ -98,7 +98,7 @@ class EffectMovementGenerator : public MovementGenerator }; template -class MANGOS_DLL_SPEC ChargeMovementGenerator +class ChargeMovementGenerator : public MovementGeneratorMedium< T, ChargeMovementGenerator > { public: diff --git a/src/game/Movement/RandomMovementGenerator.h b/src/game/Movement/RandomMovementGenerator.h index 1a87ba101..44516a78b 100644 --- a/src/game/Movement/RandomMovementGenerator.h +++ b/src/game/Movement/RandomMovementGenerator.h @@ -21,7 +21,7 @@ #include "MovementGenerator.h" -class MANGOS_DLL_SPEC RandomMovementGenerator +class RandomMovementGenerator : public MovementGeneratorMedium< Creature, RandomMovementGenerator > { public: diff --git a/src/game/Movement/TargetedMovementGenerator.h b/src/game/Movement/TargetedMovementGenerator.h index c4fcecd1f..4606d9e33 100644 --- a/src/game/Movement/TargetedMovementGenerator.h +++ b/src/game/Movement/TargetedMovementGenerator.h @@ -24,7 +24,7 @@ #include "PathFinder.h" #include "Unit.h" -class MANGOS_DLL_SPEC TargetedMovementGeneratorBase +class TargetedMovementGeneratorBase { public: explicit TargetedMovementGeneratorBase(Unit &target) { i_target.link(&target, this); } @@ -34,7 +34,7 @@ class MANGOS_DLL_SPEC TargetedMovementGeneratorBase }; template -class MANGOS_DLL_SPEC TargetedMovementGeneratorMedium +class TargetedMovementGeneratorMedium : public MovementGeneratorMedium< T, D >, public TargetedMovementGeneratorBase { protected: @@ -78,7 +78,7 @@ class MANGOS_DLL_SPEC TargetedMovementGeneratorMedium }; template -class MANGOS_DLL_SPEC ChaseMovementGenerator : public TargetedMovementGeneratorMedium > +class ChaseMovementGenerator : public TargetedMovementGeneratorMedium > { public: explicit ChaseMovementGenerator(Unit &target) @@ -126,7 +126,7 @@ class MANGOS_DLL_SPEC ChaseMovementGenerator : public TargetedMovementGeneratorM }; template -class MANGOS_DLL_SPEC FollowMovementGenerator : public TargetedMovementGeneratorMedium > +class FollowMovementGenerator : public TargetedMovementGeneratorMedium > { public: explicit FollowMovementGenerator(Unit &target) diff --git a/src/game/Movement/WaypointMovementGenerator.h b/src/game/Movement/WaypointMovementGenerator.h index 369654718..0759a0860 100644 --- a/src/game/Movement/WaypointMovementGenerator.h +++ b/src/game/Movement/WaypointMovementGenerator.h @@ -39,7 +39,7 @@ struct CreatureGroupMember; template -class MANGOS_DLL_SPEC PathMovementBase +class PathMovementBase { public: PathMovementBase() : i_currentNode(0) {} @@ -62,10 +62,10 @@ class MANGOS_DLL_SPEC PathMovementBase */ template -class MANGOS_DLL_SPEC WaypointMovementGenerator; +class WaypointMovementGenerator; template<> -class MANGOS_DLL_SPEC WaypointMovementGenerator +class WaypointMovementGenerator : public MovementGeneratorMedium< Creature, WaypointMovementGenerator >, public PathMovementBase { @@ -124,7 +124,7 @@ class MANGOS_DLL_SPEC WaypointMovementGenerator /** FlightPathMovementGenerator generates movement of the player for the paths * and hence generates ground and activities for the player. */ -class MANGOS_DLL_SPEC FlightPathMovementGenerator +class FlightPathMovementGenerator : public MovementGeneratorMedium< Player, FlightPathMovementGenerator >, public PathMovementBase { @@ -150,7 +150,7 @@ class MANGOS_DLL_SPEC FlightPathMovementGenerator bool GetResetPosition(Player&, float& x, float& y, float& z); }; -class MANGOS_DLL_SPEC PatrolMovementGenerator +class PatrolMovementGenerator : public MovementGeneratorMedium { public: diff --git a/src/game/Movement/spline/MoveSplineInit.h b/src/game/Movement/spline/MoveSplineInit.h index e8be0cc5d..694f070b8 100644 --- a/src/game/Movement/spline/MoveSplineInit.h +++ b/src/game/Movement/spline/MoveSplineInit.h @@ -29,7 +29,7 @@ namespace Movement { /* Initializes and launches spline movement */ - class MANGOS_DLL_SPEC MoveSplineInit + class MoveSplineInit { public: diff --git a/src/game/ObjectGuid.h b/src/game/ObjectGuid.h index 0c4e12a5b..950b82aaf 100644 --- a/src/game/ObjectGuid.h +++ b/src/game/ObjectGuid.h @@ -123,7 +123,7 @@ struct PackedGuidReader ObjectGuid* m_guidPtr; }; -class MANGOS_DLL_SPEC ObjectGuid +class ObjectGuid { public: // constructors ObjectGuid() : m_guid(0) {} diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 7c2564720..2c12d8d27 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -10072,30 +10072,6 @@ void ObjectMgr::RemoveGroup(Group* group) m_GroupMap.erase(group->GetId()); } -// Functions for scripting access -bool LoadMangosStrings(DatabaseType& db, char const* table, int32 start_value, int32 end_value, bool extra_content) -{ - // MAX_DB_SCRIPT_STRING_ID is max allowed negative value for scripts (scrpts can use only more deep negative values - // start/end reversed for negative values - if (end_value >= start_value) - { - sLog.outErrorDb("Table '%s' attempt loaded with reserved by mangos range (%d - %d), strings not loaded.", table, start_value, end_value + 1); - return false; - } - - return sObjectMgr.LoadMangosStrings(db, table, start_value, end_value, extra_content); -} - -CreatureInfo const* GetCreatureTemplateStore(uint32 entry) -{ - return sCreatureStorage.LookupEntry(entry); -} - -Quest const* GetQuestTemplateStore(uint32 entry) -{ - return sObjectMgr.GetQuestTemplate(entry); -} - bool FindCreatureData::operator()(CreatureDataPair const& dataPair) { // skip wrong entry ids diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index dea8b6e36..420752807 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -400,7 +400,7 @@ SkillRangeType GetSkillRangeType(SkillLineEntry const* pSkill, bool racial); bool normalizePlayerName(std::string& name, size_t max_len = MAX_INTERNAL_PLAYER_NAME); -struct MANGOS_DLL_SPEC LanguageDesc +struct LanguageDesc { Language lang_id; uint32 spell_id; @@ -408,7 +408,7 @@ struct MANGOS_DLL_SPEC LanguageDesc }; extern LanguageDesc lang_description[LANGUAGES_COUNT]; -MANGOS_DLL_SPEC LanguageDesc const* GetLanguageDescByID(uint32 lang); +LanguageDesc const* GetLanguageDescByID(uint32 lang); class PlayerDumpReader; @@ -1549,9 +1549,4 @@ class ObjectMgr #define sObjectMgr MaNGOS::Singleton::Instance() -// scripting access functions -MANGOS_DLL_SPEC bool LoadMangosStrings(DatabaseType& db, char const* table,int32 start_value, int32 end_value = std::numeric_limits::min(), bool extra_content = false); -MANGOS_DLL_SPEC CreatureInfo const* GetCreatureTemplateStore(uint32 entry); -MANGOS_DLL_SPEC Quest const* GetQuestTemplateStore(uint32 entry); - #endif diff --git a/src/game/Objects/Creature.h b/src/game/Objects/Creature.h index 8005b5872..e5252bec4 100644 --- a/src/game/Objects/Creature.h +++ b/src/game/Objects/Creature.h @@ -500,7 +500,7 @@ class ThreatListProcesser virtual bool Process(Unit* unit) = 0; }; -class MANGOS_DLL_SPEC Creature : public Unit +class Creature : public Unit { CreatureAI *i_AI; diff --git a/src/game/Objects/GameObject.h b/src/game/Objects/GameObject.h index cdb8b6bef..015b4fe27 100644 --- a/src/game/Objects/GameObject.h +++ b/src/game/Objects/GameObject.h @@ -615,7 +615,7 @@ struct GameObjectDisplayInfoEntry; #define GO_ANIMPROGRESS_DEFAULT 100 // in 3.x 0xFF -class MANGOS_DLL_SPEC GameObject : public WorldObject +class GameObject : public WorldObject { public: explicit GameObject(); diff --git a/src/game/Objects/Item.h b/src/game/Objects/Item.h index bd2ce2f69..2cb91ca0e 100644 --- a/src/game/Objects/Item.h +++ b/src/game/Objects/Item.h @@ -240,7 +240,7 @@ struct ItemRequiredTarget bool ItemCanGoIntoBag(ItemPrototype const* proto, ItemPrototype const* pBagProto); -class MANGOS_DLL_SPEC Item : public Object +class Item : public Object { public: static Item* CreateItem(uint32 item, uint32 count, Player const* player = nullptr); diff --git a/src/game/Objects/Object.h b/src/game/Objects/Object.h index beea9014f..86ab0cf05 100644 --- a/src/game/Objects/Object.h +++ b/src/game/Objects/Object.h @@ -299,7 +299,7 @@ enum ObjectDelayedAction typedef void(*CreatureAiSetter) (Creature* pCreature); -class MANGOS_DLL_SPEC Object +class Object { public: virtual ~Object(); @@ -687,7 +687,7 @@ enum CurrentSpellTypes #define CURRENT_FIRST_NON_MELEE_SPELL 1 #define CURRENT_MAX_SPELL 4 -class MANGOS_DLL_SPEC WorldObject : public Object +class WorldObject : public Object { friend struct WorldObjectChangeAccumulator; @@ -695,7 +695,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object //class is used to manipulate with WorldUpdateCounter //it is needed in order to get time diff between two object's Update() calls - class MANGOS_DLL_SPEC UpdateHelper + class UpdateHelper { public: explicit UpdateHelper(WorldObject* obj) : m_obj(obj) {} diff --git a/src/game/Objects/Pet.h b/src/game/Objects/Pet.h index 124daba6e..54448ffc6 100644 --- a/src/game/Objects/Pet.h +++ b/src/game/Objects/Pet.h @@ -143,7 +143,7 @@ extern uint32 const LevelStartLoyalty[6]; class Player; struct CharacterPetCache; -class MANGOS_DLL_SPEC Pet : public Creature +class Pet : public Creature { public: explicit Pet(PetType type = MAX_PET_TYPE); diff --git a/src/game/Objects/Player.h b/src/game/Objects/Player.h index 3792e24cc..064bee68a 100644 --- a/src/game/Objects/Player.h +++ b/src/game/Objects/Player.h @@ -645,7 +645,7 @@ struct InstancePlayerBind #define MAX_INSTANCE_PER_ACCOUNT_PER_HOUR 5 -class MANGOS_DLL_SPEC PlayerTaxi +class PlayerTaxi { public: PlayerTaxi(); @@ -851,7 +851,7 @@ struct ScheduledTeleportData std::function recover = std::function(); }; -class MANGOS_DLL_SPEC Player final: public Unit +class Player final: public Unit { friend class WorldSession; friend void Item::AddToUpdateQueueOf(Player* player); diff --git a/src/game/Objects/TemporarySummon.h b/src/game/Objects/TemporarySummon.h index e8f72a6cf..a9d320fa5 100644 --- a/src/game/Objects/TemporarySummon.h +++ b/src/game/Objects/TemporarySummon.h @@ -33,7 +33,7 @@ class TemporarySummon : public Creature void Update(uint32 update_diff, uint32 time) override; void Summon(TempSummonType type, uint32 lifetime, CreatureAiSetter pFuncAiSetter = nullptr); - void MANGOS_DLL_SPEC UnSummon(uint32 delayDespawnTime = 0); + void UnSummon(uint32 delayDespawnTime = 0); void CleanupsBeforeDelete() override; void SaveToDB(); ObjectGuid const& GetSummonerGuid() const { return m_summoner ; } diff --git a/src/game/Objects/Unit.h b/src/game/Objects/Unit.h index 89d40f9f0..f74886cd2 100644 --- a/src/game/Objects/Unit.h +++ b/src/game/Objects/Unit.h @@ -357,7 +357,7 @@ struct ProcTriggeredData typedef std::list< ProcTriggeredData > ProcTriggeredList; -class MANGOS_DLL_SPEC Unit : public WorldObject +class Unit : public WorldObject { public: static Unit* GetUnit(WorldObject &obj, uint64 const& Guid); diff --git a/src/game/ScriptMgr.cpp b/src/game/ScriptMgr.cpp index 941f86b22..eb86de514 100644 --- a/src/game/ScriptMgr.cpp +++ b/src/game/ScriptMgr.cpp @@ -1939,7 +1939,7 @@ void ScriptMgr::LoadDatabase() void ScriptMgr::LoadScriptTexts() { sLog.outString("Loading Script Texts..."); - LoadMangosStrings(WorldDatabase, "script_texts", TEXT_SOURCE_TEXT_START, TEXT_SOURCE_TEXT_END, true); + sObjectMgr.LoadMangosStrings(WorldDatabase, "script_texts", TEXT_SOURCE_TEXT_START, TEXT_SOURCE_TEXT_END, true); QueryResult* result = WorldDatabase.PQuery("SELECT entry, sound, type, language, emote FROM script_texts WHERE entry BETWEEN %i AND %i", TEXT_SOURCE_TEXT_END, TEXT_SOURCE_TEXT_START); @@ -2001,7 +2001,7 @@ void ScriptMgr::LoadScriptTexts() void ScriptMgr::LoadScriptTextsCustom() { sLog.outString("Loading Custom Texts..."); - LoadMangosStrings(WorldDatabase, "custom_texts", TEXT_SOURCE_CUSTOM_START, TEXT_SOURCE_CUSTOM_END, true); + sObjectMgr.LoadMangosStrings(WorldDatabase, "custom_texts", TEXT_SOURCE_CUSTOM_START, TEXT_SOURCE_CUSTOM_END, true); QueryResult* result = WorldDatabase.PQuery("SELECT entry, sound, type, language, emote FROM custom_texts WHERE entry BETWEEN %i AND %i", TEXT_SOURCE_CUSTOM_END, TEXT_SOURCE_CUSTOM_START); @@ -2098,7 +2098,7 @@ void ScriptMgr::LoadScriptWaypoints() pTemp.fZ = pFields[4].GetFloat(); pTemp.uiWaitTime = pFields[5].GetUInt32(); - CreatureInfo const* pCInfo = GetCreatureTemplateStore(pTemp.uiCreatureEntry); + CreatureInfo const* pCInfo = sObjectMgr.GetCreatureTemplate(pTemp.uiCreatureEntry); if (!pCInfo) { @@ -2150,7 +2150,7 @@ void ScriptMgr::LoadEscortData() pTemp.uiQuestEntry = pFields[1].GetUInt32(); pTemp.uiEscortFaction = pFields[2].GetUInt32(); - CreatureInfo const* pCInfo = GetCreatureTemplateStore(pTemp.uiCreatureEntry); + CreatureInfo const* pCInfo = sObjectMgr.GetCreatureTemplate(pTemp.uiCreatureEntry); if (!pCInfo) { @@ -2511,7 +2511,7 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map* return; } - CreatureInfo const* pInfo = GetCreatureTemplateStore(uiCreatureEntry); + CreatureInfo const* pInfo = sObjectMgr.GetCreatureTemplate(uiCreatureEntry); if (!pInfo) { sLog.outError("DoOrSimulateScriptTextForMap has invalid source entry %u for map %u.", uiCreatureEntry, pMap->GetId()); diff --git a/src/game/ScriptMgr.h b/src/game/ScriptMgr.h index d1ac59c84..68cc1892c 100644 --- a/src/game/ScriptMgr.h +++ b/src/game/ScriptMgr.h @@ -1403,10 +1403,10 @@ class ScriptMgr #define sScriptMgr MaNGOS::Singleton::Instance() -MANGOS_DLL_SPEC uint32 GetAreaTriggerScriptId(uint32 triggerId); -MANGOS_DLL_SPEC uint32 GetEventIdScriptId(uint32 eventId); -MANGOS_DLL_SPEC uint32 GetScriptId(char const* name); -MANGOS_DLL_SPEC char const* GetScriptName(uint32 id); -MANGOS_DLL_SPEC uint32 GetScriptIdsCount(); +uint32 GetAreaTriggerScriptId(uint32 triggerId); +uint32 GetEventIdScriptId(uint32 eventId); +uint32 GetScriptId(char const* name); +char const* GetScriptName(uint32 id); +uint32 GetScriptIdsCount(); #endif diff --git a/src/game/Spells/Spell.h b/src/game/Spells/Spell.h index 5f6372caf..cd4269493 100644 --- a/src/game/Spells/Spell.h +++ b/src/game/Spells/Spell.h @@ -386,7 +386,7 @@ class Spell bool CheckTarget(Unit* target, SpellEffectIndex eff); bool CanAutoCast(Unit* target); - static void MANGOS_DLL_SPEC SendCastResult(Player* caster, SpellEntry const* spellInfo, SpellCastResult result); + static void SendCastResult(Player* caster, SpellEntry const* spellInfo, SpellCastResult result); void SendCastResult(SpellCastResult result); void SendSpellStart(); void SendSpellGo(bool SendToCaster = true); diff --git a/src/game/Spells/SpellAuras.h b/src/game/Spells/SpellAuras.h index 25de9569a..677a1f795 100644 --- a/src/game/Spells/SpellAuras.h +++ b/src/game/Spells/SpellAuras.h @@ -84,7 +84,7 @@ class Aura; // internal helper struct ReapplyAffectedPassiveAurasHelper; -class MANGOS_DLL_SPEC SpellAuraHolder +class SpellAuraHolder { public: SpellAuraHolder (SpellEntry const* spellproto, Unit* target, Unit* caster, Item* castItem, WorldObject* realCaster); @@ -286,7 +286,7 @@ typedef void(Aura::*pAuraHandler)(bool Apply, bool Real); // each setting object update field code line moved under if (Real) check is significant mangos speedup, and less server->client data sends // each packet sending code moved under if (Real) check is _large_ mangos speedup, and lot less server->client data sends -class MANGOS_DLL_SPEC Aura +class Aura { friend struct ReapplyAffectedPassiveAurasHelper; friend Aura* CreateAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* currentBasePoints, SpellAuraHolder* holder, Unit* target, Unit* caster, Item* castItem); @@ -569,7 +569,7 @@ class MANGOS_DLL_SPEC Aura void ReapplyAffectedPassiveAuras(Unit* target); }; -class MANGOS_DLL_SPEC AreaAura : public Aura +class AreaAura : public Aura { public: AreaAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* currentBasePoints, SpellAuraHolder* holder, Unit* target, Unit* caster = nullptr, Item* castItem = nullptr, uint32 originalRankSpellId = 0); @@ -583,7 +583,7 @@ class MANGOS_DLL_SPEC AreaAura : public Aura uint32 m_originalRankSpellId; }; -class MANGOS_DLL_SPEC PersistentAreaAura : public Aura +class PersistentAreaAura : public Aura { public: PersistentAreaAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* currentBasePoints, SpellAuraHolder* holder, Unit* target, Unit* caster = nullptr, Item* castItem = nullptr); @@ -592,7 +592,7 @@ class MANGOS_DLL_SPEC PersistentAreaAura : public Aura void Update(uint32 diff) override; }; -class MANGOS_DLL_SPEC SingleEnemyTargetAura : public Aura +class SingleEnemyTargetAura : public Aura { friend Aura* CreateAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* currentBasePoints, SpellAuraHolder* holder, Unit* target, Unit* caster, Item* castItem); diff --git a/src/game/Threat/ThreatManager.h b/src/game/Threat/ThreatManager.h index d453598bd..17ca1b7e4 100644 --- a/src/game/Threat/ThreatManager.h +++ b/src/game/Threat/ThreatManager.h @@ -47,7 +47,7 @@ class ThreatCalcHelper }; //============================================================== -class MANGOS_DLL_SPEC HostileReference : public Reference +class HostileReference : public Reference { public: HostileReference(Unit* pUnit, ThreatManager *pThreatManager, float pThreat); @@ -138,7 +138,7 @@ class ThreatManager; typedef std::list ThreatList; -class MANGOS_DLL_SPEC ThreatContainer +class ThreatContainer { ThreatList iThreatList; bool iDirty; @@ -175,7 +175,7 @@ public: //================================================= -class MANGOS_DLL_SPEC ThreatManager +class ThreatManager { public: friend class HostileReference; diff --git a/src/game/UnitEvents.h b/src/game/UnitEvents.h index 973c5dce9..8ea1ce0e9 100644 --- a/src/game/UnitEvents.h +++ b/src/game/UnitEvents.h @@ -64,7 +64,7 @@ enum UnitThreatEventType //============================================================== -class MANGOS_DLL_SPEC UnitBaseEvent +class UnitBaseEvent { private: uint32 iType; @@ -79,7 +79,7 @@ class MANGOS_DLL_SPEC UnitBaseEvent //============================================================== -class MANGOS_DLL_SPEC ThreatRefStatusChangeEvent : public UnitBaseEvent +class ThreatRefStatusChangeEvent : public UnitBaseEvent { private: HostileReference* iHostileReference; @@ -116,7 +116,7 @@ class MANGOS_DLL_SPEC ThreatRefStatusChangeEvent : public UnitBaseEvent //============================================================== -class MANGOS_DLL_SPEC ThreatManagerEvent : public ThreatRefStatusChangeEvent +class ThreatManagerEvent : public ThreatRefStatusChangeEvent { private: ThreatContainer* iThreatContainer; diff --git a/src/game/WorldSession.h b/src/game/WorldSession.h index 712f15dfa..4c70ea702 100644 --- a/src/game/WorldSession.h +++ b/src/game/WorldSession.h @@ -270,7 +270,7 @@ typedef std::map SessionScriptsMap; #define ALL_SESSION_SCRIPTS(session, what) for (SessionScriptsMap::iterator it = session->scripts.begin(); it != session->scripts.end(); ++it) it->second->what; /// Player session in the World -class MANGOS_DLL_SPEC WorldSession +class WorldSession { friend class CharacterHandler; public: diff --git a/src/scripts/kalimdor/felwood/felwood.cpp b/src/scripts/kalimdor/felwood/felwood.cpp index 42191d741..1aa4bd34b 100644 --- a/src/scripts/kalimdor/felwood/felwood.cpp +++ b/src/scripts/kalimdor/felwood/felwood.cpp @@ -113,7 +113,7 @@ bool EffectDummyCreature_npc_kitten(WorldObject* /*pCaster*/, uint32 uiSpellId, if (uiSpellId == SPELL_CORRUPT_SABER_VISUAL && effIndex == EFFECT_INDEX_0) { // Not nice way, however using UpdateEntry will not be correct. - if (CreatureInfo const* pTemp = GetCreatureTemplateStore(NPC_CORRUPT_SABER)) + if (CreatureInfo const* pTemp = sObjectMgr.GetCreatureTemplate(NPC_CORRUPT_SABER)) { pCreatureTarget->SetEntry(pTemp->entry); pCreatureTarget->SetDisplayId(Creature::ChooseDisplayId(pTemp)); diff --git a/src/shared/Config/Config.h b/src/shared/Config/Config.h index 02f0d0e1b..3b399d21a 100644 --- a/src/shared/Config/Config.h +++ b/src/shared/Config/Config.h @@ -30,7 +30,7 @@ class ACE_Configuration_Heap; -class MANGOS_DLL_SPEC Config +class Config { friend class ACE_Singleton; public: diff --git a/src/shared/Database/Database.h b/src/shared/Database/Database.h index ceaba7513..f916d237c 100644 --- a/src/shared/Database/Database.h +++ b/src/shared/Database/Database.h @@ -43,7 +43,7 @@ class Database; typedef ACE_Based::LockedQueue SqlQueue; // -class MANGOS_DLL_SPEC SqlConnection +class SqlConnection { public: virtual ~SqlConnection() {} @@ -115,7 +115,7 @@ class MANGOS_DLL_SPEC SqlConnection StmtHolder m_holder; }; -class MANGOS_DLL_SPEC Database +class Database { public: virtual ~Database(); @@ -284,7 +284,7 @@ class MANGOS_DLL_SPEC Database //factory method to create SqlConnection objects virtual SqlConnection* CreateConnection() = 0; - class MANGOS_DLL_SPEC TransHelper + class TransHelper { public: TransHelper() : m_pTrans(nullptr) {} diff --git a/src/shared/Database/DatabaseMysql.h b/src/shared/Database/DatabaseMysql.h index 11edfb0ed..11f3e82ca 100644 --- a/src/shared/Database/DatabaseMysql.h +++ b/src/shared/Database/DatabaseMysql.h @@ -38,7 +38,7 @@ #endif //MySQL prepared statement class -class MANGOS_DLL_SPEC MySqlPreparedStatement : public SqlPreparedStatement +class MySqlPreparedStatement : public SqlPreparedStatement { public: MySqlPreparedStatement(std::string const& fmt, SqlConnection& conn, MYSQL* mysql); @@ -69,7 +69,7 @@ private: MYSQL_RES* m_pResultMetadata; }; -class MANGOS_DLL_SPEC MySQLConnection : public SqlConnection +class MySQLConnection : public SqlConnection { public: MySQLConnection(Database& db) : SqlConnection(db), mMysql(nullptr) {} @@ -99,7 +99,7 @@ class MANGOS_DLL_SPEC MySQLConnection : public SqlConnection MYSQL* mMysql; }; -class MANGOS_DLL_SPEC DatabaseMysql : public Database +class DatabaseMysql : public Database { friend class MaNGOS::OperatorNew; diff --git a/src/shared/Database/DatabasePostgre.h b/src/shared/Database/DatabasePostgre.h index a6cf56e5e..55afc00e3 100644 --- a/src/shared/Database/DatabasePostgre.h +++ b/src/shared/Database/DatabasePostgre.h @@ -37,7 +37,7 @@ #include #endif -class MANGOS_DLL_SPEC PostgreSQLConnection : public SqlConnection +class PostgreSQLConnection : public SqlConnection { public: PostgreSQLConnection() : mPGconn(nullptr) {} @@ -62,7 +62,7 @@ class MANGOS_DLL_SPEC PostgreSQLConnection : public SqlConnection PGconn* mPGconn; }; -class MANGOS_DLL_SPEC DatabasePostgre : public Database +class DatabasePostgre : public Database { friend class MaNGOS::OperatorNew; diff --git a/src/shared/Database/QueryResult.h b/src/shared/Database/QueryResult.h index ab91c2375..31176c488 100644 --- a/src/shared/Database/QueryResult.h +++ b/src/shared/Database/QueryResult.h @@ -26,7 +26,7 @@ #include "Errors.h" #include "Field.h" -class MANGOS_DLL_SPEC QueryResult +class QueryResult { public: QueryResult(uint64 rowCount, uint32 fieldCount) @@ -51,7 +51,7 @@ class MANGOS_DLL_SPEC QueryResult typedef std::vector QueryFieldNames; -class MANGOS_DLL_SPEC QueryNamedResult +class QueryNamedResult { public: explicit QueryNamedResult(QueryResult* query, QueryFieldNames const& names) : mQuery(query), mFieldNames(names) {} diff --git a/src/shared/Database/SqlPreparedStatement.h b/src/shared/Database/SqlPreparedStatement.h index fc85b881e..ab3865fff 100644 --- a/src/shared/Database/SqlPreparedStatement.h +++ b/src/shared/Database/SqlPreparedStatement.h @@ -62,7 +62,7 @@ enum SqlStmtFieldType //templates might be the best choice here //but I didn't have time to play with them -class MANGOS_DLL_SPEC SqlStmtFieldData +class SqlStmtFieldData { public: SqlStmtFieldData() : m_type(FIELD_NONE) { m_binaryData.ui64 = 0; } @@ -139,7 +139,7 @@ template<> inline void SqlStmtFieldData::set(char const* val) { m_type = FIELD_S class SqlStatement; //prepared statement executor -class MANGOS_DLL_SPEC SqlStmtParameters +class SqlStmtParameters { public: typedef std::vector ParameterContainer; @@ -188,7 +188,7 @@ class SqlStatementID }; //statement index -class MANGOS_DLL_SPEC SqlStatement +class SqlStatement { public: ~SqlStatement() { delete m_pParams; } @@ -306,7 +306,7 @@ class MANGOS_DLL_SPEC SqlStatement }; //base prepared statement class -class MANGOS_DLL_SPEC SqlPreparedStatement +class SqlPreparedStatement { public: virtual ~SqlPreparedStatement() {} @@ -338,7 +338,7 @@ class MANGOS_DLL_SPEC SqlPreparedStatement }; //prepared statements via plain SQL string requests -class MANGOS_DLL_SPEC SqlPlainPreparedStatement : public SqlPreparedStatement +class SqlPlainPreparedStatement : public SqlPreparedStatement { public: SqlPlainPreparedStatement(std::string const& fmt, SqlConnection& conn); diff --git a/src/shared/Log.h b/src/shared/Log.h index 845b7976c..cd0dd28fb 100644 --- a/src/shared/Log.h +++ b/src/shared/Log.h @@ -294,13 +294,4 @@ class Log : public MaNGOS::Singleton