Fix name and description displays for abilities on hover. Release Build 12161.
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 6m51s

This commit is contained in:
sigonasr2 2025-05-09 15:46:55 -05:00
parent 1d1cb7170c
commit 62ef4d2815
3 changed files with 5 additions and 5 deletions

View File

@ -78,13 +78,13 @@ const std::string_view Ability::GetDescription()const{
const std::string Ability::GetNameWithPlayerModifiers()const{
std::string prefixName{};
std::string newName{};
std::string newName{name};
std::string suffixName{};
for(const auto&enchant:ItemEnchantInfo::GetAllEnchantsAffectingAbility(name)){
const ItemEnchantInfo::AbilityDescriptionModifiers&modifiers{enchant.get().GetModifiers()};
if(prefixName.length()>0&&modifiers.preName)prefixName+=" ";
prefixName+=modifiers.preName.value_or("");
newName=modifiers.newName.value_or(name);
if(modifiers.newName)newName=modifiers.newName.value();
if(suffixName.length()>0&&modifiers.preName)suffixName+=" ";
suffixName+=modifiers.postName.value_or("");
}
@ -93,13 +93,13 @@ const std::string Ability::GetNameWithPlayerModifiers()const{
const std::string Ability::GetDescriptionWithPlayerModifiers()const{
std::string prefixDescription{};
std::string newDescription{};
std::string newDescription{description};
std::string suffixDescription{};
for(const auto&enchant:ItemEnchantInfo::GetAllEnchantsAffectingAbility(name)){
const ItemEnchantInfo::AbilityDescriptionModifiers&modifiers{enchant.get().GetModifiers()};
if(prefixDescription.length()>0&&modifiers.preDescription)prefixDescription+=" ";
prefixDescription+=modifiers.preDescription.value_or("");
newDescription=modifiers.newDescription.value_or(description);
if(modifiers.newDescription)newDescription=*modifiers.newDescription;
if(suffixDescription.length()>0&&modifiers.preDescription)suffixDescription+=" ";
suffixDescription+=modifiers.postDescription.value_or("");
}

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 12159
#define VERSION_BUILD 12161
#define stringify(a) stringify_(a)
#define stringify_(a) #a