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

73 lines
1.6 KiB
C#
Raw Normal View History

2024-02-07 15:40:36 +00:00
// Licensed to Timothy Schenk under 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 = 64)]
public struct ElementalStats {
2023-11-19 16:07:28 +00:00
[FieldOffset(0)]
[MarshalAs(UnmanagedType.I4)]
public int MinimumFireDamage;
2023-11-19 16:07:28 +00:00
[FieldOffset(4)]
[MarshalAs(UnmanagedType.I4)]
public int MinimumWaterDamage;
2023-11-19 16:07:28 +00:00
[FieldOffset(8)]
[MarshalAs(UnmanagedType.I4)]
public int MinimumDarkDamage;
2023-11-19 16:07:28 +00:00
[FieldOffset(12)]
[MarshalAs(UnmanagedType.I4)]
public int MinimumHolyDamage;
2023-11-19 16:07:28 +00:00
[FieldOffset(16)]
[MarshalAs(UnmanagedType.I4)]
public int MaximumFireDamage;
2023-11-19 16:07:28 +00:00
[FieldOffset(20)]
[MarshalAs(UnmanagedType.I4)]
public int MaximumWaterDamage;
2023-11-19 16:07:28 +00:00
[FieldOffset(24)]
[MarshalAs(UnmanagedType.I4)]
public int MaximumDarkDamage;
2023-11-19 16:07:28 +00:00
[FieldOffset(28)]
[MarshalAs(UnmanagedType.I4)]
public int MaximumHolyDamage;
2023-11-19 16:07:28 +00:00
[FieldOffset(32)]
[MarshalAs(UnmanagedType.U4)]
public uint ElementFire;
2023-11-19 16:07:28 +00:00
[FieldOffset(36)]
[MarshalAs(UnmanagedType.U4)]
public uint ElementWater;
2023-11-19 16:07:28 +00:00
[FieldOffset(40)]
[MarshalAs(UnmanagedType.U4)]
public uint ElementDark;
2023-11-19 16:07:28 +00:00
[FieldOffset(44)]
[MarshalAs(UnmanagedType.U4)]
public uint ElementHoly;
2023-11-19 16:07:28 +00:00
[FieldOffset(48)]
[MarshalAs(UnmanagedType.I4)]
public int FireResistance;
2023-11-19 16:07:28 +00:00
[FieldOffset(52)]
[MarshalAs(UnmanagedType.I4)]
public int WaterResistance;
2023-11-19 16:07:28 +00:00
[FieldOffset(56)]
[MarshalAs(UnmanagedType.I4)]
public int DarkResistance;
2023-11-19 16:07:28 +00:00
[FieldOffset(60)]
[MarshalAs(UnmanagedType.I4)]
public int HolyResistance;
}