mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-25 09:47:28 +00:00
Merge changes from hamusuke (#2)
This commit is contained in:
parent
396f302eac
commit
f20ac13914
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -276,6 +276,9 @@ public final class GameData {
|
||||
@Getter
|
||||
private static final Int2ObjectMap<MapLayerData> mapLayerDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
@Getter
|
||||
private static final Int2ObjectMap<MapLayerFloorData> mapLayerFloorDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
@Getter
|
||||
private static final Int2ObjectMap<MapLayerGroupData> mapLayerGroupDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
|
@ -0,0 +1,31 @@
|
||||
package emu.grasscutter.data.excels.scene;
|
||||
|
||||
import emu.grasscutter.data.GameResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ResourceType(name = "MapLayerFloorExcelConfigData.json")
|
||||
@Getter
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public final class MapLayerFloorData extends GameResource {
|
||||
@Getter(onMethod_ = @Override)
|
||||
int id;
|
||||
int PJDGAAAGOPO;
|
||||
int LCGNJBLMDHA;
|
||||
long NDAGFKELEAP; // prob text map hash.
|
||||
CKNDNKLCAHC CKNDNKLCAHC;
|
||||
long BHEMLJCFHPI; // prob desc text map hash.
|
||||
|
||||
public static class CKNDNKLCAHC {
|
||||
Unk_Type type;
|
||||
List<Integer> paramList;
|
||||
|
||||
public enum Unk_Type {
|
||||
MAP_FLOOR_NAME_CHANGE_QUEST
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package emu.grasscutter.server.packet.recv;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.net.packet.Opcodes;
|
||||
import emu.grasscutter.net.packet.PacketHandler;
|
||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||
import emu.grasscutter.net.proto.BMODMHEPOFFOuterClass;
|
||||
import emu.grasscutter.server.game.GameSession;
|
||||
|
||||
@Opcodes(PacketOpcodes.BMODMHEPOFF)
|
||||
public class HandlerPlayerEnterChildMapLayerNotify extends PacketHandler {
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
var fromClient = BMODMHEPOFFOuterClass.BMODMHEPOFF.parseFrom(payload);
|
||||
// probably
|
||||
Grasscutter.getLogger().info("player entered child map layer: id {}", fromClient.getHJMMAOMEHOL());
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package emu.grasscutter.server.packet.recv;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.net.packet.Opcodes;
|
||||
import emu.grasscutter.net.packet.PacketHandler;
|
||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||
import emu.grasscutter.net.proto.ACDCLDJFDFKOuterClass;
|
||||
import emu.grasscutter.server.game.GameSession;
|
||||
|
||||
@Opcodes(PacketOpcodes.ACDCLDJFDFK)
|
||||
public class HandlerPlayerEnterMapLayerNotify extends PacketHandler {
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
var fromClient = ACDCLDJFDFKOuterClass.ACDCLDJFDFK.parseFrom(payload);
|
||||
Grasscutter.getLogger().info("[DEBUG] Player found new map layer: id {}", fromClient.getPPLHKCKDHEC());
|
||||
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.excels.scene.SceneTagData;
|
||||
import emu.grasscutter.net.packet.BasePacket;
|
||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||
import emu.grasscutter.net.proto.MapLayerInfoOuterClass;
|
||||
import emu.grasscutter.net.proto.PlayerWorldSceneInfoListNotifyOuterClass.PlayerWorldSceneInfoListNotify;
|
||||
import emu.grasscutter.net.proto.PlayerWorldSceneInfoOuterClass.PlayerWorldSceneInfo;
|
||||
|
||||
@ -36,6 +37,11 @@ public class PacketPlayerWorldSceneInfoListNotify extends BasePacket {
|
||||
.addSceneTagIdList(153) // 3.1 event
|
||||
.addSceneTagIdList(1164) // Desert Arena (XMSM_CWLTop)
|
||||
.addSceneTagIdList(1166) // Desert Pyramid (CWL_Trans_02)
|
||||
.setMapLayerInfo(MapLayerInfoOuterClass.MapLayerInfo.newBuilder()
|
||||
.addAllUnlockedMapLayerIdList(GameData.getMapLayerDataMap().keySet()) // MapLayer Ids
|
||||
.addAllUnlockedMapLayerFloorIdList(GameData.getMapLayerFloorDataMap().keySet())
|
||||
.addAllUnlockedMapLayerGroupIdList(GameData.getMapLayerGroupDataMap().keySet()) // will show MapLayer options when hovered over
|
||||
.build()) //map layer test
|
||||
.build())
|
||||
.addInfoList(PlayerWorldSceneInfo.newBuilder()
|
||||
.setSceneId(4)
|
||||
|
Loading…
Reference in New Issue
Block a user