From 145a989a0717ba01109679a30ecfcd101a879455 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Fri, 22 Nov 2024 02:12:56 +0100 Subject: [PATCH] Use ActorControlFlags to check item use in battles --- Questionable/Controller/CombatModules/ItemUseModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Questionable/Controller/CombatModules/ItemUseModule.cs b/Questionable/Controller/CombatModules/ItemUseModule.cs index 1693edd5..56da033f 100644 --- a/Questionable/Controller/CombatModules/ItemUseModule.cs +++ b/Questionable/Controller/CombatModules/ItemUseModule.cs @@ -142,7 +142,7 @@ internal sealed class ItemUseModule : ICombatModule { BattleChara* battleChara = (BattleChara*)gameObject.Address; if (_combatData.CombatItemUse.Condition == ECombatItemUseCondition.Incapacitated) - return (*(byte*)((nint)battleChara + 0x1C68) & 0x40) != 0; + return (battleChara->ActorControlFlags & 0x40) != 0; if (_combatData.CombatItemUse.Condition == ECombatItemUseCondition.HealthPercent) return (100f * battleChara->Health / battleChara->MaxHealth) < _combatData.CombatItemUse.Value;