Support spawn NPC

This commit is contained in:
Akka
2022-05-25 10:44:46 +08:00
committed by Melledy
parent 862bfa0611
commit e1770b5a68
13 changed files with 303 additions and 32 deletions

View File

@@ -0,0 +1,25 @@
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.entity.EntityNPC;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.GroupSuiteNotifyOuterClass;
import java.util.List;
public class PacketGroupSuiteNotify extends BasePacket {
/**
* control which npc suite is loaded
*/
public PacketGroupSuiteNotify(List<EntityNPC> list) {
super(PacketOpcodes.GroupSuiteNotify);
var proto = GroupSuiteNotifyOuterClass.GroupSuiteNotify.newBuilder();
list.forEach(item -> proto.putGroupMap(item.getGroupId(), item.getSuiteId()));
this.setData(proto);
}
}