send CompoundDataNotify on Login;fix spelling mistakes. (#1869)

This commit is contained in:
dragon
2022-10-17 18:14:06 +08:00
committed by GitHub
parent 84d02370df
commit b5f356ce4f
6 changed files with 39 additions and 13 deletions

View File

@@ -0,0 +1,21 @@
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.CompoundDataNotifyOuterClass.CompoundDataNotify;
import emu.grasscutter.net.proto.CompoundQueueDataOuterClass.CompoundQueueData;
import java.util.List;
import java.util.Set;
public class PacketCompoundDataNotify extends BasePacket {
public PacketCompoundDataNotify(Set<Integer> unlockedCompounds, List<CompoundQueueData> compoundQueueData) {
super(PacketOpcodes.CompoundDataNotify);
var proto= CompoundDataNotify.newBuilder()
.addAllUnlockCompoundList(unlockedCompounds)
.addAllCompoundQueDataList(compoundQueueData)
.build();
this.setData(proto);
}
}

View File

@@ -8,14 +8,14 @@ import emu.grasscutter.net.proto.CookDataNotifyOuterClass.CookDataNotify;
import emu.grasscutter.net.proto.CookRecipeDataOuterClass.CookRecipeData;
public class PacketCookDataNotify extends BasePacket {
public PacketCookDataNotify(List<CookRecipeData> recipies) {
public PacketCookDataNotify(List<CookRecipeData> recipes) {
super(PacketOpcodes.CookDataNotify);
CookDataNotify proto = CookDataNotify.newBuilder()
.addAllRecipeDataList(recipies)
.addAllRecipeDataList(recipes)
.build();
this.setData(proto);
}
}

View File

@@ -10,11 +10,11 @@ import java.util.List;
import java.util.Set;
public class PacketGetCompoundDataRsp extends BasePacket {
public PacketGetCompoundDataRsp(Set<Integer> unlockedCompounds, List<CompoundQueueData> compundQueueData) {
public PacketGetCompoundDataRsp(Set<Integer> unlockedCompounds, List<CompoundQueueData> compoundQueueData) {
super(PacketOpcodes.GetCompoundDataRsp);
var proto = GetCompoundDataRsp.newBuilder()
.addAllUnlockCompoundList(unlockedCompounds)
.addAllCompoundQueDataList(compundQueueData)
.addAllCompoundQueDataList(compoundQueueData)
.setRetcode(Retcode.RET_SUCC_VALUE)
.build();
setData(proto);