muffin v7.5.1

This commit is contained in:
alydev 2026-05-01 08:59:48 +10:00
parent a6481e7b9a
commit 965a736f84
59 changed files with 4112 additions and 5059 deletions

View file

@ -1,5 +1,4 @@
using System;
using System.Runtime.CompilerServices;
using Dalamud.Game.Addon.Lifecycle;
using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
using Dalamud.Plugin.Services;
@ -223,11 +222,10 @@ 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++)
{
Unsafe.Write(&ptr[i].Type, (AtkValueType)3);
ptr[i].Type = AtkValueType.Int;
ptr[i].Int = args[i];
}
addon->FireCallback((uint)args.Length, ptr);
@ -235,64 +233,48 @@ 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];
Unsafe.Write(&ptr->Type, (AtkValueType)3);
ptr->Type = AtkValueType.Int;
ptr->Int = 0;
Unsafe.Write(&ptr[1].Type, (AtkValueType)3);
ptr[1].Type = AtkValueType.Int;
ptr[1].Int = item.Index;
Unsafe.Write(&ptr[2].Type, (AtkValueType)3);
ptr[2].Type = AtkValueType.Int;
ptr[2].Int = 1;
Unsafe.Write(&ptr[3].Type, (AtkValueType)3);
ptr[3].Type = AtkValueType.Int;
ptr[3].Int = 0;
Unsafe.Write(&ptr[4].Type, (AtkValueType)3);
ptr[4].Type = AtkValueType.Int;
ptr[4].Int = 0;
Unsafe.Write(&ptr[5].Type, (AtkValueType)3);
ptr[5].Type = AtkValueType.Int;
ptr[5].Int = 0;
Unsafe.Write(&ptr[6].Type, (AtkValueType)5);
ptr[6].Type = AtkValueType.UInt;
ptr[6].UInt = item.ItemId;
Unsafe.Write(&ptr[7].Type, (AtkValueType)5);
ptr[7].Type = AtkValueType.UInt;
ptr[7].UInt = item.IconId;
Unsafe.Write(&ptr[8].Type, (AtkValueType)5);
ptr[8].Type = AtkValueType.UInt;
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];
Unsafe.Write(&ptr->Type, (AtkValueType)3);
ptr->Type = AtkValueType.Int;
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];
AtkValueType type = atkValue.Type;
return (type - 2) switch
return atkValue.Type switch
{
1 => atkValue.Int,
3 => (int)atkValue.UInt,
0 => (atkValue.Byte != 0) ? 1 : 0,
AtkValueType.Int => atkValue.Int,
AtkValueType.UInt => (int)atkValue.UInt,
AtkValueType.Bool => (atkValue.Byte != 0) ? 1 : 0,
_ => -1,
};
}

View file

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