Grasscutter/src/main/java/emu/grasscutter/server/packet/send/PacketOpenStateUpdateNotify.java
2022-04-26 21:27:35 -07:00

24 lines
667 B
Java

package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.props.OpenState;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.OpenStateUpdateNotifyOuterClass.OpenStateUpdateNotify;
public class PacketOpenStateUpdateNotify extends BasePacket {
public PacketOpenStateUpdateNotify() {
super(PacketOpcodes.OpenStateUpdateNotify);
OpenStateUpdateNotify.Builder proto = OpenStateUpdateNotify.newBuilder();
for (OpenState type : OpenState.values()) {
if (type.getValue() > 0) {
proto.putOpenStateMap(type.getValue(), 1);
}
}
this.setData(proto);
}
}