mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
chore(Core/Player): Change player setting index type from uint8 to ui… (#22716)
This commit is contained in:
@@ -2641,8 +2641,8 @@ public:
|
||||
std::string GetPlayerName();
|
||||
|
||||
// Settings
|
||||
[[nodiscard]] PlayerSetting GetPlayerSetting(std::string const& source, uint8 index);
|
||||
void UpdatePlayerSetting(std::string const& source, uint8 index, uint32 value);
|
||||
[[nodiscard]] PlayerSetting GetPlayerSetting(std::string const& source, uint32 index);
|
||||
void UpdatePlayerSetting(std::string const& source, uint32 index, uint32 value);
|
||||
|
||||
void SendSystemMessage(std::string_view msg, bool escapeCharacters = false);
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace PlayerSettingsStore
|
||||
return result;
|
||||
}
|
||||
|
||||
void UpdateSetting(uint32 playerLowGuid, std::string const& source, uint8 index, uint32 value)
|
||||
void UpdateSetting(uint32 playerLowGuid, std::string const& source, uint32 index, uint32 value)
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_PLAYER_SETTINGS_ENABLED))
|
||||
return;
|
||||
@@ -129,7 +129,7 @@ void Player::_LoadCharacterSettings(PreparedQueryResult result)
|
||||
} while (result->NextRow());
|
||||
}
|
||||
|
||||
PlayerSetting Player::GetPlayerSetting(std::string const& source, uint8 index)
|
||||
PlayerSetting Player::GetPlayerSetting(std::string const& source, uint32 index)
|
||||
{
|
||||
auto it = m_charSettingsMap.find(source);
|
||||
if (it == m_charSettingsMap.end() || static_cast<size_t>(index) >= it->second.size())
|
||||
@@ -156,7 +156,7 @@ void Player::_SavePlayerSettings(CharacterDatabaseTransaction trans)
|
||||
}
|
||||
}
|
||||
|
||||
void Player::UpdatePlayerSetting(std::string const& source, uint8 index, uint32 value)
|
||||
void Player::UpdatePlayerSetting(std::string const& source, uint32 index, uint32 value)
|
||||
{
|
||||
auto it = m_charSettingsMap.find(source);
|
||||
size_t const requiredSize = static_cast<size_t>(index) + 1;
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace PlayerSettingsStore
|
||||
{
|
||||
// Update a single setting value for any player by GUID (works for online or offline players).
|
||||
// This reads the existing "source" row from character_settings, adjusts the index, and REPLACE's it back.
|
||||
void UpdateSetting(uint32 playerLowGuid, std::string const& source, uint8 index, uint32 value);
|
||||
void UpdateSetting(uint32 playerLowGuid, std::string const& source, uint32 index, uint32 value);
|
||||
|
||||
// Common helpers for parsing and serializing settings data
|
||||
PlayerSettingVector ParseSettingsData(std::string const& data);
|
||||
|
||||
Reference in New Issue
Block a user