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

@ -258,18 +258,5 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads
return (int)scaledPos;
}
#endregion
protected override byte GetMarkerForIntegerBytes(byte[] bytes)
{
var type = bytes.Length switch
{
3 => (byte)IntegerType.Int24Special, // used because seen in incoming data
2 => (byte)IntegerType.Int16,
1 => (byte)IntegerType.None, // single bytes seem to have no prefix at all here
_ => base.GetMarkerForIntegerBytes(bytes)
};
return type;
}
}
}