diff options
Diffstat (limited to 'src/server/game/Server')
| -rw-r--r-- | src/server/game/Server/Protocol/Opcodes.h | 2 | ||||
| -rw-r--r-- | src/server/game/Server/WorldSession.cpp | 24 | ||||
| -rw-r--r-- | src/server/game/Server/WorldSession.h | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index 053029b6dac..072f2b76b9e 100644 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -89,7 +89,7 @@ enum Opcodes CMSG_BATTLEFIELD_REQUEST_SCORE_DATA = 0x0000, CMSG_BATTLEFIELD_STATUS = 0x0000, CMSG_BATTLEGROUND_PLAYER_POSITIONS = 0x0000, - CMSG_BATTLEMASTER_JOIN = 0x0000, + CMSG_BATTLEMASTER_JOIN = 0x0327, CMSG_BATTLEMASTER_JOIN_ARENA = 0x0000, CMSG_BATTLEMASTER_JOIN_RATED = 0x0000, CMSG_BATTLEMASTER_HELLO = 0x0000, diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index ff5b4c6a09b..42e9a385672 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -750,12 +750,14 @@ void WorldSession::LoadAccountData(PreparedQueryResult result, uint32 mask) void WorldSession::SetAccountData(AccountDataType type, time_t tm, std::string const& data) { - uint32 id = 0; - uint32 index = 0; if ((1 << type) & GLOBAL_CACHE_MASK) { - id = GetAccountId(); - index = CHAR_REP_ACCOUNT_DATA; + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_ACCOUNT_DATA); + stmt->setUInt32(0, GetAccountId()); + stmt->setUInt8(1, type); + stmt->setUInt32(2, uint32(tm)); + stmt->setString(3, data); + CharacterDatabase.Execute(stmt); } else { @@ -763,16 +765,14 @@ void WorldSession::SetAccountData(AccountDataType type, time_t tm, std::string c if (!m_GUIDLow) return; - id = m_GUIDLow; - index = CHAR_REP_PLAYER_ACCOUNT_DATA; + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_PLAYER_ACCOUNT_DATA); + stmt->setUInt64(0, m_GUIDLow); + stmt->setUInt8(1, type); + stmt->setUInt32(2, uint32(tm)); + stmt->setString(3, data); + CharacterDatabase.Execute(stmt); } - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(index); - stmt->setUInt32(0, id); - stmt->setUInt8 (1, type); - stmt->setUInt32(2, uint32(tm)); - stmt->setString(3, data); - CharacterDatabase.Execute(stmt); m_accountData[type].Time = tm; m_accountData[type].Data = data; diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index b1b39436d2f..8599fa1b314 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -1094,7 +1094,7 @@ class WorldSession // characters who failed on Player::BuildEnumData shouldn't login GuidSet _legitCharacters; - uint32 m_GUIDLow; // set logined or recently logout player (while m_playerRecentlyLogout set) + ObjectGuid::LowType m_GUIDLow; // set logined or recently logout player (while m_playerRecentlyLogout set) Player* _player; std::shared_ptr<WorldSocket> m_Socket; std::string m_Address; // Current Remote Address |
