basic TextJoinQueryCsReq handler (not fully implemented)

This commit is contained in:
Hiro
2023-11-30 10:41:50 +02:00
parent d0c40f8349
commit 02e55301e4
6 changed files with 620 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ public class GameData {
private static Int2ObjectMap<MonsterDropExcel> monsterDropExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<MonsterExcel> monsterExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<QuestExcel> questExcelMap = new Int2ObjectLinkedOpenHashMap<>();
private static Int2ObjectMap<TextJoinExcel> textJoinExcelMap = new Int2ObjectLinkedOpenHashMap<>();
private static Int2ObjectMap<PlayerLevelExcel> playerLevelExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<ExpTypeExcel> expTypeExcelMap = new Int2ObjectOpenHashMap<>();

View File

@@ -0,0 +1,24 @@
package emu.lunarcore.data.excel;
import emu.lunarcore.data.GameResource;
import emu.lunarcore.data.ResourceType;
import emu.lunarcore.util.Utils;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import lombok.Getter;
@Getter
@ResourceType(name = {"TextJoinConfig.json"})
public class TextJoinExcel extends GameResource {
private int TextJoinID;
private int DefaultItem;
private IntArrayList TextJoinItemList;
@Override
public int getId() {
return TextJoinID;
}
public IntArrayList getTextJoinItemList() {
return TextJoinItemList;
}
}

View File

@@ -0,0 +1,17 @@
package emu.lunarcore.server.packet.recv;
import emu.lunarcore.server.game.GameSession;
import emu.lunarcore.server.packet.CmdId;
import emu.lunarcore.server.packet.Opcodes;
import emu.lunarcore.server.packet.PacketHandler;
import emu.lunarcore.server.packet.send.PacketTextJoinQueryScRsp;
@Opcodes(CmdId.TextJoinQueryCsReq)
public class HandlerTextJoinQueryCsReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] data) throws Exception {
session.send(new PacketTextJoinQueryScRsp(session.getPlayer()));
}
}

View File

@@ -0,0 +1,18 @@
package emu.lunarcore.server.packet.send;
import emu.lunarcore.game.mail.Mail;
import emu.lunarcore.game.player.Player;
import emu.lunarcore.proto.TextJoinQueryScRspOuterClass.TextJoinQueryScRsp;
import emu.lunarcore.server.packet.BasePacket;
import emu.lunarcore.server.packet.CmdId;
public class PacketTextJoinQueryScRsp extends BasePacket {
public PacketTextJoinQueryScRsp(Player player) {
super(CmdId.TextJoinQueryScRsp);
var data = TextJoinQueryScRsp.newInstance();
this.setData(data);
}
}