fix(client): add version to constructor for msgpack

This commit is contained in:
Anna 2023-10-07 04:46:08 -04:00
parent 6c3954c455
commit 3b9c6ec096
Signed by: anna
GPG Key ID: D0943384CD9F87D1
1 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ public class Plugin : IDalamudPlugin {
// shuffle so first player isn't always local player
players.Shuffle();
var update = new Update(territory, localPlayer.CurrentWorld.Id, players);
var update = new Update(2, territory, localPlayer.CurrentWorld.Id, players);
var msgpack = MessagePackSerializer.Serialize(update, MessagePackSerializerOptions.Standard);
using var mem = new MemoryStream();
@ -140,9 +140,9 @@ public class Plugin : IDalamudPlugin {
// with http headers, call it 6500 bytes/req
[Serializable]
[MessagePackObject]
public struct Update(uint territory, uint world, List<PlayerInfo> players) {
public struct Update(byte version, uint territory, uint world, List<PlayerInfo> players) {
[Key(0)]
public readonly byte Version = 2;
public readonly byte Version = version;
[Key(1)]
public readonly uint Territory = territory;