diff --git a/src/main/java/emu/lunarcore/data/GameData.java b/src/main/java/emu/lunarcore/data/GameData.java index 09a61f175..8836946e2 100644 --- a/src/main/java/emu/lunarcore/data/GameData.java +++ b/src/main/java/emu/lunarcore/data/GameData.java @@ -104,14 +104,7 @@ public static Int2ObjectMap getMapForExcel(Class resourceDefinition) { } public static List getAllRelicIds() { - List allIds = new ArrayList<>(); - - for (Int2ObjectMap.Entry entry : relicExcelMap.int2ObjectEntrySet()) { - RelicExcel relicExcel = entry.getValue(); - allIds.add(relicExcel.getId()); - } - - return allIds; + return relicExcelMap.values().stream().map(RelicExcel::getId).toList(); } public static int getRelicSetFromId(int relicId) { @@ -120,6 +113,7 @@ public static int getRelicSetFromId(int relicId) { if (relicExcel == null) { return 0; } + return relicExcel.getSetId(); } diff --git a/src/main/java/emu/lunarcore/server/packet/send/PacketGetArchiveDataScRsp.java b/src/main/java/emu/lunarcore/server/packet/send/PacketGetArchiveDataScRsp.java index 897ae3e6d..dbca0207e 100644 --- a/src/main/java/emu/lunarcore/server/packet/send/PacketGetArchiveDataScRsp.java +++ b/src/main/java/emu/lunarcore/server/packet/send/PacketGetArchiveDataScRsp.java @@ -1,6 +1,9 @@ package emu.lunarcore.server.packet.send; +import java.util.stream.Collectors; + import emu.lunarcore.data.GameData; +import emu.lunarcore.data.excel.RelicExcel; import emu.lunarcore.proto.GetArchiveDataScRspOuterClass.GetArchiveDataScRsp; import emu.lunarcore.proto.MonsterArchiveOuterClass.MonsterArchive; import emu.lunarcore.proto.RelicArchiveOuterClass.RelicArchive; @@ -16,19 +19,21 @@ public PacketGetArchiveDataScRsp() { var data = GetArchiveDataScRsp.newInstance(); var archiveData = data.getMutableArchiveData(); - var allRelicSetIds = GameData.getAllRelicSetIds(); + //var allRelicSetIds = GameData.getRelicExcelMap().values().stream().map(RelicExcel::getSetId).collect(Collectors.toSet()); //for (var avatarExcel : GameData.getAvatarExcelMap().values()) { //archiveData.addArchiveAvatarIdList(avatarExcel.getAvatarID()); //} + /* for (int relicSetId : allRelicSetIds) { int setType = GameData.getTypeValueFromSetID(relicSetId); var relicSetInstance = RelicArchive.newInstance() - .setRelicId(relicSetId) + .setRelicId(relicSetId); .setSlot(setType); archiveData.addRelicList(relicSetInstance); } + */ for (var monsterExcel : GameData.getMonsterExcelMap().values()) { MonsterArchive monsterinfo = MonsterArchive.newInstance()