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
797afd4c
Commit
797afd4c
authored
Jul 26, 2022
by
Melledy
Committed by
GitHub
Jul 26, 2022
Browse files
Merge pull request #1553 from akatatsu27/questing
Major quest framework improvements
parents
1c5c3633
8bdcfb89
Changes
63
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/send/PacketQuestProgressUpdateNotify.java
View file @
797afd4c
...
@@ -11,7 +11,7 @@ public class PacketQuestProgressUpdateNotify extends BasePacket {
...
@@ -11,7 +11,7 @@ public class PacketQuestProgressUpdateNotify extends BasePacket {
public
PacketQuestProgressUpdateNotify
(
GameQuest
quest
)
{
public
PacketQuestProgressUpdateNotify
(
GameQuest
quest
)
{
super
(
PacketOpcodes
.
QuestProgressUpdateNotify
);
super
(
PacketOpcodes
.
QuestProgressUpdateNotify
);
QuestProgressUpdateNotify
.
Builder
proto
=
QuestProgressUpdateNotify
.
newBuilder
().
setQuestId
(
quest
.
getQuestId
());
QuestProgressUpdateNotify
.
Builder
proto
=
QuestProgressUpdateNotify
.
newBuilder
().
setQuestId
(
quest
.
get
Sub
QuestId
());
if
(
quest
.
getFinishProgressList
()
!=
null
)
{
if
(
quest
.
getFinishProgressList
()
!=
null
)
{
for
(
int
i
:
quest
.
getFinishProgressList
())
{
for
(
int
i
:
quest
.
getFinishProgressList
())
{
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketQuestUpdateQuestVarRsp.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.Opcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.QuestUpdateQuestVarReqOuterClass
;
import
emu.grasscutter.net.proto.QuestUpdateQuestVarRspOuterClass
;
@Opcodes
(
PacketOpcodes
.
QuestUpdateQuestVarReq
)
public
class
PacketQuestUpdateQuestVarRsp
extends
BasePacket
{
public
PacketQuestUpdateQuestVarRsp
(
int
questId
)
{
super
(
PacketOpcodes
.
QuestUpdateQuestVarRsp
);
var
rsp
=
QuestUpdateQuestVarRspOuterClass
.
QuestUpdateQuestVarRsp
.
newBuilder
()
.
setQuestId
(
questId
).
build
();
this
.
setData
(
rsp
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketServerCondMeetQuestListUpdateNotify.java
View file @
797afd4c
...
@@ -6,6 +6,9 @@ import emu.grasscutter.net.packet.BasePacket;
...
@@ -6,6 +6,9 @@ import emu.grasscutter.net.packet.BasePacket;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ServerCondMeetQuestListUpdateNotifyOuterClass.ServerCondMeetQuestListUpdateNotify
;
import
emu.grasscutter.net.proto.ServerCondMeetQuestListUpdateNotifyOuterClass.ServerCondMeetQuestListUpdateNotify
;
import
java.util.List
;
import
java.util.Set
;
public
class
PacketServerCondMeetQuestListUpdateNotify
extends
BasePacket
{
public
class
PacketServerCondMeetQuestListUpdateNotify
extends
BasePacket
{
public
PacketServerCondMeetQuestListUpdateNotify
(
Player
player
)
{
public
PacketServerCondMeetQuestListUpdateNotify
(
Player
player
)
{
...
@@ -24,12 +27,23 @@ public class PacketServerCondMeetQuestListUpdateNotify extends BasePacket {
...
@@ -24,12 +27,23 @@ public class PacketServerCondMeetQuestListUpdateNotify extends BasePacket {
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
public
PacketServerCondMeetQuestListUpdateNotify
(
GameQuest
quest
)
{
public
PacketServerCondMeetQuestListUpdateNotify
(
List
<
GameQuest
>
quests
)
{
super
(
PacketOpcodes
.
ServerCondMeetQuestListUpdateNotify
);
ServerCondMeetQuestListUpdateNotify
.
Builder
proto
=
ServerCondMeetQuestListUpdateNotify
.
newBuilder
();
for
(
GameQuest
quest
:
quests
)
{
proto
.
addAddQuestIdList
(
quest
.
getSubQuestId
());
}
proto
.
build
();
this
.
setData
(
proto
);
}
public
PacketServerCondMeetQuestListUpdateNotify
()
{
super
(
PacketOpcodes
.
ServerCondMeetQuestListUpdateNotify
);
super
(
PacketOpcodes
.
ServerCondMeetQuestListUpdateNotify
);
ServerCondMeetQuestListUpdateNotify
proto
=
ServerCondMeetQuestListUpdateNotify
.
newBuilder
()
ServerCondMeetQuestListUpdateNotify
.
Builder
proto
=
ServerCondMeetQuestListUpdateNotify
.
newBuilder
();
//.addAddQuestIdList(quest.getQuestId())
proto
.
build
();
.
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
...
...
Prev
1
2
3
4
Next
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