mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 06:13:40 +01:00
Update ActorTable offsets for hp/mp, add ui (display-only.. probably) status effects
This commit is contained in:
parent
8072f91f51
commit
f1b51708b4
3 changed files with 27 additions and 5 deletions
|
|
@ -42,7 +42,7 @@ namespace Dalamud.Game.ClientState.Actors.Types {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The maximum MP of this Chara.
|
/// The maximum MP of this Chara.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int MaxMp => this.actorStruct.MaxMp;
|
public int MaxMp => 10000; // Currently hardcoded because the value in actorStruct is very questionable.
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Byte array describing the visual appearance of this Chara. Indexed by <see cref="CustomizeIndex"/>.
|
/// Byte array describing the visual appearance of this Chara. Indexed by <see cref="CustomizeIndex"/>.
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,16 @@ namespace Dalamud.Game.ClientState.Structs
|
||||||
[FieldOffset(0x1868)] public int NameId;
|
[FieldOffset(0x1868)] public int NameId;
|
||||||
[FieldOffset(0x1884)] public byte CurrentWorld;
|
[FieldOffset(0x1884)] public byte CurrentWorld;
|
||||||
[FieldOffset(0x1886)] public byte HomeWorld;
|
[FieldOffset(0x1886)] public byte HomeWorld;
|
||||||
[FieldOffset(6328)] public int CurrentHp;
|
[FieldOffset(0x1898)] public int CurrentHp;
|
||||||
[FieldOffset(6332)] public int MaxHp;
|
[FieldOffset(0x189C)] public int MaxHp;
|
||||||
[FieldOffset(6336)] public int CurrentMp;
|
[FieldOffset(0x18A0)] public int CurrentMp;
|
||||||
[FieldOffset(6340)] public int MaxMp;
|
// This value is weird. It seems to change semi-randomly between 0 and 10k, definitely
|
||||||
|
// in response to mp-using events, but it doesn't often have a value and the changing seems
|
||||||
|
// somewhat arbitrary.
|
||||||
|
[FieldOffset(0x18AA)] public int MaxMp;
|
||||||
[FieldOffset(6358)] public byte ClassJob;
|
[FieldOffset(6358)] public byte ClassJob;
|
||||||
[FieldOffset(6360)] public byte Level;
|
[FieldOffset(6360)] public byte Level;
|
||||||
|
[FieldOffset(0x1958)][MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] public StatusEffect[] UIStatusEffects;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
18
Dalamud/Game/ClientState/Structs/StatusEffect.cs
Normal file
18
Dalamud/Game/ClientState/Structs/StatusEffect.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Native memory representation of a FFXIV status effect.
|
||||||
|
/// </summary>
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct StatusEffect
|
||||||
|
{
|
||||||
|
public short EffectId;
|
||||||
|
public byte StackCount;
|
||||||
|
public byte Param;
|
||||||
|
public float Duration;
|
||||||
|
public int OwnerId;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue