Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
cbd46e92
Commit
cbd46e92
authored
May 13, 2022
by
Melledy
Browse files
Add one more quest trigger
parent
631a5303
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java
View file @
cbd46e92
...
...
@@ -7,6 +7,7 @@ import emu.grasscutter.data.custom.ScenePointEntry;
import
emu.grasscutter.data.def.DungeonData
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.game.props.SceneType
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.server.game.GameServer
;
...
...
@@ -51,8 +52,9 @@ public class DungeonManager {
int
sceneId
=
data
.
getSceneId
();
player
.
getScene
().
setPrevScene
(
sceneId
);
if
(
player
.
getWorld
().
transferPlayerToScene
(
player
,
sceneId
,
data
)){
if
(
player
.
getWorld
().
transferPlayerToScene
(
player
,
sceneId
,
data
))
{
player
.
getScene
().
addDungeonSettleObserver
(
basicDungeonSettleObserver
);
player
.
getQuestManager
().
triggerEvent
(
QuestTrigger
.
QUEST_CONTENT_ENTER_DUNGEON
,
data
.
getId
());
}
player
.
getScene
().
setPrevScenePoint
(
pointId
);
...
...
src/main/java/emu/grasscutter/game/quest/content/ContentEnterDungeon.java
0 → 100644
View file @
cbd46e92
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.data.def.QuestData.QuestCondition
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_CONTENT_ENTER_DUNGEON
)
public
class
ContentEnterDungeon
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
int
...
params
)
{
return
condition
.
getParam
()[
0
]
==
params
[
0
];
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment