Skip to content

Commit

Permalink
Data: Fix hold
Browse files Browse the repository at this point in the history
  • Loading branch information
Dituon committed Oct 28, 2023
1 parent d1d747c commit 49e41d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
14 changes: 2 additions & 12 deletions data/xmmt.dituon.petpet/hold/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,11 @@
"avatar": [
{
"type": "TO",
"pos": [
[
94,
13,
226,
132
]
],
"pos": [94, 13, 226, 132],
"avatarOnTop": false,
"angle": 9
}
],
"text": [],
"alias": [
"举牌",
"应援"
]
"alias": ["举牌", "应援"]
}
3 changes: 3 additions & 0 deletions src/main/java/moe/dituon/petpet/share/AvatarModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ private int[] JsonArrayToIntArray(JsonArray ja) {
int[] result = new int[ja.size()];
short i = 0;
for (JsonElement je : ja) {
if (je instanceof JsonArray) {
return JsonArrayToIntArray((JsonArray) je);
}
String str = ((JsonPrimitive) je).getContent();
try {
result[i] = Integer.parseInt(str);
Expand Down

0 comments on commit 49e41d8

Please sign in to comment.