mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
converted all tabs to 4 spaces
This commit is contained in:
@@ -91,7 +91,7 @@ private:
|
||||
uint32 _delayTime;
|
||||
|
||||
public:
|
||||
FreezeDetectorRunnable(uint32 freezeDelay) : _loops(0), _lastChange(0), _delayTime(freezeDelay) {}
|
||||
FreezeDetectorRunnable(uint32 freezeDelay) : _loops(0), _lastChange(0), _delayTime(freezeDelay) {}
|
||||
|
||||
void run()
|
||||
{
|
||||
@@ -185,9 +185,9 @@ int Master::Run()
|
||||
|
||||
ACE_Based::Thread rarThread(new RARunnable);
|
||||
|
||||
// pussywizard:
|
||||
ACE_Based::Thread auctionLising_thread(new AuctionListingRunnable);
|
||||
auctionLising_thread.setPriority(ACE_Based::High);
|
||||
// pussywizard:
|
||||
ACE_Based::Thread auctionLising_thread(new AuctionListingRunnable);
|
||||
auctionLising_thread.setPriority(ACE_Based::High);
|
||||
|
||||
#if defined(_WIN32) || defined(__linux__)
|
||||
|
||||
@@ -304,11 +304,11 @@ int Master::Run()
|
||||
delete soapThread;
|
||||
}
|
||||
|
||||
if (freezeThread)
|
||||
{
|
||||
freezeThread->wait();
|
||||
delete freezeThread;
|
||||
}
|
||||
if (freezeThread)
|
||||
{
|
||||
freezeThread->wait();
|
||||
delete freezeThread;
|
||||
}
|
||||
|
||||
// set server offline
|
||||
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, realmID);
|
||||
|
||||
@@ -74,7 +74,7 @@ void WorldRunnable::run()
|
||||
#endif
|
||||
}
|
||||
|
||||
sLog->SetLogDB(false);
|
||||
sLog->SetLogDB(false);
|
||||
|
||||
sScriptMgr->OnShutdown();
|
||||
|
||||
@@ -95,42 +95,42 @@ void WorldRunnable::run()
|
||||
void AuctionListingRunnable::run()
|
||||
{
|
||||
sLog->outString("Starting up Auction House Listing thread...");
|
||||
while (!World::IsStopped())
|
||||
{
|
||||
if (AsyncAuctionListingMgr::IsAuctionListingAllowed())
|
||||
{
|
||||
uint32 diff = AsyncAuctionListingMgr::GetDiff();
|
||||
AsyncAuctionListingMgr::ResetDiff();
|
||||
while (!World::IsStopped())
|
||||
{
|
||||
if (AsyncAuctionListingMgr::IsAuctionListingAllowed())
|
||||
{
|
||||
uint32 diff = AsyncAuctionListingMgr::GetDiff();
|
||||
AsyncAuctionListingMgr::ResetDiff();
|
||||
|
||||
if (AsyncAuctionListingMgr::GetTempList().size() || AsyncAuctionListingMgr::GetList().size())
|
||||
{
|
||||
TRINITY_GUARD(ACE_Thread_Mutex, AsyncAuctionListingMgr::GetLock());
|
||||
if (AsyncAuctionListingMgr::GetTempList().size() || AsyncAuctionListingMgr::GetList().size())
|
||||
{
|
||||
TRINITY_GUARD(ACE_Thread_Mutex, AsyncAuctionListingMgr::GetLock());
|
||||
|
||||
{
|
||||
TRINITY_GUARD(ACE_Thread_Mutex, AsyncAuctionListingMgr::GetTempLock());
|
||||
for (std::list<AuctionListItemsDelayEvent>::iterator itr = AsyncAuctionListingMgr::GetTempList().begin(); itr != AsyncAuctionListingMgr::GetTempList().end(); ++itr)
|
||||
AsyncAuctionListingMgr::GetList().push_back( (*itr) );
|
||||
AsyncAuctionListingMgr::GetTempList().clear();
|
||||
}
|
||||
{
|
||||
TRINITY_GUARD(ACE_Thread_Mutex, AsyncAuctionListingMgr::GetTempLock());
|
||||
for (std::list<AuctionListItemsDelayEvent>::iterator itr = AsyncAuctionListingMgr::GetTempList().begin(); itr != AsyncAuctionListingMgr::GetTempList().end(); ++itr)
|
||||
AsyncAuctionListingMgr::GetList().push_back( (*itr) );
|
||||
AsyncAuctionListingMgr::GetTempList().clear();
|
||||
}
|
||||
|
||||
for (std::list<AuctionListItemsDelayEvent>::iterator itr = AsyncAuctionListingMgr::GetList().begin(); itr != AsyncAuctionListingMgr::GetList().end(); ++itr)
|
||||
{
|
||||
if ((*itr)._msTimer <= diff)
|
||||
(*itr)._msTimer = 0;
|
||||
else
|
||||
(*itr)._msTimer -= diff;
|
||||
}
|
||||
for (std::list<AuctionListItemsDelayEvent>::iterator itr = AsyncAuctionListingMgr::GetList().begin(); itr != AsyncAuctionListingMgr::GetList().end(); ++itr)
|
||||
{
|
||||
if ((*itr)._msTimer <= diff)
|
||||
(*itr)._msTimer = 0;
|
||||
else
|
||||
(*itr)._msTimer -= diff;
|
||||
}
|
||||
|
||||
for (std::list<AuctionListItemsDelayEvent>::iterator itr = AsyncAuctionListingMgr::GetList().begin(); itr != AsyncAuctionListingMgr::GetList().end(); ++itr)
|
||||
if ((*itr)._msTimer == 0)
|
||||
{
|
||||
if ((*itr).Execute())
|
||||
AsyncAuctionListingMgr::GetList().erase(itr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ACE_Based::Thread::Sleep(1);
|
||||
}
|
||||
for (std::list<AuctionListItemsDelayEvent>::iterator itr = AsyncAuctionListingMgr::GetList().begin(); itr != AsyncAuctionListingMgr::GetList().end(); ++itr)
|
||||
if ((*itr)._msTimer == 0)
|
||||
{
|
||||
if ((*itr).Execute())
|
||||
AsyncAuctionListingMgr::GetList().erase(itr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ACE_Based::Thread::Sleep(1);
|
||||
}
|
||||
sLog->outString("Auction House Listing thread exiting without problems.");
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ class WorldRunnable : public ACE_Based::Runnable
|
||||
|
||||
class AuctionListingRunnable : public ACE_Based::Runnable
|
||||
{
|
||||
public:
|
||||
void run();
|
||||
public:
|
||||
void run();
|
||||
};
|
||||
#endif
|
||||
/// @}
|
||||
|
||||
Reference in New Issue
Block a user