aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-10-23 21:34:03 +0200
committerShauren <shauren.trinity@gmail.com>2014-10-23 21:34:03 +0200
commit76f1f85d8bc3f9dda2ee174f457b5f07468a7dc5 (patch)
tree887fa1af7cf4b26a2de2097c13de0e5fe3e3a0c7 /src/server/game/Server
parent2f368984094181f2aa9b1ae1c73ce182469e5037 (diff)
Core/Entities: Second part of required database changes for migrating guids to 128 bit - all fields storing lowguid must be extended to uint64
Diffstat (limited to 'src/server/game/Server')
-rw-r--r--src/server/game/Server/Protocol/Opcodes.h2
-rw-r--r--src/server/game/Server/WorldSession.cpp24
-rw-r--r--src/server/game/Server/WorldSession.h2
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