continuity/Wonderking/Game/Data/Item/Stats.cs

34 lines
717 B
C#
Raw Normal View History

2023-11-21 20:37:50 +00:00
// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
2023-11-20 18:56:14 +00:00
using System.Runtime.InteropServices;
2023-11-13 20:12:12 +00:00
namespace Wonderking.Game.Data.Item;
[StructLayout(LayoutKind.Explicit, Size = 24)]
public struct Stats
{
2023-11-19 16:07:28 +00:00
[FieldOffset(0)]
[MarshalAs(UnmanagedType.I4)]
public int Strength;
2023-11-19 16:07:28 +00:00
[FieldOffset(4)]
[MarshalAs(UnmanagedType.I4)]
public int Dexterity;
2023-11-19 16:07:28 +00:00
[FieldOffset(8)]
[MarshalAs(UnmanagedType.I4)]
public int Intelligence;
2023-11-19 16:07:28 +00:00
[FieldOffset(12)]
[MarshalAs(UnmanagedType.I4)]
public int Vitality;
2023-11-19 16:07:28 +00:00
[FieldOffset(16)]
[MarshalAs(UnmanagedType.I4)]
public int Luck;
2023-11-19 16:07:28 +00:00
[FieldOffset(20)]
[MarshalAs(UnmanagedType.I4)]
public int Wisdom;
}