Skip to content

Commit

Permalink
Attempted fix for Eukrasian Diagnosis
Browse files Browse the repository at this point in the history
  • Loading branch information
snorux committed Dec 12, 2021
1 parent 2a09cd8 commit 504004c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions MOAction/MOAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public unsafe delegate bool OnRequestActionDetour(long param_1, uint param_2, ul
private readonly GetGroupTimerDelegate getGroupTimer;

public List<MoActionStack> Stacks { get; set; }
private DalamudPluginInterface pluginInterface;
private IEnumerable<Lumina.Excel.GeneratedSheets.Action> RawActions;

public IntPtr fieldMOLocation;
Expand Down Expand Up @@ -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);
}
Expand All @@ -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()
Expand Down Expand Up @@ -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<MoActionStack> applicableActions = Enumerable.Empty<MoActionStack>();
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)
{
Expand Down
4 changes: 2 additions & 2 deletions MOAction/MOAction.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<Product>MOActionPlugin</Product>
<Description>This plugin allows for actions to be used on mouseover targets without a macro.</Description>
<Copyright>Copyleft attick 2021 baybeeee</Copyright>
<AssemblyVersion>4.1.0</AssemblyVersion>
<FileVersion>4.1.0</FileVersion>
<AssemblyVersion>4.1.1</AssemblyVersion>
<FileVersion>4.1.1</FileVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\$(Configuration)\</OutputPath>
<AppDesignerFolder>Properties.bak</AppDesignerFolder>
Expand Down

0 comments on commit 504004c

Please sign in to comment.