Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions FFXIVClientStructs/FFXIV/Client/Game/Network/EffectResultPacket.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using FFXIVClientStructs.FFXIV.Client.Game.Character;

namespace FFXIVClientStructs.FFXIV.Client.Game.Network;

[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 0x584)]
public partial struct EffectResultPacket {
[FieldOffset(0x00)] public byte NumEntries;
[FieldOffset(0x01)] private byte Unk1;
[FieldOffset(0x02)] private ushort Unk2;
[FieldOffset(0x04), FixedSizeArray] internal FixedSizeArray16<EffectResultEntry> _entries;
}

[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 0x58)]
public partial struct EffectResultEntry {
/// <remarks> Same as <see cref="ActionEffectHandler.EffectEntry.GlobalSequence"/>. </remarks>
[FieldOffset(0x00)] public uint GlobalSequence;
[FieldOffset(0x04)] public uint EntityId;
[FieldOffset(0x08)] public uint CurrentHP;
[FieldOffset(0x0C)] public uint MaxHP;
/// <remarks> MP/GP/CP </remarks>
[FieldOffset(0x10)] public ushort CurrentParameterValue;
/// <remarks> Same as <see cref="ActionEffectHandler.EffectEntry.TargetIndex"/>. </remarks>
[FieldOffset(0x12)] public byte TargetIndex;
[FieldOffset(0x13)] public byte ClassJob;
[FieldOffset(0x14)] public byte ShieldValue;
[FieldOffset(0x15)] public byte EffectCount;
[FieldOffset(0x16)] private ushort Unk16;
[FieldOffset(0x18), FixedSizeArray] internal FixedSizeArray4<EffectResultEffect> _effects;
}

[StructLayout(LayoutKind.Explicit, Size = 0x10)]
public struct EffectResultEffect {
[FieldOffset(0x00)] public byte StatusIndex; // passed to StatusManager.SetStatus
[FieldOffset(0x01)] private byte Unk1;
[FieldOffset(0x02)] public ushort StatusId;
[FieldOffset(0x04)] public ushort Param;
[FieldOffset(0x06)] private ushort Unk6;
[FieldOffset(0x08)] public float RemainingTime;
[FieldOffset(0x0C)] public uint SourceEntityId;
}
3 changes: 3 additions & 0 deletions FFXIVClientStructs/FFXIV/Client/Network/PacketDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public static partial void HandleActorControlPacket(
[MemberFunction("40 53 57 48 81 EC ?? ?? ?? ?? 48 8B FA 8B")]
public static partial void HandleActorCastPacket(uint entityId, ActorCastPacket* packet);

[MemberFunction("48 8B C4 44 88 40 18 89 48 08")]
public static partial void HandleEffectResultPacket(uint entityId, EffectResultPacket* packet, bool isRecorded);

[MemberFunction("E8 ?? ?? ?? ?? B0 ?? 48 8B 5C 24 ?? 48 8B 74 24 ?? 48 83 C4 ?? 5F C3 48 8B CB E8 ?? ?? ?? ?? B0 ?? 48 8B 5C 24 ?? 48 8B 74 24 ?? 48 83 C4 ?? 5F C3 48 8B CB E8 ?? ?? ?? ?? B0 ?? 48 8B 5C 24 ?? 48 8B 74 24 ?? 48 83 C4 ?? 5F C3 48 8B CB E8 ?? ?? ?? ?? B0 ?? 48 8B 5C 24 ?? 48 8B 74 24 ?? 48 83 C4 ?? 5F C3 0F B6 7B")]
public static partial void HandleMapEffectPacket(MapEffectPacket* packet);

Expand Down
Loading