refactor(Core/Misc): acore to Acore (#6043)

This commit is contained in:
Kitzunu
2021-05-31 14:21:54 +02:00
committed by GitHub
parent 7eeae6866e
commit 897a02bb75
224 changed files with 942 additions and 942 deletions

View File

@@ -14,7 +14,7 @@
#include "Threading.h"
/// Command Line Interface handling thread
class CliRunnable : public acore::Runnable
class CliRunnable : public Acore::Runnable
{
public:
void run() override;

View File

@@ -56,7 +56,7 @@ void usage(const char* prog)
/// Launch the Trinity server
extern int main(int argc, char** argv)
{
acore::Impl::CurrentServerProcessHolder::_type = SERVER_PROCESS_WORLDSERVER;
Acore::Impl::CurrentServerProcessHolder::_type = SERVER_PROCESS_WORLDSERVER;
///- Command line parsing to get the configuration file name
std::string configFile = sConfigMgr->GetConfigPath() + std::string(_ACORE_CORE_CONFIG);
@@ -125,7 +125,7 @@ extern int main(int argc, char** argv)
sLog->RegisterAppender<AppenderDB>();
sLog->Initialize();
acore::Banner::Show("worldserver-daemon",
Acore::Banner::Show("worldserver-daemon",
[](char const* text)
{
LOG_INFO("server.worldserver", "%s", text);

View File

@@ -65,7 +65,7 @@ void HandleSignal(int sigNum)
}
}
class FreezeDetectorRunnable : public acore::Runnable
class FreezeDetectorRunnable : public Acore::Runnable
{
private:
uint32 _loops;
@@ -95,7 +95,7 @@ public:
ABORT();
}
acore::Thread::Sleep(1000);
Acore::Thread::Sleep(1000);
}
LOG_INFO("server", "Anti-freeze thread exiting without problems.");
}
@@ -148,7 +148,7 @@ int Master::Run()
sScriptMgr->OnStartup();
///- Initialize the signal handlers
acore::SignalHandler signalHandler;
Acore::SignalHandler signalHandler;
signalHandler.handle_signal(SIGINT, &HandleSignal);
signalHandler.handle_signal(SIGTERM, &HandleSignal);
@@ -158,10 +158,10 @@ int Master::Run()
#endif
///- Launch WorldRunnable thread
acore::Thread worldThread(new WorldRunnable);
worldThread.setPriority(acore::Priority_Highest);
Acore::Thread worldThread(new WorldRunnable);
worldThread.setPriority(Acore::Priority_Highest);
acore::Thread* cliThread = nullptr;
Acore::Thread* cliThread = nullptr;
#ifdef _WIN32
if (sConfigMgr->GetOption<bool>("Console.Enable", true) && (m_ServiceStatus == -1)/* need disable console in service mode*/)
@@ -170,14 +170,14 @@ int Master::Run()
#endif
{
///- Launch CliRunnable thread
cliThread = new acore::Thread(new CliRunnable);
cliThread = new Acore::Thread(new CliRunnable);
}
acore::Thread rarThread(new RARunnable);
Acore::Thread rarThread(new RARunnable);
// pussywizard:
acore::Thread auctionLising_thread(new AuctionListingRunnable);
auctionLising_thread.setPriority(acore::Priority_High);
Acore::Thread auctionLising_thread(new AuctionListingRunnable);
auctionLising_thread.setPriority(Acore::Priority_High);
#if defined(_WIN32) || defined(__linux__)
@@ -260,12 +260,12 @@ int Master::Run()
}
// Start up freeze catcher thread
acore::Thread* freezeThread = nullptr;
Acore::Thread* freezeThread = nullptr;
if (uint32 freezeDelay = sConfigMgr->GetOption<int32>("MaxCoreStuckTime", 0))
{
FreezeDetectorRunnable* runnable = new FreezeDetectorRunnable(freezeDelay * 1000);
freezeThread = new acore::Thread(runnable);
freezeThread->setPriority(acore::Priority_Highest);
freezeThread = new Acore::Thread(runnable);
freezeThread->setPriority(Acore::Priority_Highest);
}
///- Launch the world listener socket

View File

@@ -15,7 +15,7 @@
#include "Threading.h"
#include <ace/Reactor.h>
class RARunnable : public acore::Runnable
class RARunnable : public Acore::Runnable
{
public:
RARunnable();

View File

@@ -218,10 +218,10 @@ int RASocket::check_password(const std::string& user, const std::string& pass)
if (PreparedQueryResult result = LoginDatabase.Query(stmt))
{
acore::Crypto::SRP6::Salt salt = (*result)[0].GetBinary<acore::Crypto::SRP6::SALT_LENGTH>();
acore::Crypto::SRP6::Verifier verifier = (*result)[1].GetBinary<acore::Crypto::SRP6::VERIFIER_LENGTH>();
Acore::Crypto::SRP6::Salt salt = (*result)[0].GetBinary<Acore::Crypto::SRP6::SALT_LENGTH>();
Acore::Crypto::SRP6::Verifier verifier = (*result)[1].GetBinary<Acore::Crypto::SRP6::VERIFIER_LENGTH>();
if (acore::Crypto::SRP6::CheckLogin(safe_user, safe_pass, salt, verifier))
if (Acore::Crypto::SRP6::CheckLogin(safe_user, safe_pass, salt, verifier))
return 0;
}

View File

@@ -53,7 +53,7 @@ void WorldRunnable::run()
avgDiffTracker.Update(executionTimeDiff > WORLD_SLEEP_CONST ? executionTimeDiff : WORLD_SLEEP_CONST);
if (executionTimeDiff < WORLD_SLEEP_CONST)
acore::Thread::Sleep(WORLD_SLEEP_CONST - executionTimeDiff);
Acore::Thread::Sleep(WORLD_SLEEP_CONST - executionTimeDiff);
#ifdef _WIN32
if (m_ServiceStatus == 0)
@@ -120,7 +120,7 @@ void AuctionListingRunnable::run()
}
}
}
acore::Thread::Sleep(1);
Acore::Thread::Sleep(1);
}
LOG_INFO("server", "Auction House Listing thread exiting without problems.");
}

View File

@@ -14,13 +14,13 @@
#include "Threading.h"
/// Heartbeat thread for the World
class WorldRunnable : public acore::Runnable
class WorldRunnable : public Acore::Runnable
{
public:
void run() override;
};
class AuctionListingRunnable : public acore::Runnable
class AuctionListingRunnable : public Acore::Runnable
{
public:
void run() override;