From 396f302eacab14367db10cb8e43d2976036af86d Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Sat, 26 Aug 2023 17:57:46 -0400 Subject: [PATCH] Merge changes from hamusuke (#1) --- .../java/emu/grasscutter/GameConstants.java | 4 +- .../java/emu/grasscutter/data/GameData.java | 16 +++- .../data/excels/scene/MapLayerData.java | 19 +++++ .../data/excels/scene/MapLayerGroupData.java | 21 +++++ .../data/excels/{ => scene}/SceneData.java | 10 +-- .../data/excels/scene/SceneTagData.java | 40 +++++++++ .../grasscutter/database/DatabaseHelper.java | 12 ++- .../grasscutter/game/props/ClimateType.java | 12 +-- .../emu/grasscutter/game/world/Scene.java | 10 ++- .../http/dispatch/AuthenticationHandler.java | 17 ++-- .../server/http/dispatch/RegionHandler.java | 24 +++--- .../documentation/HandbookRequestHandler.java | 2 +- .../packet/send/PacketGetSceneAreaRsp.java | 12 +-- .../PacketPlayerWorldSceneInfoListNotify.java | 85 +++++++++---------- 14 files changed, 195 insertions(+), 89 deletions(-) create mode 100644 src/main/java/emu/grasscutter/data/excels/scene/MapLayerData.java create mode 100644 src/main/java/emu/grasscutter/data/excels/scene/MapLayerGroupData.java rename src/main/java/emu/grasscutter/data/excels/{ => scene}/SceneData.java (72%) create mode 100644 src/main/java/emu/grasscutter/data/excels/scene/SceneTagData.java diff --git a/src/main/java/emu/grasscutter/GameConstants.java b/src/main/java/emu/grasscutter/GameConstants.java index d0ffef9bf..f7bdd506e 100644 --- a/src/main/java/emu/grasscutter/GameConstants.java +++ b/src/main/java/emu/grasscutter/GameConstants.java @@ -3,10 +3,12 @@ package emu.grasscutter; import emu.grasscutter.game.world.Position; import emu.grasscutter.utils.objects.SparseSet; import emu.grasscutter.utils.Utils; -import java.util.Arrays; + +import java.util.*; public final class GameConstants { public static String VERSION = "4.0.0"; + public static int[] VERSION_PARTS = {4, 0, 0}; public static boolean DEBUG = false; public static final int DEFAULT_TEAMS = 4; diff --git a/src/main/java/emu/grasscutter/data/GameData.java b/src/main/java/emu/grasscutter/data/GameData.java index 347fd70d5..a1436b8d2 100644 --- a/src/main/java/emu/grasscutter/data/GameData.java +++ b/src/main/java/emu/grasscutter/data/GameData.java @@ -15,6 +15,7 @@ import emu.grasscutter.data.excels.giving.*; import emu.grasscutter.data.excels.monster.*; import emu.grasscutter.data.excels.quest.*; import emu.grasscutter.data.excels.reliquary.*; +import emu.grasscutter.data.excels.scene.*; import emu.grasscutter.data.excels.tower.*; import emu.grasscutter.data.excels.trial.*; import emu.grasscutter.data.excels.weapon.*; @@ -269,7 +270,14 @@ public final class GameData { private static final Int2ObjectMap investigationMonsterDataMap = new Int2ObjectOpenHashMap<>(); - @Getter private static final Int2ObjectMap itemDataMap = new Int2ObjectOpenHashMap<>(); + @Getter + private static final Int2ObjectMap itemDataMap = new Int2ObjectOpenHashMap<>(); + + @Getter + private static final Int2ObjectMap mapLayerDataMap = new Int2ObjectOpenHashMap<>(); + + @Getter + private static final Int2ObjectMap mapLayerGroupDataMap = new Int2ObjectOpenHashMap<>(); @Getter private static final Int2ObjectMap monsterCurveDataMap = @@ -336,14 +344,16 @@ public final class GameData { @Getter private static final Int2ObjectMap sceneDataMap = new Int2ObjectLinkedOpenHashMap<>(); + @Getter + private static final Int2ObjectMap sceneTagDataMap = new Int2ObjectLinkedOpenHashMap<>(); @Getter private static final Int2ObjectMap talkConfigDataMap = - new Int2ObjectOpenHashMap<>(); + new Int2ObjectOpenHashMap<>(); @Getter private static final Int2ObjectMap towerFloorDataMap = - new Int2ObjectOpenHashMap<>(); + new Int2ObjectOpenHashMap<>(); @Getter private static final Int2ObjectMap towerLevelDataMap = diff --git a/src/main/java/emu/grasscutter/data/excels/scene/MapLayerData.java b/src/main/java/emu/grasscutter/data/excels/scene/MapLayerData.java new file mode 100644 index 000000000..60901d547 --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/scene/MapLayerData.java @@ -0,0 +1,19 @@ +package emu.grasscutter.data.excels.scene; + +import com.google.gson.annotations.SerializedName; +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; +import lombok.Getter; + +@ResourceType(name = "MapLayerExcelConfigData.json") +@Getter +public final class MapLayerData extends GameResource { + @Getter(onMethod_ = @Override) + private int id; + + @SerializedName("NLPFIGAEBFP") + private int idk1; + @SerializedName("GCBPOOPNLLD") + private float level; //how deep thoronium is in me + +} diff --git a/src/main/java/emu/grasscutter/data/excels/scene/MapLayerGroupData.java b/src/main/java/emu/grasscutter/data/excels/scene/MapLayerGroupData.java new file mode 100644 index 000000000..e44dc02b9 --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/scene/MapLayerGroupData.java @@ -0,0 +1,21 @@ +package emu.grasscutter.data.excels.scene; + +import com.google.gson.annotations.SerializedName; +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; +import lombok.Getter; + +import java.util.List; + +@ResourceType(name = "MapLayerGroupExcelConfigData.json") +@Getter +public final class MapLayerGroupData extends GameResource { + @Getter(onMethod_ = @Override) + private int id; + + @SerializedName("FIIAHPKBCDE") + private List areaIds; + @SerializedName("ODEFCAMHKNK") + private float mapFloorId; //MapLayerFloorExcel (first level of the maplayer) + +} diff --git a/src/main/java/emu/grasscutter/data/excels/SceneData.java b/src/main/java/emu/grasscutter/data/excels/scene/SceneData.java similarity index 72% rename from src/main/java/emu/grasscutter/data/excels/SceneData.java rename to src/main/java/emu/grasscutter/data/excels/scene/SceneData.java index dcbc737b8..e70086754 100644 --- a/src/main/java/emu/grasscutter/data/excels/SceneData.java +++ b/src/main/java/emu/grasscutter/data/excels/scene/SceneData.java @@ -1,15 +1,15 @@ -package emu.grasscutter.data.excels; +package emu.grasscutter.data.excels.scene; import com.google.gson.annotations.SerializedName; -import emu.grasscutter.data.GameResource; -import emu.grasscutter.data.ResourceType; +import emu.grasscutter.data.*; import emu.grasscutter.game.props.SceneType; -import java.util.List; import lombok.Getter; +import java.util.List; + @ResourceType(name = "SceneExcelConfigData.json") @Getter -public class SceneData extends GameResource { +public final class SceneData extends GameResource { @Getter(onMethod_ = @Override) private int id; diff --git a/src/main/java/emu/grasscutter/data/excels/scene/SceneTagData.java b/src/main/java/emu/grasscutter/data/excels/scene/SceneTagData.java new file mode 100644 index 000000000..47bf9fa49 --- /dev/null +++ b/src/main/java/emu/grasscutter/data/excels/scene/SceneTagData.java @@ -0,0 +1,40 @@ +package emu.grasscutter.data.excels.scene; + +import com.google.gson.annotations.SerializedName; +import emu.grasscutter.data.GameResource; +import emu.grasscutter.data.ResourceType; +import lombok.Getter; + +import java.util.List; + +@ResourceType(name = "SceneTagConfigData.json") +@Getter +public final class SceneTagData extends GameResource { + @Getter(onMethod_ = @Override) + private int id; + + @SerializedName("DJCOAOBDIHP") + private boolean idk1; + @SerializedName("LOLNNMPKHIB") + private boolean idk2; + + private boolean isDefaultValid; // shld be there by default + + private String sceneTagName; + private int sceneId; + private List cond; + + @Getter + public static class SceneTagCondition { + private CondType condType; + private int param1; + private int param2; + + public enum CondType { + SCENE_TAG_COND_TYPE_ACTIVITY_CONTENT_OPEN, + SCENE_TAG_COND_TYPE_QUEST_FINISH, + SCENE_TAG_COND_TYPE_QUEST_GLOBAL_VAR_EQUAL, + SCENE_TAG_COND_TYPE_SPECIFIC_ACTIVITY_OPEN + } + } +} diff --git a/src/main/java/emu/grasscutter/database/DatabaseHelper.java b/src/main/java/emu/grasscutter/database/DatabaseHelper.java index 421eeb509..49caf7265 100644 --- a/src/main/java/emu/grasscutter/database/DatabaseHelper.java +++ b/src/main/java/emu/grasscutter/database/DatabaseHelper.java @@ -21,6 +21,7 @@ import emu.grasscutter.game.quest.GameMainQuest; import emu.grasscutter.game.world.SceneGroupInstance; import emu.grasscutter.utils.objects.Returnable; import io.netty.util.concurrent.FastThreadLocalThread; +import javax.annotation.Nullable; import java.util.List; import java.util.concurrent.*; import java.util.stream.Stream; @@ -541,11 +542,20 @@ public final class DatabaseHelper { DatabaseHelper.saveGameAsync(musicGameBeatmap); } + @Nullable public static Achievements getAchievementData(int uid) { - return DatabaseManager.getGameDatastore() + try { + return DatabaseManager.getGameDatastore() .find(Achievements.class) .filter(Filters.and(Filters.eq("uid", uid))) .first(); + } catch (IllegalArgumentException e) { + Grasscutter.getLogger().debug("Error occurred while getting uid " + uid + "'s achievement data", e); + DatabaseManager.getGameDatabase() + .getCollection("achievements") + .deleteMany(eq("uid", uid)); + return null; + } } public static void saveAchievementData(Achievements achievements) { diff --git a/src/main/java/emu/grasscutter/game/props/ClimateType.java b/src/main/java/emu/grasscutter/game/props/ClimateType.java index 2038cc109..eb97aa5ab 100644 --- a/src/main/java/emu/grasscutter/game/props/ClimateType.java +++ b/src/main/java/emu/grasscutter/game/props/ClimateType.java @@ -2,6 +2,7 @@ package emu.grasscutter.game.props; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; + import java.util.HashMap; import java.util.Map; import java.util.stream.Stream; @@ -13,17 +14,18 @@ public enum ClimateType { CLIMATE_RAIN(3), CLIMATE_THUNDERSTORM(4), CLIMATE_SNOW(5), - CLIMATE_MIST(6); + CLIMATE_MIST(6), + CLIMATE_DESERT(7); private static final Int2ObjectMap map = new Int2ObjectOpenHashMap<>(); private static final Map stringMap = new HashMap<>(); static { Stream.of(values()) - .forEach( - e -> { - map.put(e.getValue(), e); - stringMap.put(e.name(), e); + .forEach( + e -> { + map.put(e.getValue(), e); + stringMap.put(e.name(), e); }); } diff --git a/src/main/java/emu/grasscutter/game/world/Scene.java b/src/main/java/emu/grasscutter/game/world/Scene.java index e144199c3..a25dfa9c5 100644 --- a/src/main/java/emu/grasscutter/game/world/Scene.java +++ b/src/main/java/emu/grasscutter/game/world/Scene.java @@ -4,9 +4,10 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.data.*; import emu.grasscutter.data.binout.SceneNpcBornEntry; import emu.grasscutter.data.binout.routes.Route; -import emu.grasscutter.data.excels.*; +import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.data.excels.codex.CodexAnimalData; import emu.grasscutter.data.excels.monster.MonsterData; +import emu.grasscutter.data.excels.scene.SceneData; import emu.grasscutter.data.excels.world.WorldLevelData; import emu.grasscutter.data.server.Grid; import emu.grasscutter.game.avatar.Avatar; @@ -22,8 +23,8 @@ import emu.grasscutter.game.props.*; import emu.grasscutter.game.quest.QuestGroupSuite; import emu.grasscutter.game.world.data.TeleportProperties; import emu.grasscutter.net.packet.BasePacket; -import emu.grasscutter.net.proto.*; import emu.grasscutter.net.proto.AttackResultOuterClass.AttackResult; +import emu.grasscutter.net.proto.*; import emu.grasscutter.net.proto.VisionTypeOuterClass.VisionType; import emu.grasscutter.scripts.*; import emu.grasscutter.scripts.constants.EventType; @@ -34,11 +35,12 @@ import emu.grasscutter.server.packet.send.*; import emu.grasscutter.server.scheduler.ServerTaskScheduler; import emu.grasscutter.utils.objects.KahnsSort; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import lombok.*; + +import javax.annotation.Nullable; import java.util.*; import java.util.concurrent.*; import java.util.stream.Collectors; -import javax.annotation.Nullable; -import lombok.*; public final class Scene { @Getter private final World world; diff --git a/src/main/java/emu/grasscutter/server/http/dispatch/AuthenticationHandler.java b/src/main/java/emu/grasscutter/server/http/dispatch/AuthenticationHandler.java index 6959b6c74..d72f984b5 100644 --- a/src/main/java/emu/grasscutter/server/http/dispatch/AuthenticationHandler.java +++ b/src/main/java/emu/grasscutter/server/http/dispatch/AuthenticationHandler.java @@ -1,20 +1,17 @@ package emu.grasscutter.server.http.dispatch; -import static emu.grasscutter.utils.lang.Language.translate; - import emu.grasscutter.Grasscutter; import emu.grasscutter.auth.AuthenticationSystem; import emu.grasscutter.auth.OAuthAuthenticator.ClientType; import emu.grasscutter.server.http.Router; -import emu.grasscutter.server.http.objects.ComboTokenReqJson; +import emu.grasscutter.server.http.objects.*; import emu.grasscutter.server.http.objects.ComboTokenReqJson.LoginTokenData; -import emu.grasscutter.server.http.objects.LoginAccountRequestJson; -import emu.grasscutter.server.http.objects.LoginTokenRequestJson; -import emu.grasscutter.utils.JsonUtils; -import emu.grasscutter.utils.Utils; +import emu.grasscutter.utils.*; import io.javalin.Javalin; import io.javalin.http.Context; +import static emu.grasscutter.utils.lang.Language.translate; + /** Handles requests related to authentication. */ public final class AuthenticationHandler implements Router { /** @@ -38,7 +35,7 @@ public final class AuthenticationHandler implements Router { // Log to console. Grasscutter.getLogger() - .info(translate("messages.dispatch.account.login_attempt", Utils.address(ctx))); + .debug(translate("messages.dispatch.account.login_attempt", Utils.address(ctx))); } /** @@ -62,7 +59,7 @@ public final class AuthenticationHandler implements Router { // Log to console. Grasscutter.getLogger() - .info(translate("messages.dispatch.account.login_attempt", Utils.address(ctx))); + .debug(translate("messages.dispatch.account.login_attempt", Utils.address(ctx))); } /** @@ -89,7 +86,7 @@ public final class AuthenticationHandler implements Router { // Log to console. Grasscutter.getLogger() - .info(translate("messages.dispatch.account.login_attempt", Utils.address(ctx))); + .debug(translate("messages.dispatch.account.login_attempt", Utils.address(ctx))); } @Override diff --git a/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java b/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java index b951ad475..e4f0ffac2 100644 --- a/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java +++ b/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java @@ -235,15 +235,15 @@ public final class RegionHandler implements Router { // Get region data. String regionData = "CAESGE5vdCBGb3VuZCB2ZXJzaW9uIGNvbmZpZw=="; - if (ctx.queryParamMap().values().size() > 0) { + if (!ctx.queryParamMap().values().isEmpty()) { if (region != null) regionData = region.getBase64(); } - String clientVersion = versionName.replaceAll(Pattern.compile("[a-zA-Z]").pattern(), ""); - String[] versionCode = clientVersion.split("\\."); - int versionMajor = Integer.parseInt(versionCode[0]); - int versionMinor = Integer.parseInt(versionCode[1]); - int versionFix = Integer.parseInt(versionCode[2]); + var clientVersion = versionName.replaceAll(Pattern.compile("[a-zA-Z]").pattern(), ""); + var versionCode = clientVersion.split("\\."); + var versionMajor = Integer.parseInt(versionCode[0]); + var versionMinor = Integer.parseInt(versionCode[1]); + var versionFix = Integer.parseInt(versionCode[2]); if (versionMajor >= 3 || (versionMajor == 2 && versionMinor == 7 && versionFix >= 50) @@ -254,8 +254,12 @@ public final class RegionHandler implements Router { String key_id = ctx.queryParam("key_id"); - if (!clientVersion.equals( - GameConstants.VERSION)) { // Reject clients when there is a version mismatch + if ( + versionMajor != GameConstants.VERSION_PARTS[0] || + versionMinor != GameConstants.VERSION_PARTS[1] + // The 'fix' or 'patch' version is not checked because it is only used + // when miHoYo is desperate and fucks up big time. + ) { // Reject clients when there is a version mismatch boolean updateClient = GameConstants.VERSION.compareTo(clientVersion) > 0; @@ -268,7 +272,7 @@ public final class RegionHandler implements Router { StopServerInfo.newBuilder() .setUrl("https://discord.gg/grasscutters") .setStopBeginTime((int) Instant.now().getEpochSecond()) - .setStopEndTime((int) Instant.now().getEpochSecond() * 2) + .setStopEndTime((int) Instant.now().getEpochSecond() + 1) .setContentMsg( updateClient ? "\nVersion mismatch outdated client! \n\nServer version: %s\nClient version: %s" @@ -279,7 +283,7 @@ public final class RegionHandler implements Router { .buildPartial(); Grasscutter.getLogger() - .info( + .debug( String.format( "Connection denied for %s due to %s.", Utils.address(ctx), updateClient ? "outdated client!" : "outdated server!")); diff --git a/src/main/java/emu/grasscutter/server/http/documentation/HandbookRequestHandler.java b/src/main/java/emu/grasscutter/server/http/documentation/HandbookRequestHandler.java index 5baef5ec1..b95d6c07c 100644 --- a/src/main/java/emu/grasscutter/server/http/documentation/HandbookRequestHandler.java +++ b/src/main/java/emu/grasscutter/server/http/documentation/HandbookRequestHandler.java @@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.command.CommandMap; import emu.grasscutter.data.GameData; import emu.grasscutter.data.excels.ItemData; -import emu.grasscutter.data.excels.SceneData; +import emu.grasscutter.data.excels.scene.SceneData; import emu.grasscutter.data.excels.avatar.AvatarData; import emu.grasscutter.data.excels.monster.MonsterData; import emu.grasscutter.utils.FileUtils; diff --git a/src/main/java/emu/grasscutter/server/packet/send/PacketGetSceneAreaRsp.java b/src/main/java/emu/grasscutter/server/packet/send/PacketGetSceneAreaRsp.java index 095337763..46d87b047 100644 --- a/src/main/java/emu/grasscutter/server/packet/send/PacketGetSceneAreaRsp.java +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketGetSceneAreaRsp.java @@ -14,11 +14,13 @@ public class PacketGetSceneAreaRsp extends BasePacket { GetSceneAreaRsp p = GetSceneAreaRsp.newBuilder() - .setSceneId(sceneId) - .addAllAreaIdList(player.getUnlockedSceneAreas(sceneId)) - .addCityInfoList(player.getSotsManager().getCityInfo(1).toProto()) - .addCityInfoList(player.getSotsManager().getCityInfo(2).toProto()) - .addCityInfoList(player.getSotsManager().getCityInfo(3).toProto()) + .setSceneId(sceneId) + .addAllAreaIdList(player.getUnlockedSceneAreas(sceneId)) + .addCityInfoList(player.getSotsManager().getCityInfo(1).toProto()) + .addCityInfoList(player.getSotsManager().getCityInfo(2).toProto()) + .addCityInfoList(player.getSotsManager().getCityInfo(3).toProto()) + .addCityInfoList(player.getSotsManager().getCityInfo(4).toProto()) + .addCityInfoList(player.getSotsManager().getCityInfo(5).toProto()) .build(); this.setData(p); diff --git a/src/main/java/emu/grasscutter/server/packet/send/PacketPlayerWorldSceneInfoListNotify.java b/src/main/java/emu/grasscutter/server/packet/send/PacketPlayerWorldSceneInfoListNotify.java index f791bcaf2..00413e5fc 100644 --- a/src/main/java/emu/grasscutter/server/packet/send/PacketPlayerWorldSceneInfoListNotify.java +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketPlayerWorldSceneInfoListNotify.java @@ -1,9 +1,12 @@ package emu.grasscutter.server.packet.send; +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.PlayerWorldSceneInfoListNotifyOuterClass.PlayerWorldSceneInfoListNotify; import emu.grasscutter.net.proto.PlayerWorldSceneInfoOuterClass.PlayerWorldSceneInfo; + import java.util.stream.IntStream; public class PacketPlayerWorldSceneInfoListNotify extends BasePacket { @@ -12,50 +15,44 @@ public class PacketPlayerWorldSceneInfoListNotify extends BasePacket { super(PacketOpcodes.PlayerWorldSceneInfoListNotify); // Rename opcode later PlayerWorldSceneInfoListNotify.Builder proto = - PlayerWorldSceneInfoListNotify.newBuilder() - .addInfoList(PlayerWorldSceneInfo.newBuilder().setSceneId(1).setIsLocked(false).build()) - .addInfoList( - PlayerWorldSceneInfo.newBuilder() - .setSceneId(3) - .setIsLocked(false) - .addSceneTagIdList(102) // Jade chamber - .addSceneTagIdList(113) - .addSceneTagIdList(117) - - // Vanarana (Sumeru tree) - .addSceneTagIdList(1093) // Vana_real - // .addSceneTagIdList(1094) // Vana_dream - // .addSceneTagIdList(1095) // Vana_first - // .addSceneTagIdList(1096) // Vana_festival - - // 3.1 event - .addSceneTagIdList(152) - .addSceneTagIdList(153) - - // Pyramid - .addSceneTagIdList(1164) // Arena (XMSM_CWLTop) - .addSceneTagIdList(1166) // Pyramid (CWL_Trans_02) - - // Brute force - // .addAllSceneTagIdList(IntStream.range(1150, 1250).boxed().toList()) - .build()) - .addInfoList( - PlayerWorldSceneInfo.newBuilder() - .setSceneId(4) - .setIsLocked(false) - .addSceneTagIdList(106) - .addSceneTagIdList(109) - .addSceneTagIdList(117) - .build()) - .addInfoList(PlayerWorldSceneInfo.newBuilder().setSceneId(5).setIsLocked(false).build()) - .addInfoList(PlayerWorldSceneInfo.newBuilder().setSceneId(6).setIsLocked(false).build()) - .addInfoList(PlayerWorldSceneInfo.newBuilder().setSceneId(7).setIsLocked(false).build()) - .addInfoList( - PlayerWorldSceneInfo.newBuilder() - .setSceneId(9) - .setIsLocked(false) - .addAllSceneTagIdList(IntStream.range(0, 3000).boxed().toList()) - .build()); + PlayerWorldSceneInfoListNotify.newBuilder() + .addInfoList(PlayerWorldSceneInfo.newBuilder().setSceneId(1).setIsLocked(false).build()) + .addInfoList(PlayerWorldSceneInfo.newBuilder() + .setSceneId(3) + .setIsLocked(false) + .addAllSceneTagIdList(GameData.getSceneTagDataMap().values().stream() + .filter(sceneTag -> sceneTag.getSceneId() == 3) + .filter(sceneTag -> sceneTag.isDefaultValid() || sceneTag.getCond().get(0).getCondType() != null) + .map(SceneTagData::getId) + .toList()) + //.addSceneTagIdList(102) // Jade chamber (alr added) + //.addSceneTagIdList(113) + //.addSceneTagIdList(117) + //.addSceneTagIdList(1093) // 3.0 Vana_real + .addSceneTagIdList(1094) // 3.0 Vana_dream + //.addSceneTagIdList(1095) // 3.0 Vana_first + //.addSceneTagIdList(1096) // 3.0 Vana_festival + .addSceneTagIdList(152) // 3.1 event + .addSceneTagIdList(153) // 3.1 event + .addSceneTagIdList(1164) // Desert Arena (XMSM_CWLTop) + .addSceneTagIdList(1166) // Desert Pyramid (CWL_Trans_02) + .build()) + .addInfoList(PlayerWorldSceneInfo.newBuilder() + .setSceneId(4) + .setIsLocked(false) + .addSceneTagIdList(106) + .addSceneTagIdList(109) + .addSceneTagIdList(117) + .build()) + .addInfoList(PlayerWorldSceneInfo.newBuilder().setSceneId(5).setIsLocked(false).build()) + .addInfoList(PlayerWorldSceneInfo.newBuilder().setSceneId(6).setIsLocked(false).build()) + .addInfoList(PlayerWorldSceneInfo.newBuilder().setSceneId(7).setIsLocked(false).build()) + .addInfoList(PlayerWorldSceneInfo.newBuilder().setSceneId(9).setIsLocked(false) + .addAllSceneTagIdList(IntStream.range(0, 3000).boxed().toList()) + .build()) + .addInfoList(PlayerWorldSceneInfo.newBuilder().setSceneId(10).setIsLocked(false) + .addAllSceneTagIdList(IntStream.range(0, 3000).boxed().toList()) + .build()); //3.8 this.setData(proto); }