*Missed some changes
--HG-- branch : trunk
This commit is contained in:
+9
-15
@@ -127,8 +127,9 @@ World::~World()
|
||||
|
||||
m_weathers.clear();
|
||||
|
||||
while (!cliCmdQueue.empty())
|
||||
delete cliCmdQueue.next();
|
||||
CliCommandHolder* command;
|
||||
while (cliCmdQueue.next(command))
|
||||
delete command;
|
||||
|
||||
VMAP::VMapFactory::clear();
|
||||
|
||||
@@ -2359,11 +2360,9 @@ void World::SendServerMessage(ServerMessageType type, const char *text, Player*
|
||||
void World::UpdateSessions( uint32 diff )
|
||||
{
|
||||
///- Add new sessions
|
||||
while(!addSessQueue.empty())
|
||||
{
|
||||
WorldSession* sess = addSessQueue.next ();
|
||||
WorldSession* sess;
|
||||
while(addSessQueue.next(sess))
|
||||
AddSession_ (sess);
|
||||
}
|
||||
|
||||
///- Then send an update signal to remaining ones
|
||||
for (SessionMap::iterator itr = m_sessions.begin(), next; itr != m_sessions.end(); itr = next)
|
||||
@@ -2388,24 +2387,19 @@ void World::UpdateSessions( uint32 diff )
|
||||
// This handles the issued and queued CLI commands
|
||||
void World::ProcessCliCommands()
|
||||
{
|
||||
if (cliCmdQueue.empty())
|
||||
return;
|
||||
CliCommandHolder::Print* zprint = NULL;
|
||||
|
||||
CliCommandHolder::Print* zprint;
|
||||
|
||||
while (!cliCmdQueue.empty())
|
||||
CliCommandHolder* command;
|
||||
while (cliCmdQueue.next(command))
|
||||
{
|
||||
sLog.outDebug("CLI command under processing...");
|
||||
CliCommandHolder *command = cliCmdQueue.next();
|
||||
|
||||
zprint = command->m_print;
|
||||
|
||||
CliHandler(zprint).ParseCommands(command->m_command);
|
||||
|
||||
delete command;
|
||||
}
|
||||
|
||||
// print the console message here so it looks right
|
||||
if (zprint)
|
||||
zprint("TC> ");
|
||||
}
|
||||
|
||||
|
||||
@@ -73,11 +73,10 @@ WorldSession::~WorldSession()
|
||||
}
|
||||
|
||||
///- empty incoming packet queue
|
||||
while(!_recvQueue.empty())
|
||||
{
|
||||
WorldPacket *packet = _recvQueue.next ();
|
||||
WorldPacket* packet;
|
||||
while(_recvQueue.next(packet))
|
||||
delete packet;
|
||||
}
|
||||
|
||||
loginDatabase.PExecute("UPDATE account SET online = 0 WHERE id = %u;", GetAccountId());
|
||||
CharacterDatabase.PExecute("UPDATE characters SET online = 0 WHERE account = %u;", GetAccountId());
|
||||
}
|
||||
@@ -169,10 +168,9 @@ bool WorldSession::Update(uint32 /*diff*/)
|
||||
{
|
||||
///- Retrieve packets from the receive queue and call the appropriate handlers
|
||||
/// not proccess packets if socket already closed
|
||||
while (!_recvQueue.empty() && m_Socket && !m_Socket->IsClosed ())
|
||||
WorldPacket* packet;
|
||||
while (_recvQueue.next(packet) && m_Socket && !m_Socket->IsClosed ())
|
||||
{
|
||||
WorldPacket *packet = _recvQueue.next();
|
||||
|
||||
/*#if 1
|
||||
sLog.outError( "MOEP: %s (0x%.4X)",
|
||||
LookupOpcodeName(packet->GetOpcode()),
|
||||
|
||||
@@ -28,7 +28,6 @@ SqlDelayThread::SqlDelayThread(Database* db) : m_dbEngine(db), m_running(true)
|
||||
|
||||
void SqlDelayThread::run()
|
||||
{
|
||||
SqlOperation* s;
|
||||
#ifndef DO_POSTGRESQL
|
||||
mysql_thread_init();
|
||||
#endif
|
||||
@@ -38,9 +37,9 @@ void SqlDelayThread::run()
|
||||
// if the running state gets turned off while sleeping
|
||||
// empty the queue before exiting
|
||||
ACE_Based::Thread::Sleep(10);
|
||||
while (!m_sqlQueue.empty())
|
||||
SqlOperation* s;
|
||||
while (m_sqlQueue.next(s))
|
||||
{
|
||||
s = m_sqlQueue.next();
|
||||
s->Execute(m_dbEngine);
|
||||
delete s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user