punish v6.8.18.0
This commit is contained in:
commit
060278c1b7
317 changed files with 554155 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
|||
using System.Text.Json.Serialization;
|
||||
using Questionable.Model.Questing.Converter;
|
||||
|
||||
namespace Questionable.Model.Questing;
|
||||
|
||||
[JsonConverter(typeof(QuestWorkConfigConverter))]
|
||||
public sealed class QuestWorkValue(byte? high, byte? low, EQuestWorkMode mode)
|
||||
{
|
||||
public byte? High { get; set; } = high;
|
||||
|
||||
public byte? Low { get; set; } = low;
|
||||
|
||||
public EQuestWorkMode Mode { get; set; } = mode;
|
||||
|
||||
public QuestWorkValue(byte value)
|
||||
: this((byte)(value >> 4), (byte)(value & 0xF), EQuestWorkMode.Bitwise)
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (High.HasValue && Low.HasValue)
|
||||
{
|
||||
return ((byte)(High << 4).Value + Low).ToString();
|
||||
}
|
||||
if (High.HasValue)
|
||||
{
|
||||
return High + "H";
|
||||
}
|
||||
if (Low.HasValue)
|
||||
{
|
||||
return Low + "L";
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue