Fix GetLeaderboardStats and get Trunk to open regularly

This commit is contained in:
Julia Butenhoff 2022-07-20 23:22:51 -05:00
parent fe498c8fcc
commit 81c995be48
3 changed files with 14 additions and 3 deletions

View File

@ -29,6 +29,8 @@ public class ArkOneController implements TcpHandler {
public static final String IP_ADDRESS = "127.0.0.1";
private boolean firstOfflineScheduledRun = true;
@Autowired
Server server;
@ -214,6 +216,11 @@ public class ArkOneController implements TcpHandler {
for (User user : onlineUsers) {
// Make sure the user has a last ping else turn them offline
// A ping should be set on login
if (firstOfflineScheduledRun) {
user.setIsOnline(0);
userService.save(user);
continue;
}
if (user.getLastPing() == null) {
user.setIsOnline(0);
userService.save(user);
@ -229,5 +236,9 @@ public class ArkOneController implements TcpHandler {
}
}
}
if (firstOfflineScheduledRun) {
firstOfflineScheduledRun = false;
}
}
}

View File

@ -183,7 +183,7 @@ public class GalaxyPlugin {
profile.getDocumentElement().normalize();
switch(category) {
case 1:
Node gameNodes = findChildNodeByName(profile.getChildNodes(), "profile/statistics/games/game");
Node gameNodes = findChildNodeByName(profile.getChildNodes(), "profile/statistics/games");
for (int i = 0; i < gameNodes.getChildNodes().getLength(); i++) {
Element record = resp.createElement("record");
@ -195,7 +195,7 @@ public class GalaxyPlugin {
}
break;
case 2:
Node itemNodes = findChildNodeByName(profile.getChildNodes(), "profile/menu/items/item");
Node itemNodes = findChildNodeByName(profile.getChildNodes(), "profile/menu/items");
for (int i = 0; i < itemNodes.getChildNodes().getLength(); i++) {
Element record = resp.createElement("record");

View File

@ -9,7 +9,7 @@ public class TrunkPlugin {
public String GetUserAssets() {
//TODO: IMPLEMENT ME
return "<gua><items /><familiars /><moods /><jammers /></gua>";
return "<h10_0><gua></gua></h10_0>";
}
public String GetLootBalance() {