mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-19 10:24:47 +01:00
MonsterInvestigation (boss icon in map)
This commit is contained in:
@@ -14,7 +14,11 @@ public class HandlerGetInvestigationMonsterReq extends PacketHandler {
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
var req = GetInvestigationMonsterReqOuterClass.GetInvestigationMonsterReq.parseFrom(payload);
|
||||
|
||||
session.send(new PacketGetInvestigationMonsterRsp(req.getCityIdListList()));
|
||||
session.send(new PacketGetInvestigationMonsterRsp(
|
||||
session.getPlayer(),
|
||||
session.getServer().getWorldDataManager(),
|
||||
req.getCityIdListList()));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,18 +1,23 @@
|
||||
package emu.grasscutter.server.packet.send;
|
||||
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.world.WorldDataManager;
|
||||
import emu.grasscutter.net.packet.BasePacket;
|
||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||
import emu.grasscutter.net.proto.GetActivityInfoRspOuterClass;
|
||||
import emu.grasscutter.net.proto.GetInvestigationMonsterRspOuterClass;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PacketGetInvestigationMonsterRsp extends BasePacket {
|
||||
|
||||
public PacketGetInvestigationMonsterRsp(List<Integer> cityIdListList) {
|
||||
public PacketGetInvestigationMonsterRsp(Player player, WorldDataManager worldDataManager, List<Integer> cityIdListList) {
|
||||
|
||||
super(PacketOpcodes.GetInvestigationMonsterRsp);
|
||||
|
||||
var resp = GetActivityInfoRspOuterClass.GetActivityInfoRsp.newBuilder();
|
||||
var resp = GetInvestigationMonsterRspOuterClass.GetInvestigationMonsterRsp.newBuilder();
|
||||
|
||||
cityIdListList.forEach(id -> resp.addAllMonsterList(worldDataManager.getInvestigationMonstersByCityId(player, id)));
|
||||
|
||||
|
||||
this.setData(resp.build());
|
||||
|
||||
Reference in New Issue
Block a user