mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
fix(Core/PacketIO): Reintroduce requeueing packets that are sent during login but need you to be logged in (#15145)
This commit is contained in:
@@ -140,7 +140,6 @@ WorldSession::WorldSession(uint32 id, std::string&& name, std::shared_ptr<WorldS
|
||||
|
||||
_offlineTime = 0;
|
||||
_kicked = false;
|
||||
_shouldSetOfflineInDB = true;
|
||||
|
||||
_timeSyncNextCounter = 0;
|
||||
_timeSyncTimer = 0;
|
||||
@@ -174,8 +173,7 @@ WorldSession::~WorldSession()
|
||||
while (_recvQueue.next(packet))
|
||||
delete packet;
|
||||
|
||||
if (GetShouldSetOfflineInDB())
|
||||
LoginDatabase.Execute("UPDATE account SET online = 0 WHERE id = {};", GetAccountId()); // One-time query
|
||||
LoginDatabase.Execute("UPDATE account SET online = 0 WHERE id = {};", GetAccountId()); // One-time query
|
||||
}
|
||||
|
||||
std::string const& WorldSession::GetPlayerName() const
|
||||
@@ -332,7 +330,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
//! the client to be in world yet. We will re-add the packets to the bottom of the queue and process them later.
|
||||
if (!m_playerRecentlyLogout)
|
||||
{
|
||||
// requeuePackets.push_back(packet);
|
||||
requeuePackets.push_back(packet);
|
||||
deletePacket = false;
|
||||
|
||||
LOG_DEBUG("network", "Re-enqueueing packet with opcode {} with with status STATUS_LOGGEDIN. "
|
||||
@@ -517,7 +515,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
|
||||
if (!m_Socket)
|
||||
{
|
||||
return false;
|
||||
return false; //Will remove this session from the world session map
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user