fix: improve SeString integer decoding and encoding

This commit is contained in:
Asvel 2021-04-14 07:09:37 +08:00
parent 2aacbee1c8
commit 5d611de8da
5 changed files with 32 additions and 279 deletions

View file

@ -109,15 +109,5 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads
{
this.colorKey = (ushort)GetInteger(reader);
}
protected override byte GetMarkerForIntegerBytes(byte[] bytes)
{
return bytes.Length switch
{
// a single byte of 0x01 is used to 'disable' color, and has no marker
1 => (byte)IntegerType.None,
_ => base.GetMarkerForIntegerBytes(bytes)
};
}
}
}