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
83f8bec9
Commit
83f8bec9
authored
May 13, 2022
by
Melledy
Browse files
Implement QUEST_CONTENT_FINISH_PLOT
parent
a227b44c
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/quest/content/ContentFinishPlot.java
0 → 100644
View file @
83f8bec9
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_FINISH_PLOT
)
public
class
ContentFinishPlot
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
int
...
params
)
{
return
condition
.
getParam
()[
0
]
==
params
[
0
];
}
}
src/main/java/emu/grasscutter/server/packet/recv/HandlerNpcTalkReq.java
View file @
83f8bec9
...
@@ -16,7 +16,9 @@ public class HandlerNpcTalkReq extends PacketHandler {
...
@@ -16,7 +16,9 @@ public class HandlerNpcTalkReq extends PacketHandler {
public
void
handle
(
GameSession
session
,
byte
[]
header
,
byte
[]
payload
)
throws
Exception
{
public
void
handle
(
GameSession
session
,
byte
[]
header
,
byte
[]
payload
)
throws
Exception
{
NpcTalkReq
req
=
NpcTalkReq
.
parseFrom
(
payload
);
NpcTalkReq
req
=
NpcTalkReq
.
parseFrom
(
payload
);
// Why are there 2 quest triggers that do the same thing...
session
.
getPlayer
().
getQuestManager
().
triggerEvent
(
QuestTrigger
.
QUEST_CONTENT_COMPLETE_TALK
,
req
.
getTalkId
());
session
.
getPlayer
().
getQuestManager
().
triggerEvent
(
QuestTrigger
.
QUEST_CONTENT_COMPLETE_TALK
,
req
.
getTalkId
());
session
.
getPlayer
().
getQuestManager
().
triggerEvent
(
QuestTrigger
.
QUEST_CONTENT_FINISH_PLOT
,
req
.
getTalkId
());
session
.
send
(
new
PacketNpcTalkRsp
(
req
.
getNpcEntityId
(),
req
.
getTalkId
(),
req
.
getEntityId
()));
session
.
send
(
new
PacketNpcTalkRsp
(
req
.
getNpcEntityId
(),
req
.
getTalkId
(),
req
.
getEntityId
()));
}
}
...
...
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