Commit b9f7c657 authored by Benjamin Elsdon's avatar Benjamin Elsdon
Browse files

Merge remote-tracking branch 'upstream/development' into dev-mail

parents eb495807 782618cd
...@@ -18,7 +18,7 @@ public class PacketStoreItemChangeNotify extends GenshinPacket { ...@@ -18,7 +18,7 @@ public class PacketStoreItemChangeNotify extends GenshinPacket {
this(); this();
StoreItemChangeNotify.Builder proto = StoreItemChangeNotify.newBuilder() StoreItemChangeNotify.Builder proto = StoreItemChangeNotify.newBuilder()
.setStoreType(StoreType.StorePack) .setStoreType(StoreType.STORE_PACK)
.addItemList(item.toProto()); .addItemList(item.toProto());
this.setData(proto); this.setData(proto);
...@@ -28,9 +28,9 @@ public class PacketStoreItemChangeNotify extends GenshinPacket { ...@@ -28,9 +28,9 @@ public class PacketStoreItemChangeNotify extends GenshinPacket {
this(); this();
StoreItemChangeNotify.Builder proto = StoreItemChangeNotify.newBuilder() StoreItemChangeNotify.Builder proto = StoreItemChangeNotify.newBuilder()
.setStoreType(StoreType.StorePack); .setStoreType(StoreType.STORE_PACK);
items.stream().forEach(item -> proto.addItemList(item.toProto())); items.forEach(item -> proto.addItemList(item.toProto()));
this.setData(proto); this.setData(proto);
} }
......
...@@ -18,7 +18,7 @@ public class PacketStoreItemDelNotify extends GenshinPacket { ...@@ -18,7 +18,7 @@ public class PacketStoreItemDelNotify extends GenshinPacket {
this(); this();
StoreItemDelNotify.Builder proto = StoreItemDelNotify.newBuilder() StoreItemDelNotify.Builder proto = StoreItemDelNotify.newBuilder()
.setStoreType(StoreType.StorePack) .setStoreType(StoreType.STORE_PACK)
.addGuidList(item.getGuid()); .addGuidList(item.getGuid());
this.setData(proto); this.setData(proto);
...@@ -28,7 +28,7 @@ public class PacketStoreItemDelNotify extends GenshinPacket { ...@@ -28,7 +28,7 @@ public class PacketStoreItemDelNotify extends GenshinPacket {
this(); this();
StoreItemDelNotify.Builder proto = StoreItemDelNotify.newBuilder() StoreItemDelNotify.Builder proto = StoreItemDelNotify.newBuilder()
.setStoreType(StoreType.StorePack); .setStoreType(StoreType.STORE_PACK);
items.stream().forEach(item -> proto.addGuidList(item.getGuid())); items.stream().forEach(item -> proto.addGuidList(item.getGuid()));
......
...@@ -12,7 +12,7 @@ public class PacketStoreWeightLimitNotify extends GenshinPacket { ...@@ -12,7 +12,7 @@ public class PacketStoreWeightLimitNotify extends GenshinPacket {
super(PacketOpcodes.StoreWeightLimitNotify); super(PacketOpcodes.StoreWeightLimitNotify);
StoreWeightLimitNotify p = StoreWeightLimitNotify.newBuilder() StoreWeightLimitNotify p = StoreWeightLimitNotify.newBuilder()
.setStoreType(StoreType.StorePack) .setStoreType(StoreType.STORE_PACK)
.setWeightLimit(Grasscutter.getConfig().getGameServerOptions().InventoryLimitAll) .setWeightLimit(Grasscutter.getConfig().getGameServerOptions().InventoryLimitAll)
.setWeaponCountLimit(Grasscutter.getConfig().getGameServerOptions().InventoryLimitWeapon) .setWeaponCountLimit(Grasscutter.getConfig().getGameServerOptions().InventoryLimitWeapon)
.setReliquaryCountLimit(Grasscutter.getConfig().getGameServerOptions().InventoryLimitRelic) .setReliquaryCountLimit(Grasscutter.getConfig().getGameServerOptions().InventoryLimitRelic)
......
...@@ -3,6 +3,7 @@ package emu.grasscutter.server.packet.send; ...@@ -3,6 +3,7 @@ package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.inventory.GenshinItem; import emu.grasscutter.game.inventory.GenshinItem;
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.RetcodeOuterClass;
import emu.grasscutter.net.proto.UseItemRspOuterClass.UseItemRsp; import emu.grasscutter.net.proto.UseItemRspOuterClass.UseItemRsp;
public class PacketUseItemRsp extends GenshinPacket { public class PacketUseItemRsp extends GenshinPacket {
...@@ -22,7 +23,7 @@ public class PacketUseItemRsp extends GenshinPacket { ...@@ -22,7 +23,7 @@ public class PacketUseItemRsp extends GenshinPacket {
public PacketUseItemRsp() { public PacketUseItemRsp() {
super(PacketOpcodes.UseItemRsp); super(PacketOpcodes.UseItemRsp);
UseItemRsp proto = UseItemRsp.newBuilder().setRetcode(1).build(); UseItemRsp proto = UseItemRsp.newBuilder().setRetcode(RetcodeOuterClass.Retcode.RET_SVR_ERROR_VALUE).build();
this.setData(proto); this.setData(proto);
} }
......
...@@ -14,7 +14,7 @@ public class PacketWorldPlayerLocationNotify extends GenshinPacket { ...@@ -14,7 +14,7 @@ public class PacketWorldPlayerLocationNotify extends GenshinPacket {
WorldPlayerLocationNotify.Builder proto = WorldPlayerLocationNotify.newBuilder(); WorldPlayerLocationNotify.Builder proto = WorldPlayerLocationNotify.newBuilder();
for (GenshinPlayer p : world.getPlayers()) { for (GenshinPlayer p : world.getPlayers()) {
proto.addPlayerLocList(p.getWorldPlayerLocationInfo()); proto.addPlayerWorldLocList(p.getWorldPlayerLocationInfo());
} }
this.setData(proto); this.setData(proto);
......
...@@ -34,7 +34,7 @@ public final class Crypto { ...@@ -34,7 +34,7 @@ public final class Crypto {
public static void extractSecretKeyBuffer(byte[] data) { public static void extractSecretKeyBuffer(byte[] data) {
try { try {
GetPlayerTokenRsp p = GetPlayerTokenRsp.parseFrom(data); GetPlayerTokenRsp p = GetPlayerTokenRsp.parseFrom(data);
FileUtils.write(Grasscutter.getConfig().KEY_FOLDER + "secretKeyBuffer.bin", p.getSecretKeyBuffer().toByteArray()); FileUtils.write(Grasscutter.getConfig().KEY_FOLDER + "secretKeyBuffer.bin", p.getSecretKeyBytes().toByteArray());
Grasscutter.getLogger().info("Secret Key: " + p.getSecretKey()); Grasscutter.getLogger().info("Secret Key: " + p.getSecretKey());
} catch (Exception e) { } catch (Exception e) {
Grasscutter.getLogger().error("Crypto error.", e); Grasscutter.getLogger().error("Crypto error.", e);
......
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