mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-20 19:40:43 +08:00
dc9cef8ab7
* Refactor a couple of iterators * Use side-effect instead of second iterator * Make World::onTick return shouldDelete instead of success * Replace Shop iterator with side effects * Scene * Clean up Expeditions * Refactor Expeditions * Clean up Expeditions, Player * Limit Expeditions by AR * Lombokify props Co-authored-by: AnimeGitB <AnimeGitB@bigblueball.in>
25 lines
897 B
Java
25 lines
897 B
Java
package emu.grasscutter.server.packet.send;
|
|
|
|
import emu.grasscutter.game.expedition.ExpeditionInfo;
|
|
import emu.grasscutter.net.packet.BasePacket;
|
|
import emu.grasscutter.net.packet.PacketOpcodes;
|
|
import emu.grasscutter.net.proto.AvatarExpeditionDataNotifyOuterClass.AvatarExpeditionDataNotify;
|
|
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class PacketAvatarExpeditionDataNotify extends BasePacket {
|
|
public PacketAvatarExpeditionDataNotify(Map<Long, ExpeditionInfo> expeditionInfo) {
|
|
super(PacketOpcodes.AvatarExpeditionDataNotify);
|
|
|
|
this.setData(AvatarExpeditionDataNotify.newBuilder()
|
|
.putAllExpeditionInfoMap(
|
|
expeditionInfo.entrySet().stream()
|
|
.collect(Collectors.toMap(
|
|
e -> e.getKey(),
|
|
e -> e.getValue().toProto())))
|
|
.build()
|
|
);
|
|
}
|
|
}
|