Update to support game version 1.9.0.*

This commit is contained in:
Melledy committed 2026-04-15 22:09:36 -07:00
1 parent dbd9d7693e
commit eef6572073
34 files changed
+11925 -892

No files matched your search

@@ -0,0 +1,32 @@
package emu.nebula.server.handlers;
import emu.nebula.net.NetHandler;
import emu.nebula.net.NetMsgId;
import emu.nebula.proto.Public.UI32;
import emu.nebula.net.HandlerId;
import emu.nebula.net.GameSession;
@HandlerId(NetMsgId.char_favorite_set_req)
public class HandlerCharFavoriteSetReq extends NetHandler {
@Override
public byte[] handle(GameSession session, byte[] message) throws Exception {
// Parse request
var req = UI32.parseFrom(message);
// Get character
var character = session.getPlayer().getCharacters().getCharacterById(req.getValue());
if (character == null) {
return session.encodeMsg(NetMsgId.char_favorite_set_failed_ack);
}
// Toggle favorite status
character.setFavorite(!character.isFavorite());
character.save();
// Encode and send
return session.encodeMsg(NetMsgId.char_favorite_set_succeed_ack);
}
}
@@ -0,0 +1,21 @@
package emu.nebula.server.handlers;
import emu.nebula.net.NetHandler;
import emu.nebula.net.NetMsgId;
import emu.nebula.proto.PotentialPreselectionListOuterClass.PotentialPreselectionList;
import emu.nebula.net.HandlerId;
import emu.nebula.net.GameSession;
@HandlerId(NetMsgId.potential_preselection_list_req)
public class HandlerPotentialPreselectionListReq extends NetHandler {
@Override
public byte[] handle(GameSession session, byte[] message) throws Exception {
// Create base response
var rsp = PotentialPreselectionList.newInstance();
// Encode and send
return session.encodeMsg(NetMsgId.potential_preselection_list_succeed_ack, rsp);
}
}