feat: set friend enter home option (#1860)

This commit is contained in:
hamusuke
2022-10-16 00:58:45 +09:00
committed by GitHub
parent a4747abfc9
commit 610a364b9a
9 changed files with 1207 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ public class PacketPlayerHomeCompInfoNotify extends BasePacket {
PlayerHomeCompInfoOuterClass.PlayerHomeCompInfo.newBuilder()
.addAllUnlockedModuleIdList(player.getRealmList())
.addAllLevelupRewardGotLevelList(List.of(1)) // Hardcoded
.setFriendEnterHomeOptionValue(player.getHome().getEnterHomeOption())
.build()
)
.build();

View File

@@ -0,0 +1,10 @@
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
public class PacketSetFriendEnterHomeOptionRsp extends BasePacket {
public PacketSetFriendEnterHomeOptionRsp() {
super(PacketOpcodes.SetFriendEnterHomeOptionRsp);
}
}

View File

@@ -27,4 +27,15 @@ public class PacketTryEnterHomeRsp extends BasePacket {
this.setData(proto);
}
public PacketTryEnterHomeRsp(int retCode, int uid) {
super(PacketOpcodes.TryEnterHomeRsp);
TryEnterHomeRspOuterClass.TryEnterHomeRsp proto = TryEnterHomeRspOuterClass.TryEnterHomeRsp.newBuilder()
.setRetcode(retCode)
.setTargetUid(uid)
.build();
this.setData(proto);
}
}