forked from sruon/ffxivlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuff.cs
41 lines (29 loc) · 921 Bytes
/
Buff.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Runtime.InteropServices;
namespace ffxivlib
{
public class Buff : BaseObject<Buff.BUFFINFO>
{
#region Constructor
public Buff(BUFFINFO structure, IntPtr address)
: base(structure, address)
{
Initialize();
}
#endregion
#region Properties
public short Id { get; set; }
public float TimeLeft { get; set; }
public int BuffProvider { get; set; }
#endregion
#region Unmanaged structure
[StructLayout(LayoutKind.Explicit, Pack = 1)]
public struct BUFFINFO
{
[MarshalAs(UnmanagedType.I2)] [FieldOffset(0)] public short Id;
[MarshalAs(UnmanagedType.R4)] [FieldOffset(0x4)] public float TimeLeft;
[MarshalAs(UnmanagedType.I4)] [FieldOffset(0x8)] public int BuffProvider;
};
#endregion
}
}