Commit addfb5eb authored by WetABQ's avatar WetABQ Committed by GitHub
Browse files

[BREAKING CHANGE] proto auto compiled by gradle (#226)

* [BREAK] proto auto compiled by gradle

* [BREAK] move proto to submodule

* update gitmodules

* [BREAK] move proto to submodule

* move proto to submodule

* fix merge conflict

* fix github action after merging

* fix merge conflicts and del submodule

* upload the proto
parent 627a2f1e
......@@ -18,7 +18,7 @@ public class PacketStoreItemDelNotify extends GenshinPacket {
this();
StoreItemDelNotify.Builder proto = StoreItemDelNotify.newBuilder()
.setStoreType(StoreType.StorePack)
.setStoreType(StoreType.STORE_PACK)
.addGuidList(item.getGuid());
this.setData(proto);
......@@ -28,7 +28,7 @@ public class PacketStoreItemDelNotify extends GenshinPacket {
this();
StoreItemDelNotify.Builder proto = StoreItemDelNotify.newBuilder()
.setStoreType(StoreType.StorePack);
.setStoreType(StoreType.STORE_PACK);
items.stream().forEach(item -> proto.addGuidList(item.getGuid()));
......
......@@ -12,7 +12,7 @@ public class PacketStoreWeightLimitNotify extends GenshinPacket {
super(PacketOpcodes.StoreWeightLimitNotify);
StoreWeightLimitNotify p = StoreWeightLimitNotify.newBuilder()
.setStoreType(StoreType.StorePack)
.setStoreType(StoreType.STORE_PACK)
.setWeightLimit(Grasscutter.getConfig().getGameServerOptions().InventoryLimitAll)
.setWeaponCountLimit(Grasscutter.getConfig().getGameServerOptions().InventoryLimitWeapon)
.setReliquaryCountLimit(Grasscutter.getConfig().getGameServerOptions().InventoryLimitRelic)
......
......@@ -3,6 +3,7 @@ package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.inventory.GenshinItem;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.RetcodeOuterClass;
import emu.grasscutter.net.proto.UseItemRspOuterClass.UseItemRsp;
public class PacketUseItemRsp extends GenshinPacket {
......@@ -22,7 +23,7 @@ public class PacketUseItemRsp extends GenshinPacket {
public PacketUseItemRsp() {
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);
}
......
......@@ -14,7 +14,7 @@ public class PacketWorldPlayerLocationNotify extends GenshinPacket {
WorldPlayerLocationNotify.Builder proto = WorldPlayerLocationNotify.newBuilder();
for (GenshinPlayer p : world.getPlayers()) {
proto.addPlayerLocList(p.getWorldPlayerLocationInfo());
proto.addPlayerWorldLocList(p.getWorldPlayerLocationInfo());
}
this.setData(proto);
......
......@@ -34,7 +34,7 @@ public final class Crypto {
public static void extractSecretKeyBuffer(byte[] data) {
try {
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());
} catch (Exception 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