mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-12-04 09:50:08 +00:00
26 lines
793 B
Java
26 lines
793 B
Java
package emu.grasscutter.server.packet.send;
|
|
|
|
import java.util.List;
|
|
|
|
import emu.grasscutter.game.inventory.GameItem;
|
|
import emu.grasscutter.net.packet.BasePacket;
|
|
import emu.grasscutter.net.packet.PacketOpcodes;
|
|
import emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam;
|
|
import emu.grasscutter.net.proto.WeaponUpgradeRspOuterClass.WeaponUpgradeRsp;
|
|
|
|
public class PacketWeaponUpgradeRsp extends BasePacket {
|
|
|
|
public PacketWeaponUpgradeRsp(GameItem item, int oldLevel, List<ItemParam> leftoverOres) {
|
|
super(PacketOpcodes.WeaponUpgradeRsp);
|
|
|
|
WeaponUpgradeRsp proto = WeaponUpgradeRsp.newBuilder()
|
|
.setTargetWeaponGuid(item.getGuid())
|
|
.setCurLevel(item.getLevel())
|
|
.setOldLevel(oldLevel)
|
|
.addAllItemParamList(leftoverOres)
|
|
.build();
|
|
|
|
this.setData(proto);
|
|
}
|
|
}
|