Core/DBLayer: Implement async transaction completion callbacks
This commit is contained in:
1 parent
882c275e65
commit
ca881f7e3f
22 files changed
+246
-141
No files matched your search
@@ -244,7 +244,7 @@ void WorldSession::SendPacket(WorldPacket const* packet, bool forced /*= false*/
|
||||
{
|
||||
if (packet->GetConnection() != CONNECTION_TYPE_INSTANCE && IsInstanceOnlyOpcode(packet->GetOpcode()))
|
||||
{
|
||||
TC_LOG_ERROR("network.opcode", "Prevented sending of instance only opcode %u with connection type %u to %s", packet->GetOpcode(), packet->GetConnection(), GetPlayerInfo().c_str());
|
||||
TC_LOG_ERROR("network.opcode", "Prevented sending of instance only opcode %u with connection type %u to %s", packet->GetOpcode(), uint32(packet->GetConnection()), GetPlayerInfo().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ void WorldSession::SendPacket(WorldPacket const* packet, bool forced /*= false*/
|
||||
|
||||
if (!m_Socket[conIdx])
|
||||
{
|
||||
TC_LOG_ERROR("network.opcode", "Prevented sending of %s to non existent socket %u to %s", GetOpcodeNameForLogging(static_cast<OpcodeServer>(packet->GetOpcode())).c_str(), conIdx, GetPlayerInfo().c_str());
|
||||
TC_LOG_ERROR("network.opcode", "Prevented sending of %s to non existent socket %u to %s", GetOpcodeNameForLogging(static_cast<OpcodeServer>(packet->GetOpcode())).c_str(), uint32(conIdx), GetPlayerInfo().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1122,7 +1122,8 @@ void WorldSession::SetPlayer(Player* player)
|
||||
|
||||
void WorldSession::ProcessQueryCallbacks()
|
||||
{
|
||||
_queryProcessor.ProcessReadyQueries();
|
||||
_queryProcessor.ProcessReadyCallbacks();
|
||||
_transactionCallbacks.ProcessReadyCallbacks();
|
||||
|
||||
if (_realmAccountLoginCallback.valid() && _realmAccountLoginCallback.wait_for(std::chrono::seconds(0)) == std::future_status::ready)
|
||||
InitializeSessionCallback(static_cast<LoginDatabaseQueryHolder*>(_realmAccountLoginCallback.get()));
|
||||
@@ -1132,6 +1133,11 @@ void WorldSession::ProcessQueryCallbacks()
|
||||
HandlePlayerLogin(reinterpret_cast<LoginQueryHolder*>(_charLoginCallback.get()));
|
||||
}
|
||||
|
||||
TransactionCallback& WorldSession::AddTransactionCallback(TransactionCallback&& callback)
|
||||
{
|
||||
return _transactionCallbacks.AddCallback(std::move(callback));
|
||||
}
|
||||
|
||||
void WorldSession::InitWarden(BigNumber* k, std::string const& os)
|
||||
{
|
||||
if (os == "Win")
|
||||
|
||||
Reference in new issue
Block a user