1
0
Fork 0
forked from aly/qstbak

muffin v7.5.6

This commit is contained in:
alydev 2026-08-17 20:27:25 +10:00
parent 6266f9e6b7
commit addf2d530f
619 changed files with 264792 additions and 446022 deletions

View file

@ -0,0 +1,188 @@
using FFXIVClientStructs.FFXIV.Component.GUI;
namespace LLib.GameUI;
public static class AddonCallback
{
public unsafe static void Fire(AtkUnitBase* addon, params int[] args)
{
int num = ((addon != null) ? 1413141629 : 1413141631);
int num5 = default(int);
AtkValue* ptr = default(AtkValue*);
while (true)
{
int num2 = num;
int num3 = 1413141624;
int num4 = num2;
int num9;
switch ((num4 | num3) - (num4 & num3))
{
case 3:
num = 1413141631;
break;
case 2:
num = ((num5 < args.Length) ? 1413141625 : 1413141630);
break;
case 4:
num9 = args.Length;
goto IL_0099;
case 7:
return;
case 0:
num9 = 1;
goto IL_0099;
case 5:
num = ((args.Length == 0) ? 1413141624 : 1413141628);
break;
case 1:
{
ptr[num5].Type = AtkValueType.Int;
ptr[num5].Int = args[num5];
int num6 = num5;
num3 = 1;
num4 = num6;
int num7 = num4 ^ num3;
int num8 = num4 & num3;
num5 = num7 + (num8 + num8);
num = 1413141626;
break;
}
case 6:
{
addon->FireCallback((uint)args.Length, ptr);
return;
}
IL_0099:
ptr = stackalloc AtkValue[num9];
num5 = 0;
num = 1413141626;
break;
}
}
}
public unsafe static void FireWithUpdate(AtkUnitBase* addon, params int[] args)
{
int num = ((addon != null) ? 914584294 : 914584289);
AtkValue* ptr = default(AtkValue*);
int num8 = default(int);
while (true)
{
int num2 = num;
int num3 = 914584290;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
int num7;
switch (num5 - (num6 + num6))
{
case 4:
num = ((args.Length == 0) ? 914584293 : 914584291);
break;
case 3:
return;
case 7:
num7 = 1;
goto IL_007b;
case 5:
num = 914584289;
break;
case 0:
{
ptr[num8].Type = AtkValueType.Int;
ptr[num8].Int = args[num8];
int num9 = num8;
num3 = 1;
num4 = num9;
int num10 = num4 ^ num3;
int num11 = num4 & num3;
num8 = num10 + (num11 + num11);
num = 914584288;
break;
}
case 2:
num = ((num8 < args.Length) ? 914584290 : 914584292);
break;
case 1:
num7 = args.Length;
goto IL_007b;
case 6:
{
addon->FireCallback((uint)args.Length, ptr, close: true);
return;
}
IL_007b:
ptr = stackalloc AtkValue[num7];
num8 = 0;
num = 914584288;
break;
}
}
}
public unsafe static void ClickYes(AtkUnitBase* addon)
{
int num = ((addon != null) ? (-2035549555) : (-2035549554));
while (true)
{
int num2 = num;
int num3 = -2035549553;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 0:
goto IL_0043;
case 1:
return;
case 2:
addon->FireCallbackInt(0);
return;
}
continue;
IL_0043:
num = -2035549554;
}
}
public unsafe static bool ClickButton(AtkUnitBase* addon, AtkComponentButton* button)
{
int num = ((addon == null) ? (-1621168599) : (-1621168597));
AtkComponentNode* ownerNode = default(AtkComponentNode*);
AtkEvent* ptr = default(AtkEvent*);
while (true)
{
int num2 = num;
int num3 = -1621168595;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 7:
ownerNode = button->AtkComponentBase.OwnerNode;
num = ((ownerNode != null) ? (-1621168603) : (-1621168595));
break;
case 1:
addon->ReceiveEvent(ptr->State.EventType, (int)ptr->Param, ptr, null);
return true;
case 2:
num = (button->IsEnabled ? (-1621168598) : (-1621168599));
break;
case 5:
return false;
case 4:
return false;
case 8:
ptr = ownerNode->AtkResNode.AtkEventManager.Event;
num = ((ptr != null) ? (-1621168596) : (-1621168600));
break;
case 3:
num = -1621168597;
break;
case 0:
return false;
case 6:
num = ((button == null) ? (-1621168599) : (-1621168593));
break;
}
}
}
}

View file

@ -0,0 +1,67 @@
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
using FFXIVClientStructs.FFXIV.Component.GUI;
namespace LLib.GameUI;
public static class AgentHelper
{
public unsafe static void SendEvent(AgentInterface* agent, ulong eventId, params int[] args)
{
int num = ((agent != null) ? (-130884679) : (-130884676));
int num8 = default(int);
AtkValue* ptr = default(AtkValue*);
while (true)
{
int num2 = num;
int num3 = -130884678;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
int num7;
switch (num5 - (num6 + num6))
{
case 0:
num = -130884676;
break;
case 3:
num = ((args.Length == 0) ? (-130884674) : (-130884675));
break;
case 7:
num7 = args.Length;
goto IL_00fd;
case 5:
num = ((num8 < args.Length) ? (-130884677) : (-130884680));
break;
case 1:
{
ptr[num8].Type = AtkValueType.Int;
ptr[num8].Int = args[num8];
int num9 = num8;
num3 = 1;
num4 = num9;
int num10 = num4 ^ num3;
int num11 = num4 & num3;
num8 = num10 + (num11 + num11);
num = -130884673;
break;
}
case 4:
num7 = 1;
goto IL_00fd;
case 2:
{
AtkValue* returnValue = stackalloc AtkValue[1];
agent->ReceiveEvent(returnValue, (args.Length == 0) ? null : ptr, (uint)args.Length, eventId);
return;
}
case 6:
return;
IL_00fd:
ptr = stackalloc AtkValue[num7];
num8 = 0;
num = -130884673;
break;
}
}
}
}

View file

@ -1,5 +1,5 @@
using System;
using System.Linq;
using System.Runtime.CompilerServices;
using Dalamud.Game.NativeWrapper;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Component.GUI;
@ -13,41 +13,170 @@ public static class LAddon
public unsafe static AtkUnitBase* GetAddonById(uint id)
{
AtkUnitList* ptr = &AtkStage.Instance()->RaptureAtkUnitManager->AtkUnitManager.DepthLayerOneList;
for (int i = 0; i < 18; i++)
int num = 0;
int num2 = 2129774169;
AtkUnitBase* value = default(AtkUnitBase*);
AtkUnitList* ptr2 = default(AtkUnitList*);
int num10 = default(int);
int num7 = default(int);
while (true)
{
AtkUnitList* ptr2 = ptr + i;
foreach (int item in Enumerable.Range(0, Math.Min(ptr2->Count, ptr2->Entries.Length)))
int num3 = num2;
int num4 = 2129774174;
int num5 = num3;
switch ((num5 | num4) - (num5 & num4))
{
AtkUnitBase* value = ptr2->Entries[item].Value;
if (value != null && value->Id == id)
{
return value;
}
case 9:
num2 = 2129774169;
break;
case 5:
{
int num11 = num;
num4 = 1;
num5 = num11;
num = (num5 | num4) + (num5 & num4);
num2 = 2129774169;
break;
}
case 8:
num2 = ((value->Id != id) ? 2129774174 : 2129774175);
break;
case 7:
num2 = ((num < 18) ? 2129774170 : 2129774172);
break;
case 1:
return value;
case 4:
ptr2 = ptr + num;
num10 = _200F_202C_206F_202D_200F_202D_206D_200E_200D_206E_200B_200B_202A_202B_200F_202A_200C_200B_206C_206F_200B_202A_200E_202C_202E_206A_202D_206D_200F_200E_202C_206A_206A_206F_202D_206B_200B_200C_206C_202A_202E((int)ptr2->Count, ptr2->Entries.Length);
num7 = 0;
num2 = 2129774168;
break;
case 3:
value = ptr2->Entries[num7].Value;
num2 = ((value == null) ? 2129774174 : 2129774166);
break;
case 6:
num2 = ((num7 < num10) ? 2129774173 : 2129774171);
break;
case 0:
{
int num6 = num7;
num4 = 1;
num5 = num6;
int num8 = num5 ^ num4;
int num9 = num5 & num4;
num7 = num8 + (num9 + num9);
num2 = 2129774168;
break;
}
case 2:
return null;
}
}
return null;
}
[MethodImpl(MethodImplOptions.NoInlining)]
public unsafe static bool TryGetAddonByName<T>(this IGameGui gameGui, string addonName, out T* addonPtr) where T : unmanaged
{
ArgumentNullException.ThrowIfNull(gameGui, "gameGui");
ArgumentException.ThrowIfNullOrEmpty(addonName, "addonName");
AtkUnitBasePtr addonByName = gameGui.GetAddonByName(addonName);
if (!addonByName.IsNull)
_206F_202D_200B_200D_206C_206D_200D_202D_202B_200C_206D_206C_206E_200D_200F_206E_200B_202E_200F_206F_200E_200F_206A_202B_202C_202B_206F_206A_206C_206F_200E_202E_200F_200E_202C_202D_200F_206F_200C_206D_202E((object)gameGui, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1115223157));
_206D_200C_206B_206E_200E_202E_202B_206D_206F_202B_200D_200D_206A_202D_202E_202B_202D_206E_206F_206E_206A_202E_202C_202A_206E_200B_206B_206F_200E_202E_202A_200F_202E_206A_206E_206A_206D_206F_206B_206F_202E(addonName, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-709864046));
AtkUnitBasePtr atkUnitBasePtr = _200F_202D_202D_200E_200F_200C_200E_202D_202E_200B_202A_206B_202A_206A_206A_206F_206D_202A_206D_206C_200E_202D_202C_206A_200D_202E_202D_206E_200C_206A_206B_200F_206C_200E_202D_202C_200B_202D_200E_200F_202E(gameGui, addonName, 1);
int num = (atkUnitBasePtr.IsNull ? (-1471855993) : (-1471855994));
while (true)
{
addonPtr = (T*)addonByName.Address;
return true;
int num2 = num;
int num3 = -1471855993;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 2:
goto IL_0072;
case 0:
addonPtr = null;
return false;
case 1:
addonPtr = (T*)atkUnitBasePtr.Address;
return true;
}
continue;
IL_0072:
num = -1471855994;
}
addonPtr = null;
return false;
}
public unsafe static bool IsAddonReady(AtkUnitBase* addon)
{
if (addon->IsVisible)
int num = ((addon == null) ? 1974833566 : 1974833564);
while (true)
{
return addon->UldManager.LoadedState == AtkLoadState.Loaded;
int num2 = num;
int num3 = 1974833565;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 0:
return addon->UldManager.LoadedState == AtkLoadState.Loaded;
case 1:
num = ((!addon->IsVisible) ? 1974833566 : 1974833565);
break;
case 3:
return false;
case 2:
num = 1974833564;
break;
}
}
return false;
}
public unsafe static bool TryGetReadyAddon<T>(this IGameGui gameGui, string addonName, out T* addonPtr) where T : unmanaged
{
int num = ((!gameGui.TryGetAddonByName<T>(addonName, out addonPtr)) ? 1276632889 : 1276632891);
while (true)
{
int num2 = num;
int num3 = 1276632890;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 2:
return true;
case 1:
num = ((!IsAddonReady((AtkUnitBase*)addonPtr)) ? 1276632889 : 1276632888);
break;
case 3:
addonPtr = null;
return false;
case 0:
num = 1276632891;
break;
}
}
}
static int _200F_202C_206F_202D_200F_202D_206D_200E_200D_206E_200B_200B_202A_202B_200F_202A_200C_200B_206C_206F_200B_202A_200E_202C_202E_206A_202D_206D_200F_200E_202C_206A_206A_206F_202D_206B_200B_200C_206C_202A_202E(int P_0, int P_1)
{
return Math.Min(P_0, P_1);
}
static void _206F_202D_200B_200D_206C_206D_200D_202D_202B_200C_206D_206C_206E_200D_200F_206E_200B_202E_200F_206F_200E_200F_206A_202B_202C_202B_206F_206A_206C_206F_200E_202E_200F_200E_202C_202D_200F_206F_200C_206D_202E(object P_0, string P_1)
{
ArgumentNullException.ThrowIfNull(P_0, P_1);
}
static void _206D_200C_206B_206E_200E_202E_202B_206D_206F_202B_200D_200D_206A_202D_202E_202B_202D_206E_206F_206E_206A_202E_202C_202A_206E_200B_206B_206F_200E_202E_202A_200F_202E_206A_206E_206A_206D_206F_206B_206F_202E(string P_0, string P_1)
{
ArgumentException.ThrowIfNullOrEmpty(P_0, P_1);
}
static AtkUnitBasePtr _200F_202D_202D_200E_200F_200C_200E_202D_202E_200B_202A_206B_202A_206A_206A_206F_206D_202A_206D_206C_200E_202D_202C_206A_200D_202E_202D_206E_200C_206A_206B_200F_206C_200E_202D_202C_200B_202D_200E_200F_202E(IGameGui P_0, string P_1, int P_2)
{
return P_0.GetAddonByName(P_1, P_2);
}
}

View file

@ -1,4 +1,5 @@
using System;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Memory;
using FFXIVClientStructs.FFXIV.Component.GUI;
@ -8,14 +9,38 @@ public static class LAtkValue
{
public unsafe static string? ReadAtkString(this AtkValue atkValue)
{
if (atkValue.Type == AtkValueType.Undefined)
AtkValueType atkValueType = atkValue.Type & AtkValueType.TypeMask;
int num = ((atkValueType == AtkValueType.String) ? 1097061061 : 1097061058);
while (true)
{
return null;
int num2 = num;
int num3 = 1097061057;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 5:
num = 1097061058;
break;
case 3:
num = ((atkValueType == AtkValueType.ConstString) ? 1097061061 : 1097061057);
break;
case 4:
num = ((!atkValue.String.HasValue) ? 1097061059 : 1097061056);
break;
case 1:
return _200F_206A_206C_206F_202D_202E_200D_200B_202D_200B_200B_202E_200C_200C_200C_206B_202A_202D_206C_202B_206A_200E_200E_202B_206C_200E_206D_202E_202B_206C_200F_200F_200B_206F_202B_202E_200E_202C_206A_202A_202E(new IntPtr((byte*)atkValue.String)).WithCertainMacroCodeReplacements();
case 2:
return null;
case 0:
return null;
}
}
if (atkValue.String.HasValue)
{
return MemoryHelper.ReadSeStringNullTerminated(new IntPtr((byte*)atkValue.String)).WithCertainMacroCodeReplacements();
}
return null;
}
static SeString _200F_206A_206C_206F_202D_202E_200D_200B_202D_200B_200B_202E_200C_200C_200C_206B_202A_202D_206C_202B_206A_200E_200E_202B_206C_200E_206D_202E_202B_206C_200F_200F_200B_206F_202B_202E_200E_202C_206A_202A_202E(nint P_0)
{
return MemoryHelper.ReadSeStringNullTerminated(P_0);
}
}

View file

@ -7,10 +7,29 @@ public static class SeStringExtensions
{
public static string WithCertainMacroCodeReplacements(this SeString? str)
{
if (str == null)
int num = ((str != null) ? 678693076 : 678693077);
while (true)
{
return string.Empty;
int num2 = num;
int num3 = 678693076;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 0:
return new ReadOnlySeString(_200E_206E_206F_206E_200D_202D_206F_206C_202E_206A_202A_200F_202A_202E_202B_206A_206B_202C_200D_202E_200E_202D_200D_206C_206A_206E_200F_206D_200D_200D_202B_206D_206A_206F_202B_200C_202C_202C_206B_206F_202E(str)).WithCertainMacroCodeReplacements();
case 1:
return string.Empty;
case 2:
goto IL_0058;
}
continue;
IL_0058:
num = 678693077;
}
return new ReadOnlySeString(str.Encode()).WithCertainMacroCodeReplacements();
}
static byte[] _200E_206E_206F_206E_200D_202D_206F_206C_202E_206A_202A_200F_202A_202E_202B_206A_206B_202C_200D_202E_200E_202D_200D_206C_206A_206E_200F_206D_200D_200D_202B_206D_206A_206F_202B_200C_202C_202C_206B_206F_202E(SeString P_0)
{
return P_0.Encode();
}
}