diff --git a/Adventures in Lestoria/Item.cpp b/Adventures in Lestoria/Item.cpp index 382427ca..aa092ffe 100644 --- a/Adventures in Lestoria/Item.cpp +++ b/Adventures in Lestoria/Item.cpp @@ -769,7 +769,7 @@ const std::string Item::Description(CompactText compact)const{ } } if(HasEnchant()){ - description+=std::format("\n#D48EFF{}\n#E0E0E0{}#FFFFFF",GetEnchant().value().Name(),GetEnchant().value().Description()); + description+=std::format("\n{}{}\n#E0E0E0{}#FFFFFF",GetEnchant().value().DisplayCol().toHTMLColorCode(),GetEnchant().value().Name(),GetEnchant().value().Description()); } return description; } @@ -1459,6 +1459,6 @@ const bool Item::HasEnchant()const{ } const Pixel Item::GetDisplayNameColor()const{ Pixel col{WHITE}; - if(HasEnchant())col=0xD8BDFF; + if(HasEnchant())col=enchant.value().DisplayCol(); return col; } \ No newline at end of file diff --git a/Adventures in Lestoria/ItemEnchant.cpp b/Adventures in Lestoria/ItemEnchant.cpp index c5b7f20b..4944b2bf 100644 --- a/Adventures in Lestoria/ItemEnchant.cpp +++ b/Adventures in Lestoria/ItemEnchant.cpp @@ -267,4 +267,8 @@ std::map::const_iterator ItemEnchant::begin()const{ } std::map::const_iterator ItemEnchant::end()const{ return stats.end(); +} + +const Pixel&ItemEnchant::DisplayCol()const{ + return ItemEnchantInfo::GetEnchant(Name()).enchantAttributeCol; } \ No newline at end of file diff --git a/Adventures in Lestoria/ItemEnchant.h b/Adventures in Lestoria/ItemEnchant.h index af56f50a..3d922d7b 100644 --- a/Adventures in Lestoria/ItemEnchant.h +++ b/Adventures in Lestoria/ItemEnchant.h @@ -108,6 +108,7 @@ public: const float&GetAttribute(const std::string_view attr)const; std::map::const_iterator begin()const; std::map::const_iterator end()const; + const Pixel&DisplayCol()const; private: void UpdateDescription(); const ItemEnchantInfo&GetEnchantInfo()const; diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index 82575ee8..5a359f21 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -1920,8 +1920,7 @@ const bool Player::HasEnchant(const std::string_view enchantName)const{ } void Player::OnAbilityUse(const Ability&ability){ - if(ability.itemAbility)ERR(std::format("WARNING! Somehow triggered an item ability called {} in OnAbilityUse Callback function. THIS SHOULD NOT BE HAPPENING!",ability.name)); - if(ability.name==GetRightClickAbility().name)return; + if(ability.itemAbility||ability.name==GetRightClickAbility().name)return; if(HasEnchant("Wizard's Soul")){ const auto ReduceCooldown=[this,&ability](Ability&a){ if(ability.name==a.name)return; diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index d51b1421..0edd2ddf 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 3 -#define VERSION_BUILD 10729 +#define VERSION_BUILD 10737 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 212f5362..4892a060 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ