mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Players: Use correct size in variables
This commit is contained in:
@@ -1911,7 +1911,7 @@ bool Player::BuildEnumData(PreparedQueryResult result, WorldPacket* data)
|
||||
|
||||
uint32 charFlags = 0;
|
||||
uint32 playerFlags = fields[14].GetUInt32();
|
||||
uint32 atLoginFlags = fields[15].GetUInt16();
|
||||
uint16 atLoginFlags = fields[15].GetUInt16();
|
||||
if (playerFlags & PLAYER_FLAGS_HIDE_HELM)
|
||||
charFlags |= CHARACTER_FLAG_HIDE_HELM;
|
||||
if (playerFlags & PLAYER_FLAGS_HIDE_CLOAK)
|
||||
|
||||
@@ -61,7 +61,7 @@ bool PlayerSocial::AddToSocialList(uint32 friendGuid, bool ignore)
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 flag = SOCIAL_FLAG_FRIEND;
|
||||
uint8 flag = SOCIAL_FLAG_FRIEND;
|
||||
if (ignore)
|
||||
flag = SOCIAL_FLAG_IGNORED;
|
||||
|
||||
@@ -70,7 +70,7 @@ bool PlayerSocial::AddToSocialList(uint32 friendGuid, bool ignore)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_CHARACTER_SOCIAL_FLAGS);
|
||||
|
||||
stmt->setUInt8(0, uint8(flag));
|
||||
stmt->setUInt8(0, flag);
|
||||
stmt->setUInt32(1, GetPlayerGUID());
|
||||
stmt->setUInt32(2, friendGuid);
|
||||
|
||||
@@ -84,7 +84,7 @@ bool PlayerSocial::AddToSocialList(uint32 friendGuid, bool ignore)
|
||||
|
||||
stmt->setUInt32(0, GetPlayerGUID());
|
||||
stmt->setUInt32(1, friendGuid);
|
||||
stmt->setUInt8(2, uint8(flag));
|
||||
stmt->setUInt8(2, flag);
|
||||
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
@@ -101,7 +101,7 @@ void PlayerSocial::RemoveFromSocialList(uint32 friendGuid, bool ignore)
|
||||
if (itr == m_playerSocialMap.end()) // not exist
|
||||
return;
|
||||
|
||||
uint32 flag = SOCIAL_FLAG_FRIEND;
|
||||
uint8 flag = SOCIAL_FLAG_FRIEND;
|
||||
if (ignore)
|
||||
flag = SOCIAL_FLAG_IGNORED;
|
||||
|
||||
@@ -121,7 +121,7 @@ void PlayerSocial::RemoveFromSocialList(uint32 friendGuid, bool ignore)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_REM_CHARACTER_SOCIAL_FLAGS);
|
||||
|
||||
stmt->setUInt8(0, uint8(flag));
|
||||
stmt->setUInt8(0, flag);
|
||||
stmt->setUInt32(1, GetPlayerGUID());
|
||||
stmt->setUInt32(2, friendGuid);
|
||||
|
||||
@@ -330,7 +330,7 @@ PlayerSocial* SocialMgr::LoadFromDB(PreparedQueryResult result, uint32 guid)
|
||||
return social;
|
||||
|
||||
uint32 friend_guid = 0;
|
||||
uint32 flags = 0;
|
||||
uint8 flags = 0;
|
||||
std::string note = "";
|
||||
|
||||
do
|
||||
|
||||
@@ -48,7 +48,7 @@ enum SocialFlag
|
||||
struct FriendInfo
|
||||
{
|
||||
FriendStatus Status;
|
||||
uint32 Flags;
|
||||
uint8 Flags;
|
||||
uint32 Area;
|
||||
uint8 Level;
|
||||
uint8 Class;
|
||||
@@ -64,7 +64,7 @@ struct FriendInfo
|
||||
Note = "";
|
||||
}
|
||||
|
||||
FriendInfo(uint32 flags, const std::string& note)
|
||||
FriendInfo(uint8 flags, const std::string& note)
|
||||
{
|
||||
Status = FRIEND_STATUS_OFFLINE;
|
||||
Flags = flags;
|
||||
|
||||
Reference in New Issue
Block a user