*Correcting account/characters' online value.
--HG-- branch : trunk
This commit is contained in:
@@ -53,6 +53,7 @@ m_latency(0), m_TutorialsChanged(false)
|
|||||||
{
|
{
|
||||||
m_Address = sock->GetRemoteAddress ();
|
m_Address = sock->GetRemoteAddress ();
|
||||||
sock->AddReference ();
|
sock->AddReference ();
|
||||||
|
LoginDatabase.PExecute("UPDATE account SET online = 1 WHERE id = %u;", GetAccountId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,6 +78,8 @@ WorldSession::~WorldSession()
|
|||||||
WorldPacket *packet = _recvQueue.next ();
|
WorldPacket *packet = _recvQueue.next ();
|
||||||
delete 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SizeError(WorldPacket const& packet, uint32 size) const
|
void WorldSession::SizeError(WorldPacket const& packet, uint32 size) const
|
||||||
@@ -329,11 +332,6 @@ void WorldSession::LogoutPlayer(bool Save)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///- Reset the online field in the account table
|
|
||||||
// no point resetting online in character table here as Player::SaveToDB() will set it to 1 since player has not been removed from world at this stage
|
|
||||||
//No SQL injection as AccountID is uint32
|
|
||||||
LoginDatabase.PExecute("UPDATE account SET online = 0 WHERE id = '%u'", GetAccountId());
|
|
||||||
|
|
||||||
///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members
|
///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members
|
||||||
Guild *guild = objmgr.GetGuildById(_player->GetGuildId());
|
Guild *guild = objmgr.GetGuildById(_player->GetGuildId());
|
||||||
if(guild)
|
if(guild)
|
||||||
|
|||||||
Reference in New Issue
Block a user