Dubious IL edit change

This commit is contained in:
IbanPlay authored and Cameron Ewell committed 2022-03-09 00:02:13 -05:00
1 parent 60a38d058a
commit a5d074e532
1 file changed
+1 -1
+1 -1
View File
@@ -109,7 +109,7 @@ namespace CalamityMod.ILEditing
cursor.EmitDelegate<Func<Player, int>>((Player p) =>
{
CalamityPlayer mp = p.Calamity();
return mp.disableAllDodges ? 1 : mp.dodgeCooldownTimer;
return mp.disableAllDodges ? 1 : p.Calamity().Cooldowns.ContainsType(typeof(GlobalDodgeCooldown)) ? p.Calamity().Cooldowns.Find(cooldown => cooldown.GetType() == typeof(GlobalDodgeCooldown)).TimeLeft : 0;
});
// Bitwise OR the "RNG result" (always zero) with the dodge cooldown. This will only return zero if both values were zero.