*Missed some changes

--HG--
branch : trunk
This commit is contained in:
maximius
2009-09-11 13:42:39 -07:00
parent aed229dfe6
commit b4a13eff51
3 changed files with 17 additions and 26 deletions
+10 -16
View File
@@ -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,25 +2387,20 @@ 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
zprint("TC> ");
if (zprint)
zprint("TC> ");
}
void World::SendRNDBroadcast()
+5 -7
View File
@@ -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()),