Core/Misc: Minor formatting fixes

This commit is contained in:
Shauren
2026-08-18 00:05:41 +02:00
parent 44f04a4da2
commit ec4d54360d
6 changed files with 42 additions and 31 deletions
@@ -235,9 +235,9 @@ namespace WorldPackets
struct ClassUnlock
{
int8 ClassID = 0;
bool HasUnlockedAchievement = false;
uint32 AchievementID = 0;
int8 ClassID = 0;
bool HasUnlockedAchievement = false;
uint32 AchievementID = 0;
};
struct RaceUnlock
@@ -75,17 +75,31 @@ ByteBuffer& operator<<(ByteBuffer& data, InspectItemData const& itemData)
return data;
}
ByteBuffer& operator<<(ByteBuffer& data, CharDisplayInfo const& displayInfo)
{
data << SizedString::BitsSize<6>(displayInfo.Name);
data << uint8(displayInfo.GenderID);
data << uint8(displayInfo.Race);
data << uint8(displayInfo.ClassID);
data << Size<uint32>(displayInfo.Customizations);
data << SizedString::Data(displayInfo.Name);
for (Character::ChrCustomizationChoice const& customization : displayInfo.Customizations)
data << customization;
return data;
}
void PlayerModelDisplayInfo::Initialize(Player const* player)
{
GUID = player->GetGUID();
SpecializationID = AsUnderlyingType(player->GetPrimarySpecialization());
Name = player->GetName();
GenderID = player->GetNativeGender();
Race = player->GetRace();
ClassID = player->GetClass();
DisplayInfo.Name = player->GetName();
DisplayInfo.GenderID = player->GetNativeGender();
DisplayInfo.Race = player->GetRace();
DisplayInfo.ClassID = player->GetClass();
for (UF::ChrCustomizationChoice const& customization : player->m_playerData->Customizations)
Customizations.push_back(customization);
DisplayInfo.Customizations.push_back(customization);
for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
if (::Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i))
@@ -97,15 +111,7 @@ ByteBuffer& operator<<(ByteBuffer& data, PlayerModelDisplayInfo const& displayIn
data << displayInfo.GUID;
data << int32(displayInfo.SpecializationID);
data << Size<uint32>(displayInfo.Items);
data << SizedString::BitsSize<6>(displayInfo.Name);
data << uint8(displayInfo.GenderID);
data << uint8(displayInfo.Race);
data << uint8(displayInfo.ClassID);
data << Size<uint32>(displayInfo.Customizations);
data << SizedString::Data(displayInfo.Name);
for (Character::ChrCustomizationChoice const& customization : displayInfo.Customizations)
data << customization;
data << displayInfo.DisplayInfo;
for (InspectItemData const& item : displayInfo.Items)
data << item;
@@ -75,16 +75,21 @@ namespace WorldPackets
std::vector<AzeriteEssenceData> AzeriteEssences;
};
struct PlayerModelDisplayInfo
struct CharDisplayInfo
{
ObjectGuid GUID;
std::vector<InspectItemData> Items;
std::string Name;
int32 SpecializationID = 0;
uint8 GenderID = GENDER_NONE;
uint8 Race = RACE_NONE;
uint8 ClassID = CLASS_NONE;
std::vector<Character::ChrCustomizationChoice> Customizations;
};
struct PlayerModelDisplayInfo
{
ObjectGuid GUID;
int32 SpecializationID = 0;
CharDisplayInfo DisplayInfo;
std::vector<InspectItemData> Items;
void Initialize(Player const* player);
};
@@ -79,8 +79,8 @@ WorldPacket const* PartyInvite::Write()
_worldPacket << SizedString::Data(InviterName);
for (uint32 LfgSlot : LfgSlots)
_worldPacket << LfgSlot;
for (uint32 lfgSlot : LfgSlots)
_worldPacket << lfgSlot;
return &_worldPacket;
}
@@ -459,11 +459,11 @@ namespace WorldPackets
std::string_view LogDescription;
std::string_view DescriptionText;
std::vector<ConditionalQuestText> ConditionalDescriptionText;
bool DisplayPopup = false;
bool StartCheat = false;
bool AutoLaunched = false;
bool FromContentPush = false;
bool ResetByScheduler = false;
bool StartCheat = false;
bool DisplayPopup = false;
};
struct QuestObjectiveCollect
@@ -171,20 +171,20 @@ namespace WorldPackets
bool LfgRequireAuthenticatorEnabled = false;
bool ScriptsDisallowedForBeta = false;
bool TimerunningEnabled = false;
bool PlayerIdentityOptionsEnabled = false; // classic only
bool PlayerIdentityOptionsEnabled = false; // classic only
bool IsPlayerContentTrackingEnabled = false;
bool LfdEnabled = false;
bool LfrEnabled = true; // classic only
bool PetHappinessEnabled = true; // classic only
bool LfdEnabled = false;
bool LfrEnabled = true; // classic only
bool PetHappinessEnabled = true; // classic only
bool GuildEventsEditsEnabled = true;
bool GuildTradeSkillsEnabled = true;
bool IsAccountCurrencyTransferEnabled = false;
bool NetEaseChatTelemetryEnabled = false;
bool LobbyMatchmakerQueueFromMainlineEnabled = false;
bool CanSendLobbyMatchmakerPartyCustomizations = false;
bool AddonProfilingEnabled = false;
bool AddonProfilingEnabled = false;
bool GlobalUserGeneratedContentMuteEnabled = false;
bool AccountUserGeneratedContentIsRisky = false;
bool AccountUserGeneratedContentIsRisky = false;
SocialQueueConfig QuickJoinConfig;
SquelchInfo Squelch;