Skip to content

Commit 62be14b

Browse files
committed
bugfix: fixed SwapCrestOnHit giving base Hunter Crest regardless of upgrades
1 parent 54c341f commit 62be14b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

SwapCrestOnHit/SwapCrestOnHit.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System;
66
using System.Collections.Generic;
77

8-
[BepInPlugin("com.chrismzz.swapcrestonhit", "Swap Crest On Hit", "1.1.0")]
8+
[BepInPlugin("com.chrismzz.swapcrestonhit", "Swap Crest On Hit", "1.1.1")]
99

1010
public class SwapCrestOnHit : BaseUnityPlugin
1111
{
@@ -36,8 +36,11 @@ private static void TakeDamagePostfix(HeroController __instance)
3636
int crestCount = ToolItemManager.GetUnlockedCrestsCount();
3737
foreach (ToolCrest crest in allCrests)
3838
{
39-
if (!crest.IsHidden && crest.IsBaseVersion && crest.IsUnlocked)
40-
availableCrests.Add(crest);
39+
if (!crest.IsHidden && crest.IsUnlocked)
40+
{
41+
if (!crest.IsUpgradedVersionUnlocked)
42+
availableCrests.Add(crest);
43+
}
4144
}
4245
bool canSwap = (crestCount > 1 && __instance.playerData.CurrentCrestID != Gameplay.CursedCrest.name && __instance.playerData.CurrentCrestID != Gameplay.CloaklessCrest.name);
4346
List<ToolCrest> crestsList = crestSanity.Value ? availableCrests : allCrests;

0 commit comments

Comments
 (0)