Cosmetic: PLAYER__FIELD_KNOWN_TITLES --> PLAYER_FIELD_KNOWN_TITLES
This commit is contained in:
@@ -628,7 +628,6 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, PreparedQ
|
||||
if (AchievementReward const* reward = sAchievementMgr->GetAchievementReward(achievement))
|
||||
if (uint32 titleId = reward->titleId[Player::TeamForRace(GetPlayer()->getRace()) == ALLIANCE ? 0 : 1])
|
||||
if (CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(titleId))
|
||||
if (!GetPlayer()->HasTitle(titleEntry))
|
||||
GetPlayer()->SetTitle(titleEntry);
|
||||
|
||||
} while (achievementResult->NextRow());
|
||||
|
||||
@@ -645,7 +645,7 @@ struct CharTitlesEntry
|
||||
// 18 string flag, unused
|
||||
//char* name2[16]; // 19-34, unused
|
||||
// 35 string flag, unused
|
||||
uint32 bit_index; // 36 used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER__FIELD_KNOWN_TITLES
|
||||
uint32 bit_index; // 36 used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER_FIELD_KNOWN_TITLES
|
||||
};
|
||||
|
||||
struct ChatChannelsEntry
|
||||
|
||||
@@ -787,12 +787,12 @@ uint32 UnitUpdateFieldFlags[PLAYER_END] =
|
||||
UF_FLAG_PRIVATE, // PLAYER_FIELD_CURRENCYTOKEN_SLOT_1+63
|
||||
UF_FLAG_PRIVATE, // PLAYER_FARSIGHT
|
||||
UF_FLAG_PRIVATE, // PLAYER_FARSIGHT+1
|
||||
UF_FLAG_PRIVATE, // PLAYER__FIELD_KNOWN_TITLES
|
||||
UF_FLAG_PRIVATE, // PLAYER__FIELD_KNOWN_TITLES+1
|
||||
UF_FLAG_PRIVATE, // PLAYER__FIELD_KNOWN_TITLES1
|
||||
UF_FLAG_PRIVATE, // PLAYER__FIELD_KNOWN_TITLES1+1
|
||||
UF_FLAG_PRIVATE, // PLAYER__FIELD_KNOWN_TITLES2
|
||||
UF_FLAG_PRIVATE, // PLAYER__FIELD_KNOWN_TITLES2+1
|
||||
UF_FLAG_PRIVATE, // PLAYER_FIELD_KNOWN_TITLES
|
||||
UF_FLAG_PRIVATE, // PLAYER_FIELD_KNOWN_TITLES+1
|
||||
UF_FLAG_PRIVATE, // PLAYER_FIELD_KNOWN_TITLES1
|
||||
UF_FLAG_PRIVATE, // PLAYER_FIELD_KNOWN_TITLES1+1
|
||||
UF_FLAG_PRIVATE, // PLAYER_FIELD_KNOWN_TITLES2
|
||||
UF_FLAG_PRIVATE, // PLAYER_FIELD_KNOWN_TITLES2+1
|
||||
UF_FLAG_PRIVATE, // PLAYER_FIELD_KNOWN_CURRENCIES
|
||||
UF_FLAG_PRIVATE, // PLAYER_FIELD_KNOWN_CURRENCIES+1
|
||||
UF_FLAG_PRIVATE, // PLAYER_XP
|
||||
|
||||
@@ -333,9 +333,9 @@ enum EUnitFields
|
||||
PLAYER_FIELD_KEYRING_SLOT_1 = UNIT_END + 0x015C, // Size: 64, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_CURRENCYTOKEN_SLOT_1 = UNIT_END + 0x019C, // Size: 64, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FARSIGHT = UNIT_END + 0x01DC, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER__FIELD_KNOWN_TITLES = UNIT_END + 0x01DE, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER__FIELD_KNOWN_TITLES1 = UNIT_END + 0x01E0, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER__FIELD_KNOWN_TITLES2 = UNIT_END + 0x01E2, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_KNOWN_TITLES = UNIT_END + 0x01DE, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_KNOWN_TITLES1 = UNIT_END + 0x01E0, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_KNOWN_TITLES2 = UNIT_END + 0x01E2, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_FIELD_KNOWN_CURRENCIES = UNIT_END + 0x01E4, // Size: 2, Type: LONG, Flags: PRIVATE
|
||||
PLAYER_XP = UNIT_END + 0x01E6, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
PLAYER_NEXT_LEVEL_XP = UNIT_END + 0x01E7, // Size: 1, Type: INT, Flags: PRIVATE
|
||||
|
||||
@@ -995,7 +995,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
|
||||
SetUInt32Value(PLAYER_GUILD_TIMESTAMP, 0);
|
||||
|
||||
for (int i = 0; i < KNOWN_TITLES_SIZE; ++i)
|
||||
SetUInt64Value(PLAYER__FIELD_KNOWN_TITLES + i, 0); // 0=disabled
|
||||
SetUInt64Value(PLAYER_FIELD_KNOWN_TITLES + i, 0); // 0=disabled
|
||||
SetUInt32Value(PLAYER_CHOSEN_TITLE, 0);
|
||||
|
||||
SetUInt32Value(PLAYER_FIELD_KILLS, 0);
|
||||
@@ -16751,7 +16751,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
|
||||
SetUInt32Value(PLAYER_XP, fields[7].GetUInt32());
|
||||
|
||||
_LoadIntoDataField(fields[61].GetCString(), PLAYER_EXPLORED_ZONES_1, PLAYER_EXPLORED_ZONES_SIZE);
|
||||
_LoadIntoDataField(fields[64].GetCString(), PLAYER__FIELD_KNOWN_TITLES, KNOWN_TITLES_SIZE*2);
|
||||
_LoadIntoDataField(fields[64].GetCString(), PLAYER_FIELD_KNOWN_TITLES, KNOWN_TITLES_SIZE*2);
|
||||
|
||||
SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, DEFAULT_WORLD_OBJECT_SIZE);
|
||||
SetFloatValue(UNIT_FIELD_COMBATREACH, 1.5f);
|
||||
@@ -17216,8 +17216,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
|
||||
|
||||
m_social = sSocialMgr->LoadFromDB(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADSOCIALLIST), GetGUIDLow());
|
||||
|
||||
// check PLAYER_CHOSEN_TITLE compatibility with PLAYER__FIELD_KNOWN_TITLES
|
||||
// note: PLAYER__FIELD_KNOWN_TITLES updated at quest status loaded
|
||||
// check PLAYER_CHOSEN_TITLE compatibility with PLAYER_FIELD_KNOWN_TITLES
|
||||
// note: PLAYER_FIELD_KNOWN_TITLES updated at quest status loaded
|
||||
uint32 curTitle = fields[46].GetUInt32();
|
||||
if (curTitle && !HasTitle(curTitle))
|
||||
curTitle = 0;
|
||||
@@ -18713,7 +18713,7 @@ void Player::SaveToDB(bool create /*=false*/)
|
||||
|
||||
ss.str("");
|
||||
for (uint32 i = 0; i < KNOWN_TITLES_SIZE*2; ++i)
|
||||
ss << GetUInt32Value(PLAYER__FIELD_KNOWN_TITLES + i) << ' ';
|
||||
ss << GetUInt32Value(PLAYER_FIELD_KNOWN_TITLES + i) << ' ';
|
||||
|
||||
stmt->setString(index++, ss.str());
|
||||
stmt->setUInt8(index++, GetByteValue(PLAYER_FIELD_BYTES, 2));
|
||||
@@ -18824,7 +18824,7 @@ void Player::SaveToDB(bool create /*=false*/)
|
||||
|
||||
ss.str("");
|
||||
for (uint32 i = 0; i < KNOWN_TITLES_SIZE*2; ++i)
|
||||
ss << GetUInt32Value(PLAYER__FIELD_KNOWN_TITLES + i) << ' ';
|
||||
ss << GetUInt32Value(PLAYER_FIELD_KNOWN_TITLES + i) << ' ';
|
||||
|
||||
stmt->setString(index++, ss.str());
|
||||
stmt->setUInt8(index++, GetByteValue(PLAYER_FIELD_BYTES, 2));
|
||||
@@ -23619,7 +23619,7 @@ bool Player::HasTitle(uint32 bitIndex)
|
||||
|
||||
uint32 fieldIndexOffset = bitIndex / 32;
|
||||
uint32 flag = 1 << (bitIndex % 32);
|
||||
return HasFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
return HasFlag(PLAYER_FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
}
|
||||
|
||||
void Player::SetTitle(CharTitlesEntry const* title, bool lost)
|
||||
@@ -23629,17 +23629,17 @@ void Player::SetTitle(CharTitlesEntry const* title, bool lost)
|
||||
|
||||
if (lost)
|
||||
{
|
||||
if (!HasFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag))
|
||||
if (!HasFlag(PLAYER_FIELD_KNOWN_TITLES + fieldIndexOffset, flag))
|
||||
return;
|
||||
|
||||
RemoveFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
RemoveFlag(PLAYER_FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (HasFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag))
|
||||
if (HasFlag(PLAYER_FIELD_KNOWN_TITLES + fieldIndexOffset, flag))
|
||||
return;
|
||||
|
||||
SetFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
SetFlag(PLAYER_FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_TITLE_EARNED, 4 + 4);
|
||||
|
||||
@@ -402,7 +402,7 @@ enum PlayerFlags
|
||||
PLAYER_FLAGS_UNK31 = 0x80000000
|
||||
};
|
||||
|
||||
// used for PLAYER__FIELD_KNOWN_TITLES field (uint64), (1<<bit_index) without (-1)
|
||||
// used for PLAYER_FIELD_KNOWN_TITLES field (uint64), (1<<bit_index) without (-1)
|
||||
// can't use enum for uint64 values
|
||||
#define PLAYER_TITLE_DISABLED UI64LIT(0x0000000000000000)
|
||||
#define PLAYER_TITLE_NONE UI64LIT(0x0000000000000001)
|
||||
|
||||
Reference in New Issue
Block a user