continuity/Wonderking/Game/Data/Item/ElementalStats.cs
Timothy Schenk f5cd6c380e
Some checks failed
Build, Package and Push Images / preprocess (push) Successful in 2s
Build, Package and Push Images / build (push) Successful in 27s
Build, Package and Push Images / sonarqube (push) Has been skipped
Build, Package and Push Images / sbom-scan (push) Successful in 33s
Build, Package and Push Images / container-build (push) Failing after 1m10s
Build, Package and Push Images / container-sbom-scan (push) Has been skipped
feat: Itemdata pooling & benchmarks for storage options
2023-11-08 19:04:37 +01:00

55 lines
1.5 KiB
C#

using System.Runtime.InteropServices;
namespace Wonderking.GameData.Item;
[StructLayout(LayoutKind.Explicit, Size = 64)]
public struct ElementalStats
{
[FieldOffset(0), MarshalAs(UnmanagedType.I4)]
public int MinimumFireDamage;
[FieldOffset(4), MarshalAs(UnmanagedType.I4)]
public int MinimumWaterDamage;
[FieldOffset(8), MarshalAs(UnmanagedType.I4)]
public int MinimumDarkDamage;
[FieldOffset(12), MarshalAs(UnmanagedType.I4)]
public int MinimumHolyDamage;
[FieldOffset(16), MarshalAs(UnmanagedType.I4)]
public int MaximumFireDamage;
[FieldOffset(20), MarshalAs(UnmanagedType.I4)]
public int MaximumWaterDamage;
[FieldOffset(24), MarshalAs(UnmanagedType.I4)]
public int MaximumDarkDamage;
[FieldOffset(28), MarshalAs(UnmanagedType.I4)]
public int MaximumHolyDamage;
[FieldOffset(32), MarshalAs(UnmanagedType.U4)]
public uint ElementFire;
[FieldOffset(36), MarshalAs(UnmanagedType.U4)]
public uint ElementWater;
[FieldOffset(40), MarshalAs(UnmanagedType.U4)]
public uint ElementDark;
[FieldOffset(44), MarshalAs(UnmanagedType.U4)]
public uint ElementHoly;
[FieldOffset(48), MarshalAs(UnmanagedType.I4)]
public int FireResistance;
[FieldOffset(52), MarshalAs(UnmanagedType.I4)]
public int WaterResistance;
[FieldOffset(56), MarshalAs(UnmanagedType.I4)]
public int DarkResistance;
[FieldOffset(60), MarshalAs(UnmanagedType.I4)]
public int HolyResistance;
}