mirror of
https://github.com/Leahnaya/UBFunkeysServer.git
synced 2026-09-01 13:34:03 -05:00
Add GetLootBalance command
This commit is contained in:
@@ -2,6 +2,7 @@ package com.icedberries.UBFunkeysServer.ArkOne;
|
||||
|
||||
import com.icedberries.UBFunkeysServer.ArkOne.Plugins.BasePlugin;
|
||||
import com.icedberries.UBFunkeysServer.ArkOne.Plugins.GalaxyPlugin;
|
||||
import com.icedberries.UBFunkeysServer.ArkOne.Plugins.TrunkPlugin;
|
||||
import com.icedberries.UBFunkeysServer.ArkOne.Plugins.UserPlugin;
|
||||
import com.icedberries.UBFunkeysServer.domain.User;
|
||||
import com.icedberries.UBFunkeysServer.service.UserService;
|
||||
@@ -43,6 +44,9 @@ public class ArkOneController implements TcpHandler {
|
||||
@Autowired
|
||||
GalaxyPlugin galaxyPlugin;
|
||||
|
||||
@Autowired
|
||||
TrunkPlugin trunkPlugin;
|
||||
|
||||
@Override
|
||||
public void receiveData(Connection connection, byte[] data) {
|
||||
// Log the received request
|
||||
@@ -127,6 +131,12 @@ public class ArkOneController implements TcpHandler {
|
||||
break;
|
||||
|
||||
// Plugin 10 (Trunk)
|
||||
case "gua":
|
||||
responses.add(trunkPlugin.GetUserAssets());
|
||||
break;
|
||||
case "glb":
|
||||
responses.add(trunkPlugin.GetLootBalance());
|
||||
break;
|
||||
|
||||
// Catch Unhandled Commands
|
||||
default:
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.icedberries.UBFunkeysServer.ArkOne.Plugins;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class TrunkPlugin {
|
||||
|
||||
private final Integer LOOT_BALANCE = 2500;
|
||||
|
||||
public String GetUserAssets() {
|
||||
//TODO: IMPLEMENT ME
|
||||
return "<gua><items /><familiars /><moods /><jammers /></gua>";
|
||||
}
|
||||
|
||||
public String GetLootBalance() {
|
||||
|
||||
return "<h10_0><glb b=\"" + LOOT_BALANCE + "\" /></h10_0>";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user