mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-20 04:13:33 +08:00
Fix whitespace [skip actions]
This commit is contained in:
+4
-4
@@ -17,18 +17,18 @@ import java.util.stream.Stream;
|
||||
@Opcodes(PacketOpcodes.AddQuestContentProgressReq)
|
||||
public class HandlerAddQuestContentProgressReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
var req = AddQuestContentProgressReqOuterClass.AddQuestContentProgressReq.parseFrom(payload);
|
||||
//Find all conditions in quest that are the same as the given one
|
||||
Stream<QuestCondition> finishCond = GameData.getQuestDataMap().get(req.getParam()).getFinishCond().stream();
|
||||
Stream<QuestCondition> acceptCond = GameData.getQuestDataMap().get(req.getParam()).getAcceptCond().stream();
|
||||
Stream<QuestCondition> failCond = GameData.getQuestDataMap().get(req.getParam()).getFailCond().stream();
|
||||
List<QuestCondition> allCondMatch = Stream.concat(Stream.concat(acceptCond,failCond),finishCond).filter(p -> p.getType().getValue() == req.getContentType()).toList();
|
||||
for(QuestCondition cond : allCondMatch ) {
|
||||
for (QuestCondition cond : allCondMatch ) {
|
||||
session.getPlayer().getQuestManager().triggerEvent(QuestTrigger.getContentTriggerByValue(req.getContentType()), cond.getParam());
|
||||
}
|
||||
session.send(new PacketAddQuestContentProgressRsp(req.getContentType()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user