Sync with 3.3.5a core

This commit is contained in:
Aokromes committed 2016-05-03 12:40:27 +02:00
1 parent 41e7c525f6
commit 0ac5f4a440
17 files changed
+58 -29

No files matched your search

@@ -84,4 +84,6 @@ private:
std::unique_ptr<GameObjectModelOwnerBase> owner; std::unique_ptr<GameObjectModelOwnerBase> owner;
}; };
void LoadGameObjectModelList(std::string const& dataPath);
#endif // _GAMEOBJECT_MODEL_H #endif // _GAMEOBJECT_MODEL_H
+6
View File
@@ -56,6 +56,12 @@ bool ConfigMgr::LoadInitial(std::string const& file, std::string& error)
return true; return true;
} }
ConfigMgr* ConfigMgr::instance()
{
static ConfigMgr instance;
return &instance;
}
bool ConfigMgr::Reload(std::string& error) bool ConfigMgr::Reload(std::string& error)
{ {
return LoadInitial(_filename, error); return LoadInitial(_filename, error);
+1 -5
View File
@@ -33,11 +33,7 @@ public:
/// Method used only for loading main configuration files (authserver.conf and worldserver.conf) /// Method used only for loading main configuration files (authserver.conf and worldserver.conf)
bool LoadInitial(std::string const& file, std::string& error); bool LoadInitial(std::string const& file, std::string& error);
static ConfigMgr* instance() static ConfigMgr* instance();
{
static ConfigMgr instance;
return &instance;
}
bool Reload(std::string& error); bool Reload(std::string& error);
+6
View File
@@ -320,6 +320,12 @@ void Log::Close()
appenders.clear(); appenders.clear();
} }
Log* Log::instance()
{
static Log instance;
return &instance;
}
void Log::Initialize(boost::asio::io_service* ioService) void Log::Initialize(boost::asio::io_service* ioService)
{ {
if (ioService) if (ioService)
+1 -5
View File
@@ -44,11 +44,7 @@ class Log
public: public:
static Log* instance() static Log* instance();
{
static Log instance;
return &instance;
}
void Initialize(boost::asio::io_service* ioService); void Initialize(boost::asio::io_service* ioService);
void LoadFromConfig(); void LoadFromConfig();
@@ -261,4 +261,3 @@ bool WinServiceRun()
return true; return true;
} }
#endif #endif
@@ -26,4 +26,3 @@ bool WinServiceRun();
#endif // _WIN32_SERVICE_ #endif // _WIN32_SERVICE_
#endif // _WIN32 #endif // _WIN32
+9 -4
View File
@@ -18,10 +18,15 @@ if(CMAKE_COMPILER_IS_GNUCXX AND NOT MINGW)
add_definitions(-fno-delete-null-pointer-checks) add_definitions(-fno-delete-null-pointer-checks)
endif() endif()
set(sources_windows_Debugging if(WIN32)
${CMAKE_SOURCE_DIR}/src/common/Debugging/WheatyExceptionReport.cpp set(sources_windows
${CMAKE_SOURCE_DIR}/src/common/Debugging/WheatyExceptionReport.h ${CMAKE_SOURCE_DIR}/src/common/Debugging/WheatyExceptionReport.cpp
) ${CMAKE_SOURCE_DIR}/src/common/Debugging/WheatyExceptionReport.h
${CMAKE_SOURCE_DIR}/src/common/Platform/ServiceWin32.cpp
${CMAKE_SOURCE_DIR}/src/common/Platform/ServiceWin32.h
)
endif(WIN32)
add_subdirectory(database) add_subdirectory(database)
add_subdirectory(shared) add_subdirectory(shared)
add_subdirectory(game) add_subdirectory(game)
+3 -1
View File
@@ -31,7 +31,7 @@ set(authserver_SRCS
if( WIN32 ) if( WIN32 )
set(authserver_SRCS set(authserver_SRCS
${authserver_SRCS} ${authserver_SRCS}
${sources_windows_Debugging} ${sources_windows}
) )
if ( MSVC ) if ( MSVC )
set(authserver_SRCS set(authserver_SRCS
@@ -54,9 +54,11 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/common/Logging ${CMAKE_SOURCE_DIR}/src/common/Logging
${CMAKE_SOURCE_DIR}/src/common/Threading ${CMAKE_SOURCE_DIR}/src/common/Threading
${CMAKE_SOURCE_DIR}/src/common/Utilities ${CMAKE_SOURCE_DIR}/src/common/Utilities
${CMAKE_SOURCE_DIR}/src/common/Platform
${CMAKE_SOURCE_DIR}/src/server/database ${CMAKE_SOURCE_DIR}/src/server/database
${CMAKE_SOURCE_DIR}/src/server/database/Database ${CMAKE_SOURCE_DIR}/src/server/database/Database
${CMAKE_SOURCE_DIR}/src/server/database/Logging ${CMAKE_SOURCE_DIR}/src/server/database/Logging
${CMAKE_SOURCE_DIR}/src/server/database/Updater
${CMAKE_SOURCE_DIR}/src/server/shared ${CMAKE_SOURCE_DIR}/src/server/shared
${CMAKE_SOURCE_DIR}/src/server/shared/Networking ${CMAKE_SOURCE_DIR}/src/server/shared/Networking
${CMAKE_SOURCE_DIR}/src/server/shared/Packets ${CMAKE_SOURCE_DIR}/src/server/shared/Packets
-1
View File
@@ -76,7 +76,6 @@ boost::asio::deadline_timer* _dbPingTimer;
uint32 _dbPingInterval; uint32 _dbPingInterval;
boost::asio::deadline_timer* _banExpiryCheckTimer; boost::asio::deadline_timer* _banExpiryCheckTimer;
uint32 _banExpiryCheckInterval; uint32 _banExpiryCheckInterval;
LoginDatabaseWorkerPool LoginDatabase;
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
@@ -0,0 +1,22 @@
/*
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "DatabaseEnv.h"
WorldDatabaseWorkerPool WorldDatabase;
CharacterDatabaseWorkerPool CharacterDatabase;
LoginDatabaseWorkerPool LoginDatabase;
+3 -1
View File
@@ -38,9 +38,11 @@
#include "Implementation/CharacterDatabase.h" #include "Implementation/CharacterDatabase.h"
#include "Implementation/WorldDatabase.h" #include "Implementation/WorldDatabase.h"
/// Accessor to the world database
extern WorldDatabaseWorkerPool WorldDatabase; extern WorldDatabaseWorkerPool WorldDatabase;
/// Accessor to the character database
extern CharacterDatabaseWorkerPool CharacterDatabase; extern CharacterDatabaseWorkerPool CharacterDatabase;
/// Accessor to the realm/login database
extern LoginDatabaseWorkerPool LoginDatabase; extern LoginDatabaseWorkerPool LoginDatabase;
#endif #endif
@@ -19,7 +19,7 @@
#define DatabaseLoader_h__ #define DatabaseLoader_h__
#include "DatabaseWorkerPool.h" #include "DatabaseWorkerPool.h"
#include "DatabaseEnv.h" #include "DBUpdater.h"
#include <functional> #include <functional>
#include <stack> #include <stack>
+1 -2
View File
@@ -38,6 +38,7 @@
#include "DatabaseEnv.h" #include "DatabaseEnv.h"
#include "DisableMgr.h" #include "DisableMgr.h"
#include "GameEventMgr.h" #include "GameEventMgr.h"
#include "GameObjectModel.h"
#include "GridNotifiersImpl.h" #include "GridNotifiersImpl.h"
#include "GroupMgr.h" #include "GroupMgr.h"
#include "GuildFinderMgr.h" #include "GuildFinderMgr.h"
@@ -1347,8 +1348,6 @@ void World::LoadConfigSettings(bool reload)
sScriptMgr->OnConfigLoad(reload); sScriptMgr->OnConfigLoad(reload);
} }
extern void LoadGameObjectModelList(std::string const& dataPath);
/// Initialize the World /// Initialize the World
void World::SetInitialWorldSettings() void World::SetInitialWorldSettings()
{ {
-3
View File
@@ -18,9 +18,6 @@ file(GLOB_RECURSE sources_Dynamic Dynamic/*.cpp Dynamic/*.h)
file(GLOB_RECURSE sources_Networking Networking/*.cpp Networking/*.h) file(GLOB_RECURSE sources_Networking Networking/*.cpp Networking/*.h)
file(GLOB_RECURSE sources_Packets Packets/*.cpp Packets/*.h) file(GLOB_RECURSE sources_Packets Packets/*.cpp Packets/*.h)
file(GLOB_RECURSE sources_Realm Realm/*.cpp Realm/*.h) file(GLOB_RECURSE sources_Realm Realm/*.cpp Realm/*.h)
if( WIN32 )
file(GLOB_RECURSE sources_Service Service/*.cpp Service/*.h)
endif( WIN32 )
file(GLOB sources_localdir *.cpp *.h) file(GLOB sources_localdir *.cpp *.h)
# #
+3 -1
View File
@@ -29,7 +29,7 @@ set(worldserver_SRCS
if( WIN32 ) if( WIN32 )
set(worldserver_SRCS set(worldserver_SRCS
${worldserver_SRCS} ${worldserver_SRCS}
${sources_windows_Debugging} ${sources_windows}
) )
if ( MSVC ) if ( MSVC )
set(worldserver_SRCS set(worldserver_SRCS
@@ -60,10 +60,12 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/common/Logging ${CMAKE_SOURCE_DIR}/src/common/Logging
${CMAKE_SOURCE_DIR}/src/common/Threading ${CMAKE_SOURCE_DIR}/src/common/Threading
${CMAKE_SOURCE_DIR}/src/common/Utilities ${CMAKE_SOURCE_DIR}/src/common/Utilities
${CMAKE_SOURCE_DIR}/src/common/Platform
${CMAKE_SOURCE_DIR}/src/server/authserver/Realms ${CMAKE_SOURCE_DIR}/src/server/authserver/Realms
${CMAKE_SOURCE_DIR}/src/server/database/ ${CMAKE_SOURCE_DIR}/src/server/database/
${CMAKE_SOURCE_DIR}/src/server/database/Database ${CMAKE_SOURCE_DIR}/src/server/database/Database
${CMAKE_SOURCE_DIR}/src/server/database/Logging ${CMAKE_SOURCE_DIR}/src/server/database/Logging
${CMAKE_SOURCE_DIR}/src/server/database/Updater
${CMAKE_SOURCE_DIR}/src/server/ipc ${CMAKE_SOURCE_DIR}/src/server/ipc
${CMAKE_SOURCE_DIR}/src/server/game ${CMAKE_SOURCE_DIR}/src/server/game
${CMAKE_SOURCE_DIR}/src/server/game/Accounts ${CMAKE_SOURCE_DIR}/src/server/game/Accounts
-3
View File
@@ -79,9 +79,6 @@ uint32 _worldLoopCounter(0);
uint32 _lastChangeMsTime(0); uint32 _lastChangeMsTime(0);
uint32 _maxCoreStuckTimeInMs(0); uint32 _maxCoreStuckTimeInMs(0);
WorldDatabaseWorkerPool WorldDatabase; ///< Accessor to the world database
CharacterDatabaseWorkerPool CharacterDatabase; ///< Accessor to the character database
LoginDatabaseWorkerPool LoginDatabase; ///< Accessor to the realm/login database
Realm realm; Realm realm;
void SignalHandler(const boost::system::error_code& error, int signalNumber); void SignalHandler(const boost::system::error_code& error, int signalNumber);