From e9e8cb4232e3ebb9827b3adc53926fba7df689d1 Mon Sep 17 00:00:00 2001 From: doombubbles Date: Thu, 11 Apr 2024 10:20:56 -0700 Subject: [PATCH] Fix for v42.1 --- BloonsTD6 Mod Helper/LATEST.md | 10 +--------- BloonsTD6 Mod Helper/ModHelper.cs | 2 +- .../UI/HeroUpgradeDetails_OnUpgradePanelScroll.cs | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/BloonsTD6 Mod Helper/LATEST.md b/BloonsTD6 Mod Helper/LATEST.md index 1b5f28533..ed17a1736 100644 --- a/BloonsTD6 Mod Helper/LATEST.md +++ b/BloonsTD6 Mod Helper/LATEST.md @@ -1,9 +1 @@ -- Fixes for BTD6 v42.0 - -This Mod Helper update will not be able to be made via the in game Mod Browser. - -### Note for Modders - -A large number of mods will need to be updated for this patch, as the namespace -for `SpriteReference`, `PrefabReference`, and `AudioSourceReference` has been changed from `Il2CppAssets.Scripts.Utils` -to `Il2CppNinjaKiwi.Common.ResourceUtils`. \ No newline at end of file +- Fixed a patch for BTD6 v42.1 \ No newline at end of file diff --git a/BloonsTD6 Mod Helper/ModHelper.cs b/BloonsTD6 Mod Helper/ModHelper.cs index bf6918b4d..a95717781 100644 --- a/BloonsTD6 Mod Helper/ModHelper.cs +++ b/BloonsTD6 Mod Helper/ModHelper.cs @@ -16,7 +16,7 @@ namespace BTD_Mod_Helper; public static class ModHelper { internal const string Name = "BloonsTD6 Mod Helper"; - internal const string Version = "3.1.18"; + internal const string Version = "3.1.19"; internal const string RepoOwner = "gurrenm3"; internal const string RepoName = "BTD-Mod-Helper"; internal const string Description = diff --git a/BloonsTD6 Mod Helper/Patches/UI/HeroUpgradeDetails_OnUpgradePanelScroll.cs b/BloonsTD6 Mod Helper/Patches/UI/HeroUpgradeDetails_OnUpgradePanelScroll.cs index 51d27d320..1271f7a9f 100644 --- a/BloonsTD6 Mod Helper/Patches/UI/HeroUpgradeDetails_OnUpgradePanelScroll.cs +++ b/BloonsTD6 Mod Helper/Patches/UI/HeroUpgradeDetails_OnUpgradePanelScroll.cs @@ -10,7 +10,7 @@ internal static class HeroUpgradeDetails_OnUpgradePanelScroll private static bool Prefix(HeroUpgradeDetails __instance, ref Il2CppReferenceArray __state) { __state = __instance.heroUpgrades; - if (ModTowerHelper.ModTowerCache.TryGetValue(__instance.selectedHeroId, out var tower) && + if (ModTowerHelper.ModTowerCache.TryGetValue(__instance.SelectedHeroId, out var tower) && tower is ModHero {MaxLevel: < 20} hero) { __instance.heroUpgrades = __instance.heroUpgrades.Take(hero.MaxLevel).ToIl2CppReferenceArray();