DP-PatMe2Mqtt/PatMe2Mqtt/PatMeProxyApi/EmoteCounter.cs
2023-05-26 15:55:33 +02:00

20 lines
751 B
C#

using Dalamud.Game.ClientState.Objects.Enums;
using PatMe2Mqtt.PatMeProxyApi;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
// This could be optimized in a thousand different ways (better dynamic methods, source-gen this class), but eh.
namespace PatMe2Mqtt.PatMeProxyApi
{
public readonly record struct EmoteCounter(PatMe PatMe, object ProxiedValue) : IPatMeProxy
{
public string descSingular => (string) PatMe.GetValue(ProxiedValue, nameof(descSingular))!;
public string descPlural => (string) PatMe.GetValue(ProxiedValue, nameof(descPlural))!;
public uint Value => (uint) PatMe.GetValue(ProxiedValue, nameof(Value))!;
}
}