From 4301b198362d48e009a0f80e15a75a9aa2433c4a Mon Sep 17 00:00:00 2001 From: Timo Schwarzer Date: Sat, 25 Nov 2023 13:22:32 +0100 Subject: [PATCH] Fix Opher closing after buying (also fixes black market keystone crash) --- projects/Randomizer/game/shops/opher.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/projects/Randomizer/game/shops/opher.cpp b/projects/Randomizer/game/shops/opher.cpp index 65f709765f4..24d7b12ac9f 100644 --- a/projects/Randomizer/game/shops/opher.cpp +++ b/projects/Randomizer/game/shops/opher.cpp @@ -61,10 +61,13 @@ namespace { ); SpellUIExperience::Spend(ui_experience, WeaponmasterItem::GetCostForLevel(this_ptr, level)); - if (!Moon::ConditionUberState::EvaluateConditions(this_ptr->fields.Upgrade->fields.DiscountCondition)) { - context->ForceHideScreenOnPurchase = true; - context->Result = app::PurchaseResult__Enum::UsedUpDiscount; - } + // TODO: Make uber states for context->ForceHideScreenOnPurchase to be able to hide the screen after purchase via headers + // The commented code below is vanilla behavior and not suitable for rando. + // + // if (this_ptr->fields.Upgrade->fields.DiscountCondition != nullptr && !Moon::ConditionUberState::EvaluateConditions(this_ptr->fields.Upgrade->fields.DiscountCondition)) { + // context->ForceHideScreenOnPurchase = true; + // context->Result = app::PurchaseResult__Enum::UsedUpDiscount; + // } auto key = std::make_pair( this_ptr->fields.Upgrade->fields.AcquiredAbilityType,