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; } } } }