Fix Persisting Familiars

This commit is contained in:
Julia Butenhoff 2022-07-26 21:11:52 -05:00
parent 28ceb6a90c
commit b22c0bcefd
2 changed files with 11 additions and 4 deletions

View File

@ -153,6 +153,9 @@ public class ArkOneController implements TcpHandler {
case "gut":
responses.add(trunkPlugin.GetUserTransactions(connection));
break;
case "asp":
responses.add(trunkPlugin.AssetParam());
break;
case "bf":
responses.add(trunkPlugin.BuyFamiliar(commandInfo, connection));
break;

View File

@ -81,13 +81,12 @@ public class TrunkPlugin {
String id = child.getAttribute("id");
String p = child.getAttribute("start");
String cnt = child.getAttribute("time");
Integer c = Integer.valueOf(child.getAttribute("time"));
// cnt -> time
// c -> time (needs to be divided by 60)
// p -> start
// id -> item id
//TODO: FINISH FIXING THIS
response.append("<f id=\"" + id + "\" p=\"" + (27645298/60) + "\" c=\"" + 720 + "\" />");
response.append("<f id=\"" + id + "\" p=\"" + p + "\" c=\"" + (c / 60) + "\" />");
}
}
@ -158,6 +157,11 @@ public class TrunkPlugin {
}
}
public String AssetParam() {
// Doesn't seem to be needed so we can just respond with an empty xml tag
return "<h10_0><asp /></h10_0>";
}
public String BuyFamiliar(Element element, Connection connection) {
// Save this transaction to the DB
PostTransaction(connection, PurchaseType.FAMILIAR, element.getAttribute("id"));