muffin v7.5.0

This commit is contained in:
alydev 2026-05-01 05:17:35 +10:00
parent afafd5e377
commit a6481e7b9a
67 changed files with 4281 additions and 2372 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Runtime.CompilerServices;
using Dalamud.Game.Addon.Lifecycle;
using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
using Dalamud.Plugin.Services;
@ -222,10 +223,11 @@ public sealed class GrandCompanyShop : IDisposable
private unsafe void FireCallback(AtkUnitBase* addon, params int[] args)
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
AtkValue* ptr = stackalloc AtkValue[args.Length];
for (int i = 0; i < args.Length; i++)
{
ptr[i].Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Int;
Unsafe.Write(&ptr[i].Type, (AtkValueType)3);
ptr[i].Int = args[i];
}
addon->FireCallback((uint)args.Length, ptr);
@ -233,48 +235,64 @@ public sealed class GrandCompanyShop : IDisposable
private unsafe void FirePurchaseCallback(AtkUnitBase* addon, GrandCompanyItem item)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_011e: Unknown result type (might be due to invalid IL or missing references)
AtkValue* ptr = stackalloc AtkValue[9];
ptr->Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Int;
Unsafe.Write(&ptr->Type, (AtkValueType)3);
ptr->Int = 0;
ptr[1].Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Int;
Unsafe.Write(&ptr[1].Type, (AtkValueType)3);
ptr[1].Int = item.Index;
ptr[2].Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Int;
Unsafe.Write(&ptr[2].Type, (AtkValueType)3);
ptr[2].Int = 1;
ptr[3].Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Int;
Unsafe.Write(&ptr[3].Type, (AtkValueType)3);
ptr[3].Int = 0;
ptr[4].Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Int;
Unsafe.Write(&ptr[4].Type, (AtkValueType)3);
ptr[4].Int = 0;
ptr[5].Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Int;
Unsafe.Write(&ptr[5].Type, (AtkValueType)3);
ptr[5].Int = 0;
ptr[6].Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.UInt;
Unsafe.Write(&ptr[6].Type, (AtkValueType)5);
ptr[6].UInt = item.ItemId;
ptr[7].Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.UInt;
Unsafe.Write(&ptr[7].Type, (AtkValueType)5);
ptr[7].UInt = item.IconId;
ptr[8].Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.UInt;
Unsafe.Write(&ptr[8].Type, (AtkValueType)5);
ptr[8].UInt = item.SealCost;
addon->FireCallback(9u, ptr);
}
private unsafe static void ClickYes(AtkUnitBase* addon)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
AtkValue* ptr = stackalloc AtkValue[1];
ptr->Type = FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Int;
Unsafe.Write(&ptr->Type, (AtkValueType)3);
ptr->Int = 0;
addon->FireCallback(1u, ptr);
}
private unsafe static int GetAtkValueInt(AtkUnitBase* addon, int index)
{
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Expected I4, but got Unknown
if (addon == null || addon->AtkValues == null || index < 0 || index >= addon->AtkValuesCount)
{
return -1;
}
AtkValue atkValue = addon->AtkValues[index];
return atkValue.Type switch
AtkValueType type = atkValue.Type;
return (type - 2) switch
{
FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Int => atkValue.Int,
FFXIVClientStructs.FFXIV.Component.GUI.ValueType.UInt => (int)atkValue.UInt,
FFXIVClientStructs.FFXIV.Component.GUI.ValueType.Bool => (atkValue.Byte != 0) ? 1 : 0,
1 => atkValue.Int,
3 => (int)atkValue.UInt,
0 => (atkValue.Byte != 0) ? 1 : 0,
_ => -1,
};
}

View file

@ -91,10 +91,10 @@ public class RegularShopBase
short num = 0;
short num2 = 0;
address->GetPosition(&num, &num2);
short num3 = 0;
short num4 = 0;
address->GetSize(&num3, &num4, scaled: true);
num += num3;
ushort num3 = 0;
ushort num4 = 0;
address->GetSize(&num3, &num4, true);
num += (short)num3;
Vector2? position = _parentWindow.Position;
if (position.HasValue)
{