mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-12-05 03:03:31 +00:00
28 lines
833 B
Java
28 lines
833 B
Java
|
package emu.grasscutter.server.packet.send;
|
||
|
|
||
|
import java.util.Map;
|
||
|
|
||
|
import emu.grasscutter.game.avatar.GenshinAvatar;
|
||
|
import emu.grasscutter.net.packet.GenshinPacket;
|
||
|
import emu.grasscutter.net.packet.PacketOpcodes;
|
||
|
import emu.grasscutter.net.proto.AvatarUpgradeRspOuterClass.AvatarUpgradeRsp;
|
||
|
|
||
|
public class PacketAvatarUpgradeRsp extends GenshinPacket {
|
||
|
|
||
|
public PacketAvatarUpgradeRsp(GenshinAvatar avatar, int oldLevel, Map<Integer, Float> oldFightPropMap) {
|
||
|
super(PacketOpcodes.AvatarUpgradeRsp);
|
||
|
|
||
|
this.buildHeader(0);
|
||
|
|
||
|
AvatarUpgradeRsp proto = AvatarUpgradeRsp.newBuilder()
|
||
|
.setAvatarGuid(avatar.getGuid())
|
||
|
.setOldLevel(oldLevel)
|
||
|
.setCurLevel(avatar.getLevel())
|
||
|
.putAllOldFightPropMap(oldFightPropMap)
|
||
|
.putAllCurFightPropMap(avatar.getFightProperties())
|
||
|
.build();
|
||
|
|
||
|
this.setData(proto);
|
||
|
}
|
||
|
}
|