diff options
| author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2020-05-30 15:43:54 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-30 17:43:54 +0200 |
| commit | 141ada19b00fb9d0dd1a260d86d97bbb709a0f5e (patch) | |
| tree | 03c8559a245f404d7d84655fe5c5066ec22e2ee7 /src/server/game/Handlers/NPCHandler.cpp | |
| parent | 00bc6e7d54e924dabaf4636a4b8084f0db067194 (diff) | |
Cherry pick some db commits (#24713)
* Core/DBLayer: Implement async transaction completion callbacks
(cherry picked from commit 0f0ca3a9194d76afa0227943e86469ad8368c5e2)
# Conflicts:
# src/server/bnetserver/REST/LoginRESTService.cpp
# src/server/bnetserver/Server/Session.cpp
# src/server/bnetserver/Server/Session.h
# src/server/database/Database/Transaction.cpp
# src/server/game/Handlers/CharacterHandler.cpp
# src/server/game/Handlers/SpellHandler.cpp
# src/server/game/Server/WorldSession.cpp
# src/server/game/Server/WorldSocket.cpp
# src/server/game/Server/WorldSocket.h
* Core/Misc: Fixed char enum packet sometimes not showing newly created character when client latency is too low
(cherry picked from commit fc9d2e728e5c21bd2a1645a29be60d0e280ad940)
# Conflicts:
# src/server/game/Handlers/CharacterHandler.cpp
* Fix no-pch build
* Core/Player: Wait for correct transaction on character creation
(cherry picked from commit 01c68b2aa2ed25ea9b4c007f238a0e958f6525b1)
# Conflicts:
# src/server/game/Entities/Player/Player.cpp
* Fix warning
* Remove unused login transaction
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Diffstat (limited to 'src/server/game/Handlers/NPCHandler.cpp')
| -rw-r--r-- | src/server/game/Handlers/NPCHandler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index 1078de17111..f25efb18b70 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -308,7 +308,7 @@ void WorldSession::SendStablePet(ObjectGuid guid) stmt->setUInt8(1, PET_SAVE_FIRST_STABLE_SLOT); stmt->setUInt8(2, PET_SAVE_LAST_STABLE_SLOT); - _queryProcessor.AddQuery(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&WorldSession::SendStablePetCallback, this, guid, std::placeholders::_1))); + _queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&WorldSession::SendStablePetCallback, this, guid, std::placeholders::_1))); } void WorldSession::SendStablePetCallback(ObjectGuid guid, PreparedQueryResult result) @@ -409,7 +409,7 @@ void WorldSession::HandleStablePet(WorldPacket& recvData) stmt->setUInt8(1, PET_SAVE_FIRST_STABLE_SLOT); stmt->setUInt8(2, PET_SAVE_LAST_STABLE_SLOT); - _queryProcessor.AddQuery(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&WorldSession::HandleStablePetCallback, this, std::placeholders::_1))); + _queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&WorldSession::HandleStablePetCallback, this, std::placeholders::_1))); } void WorldSession::HandleStablePetCallback(PreparedQueryResult result) @@ -471,7 +471,7 @@ void WorldSession::HandleUnstablePet(WorldPacket& recvData) stmt->setUInt8(2, PET_SAVE_FIRST_STABLE_SLOT); stmt->setUInt8(3, PET_SAVE_LAST_STABLE_SLOT); - _queryProcessor.AddQuery(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&WorldSession::HandleUnstablePetCallback, this, petnumber, std::placeholders::_1))); + _queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&WorldSession::HandleUnstablePetCallback, this, petnumber, std::placeholders::_1))); } void WorldSession::HandleUnstablePetCallback(uint32 petId, PreparedQueryResult result) @@ -597,7 +597,7 @@ void WorldSession::HandleStableSwapPet(WorldPacket& recvData) stmt->setUInt32(0, _player->GetGUID().GetCounter()); stmt->setUInt32(1, petId); - _queryProcessor.AddQuery(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&WorldSession::HandleStableSwapPetCallback, this, petId, std::placeholders::_1))); + _queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&WorldSession::HandleStableSwapPetCallback, this, petId, std::placeholders::_1))); } void WorldSession::HandleStableSwapPetCallback(uint32 petId, PreparedQueryResult result) |
