refactor: use old syntax
This commit is contained in:
parent
a60dfb2da3
commit
4cf6775eef
|
@ -9,7 +9,7 @@
|
|||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -140,69 +140,91 @@ public class Plugin : IDalamudPlugin {
|
|||
// with http headers, call it 6500 bytes/req
|
||||
[Serializable]
|
||||
[MessagePackObject]
|
||||
public struct Update(byte version, uint territory, uint world, List<PlayerInfo> players) {
|
||||
public struct Update {
|
||||
[Key(0)]
|
||||
public readonly byte Version = version;
|
||||
public readonly byte Version;
|
||||
|
||||
[Key(1)]
|
||||
public readonly uint Territory = territory;
|
||||
public readonly uint Territory;
|
||||
|
||||
[Key(2)]
|
||||
public readonly uint World = world;
|
||||
public readonly uint World;
|
||||
|
||||
[Key(3)]
|
||||
public readonly List<PlayerInfo> Players = players;
|
||||
public readonly List<PlayerInfo> Players;
|
||||
|
||||
public Update(byte version, uint territory, uint world, List<PlayerInfo> players) {
|
||||
this.Version = version;
|
||||
this.Territory = territory;
|
||||
this.World = world;
|
||||
this.Players = players;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
[MessagePackObject]
|
||||
public struct PlayerInfo(
|
||||
byte[] hash,
|
||||
uint world,
|
||||
float x,
|
||||
float y,
|
||||
float z,
|
||||
float w,
|
||||
byte[] customize,
|
||||
byte level,
|
||||
uint job,
|
||||
string freeCompany,
|
||||
uint currentHp,
|
||||
uint maxHp
|
||||
) {
|
||||
public struct PlayerInfo {
|
||||
[Key(0)]
|
||||
public readonly byte[] Hash = hash;
|
||||
public readonly byte[] Hash;
|
||||
|
||||
[Key(1)]
|
||||
public readonly uint World = world;
|
||||
public readonly uint World;
|
||||
|
||||
[Key(2)]
|
||||
public readonly float X = x;
|
||||
public readonly float X;
|
||||
|
||||
[Key(3)]
|
||||
public readonly float Y = y;
|
||||
public readonly float Y;
|
||||
|
||||
[Key(4)]
|
||||
public readonly float Z = z;
|
||||
public readonly float Z;
|
||||
|
||||
[Key(5)]
|
||||
public readonly float W = w;
|
||||
public readonly float W;
|
||||
|
||||
[Key(6)]
|
||||
public readonly byte[] Customize = customize;
|
||||
public readonly byte[] Customize;
|
||||
|
||||
[Key(7)]
|
||||
public readonly byte Level = level;
|
||||
public readonly byte Level;
|
||||
|
||||
[Key(8)]
|
||||
public readonly uint Job = job;
|
||||
public readonly uint Job;
|
||||
|
||||
[Key(9)]
|
||||
public readonly string FreeCompany = freeCompany;
|
||||
public readonly string FreeCompany;
|
||||
|
||||
[Key(10)]
|
||||
public readonly uint CurrentHp = currentHp;
|
||||
public readonly uint CurrentHp;
|
||||
|
||||
[Key(11)]
|
||||
public readonly uint MaxHp = maxHp;
|
||||
public readonly uint MaxHp;
|
||||
|
||||
public PlayerInfo(
|
||||
byte[] hash,
|
||||
uint world,
|
||||
float x,
|
||||
float y,
|
||||
float z,
|
||||
float w,
|
||||
byte[] customize,
|
||||
byte level,
|
||||
uint job,
|
||||
string freeCompany,
|
||||
uint currentHp,
|
||||
uint maxHp
|
||||
) {
|
||||
this.Hash = hash;
|
||||
this.World = world;
|
||||
this.X = x;
|
||||
this.Y = y;
|
||||
this.Z = z;
|
||||
this.W = w;
|
||||
this.Customize = customize;
|
||||
this.Level = level;
|
||||
this.Job = job;
|
||||
this.FreeCompany = freeCompany;
|
||||
this.CurrentHp = currentHp;
|
||||
this.MaxHp = maxHp;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue