diff --git a/Adventures in Lestoria/Ability.h b/Adventures in Lestoria/Ability.h index ec3a848b..f4ec85fd 100644 --- a/Adventures in Lestoria/Ability.h +++ b/Adventures in Lestoria/Ability.h @@ -56,7 +56,7 @@ struct PrecastData{ PrecastData(float castTime,float range,float size); }; -enum class AbilitySlot{ +enum class EnchantAbilitySlot{ ABILITY1, ABILITY2, ABILITY3, diff --git a/Adventures in Lestoria/CharacterMenuWindow.cpp b/Adventures in Lestoria/CharacterMenuWindow.cpp index 997bc652..8dd20f23 100644 --- a/Adventures in Lestoria/CharacterMenuWindow.cpp +++ b/Adventures in Lestoria/CharacterMenuWindow.cpp @@ -349,11 +349,11 @@ void Menu::InitializeCharacterMenuWindow(){ #pragma region Skill Selection Boxes const std::array abilityBoxes{ - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility1(),AbilitySlot::ABILITY1}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility2(),AbilitySlot::ABILITY2}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility3(),AbilitySlot::ABILITY3}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility4(),AbilitySlot::ABILITY4}, - std::pair,AbilitySlot>{game->GetPlayer()->GetRightClickAbility(),AbilitySlot::DEFENSIVE}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility1(),EnchantAbilitySlot::ABILITY1}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility2(),EnchantAbilitySlot::ABILITY2}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility3(),EnchantAbilitySlot::ABILITY3}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility4(),EnchantAbilitySlot::ABILITY4}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetRightClickAbility(),EnchantAbilitySlot::DEFENSIVE}, }; for(size_t i{0};auto&[ability,slot]:abilityBoxes){ float x=8; @@ -401,11 +401,11 @@ void Menu::InitializeCharacterMenuWindow(){ else slot->Disable(); } const std::array abilityBoxes{ - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility1(),AbilitySlot::ABILITY1}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility2(),AbilitySlot::ABILITY2}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility3(),AbilitySlot::ABILITY3}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility4(),AbilitySlot::ABILITY4}, - std::pair,AbilitySlot>{game->GetPlayer()->GetRightClickAbility(),AbilitySlot::DEFENSIVE}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility1(),EnchantAbilitySlot::ABILITY1}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility2(),EnchantAbilitySlot::ABILITY2}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility3(),EnchantAbilitySlot::ABILITY3}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility4(),EnchantAbilitySlot::ABILITY4}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetRightClickAbility(),EnchantAbilitySlot::DEFENSIVE}, }; for(int i=0;i(CHARACTER_MENU,"Character Rotating Display")->SetIcon(GFX[classutils::GetClassInfo(game->GetPlayer()->GetClassName()).classFullImgName].Decal()); Component(CHARACTER_MENU,"Equip Selection Select Button")->Click(); std::array abilityBoxes{ - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility1(),AbilitySlot::ABILITY1}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility2(),AbilitySlot::ABILITY2}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility3(),AbilitySlot::ABILITY3}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility4(),AbilitySlot::ABILITY4}, - std::pair,AbilitySlot>{game->GetPlayer()->GetRightClickAbility(),AbilitySlot::DEFENSIVE}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility1(),EnchantAbilitySlot::ABILITY1}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility2(),EnchantAbilitySlot::ABILITY2}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility3(),EnchantAbilitySlot::ABILITY3}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility4(),EnchantAbilitySlot::ABILITY4}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetRightClickAbility(),EnchantAbilitySlot::DEFENSIVE}, }; for(size_t i{0};auto&[ability,slot]:abilityBoxes){ //Attempt to update icons in case the abilities have changed at some point. diff --git a/Adventures in Lestoria/ItemEnchant.cpp b/Adventures in Lestoria/ItemEnchant.cpp index 074ff31c..30b9d6d0 100644 --- a/Adventures in Lestoria/ItemEnchant.cpp +++ b/Adventures in Lestoria/ItemEnchant.cpp @@ -102,8 +102,8 @@ void ItemEnchantInfo::Initialize(){ newEnchant.category=enchantCategory; newEnchant.name=keyName; std::string enchantDescription{enchant["Description"].GetString()}; - using enum AbilitySlot; - const std::unordered_mapaffectSlots{ + using enum EnchantAbilitySlot; + const std::unordered_mapaffectSlots{ {"Auto Attack",AUTO_ATTACK}, {"Right Click Ability",RIGHT_CLICK}, {"Ability 1",ABILITY_1}, @@ -236,7 +236,7 @@ const std::string_view ItemEnchant::Description()const{ const ItemEnchantInfo::ItemEnchantCategory&ItemEnchant::Category()const{ return GetEnchantInfo().Category(); } -const std::optional&ItemEnchant::AbilitySlot()const{ +const std::optional&ItemEnchant::EnchantAbilitySlot()const{ return GetEnchantInfo().abilitySlot; } const std::unordered_map&ItemEnchantInfo::GetEnchants(){ @@ -324,7 +324,7 @@ const Pixel&ItemEnchant::DisplayCol()const{ return ItemEnchantInfo::enchantTextDisplayCol.at(Category()); } -const std::optional&ItemEnchantInfo::GetAbilitySlot()const{ +const std::optional&ItemEnchantInfo::GetAbilitySlot()const{ return abilitySlot; } diff --git a/Adventures in Lestoria/ItemEnchant.h b/Adventures in Lestoria/ItemEnchant.h index f3beebae..235b0867 100644 --- a/Adventures in Lestoria/ItemEnchant.h +++ b/Adventures in Lestoria/ItemEnchant.h @@ -56,7 +56,7 @@ public: CLASS, UNIQUE, }; - enum class AbilitySlot{ + enum class EnchantAbilitySlot{ AUTO_ATTACK, RIGHT_CLICK, ABILITY_1, @@ -84,7 +84,7 @@ public: const std::string_view Description()const; const ItemEnchantCategory&Category()const; const std::optional&GetClass()const; - const std::optional&GetAbilitySlot()const; + const std::optional&GetAbilitySlot()const; const std::optionalGetAbility()const; //Get the ability this enchant is tied to. const Pixel&DisplayCol()const; const float GetConfigValue(const std::string_view keyName)const; @@ -104,7 +104,7 @@ private: std::string name; std::string description; std::optionalabilityClass; - std::optionalabilitySlot; + std::optionalabilitySlot; ItemAttributable minStatModifiers; ItemAttributable maxStatModifiers; std::unordered_mapconfig; @@ -121,7 +121,7 @@ public: const std::string Name(ItemEnchantInfo::TextStyle style=ItemEnchantInfo::TextStyle::NORMAL)const; const std::string_view Description()const; const ItemEnchantInfo::ItemEnchantCategory&Category()const; - const std::optional&AbilitySlot()const; + const std::optional&EnchantAbilitySlot()const; const static std::vectorGetAvailableEnchants(); //Rolls a class-appropriate random enchant. const static ItemEnchant RollRandomEnchant(const std::optionalpreviousEnchant={}); diff --git a/Adventures in Lestoria/PauseMenu.cpp b/Adventures in Lestoria/PauseMenu.cpp index e2251475..cd7f7497 100644 --- a/Adventures in Lestoria/PauseMenu.cpp +++ b/Adventures in Lestoria/PauseMenu.cpp @@ -60,11 +60,11 @@ void Menu::InitializePauseWindow(){ Component(CHARACTER_MENU,"Character Rotating Display")->SetIcon(GFX[classutils::GetClassInfo(game->GetPlayer()->GetClassName()).classFullImgName].Decal()); Component(CHARACTER_MENU,"Equip Selection Select Button")->Click(); std::array abilityBoxes{ - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility1(),AbilitySlot::ABILITY1}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility2(),AbilitySlot::ABILITY2}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility3(),AbilitySlot::ABILITY3}, - std::pair,AbilitySlot>{game->GetPlayer()->GetAbility4(),AbilitySlot::ABILITY4}, - std::pair,AbilitySlot>{game->GetPlayer()->GetRightClickAbility(),AbilitySlot::DEFENSIVE}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility1(),EnchantAbilitySlot::ABILITY1}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility2(),EnchantAbilitySlot::ABILITY2}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility3(),EnchantAbilitySlot::ABILITY3}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetAbility4(),EnchantAbilitySlot::ABILITY4}, + std::pair,EnchantAbilitySlot>{game->GetPlayer()->GetRightClickAbility(),EnchantAbilitySlot::DEFENSIVE}, }; for(size_t i{0};auto&[ability,slot]:abilityBoxes){ //Attempt to update icons in case the abilities have changed at some point. diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index df308dae..c0928984 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -2328,8 +2328,8 @@ const std::unordered_set&Player::GetEnchants()const{ return enchantList; } -const Ability&Player::GetAbility(AbilitySlot slot){ - using enum AbilitySlot; +const Ability&Player::GetAbility(EnchantAbilitySlot slot){ + using enum EnchantAbilitySlot; switch(slot){ case ABILITY1:return GetAbility1(); case ABILITY2:return GetAbility2(); diff --git a/Adventures in Lestoria/Player.h b/Adventures in Lestoria/Player.h index e58d4b44..fa57887f 100644 --- a/Adventures in Lestoria/Player.h +++ b/Adventures in Lestoria/Player.h @@ -230,7 +230,7 @@ public: virtual Ability&GetAbility2()=0; virtual Ability&GetAbility3()=0; virtual Ability&GetAbility4()=0; - const Ability&GetAbility(AbilitySlot slot); + const Ability&GetAbility(EnchantAbilitySlot slot); virtual void SetAbility4(const Ability&originalAbility)=0; //NOTE: Make sure to provide the original ability and not a current ability! virtual std::string&GetWalkNAnimation()=0; virtual std::string&GetWalkEAnimation()=0; diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 60942500..254aac6f 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 3 #define VERSION_PATCH 0 -#define VERSION_BUILD 12245 +#define VERSION_BUILD 12246 #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 c7b5b9fe..3da33029 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ