Commit 058d3222 authored by Benjamin Elsdon's avatar Benjamin Elsdon
Browse files

Merge remote-tracking branch 'upstream/main'

parents dfc956a1 2572d55c
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.SceneUnlockInfoNotifyOuterClass.SceneUnlockInfoNotify;
import emu.grasscutter.net.proto.SceneUnlockInfoOuterClass.SceneUnlockInfo;
public class PacketSceneUnlockInfoNotify extends GenshinPacket {
public PacketSceneUnlockInfoNotify() {
super(PacketOpcodes.SceneUnlockInfoNotify); // Rename opcode later
SceneUnlockInfoNotify proto = SceneUnlockInfoNotify.newBuilder()
.addUnlockInfos(SceneUnlockInfo.newBuilder().setSceneId(1))
.addUnlockInfos(SceneUnlockInfo.newBuilder().setSceneId(3))
.addUnlockInfos(SceneUnlockInfo.newBuilder().setSceneId(4))
.addUnlockInfos(SceneUnlockInfo.newBuilder().setSceneId(5))
.addUnlockInfos(SceneUnlockInfo.newBuilder().setSceneId(6))
.addUnlockInfos(SceneUnlockInfo.newBuilder().setSceneId(7))
.build();
this.setData(proto);
}
}
package emu.grasscutter.server.packet.send; package emu.grasscutter.server.packet.send;
import emu.grasscutter.GenshinConstants; import emu.grasscutter.Grasscutter;
import emu.grasscutter.net.packet.GenshinPacket; import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.PacketOpcodes; import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType; import emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType;
...@@ -13,11 +13,11 @@ public class PacketStoreWeightLimitNotify extends GenshinPacket { ...@@ -13,11 +13,11 @@ public class PacketStoreWeightLimitNotify extends GenshinPacket {
StoreWeightLimitNotify p = StoreWeightLimitNotify.newBuilder() StoreWeightLimitNotify p = StoreWeightLimitNotify.newBuilder()
.setStoreType(StoreType.StorePack) .setStoreType(StoreType.StorePack)
.setWeightLimit(GenshinConstants.LIMIT_ALL) .setWeightLimit(Grasscutter.getConfig().getServerOptions().InventoryLimitAll)
.setWeaponCountLimit(GenshinConstants.LIMIT_WEAPON) .setWeaponCountLimit(Grasscutter.getConfig().getServerOptions().InventoryLimitWeapon)
.setReliquaryCountLimit(GenshinConstants.LIMIT_RELIC) .setReliquaryCountLimit(Grasscutter.getConfig().getServerOptions().InventoryLimitRelic)
.setMaterialCountLimit(GenshinConstants.LIMIT_MATERIAL) .setMaterialCountLimit(Grasscutter.getConfig().getServerOptions().InventoryLimitMaterial)
.setFurnitureCountLimit(GenshinConstants.LIMIT_FURNITURE) .setFurnitureCountLimit(Grasscutter.getConfig().getServerOptions().InventoryLimitFurniture)
.build(); .build();
this.setData(p); this.setData(p);
......
...@@ -17,7 +17,7 @@ public class PacketWorldPlayerInfoNotify extends GenshinPacket { ...@@ -17,7 +17,7 @@ public class PacketWorldPlayerInfoNotify extends GenshinPacket {
GenshinPlayer p = world.getPlayers().get(i); GenshinPlayer p = world.getPlayers().get(i);
proto.addPlayerInfoList(p.getOnlinePlayerInfo()); proto.addPlayerInfoList(p.getOnlinePlayerInfo());
proto.addPlayerUidList(p.getId()); proto.addPlayerUidList(p.getUid());
} }
this.setData(proto.build()); this.setData(proto.build());
......
...@@ -17,7 +17,7 @@ public class PacketWorldPlayerRTTNotify extends GenshinPacket { ...@@ -17,7 +17,7 @@ public class PacketWorldPlayerRTTNotify extends GenshinPacket {
for (GenshinPlayer player : world.getPlayers()) { for (GenshinPlayer player : world.getPlayers()) {
proto.addPlayerRttList( proto.addPlayerRttList(
PlayerRTTInfo.newBuilder() PlayerRTTInfo.newBuilder()
.setUid(player.getId()) .setUid(player.getUid())
.setRtt(10) // TODO - put player ping here .setRtt(10) // TODO - put player ping here
); );
} }
......
...@@ -20,6 +20,7 @@ import emu.grasscutter.data.ResourceLoader; ...@@ -20,6 +20,7 @@ import emu.grasscutter.data.ResourceLoader;
import emu.grasscutter.data.def.AvatarData; import emu.grasscutter.data.def.AvatarData;
import emu.grasscutter.data.def.ItemData; import emu.grasscutter.data.def.ItemData;
import emu.grasscutter.data.def.MonsterData; import emu.grasscutter.data.def.MonsterData;
import emu.grasscutter.data.def.SceneData;
public final class Tools { public final class Tools {
...@@ -63,6 +64,17 @@ public final class Tools { ...@@ -63,6 +64,17 @@ public final class Tools {
writer.println(); writer.println();
writer.println("// Scenes");
list = new ArrayList<>(GenshinData.getSceneDataMap().keySet());
Collections.sort(list);
for (Integer id : list) {
SceneData data = GenshinData.getSceneDataMap().get(id);
writer.println(data.getId() + " : " + data.getScriptData());
}
writer.println();
writer.println("// Monsters"); writer.println("// Monsters");
list = new ArrayList<>(GenshinData.getMonsterDataMap().keySet()); list = new ArrayList<>(GenshinData.getMonsterDataMap().keySet());
Collections.sort(list); Collections.sort(list);
......
...@@ -165,8 +165,6 @@ public final class Utils { ...@@ -165,8 +165,6 @@ public final class Utils {
// Check for game data. // Check for game data.
if(!fileExists(dataFolder)) if(!fileExists(dataFolder))
createFolder(dataFolder); createFolder(dataFolder);
if(!fileExists(dataFolder + "AbilityEmbryos.json"))
copyFromResources("data/AbilityEmbryos.json", dataFolder);
if(exit) System.exit(1); if(exit) System.exit(1);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment