Per feedback from @khionupull/877/head
| @@ -5,6 +5,7 @@ | |||||
| internal GameParty() { } | internal GameParty() { } | ||||
| public string Id { get; internal set; } | public string Id { get; internal set; } | ||||
| public int[] Size { get; internal set; } | |||||
| public int Members { get; internal set; } | |||||
| public int Capacity { get; internal set; } | |||||
| } | } | ||||
| } | } | ||||
| @@ -56,10 +56,18 @@ | |||||
| public static GameParty ToEntity(this API.GameParty model) | public static GameParty ToEntity(this API.GameParty model) | ||||
| { | { | ||||
| // Discord will probably send bad data since they don't validate anything | |||||
| int current = 0, cap = 0; | |||||
| if (model.Size.Length == 2) | |||||
| { | |||||
| current = model.Size[0]; | |||||
| cap = model.Size[1]; | |||||
| } | |||||
| return new GameParty | return new GameParty | ||||
| { | { | ||||
| Id = model.Id, | Id = model.Id, | ||||
| Size = model.Size | |||||
| Members = current, | |||||
| Capacity = cap, | |||||
| }; | }; | ||||
| } | } | ||||