Skip to content

Commit d731108

Browse files
authored
Merge pull request #1177 from erdelf/dev
fix IsTargetable in Condition Action
2 parents e74d7be + c20a0a5 commit d731108

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

AutoDuty/AutoDuty.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public AutoDuty()
255255
AssemblyDirectoryInfo = AssemblyFileInfo.Directory;
256256

257257
Version =
258-
((PluginInterface.IsDev ? new Version(0,0,0, 251) :
258+
((PluginInterface.IsDev ? new Version(0,0,0, 252) :
259259
PluginInterface.IsTesting ? PluginInterface.Manifest.TestingAssemblyVersion ?? PluginInterface.Manifest.AssemblyVersion : PluginInterface.Manifest.AssemblyVersion)!).Revision;
260260

261261
if (!_configDirectory.Exists)

AutoDuty/Managers/ActionsManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ public unsafe void ConditionAction(PathAction action)
154154
IGameObject? gameObject = null;
155155
if ((gameObject = GetObjectByDataId(uint.TryParse(conditionArray[1], out uint dataId) ? dataId : 0)) != null)
156156
{
157-
var csObj = *gameObject.Struct();
157+
var csObj = gameObject.Struct();
158158
switch (conditionArray[2])
159159
{
160160
case "EventState":
161-
if (csObj.EventState == (int.TryParse(conditionArray[3], out int es) ? es : -1))
161+
if (csObj->EventState == (int.TryParse(conditionArray[3], out int es) ? es : -1))
162162
invokeAction = true;
163163
break;
164164
case "IsTargetable":
165-
if (csObj.GetIsTargetable() == (bool.TryParse(conditionArray[3], out bool it) && it))
165+
if (csObj->GetIsTargetable() == (bool.TryParse(conditionArray[3], out bool it) && it))
166166
invokeAction = true;
167167
break;
168168
}

0 commit comments

Comments
 (0)