mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-12-05 03:03:31 +00:00
24 lines
761 B
Java
24 lines
761 B
Java
package emu.grasscutter.server.packet.send;
|
|
|
|
import emu.grasscutter.net.packet.BasePacket;
|
|
import emu.grasscutter.net.packet.PacketOpcodes;
|
|
import emu.grasscutter.net.proto.DestroyMaterialRspOuterClass.DestroyMaterialRsp;
|
|
import it.unimi.dsi.fastutil.ints.Int2IntMap;
|
|
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
|
|
|
|
public class PacketDestroyMaterialRsp extends BasePacket {
|
|
|
|
public PacketDestroyMaterialRsp(Int2IntOpenHashMap returnMaterialMap) {
|
|
super(PacketOpcodes.DestroyMaterialRsp);
|
|
|
|
DestroyMaterialRsp.Builder proto = DestroyMaterialRsp.newBuilder();
|
|
|
|
for (Int2IntMap.Entry e : returnMaterialMap.int2IntEntrySet()) {
|
|
proto.addItemIdList(e.getIntKey());
|
|
proto.addItemCountList(e.getIntValue());
|
|
}
|
|
|
|
this.setData(proto);
|
|
}
|
|
}
|