Core/DBLayer: Use correct Get method in some DB fields

This commit is contained in:
Subv
2012-03-25 12:59:18 -05:00
parent 71c02fb54d
commit 19747fb95e
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -1911,7 +1911,7 @@ bool Player::BuildEnumData(PreparedQueryResult result, WorldPacket* data)
uint32 charFlags = 0;
uint32 playerFlags = fields[14].GetUInt32();
uint32 atLoginFlags = fields[15].GetUInt32();
uint32 atLoginFlags = fields[15].GetUInt16();
if (playerFlags & PLAYER_FLAGS_HIDE_HELM)
charFlags |= CHARACTER_FLAG_HIDE_HELM;
if (playerFlags & PLAYER_FLAGS_HIDE_CLOAK)
@@ -16759,12 +16759,12 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
InitPrimaryProfessions(); // to max set before any spell loaded
// init saved position, and fix it later if problematic
uint32 transGUID = uint32(fields[30].GetUInt64()); // field type is uint64 but lowguid is saved
uint32 transGUID = fields[30].GetUInt32();
Relocate(fields[12].GetFloat(), fields[13].GetFloat(), fields[14].GetFloat(), fields[16].GetFloat());
uint32 mapId = fields[15].GetUInt16();
uint32 instanceId = fields[58].GetUInt8();
uint32 dungeonDiff = fields[38].GetUInt32() & 0x0F;
uint32 dungeonDiff = fields[38].GetUInt8() & 0x0F;
if (dungeonDiff >= MAX_DUNGEON_DIFFICULTY)
dungeonDiff = DUNGEON_DIFFICULTY_NORMAL;
uint32 raidDiff = (fields[38].GetUInt8() >> 4) & 0x0F;
@@ -17257,7 +17257,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
}
// RaF stuff.
m_grantableLevels = fields[66].GetUInt32();
m_grantableLevels = fields[66].GetUInt8();
if (GetSession()->IsARecruiter() || (GetSession()->GetRecruiterId() != 0))
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_REFER_A_FRIEND);
@@ -24712,7 +24712,7 @@ void Player::_LoadTalents(PreparedQueryResult result)
if (result)
{
do
AddTalent((*result)[0].GetUInt32(), (*result)[1].GetUInt32(), false);
AddTalent((*result)[0].GetUInt32(), (*result)[1].GetUInt8(), false);
while (result->NextRow());
}
}
@@ -321,7 +321,7 @@ void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket* packet)
}
}
PlayerSocial *SocialMgr::LoadFromDB(PreparedQueryResult result, uint32 guid)
PlayerSocial* SocialMgr::LoadFromDB(PreparedQueryResult result, uint32 guid)
{
PlayerSocial *social = &m_socialMap[guid];
social->SetPlayerGUID(guid);
@@ -338,7 +338,7 @@ PlayerSocial *SocialMgr::LoadFromDB(PreparedQueryResult result, uint32 guid)
Field* fields = result->Fetch();
friend_guid = fields[0].GetUInt32();
flags = fields[1].GetUInt32();
flags = fields[1].GetUInt8();
note = fields[2].GetString();
social->m_playerSocialMap[friend_guid] = FriendInfo(flags, note);