mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-30 00:23:57 +00:00
Fix quest progression when entering a domain
This commit is contained in:
parent
60eb62fa42
commit
b42d8b67ed
@ -13,11 +13,20 @@ public class HandlerPostEnterSceneReq extends PacketHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||||
if (session.getPlayer().getScene().getSceneType() == SceneType.SCENE_ROOM) {
|
var player = session.getPlayer();
|
||||||
session
|
var scene = player.getScene();
|
||||||
.getPlayer()
|
var questManager = player.getQuestManager();
|
||||||
.getQuestManager()
|
|
||||||
.queueEvent(QuestContent.QUEST_CONTENT_ENTER_ROOM, session.getPlayer().getSceneId(), 0);
|
switch (session.getPlayer().getScene().getSceneType()){
|
||||||
|
case SCENE_ROOM -> questManager.queueEvent(QuestContent.QUEST_CONTENT_ENTER_ROOM, scene.getId(), 0);
|
||||||
|
case SCENE_WORLD -> {
|
||||||
|
questManager.queueEvent(QuestContent.QUEST_CONTENT_ENTER_MY_WORLD, scene.getId());
|
||||||
|
questManager.queueEvent(QuestContent.QUEST_CONTENT_ENTER_MY_WORLD_SCENE, scene.getId());
|
||||||
|
}
|
||||||
|
case SCENE_DUNGEON -> {
|
||||||
|
var dungeonManager = scene.getDungeonManager();
|
||||||
|
if (dungeonManager != null) dungeonManager.startDungeon();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
session.send(new PacketPostEnterSceneRsp(session.getPlayer()));
|
session.send(new PacketPostEnterSceneRsp(session.getPlayer()));
|
||||||
|
Loading…
Reference in New Issue
Block a user