From 59ec91a84e64ce0143feb53d4f7c68deec67c328 Mon Sep 17 00:00:00 2001 From: Matt Jakubowski Date: Mon, 9 Mar 2026 12:03:48 -0500 Subject: [PATCH 1/2] CC fixes --- .../Enhancements/game-interactor/GameInteractionEffect.cpp | 6 ++++++ soh/soh/Network/CrowdControl/ShipOfHarkinian.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp index 7c762ca663f..93bbf9f8e68 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp +++ b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp @@ -133,6 +133,8 @@ void FillMagic::_Apply() { GameInteractionEffectQueryResult EmptyMagic::CanBeApplied() { if (!GameInteractor::IsSaveLoaded(true)) { return GameInteractionEffectQueryResult::TemporarilyNotPossible; + } else if (CVarGetInteger(CVAR_CHEAT("InfiniteMagic"), 0)) { + return GameInteractionEffectQueryResult::NotPossible; } else if (!gSaveContext.isMagicAcquired || gSaveContext.magic <= 0) { return GameInteractionEffectQueryResult::NotPossible; } else { @@ -147,6 +149,8 @@ void EmptyMagic::_Apply() { GameInteractionEffectQueryResult ModifyRupees::CanBeApplied() { if (!GameInteractor::IsSaveLoaded(true)) { return GameInteractionEffectQueryResult::TemporarilyNotPossible; + } else if (CVarGetInteger(CVAR_CHEAT("InfiniteMoney"), 0)) { + return GameInteractionEffectQueryResult::NotPossible; } else if ((parameters[0] < 0 && gSaveContext.rupees <= 0) || (parameters[0] > 0 && gSaveContext.rupees >= CUR_CAPACITY(UPG_WALLET))) { return GameInteractionEffectQueryResult::NotPossible; @@ -532,6 +536,8 @@ void PressRandomButton::_Apply() { GameInteractionEffectQueryResult AddOrTakeAmmo::CanBeApplied() { if (!GameInteractor::IsSaveLoaded(true)) { return GameInteractionEffectQueryResult::TemporarilyNotPossible; + } else if (parameters[1] != ITEM_BEAN && CVarGetInteger(CVAR_CHEAT("InfiniteAmmo"), 0)) { + return GameInteractionEffectQueryResult::NotPossible; } else if (!GameInteractor::CanAddOrTakeAmmo(parameters[0], parameters[1])) { return GameInteractionEffectQueryResult::NotPossible; } else { diff --git a/soh/soh/Network/CrowdControl/ShipOfHarkinian.cs b/soh/soh/Network/CrowdControl/ShipOfHarkinian.cs index 554e0d56beb..ea877180fe2 100644 --- a/soh/soh/Network/CrowdControl/ShipOfHarkinian.cs +++ b/soh/soh/Network/CrowdControl/ShipOfHarkinian.cs @@ -74,7 +74,7 @@ public ShipOfHarkinian(UserRecord player, Func response new("Refill Deku Nuts", "refill_nuts") { Category = "Give Items/Consumables", Quantity = 30, Price = 3, Description = "Only works when the player already had Deku Nuts before." }, new("Refill Bombs", "refill_bombs") { Category = "Give Items/Consumables", Quantity = 30, Price = 5, Description = "Only works when the player already has a bomb bag." }, new("Refill Slingshot Seeds", "refill_seeds") { Category = "Give Items/Consumables", Quantity = 30, Price = 1, Description = "Only works when the player already has a Slingshot." }, - new("Refill Arrows", "refill_arrows") { Category = "Give Items/Consumables", Price = 1, Description = "Only works when the player already has a bow." }, + new("Refill Arrows", "refill_arrows") { Category = "Give Items/Consumables", Quantity = 30, Price = 1, Description = "Only works when the player already has a bow." }, new("Refill Bombchus", "refill_bombchus") { Category = "Give Items/Consumables", Quantity = 30, Price = 5, Description = "Only works when the player already had Bombchus before." }, // Take Items and Consumables From 3d24152e9188b18682edacb3aa0d157225c746c9 Mon Sep 17 00:00:00 2001 From: Matt Jakubowski Date: Mon, 4 May 2026 10:47:15 -0500 Subject: [PATCH 2/2] Fix Crowd Control Wolfos using wrong spawn params (0xFF00) Crowd Control passed actor params 0 for EN_WF, so EnWf_Init treated switchFlag 0 and killed the actor when scene switch 0 was set. Match vanilla EnEncount1 Wolfos spawns: (0xFF << 8) | 0x00. --- soh/soh/Network/CrowdControl/CrowdControl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/soh/soh/Network/CrowdControl/CrowdControl.cpp b/soh/soh/Network/CrowdControl/CrowdControl.cpp index 19ac74f2768..4fe376f6ca8 100644 --- a/soh/soh/Network/CrowdControl/CrowdControl.cpp +++ b/soh/soh/Network/CrowdControl/CrowdControl.cpp @@ -268,6 +268,9 @@ CrowdControl::Effect* CrowdControl::ParseMessage(nlohmann::json dataReceived) { break; case kEffectSpawnWolfos: effect->spawnParams[0] = ACTOR_EN_WF; + // Match EnEncount1 wolfos spawner (0xFF00): high byte must be 0xFF so EnWf_Init does not treat + // switchFlag 0; Flags_GetSwitch(play, 0) is true in many scenes and would instantly kill the actor. + effect->spawnParams[1] = (0xFF << 8) | 0x00; // normal Wolfos; high byte 0xFF = no switch (vanilla encount) effect->category = kEffectCatSpawnEnemy; break; case kEffectSpawnWallmaster: