From 504004c9ec3b48a401c77c5301aff4a865d24f9c Mon Sep 17 00:00:00 2001 From: Snowy <34697265+SnowyGFL@users.noreply.github.com> Date: Sun, 12 Dec 2021 22:15:28 +0800 Subject: [PATCH] Attempted fix for Eukrasian Diagnosis --- MOAction/MOAction.cs | 11 ++++++++--- MOAction/MOAction.csproj | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/MOAction/MOAction.cs b/MOAction/MOAction.cs index 2040796..9c3f3d5 100644 --- a/MOAction/MOAction.cs +++ b/MOAction/MOAction.cs @@ -55,7 +55,6 @@ public unsafe delegate bool OnRequestActionDetour(long param_1, uint param_2, ul private readonly GetGroupTimerDelegate getGroupTimer; public List Stacks { get; set; } - private DalamudPluginInterface pluginInterface; private IEnumerable RawActions; public IntPtr fieldMOLocation; @@ -181,7 +180,7 @@ public void Dispose() private void HandleUiMoEntityId(long param1, long param2) { - //Log.Information("UI MO: {0}", param2); + PluginLog.Verbose("UI MO: {0}, {1}", param1, param2); uiMoEntityId = (IntPtr)param2; uiMoEntityIdHook.Original(param1, param2); } @@ -195,6 +194,7 @@ private bool ReqLocDetour(IntPtr actionMgr, uint type, uint id, uint targetId, r private unsafe bool HandleRequestAction(long param_1, uint actionType, ulong actionID, long param_4, uint param_5, uint param_6, int param_7, byte* param_8) { + PluginLog.Verbose("HandleRequstAction: {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}", param_1, actionType, actionID, param_4, param_5, param_6, param_7); if (actionType != 1) return requestActionHook.Original(param_1, actionType, actionID, param_4, param_5, param_6, param_7, param_8); var (action, target) = GetActionTarget((uint)actionID, actionType); void EnqueueGroundTarget() @@ -285,7 +285,12 @@ private Vector3 GetClampedGroundCoords(Vector3 self, Vector3 dest, int range) var action = RawActions.FirstOrDefault(x => x.RowId == ActionID); if (action == default) return (null, null); //var action = RawActions.First(x => x.RowId == ActionID); - var applicableActions = Stacks.Where(entry => entry.BaseAction == action); + IEnumerable applicableActions = Enumerable.Empty(); + if (ActionID == 24291) // 24291 is Eukrasian Diagnosis, somehow it gets called when you press the action early? I need an expert!!! + applicableActions = Stacks.Where(entry => entry.BaseAction.RowId == 24284); + else + applicableActions = Stacks.Where(entry => entry.BaseAction == action); + MoActionStack stackToUse = null; foreach (var entry in applicableActions) { diff --git a/MOAction/MOAction.csproj b/MOAction/MOAction.csproj index 1ab0d1e..c6fd9df 100644 --- a/MOAction/MOAction.csproj +++ b/MOAction/MOAction.csproj @@ -5,8 +5,8 @@ MOActionPlugin This plugin allows for actions to be used on mouseover targets without a macro. Copyleft attick 2021 baybeeee - 4.1.0 - 4.1.0 + 4.1.1 + 4.1.1 true bin\$(Configuration)\ Properties.bak