|
|
|
@ -44,10 +44,12 @@ All rights reserved. |
|
|
|
|
#include <algorithm> |
|
|
|
|
#include "util.h" |
|
|
|
|
#include "AdventuresInLestoria.h" |
|
|
|
|
#include <ranges> |
|
|
|
|
|
|
|
|
|
INCLUDE_game |
|
|
|
|
INCLUDE_DATA |
|
|
|
|
|
|
|
|
|
const Pixel ItemEnchantInfo::enchantAttributeCol{0x00DFE2}; |
|
|
|
|
std::unordered_map<std::string,ItemEnchantInfo>ItemEnchantInfo::ENCHANT_LIST; |
|
|
|
|
std::unordered_map<ItemEnchantInfo::ItemEnchantCategory,ItemEnchantInfo::ItemEnchantCategoryData>ItemEnchantInfo::ENCHANT_CATEGORIES; |
|
|
|
|
|
|
|
|
@ -117,7 +119,7 @@ void ItemEnchantInfo::Initialize(){ |
|
|
|
|
const std::string wrappedConfigStr{std::vformat("{{{}}}",std::make_format_args(configName))}; |
|
|
|
|
size_t configValInd{enchantDescription.find(wrappedConfigStr)}; |
|
|
|
|
if(configValInd==std::string::npos)continue; |
|
|
|
|
std::string formattedFloat{std::format("{}",val)}; |
|
|
|
|
std::string formattedFloat{std::format("{}{}#FFFFFF",ItemEnchantInfo::enchantAttributeCol.toHTMLColorCode(),val)}; |
|
|
|
|
enchantDescription=enchantDescription.replace(configValInd,wrappedConfigStr.length(),formattedFloat); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -169,7 +171,7 @@ ItemEnchant::ItemEnchant(const std::string_view enchantName) |
|
|
|
|
const std::string wrappedConfigStr{std::vformat("{{{}}}",std::make_format_args(attr.ActualName()))}; |
|
|
|
|
size_t configValInd{description.find(wrappedConfigStr)}; |
|
|
|
|
if(configValInd==std::string::npos)continue; |
|
|
|
|
std::string formattedFloat{std::format("{}",val)}; |
|
|
|
|
std::string formattedFloat{std::format("{}{}#FFFFFF",ItemEnchantInfo::enchantAttributeCol.toHTMLColorCode(),val)}; |
|
|
|
|
description=description.replace(configValInd,wrappedConfigStr.length(),formattedFloat); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|