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
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/quest/conditions/ConditionQuestVarLess.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.conditions
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameMainQuest
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_COND_QUEST_VAR_LESS
)
public
class
ConditionQuestVarLess
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
int
questVarValue
=
quest
.
getMainQuest
().
getQuestVars
()[
params
[
0
]];
Grasscutter
.
getLogger
().
debug
(
"questVar {} : {}"
,
params
[
0
],
questVarValue
);
return
questVarValue
<
params
[
1
];
}
}
src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateEqual.java
View file @
797afd4c
package
emu.grasscutter.game.quest.conditions
;
package
emu.grasscutter.game.quest.conditions
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.data.excels.QuestData.QuestCondition
;
import
emu.grasscutter.data.excels.QuestData.QuestCondition
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.GameQuest
;
...
@@ -11,13 +12,16 @@ public class ConditionStateEqual extends QuestBaseHandler {
...
@@ -11,13 +12,16 @@ public class ConditionStateEqual extends QuestBaseHandler {
@Override
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
GameQuest
checkQuest
=
quest
.
getOwner
().
getQuestManager
().
getQuestById
(
params
[
0
]);
GameQuest
checkQuest
=
quest
.
getOwner
().
getQuestManager
().
getQuestById
(
condition
.
getParam
()[
0
]);
if
(
checkQuest
==
null
)
{
/*
Will spam the console
//Grasscutter.getLogger().debug("Warning: quest {} hasn't been started yet!", condition.getParam()[0]);
if
(
checkQuest
!=
null
)
{
*/
return
checkQuest
.
getState
().
getValue
()
==
params
[
1
];
return
false
;
}
}
return
checkQuest
.
getState
().
getValue
()
==
condition
.
getParam
()[
1
];
return
false
;
}
}
}
}
src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateNotEqual.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.conditions
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_COND_STATE_NOT_EQUAL
)
public
class
ConditionStateNotEqual
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
GameQuest
checkQuest
=
quest
.
getOwner
().
getQuestManager
().
getQuestById
(
condition
.
getParam
()[
0
]);
if
(
checkQuest
==
null
)
{
/*
Will spam the console
//Grasscutter.getLogger().debug("Warning: quest {} hasn't been started yet!", condition.getParam()[0]);
*/
return
false
;
}
return
checkQuest
.
getState
().
getValue
()
!=
condition
.
getParam
()[
1
];
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentAddQuestProgress.java
View file @
797afd4c
...
@@ -11,7 +11,12 @@ public class ContentAddQuestProgress extends QuestBaseHandler {
...
@@ -11,7 +11,12 @@ public class ContentAddQuestProgress extends QuestBaseHandler {
@Override
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
return
condition
.
getParam
()[
0
]
==
params
[
0
];
/*
//paramStr is a lua group, params[0] may also be a lua group!
questid = xxxxxx lua group = xxxxxxyy
count seems relevant only for lua group
*/
return
condition
.
getParam
()[
0
]
==
params
[
0
];
//missing params[1], paramStr, and count
}
}
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentCompleteAnyTalk.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.data.binout.MainQuestData
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameMainQuest
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_CONTENT_COMPLETE_ANY_TALK
)
public
class
ContentCompleteAnyTalk
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
GameMainQuest
checkMainQuest
=
quest
.
getOwner
().
getQuestManager
().
getMainQuestById
(
params
[
0
]/
100
);
if
(
checkMainQuest
==
null
)
{
return
false
;}
MainQuestData
.
TalkData
talkData
=
checkMainQuest
.
getTalks
().
get
(
Integer
.
valueOf
(
paramStr
));
return
talkData
==
null
||
condition
.
getParamStr
().
contains
(
paramStr
)
||
checkMainQuest
.
getChildQuestById
(
params
[
0
])
!=
null
;
}
}
\ No newline at end of file
src/main/java/emu/grasscutter/game/quest/content/ContentCompleteTalk.java
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.data.binout.MainQuestData
;
import
emu.grasscutter.game.quest.GameMainQuest
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.data.excels.QuestData.QuestCondition
;
import
emu.grasscutter.data.excels.QuestData.QuestCondition
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
...
@@ -11,7 +13,9 @@ public class ContentCompleteTalk extends QuestBaseHandler {
...
@@ -11,7 +13,9 @@ public class ContentCompleteTalk extends QuestBaseHandler {
@Override
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
return
condition
.
getParam
()[
0
]
==
params
[
0
];
GameMainQuest
checkMainQuest
=
quest
.
getOwner
().
getQuestManager
().
getMainQuestById
(
params
[
0
]/
100
);
if
(
checkMainQuest
==
null
)
{
return
false
;}
MainQuestData
.
TalkData
talkData
=
checkMainQuest
.
getTalks
().
get
(
Integer
.
valueOf
(
params
[
0
]));
return
talkData
==
null
||
condition
.
getParamStr
().
contains
(
paramStr
)
||
checkMainQuest
.
getChildQuestById
(
params
[
0
])
!=
null
;
}
}
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentEnterDungeon.java
View file @
797afd4c
...
@@ -11,7 +11,7 @@ public class ContentEnterDungeon extends QuestBaseHandler {
...
@@ -11,7 +11,7 @@ public class ContentEnterDungeon extends QuestBaseHandler {
@Override
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
return
condition
.
getParam
()[
0
]
==
params
[
0
];
return
condition
.
getParam
()[
0
]
==
params
[
0
];
//missing params[1]
}
}
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentFinishPlot.java
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.data.binout.MainQuestData
;
import
emu.grasscutter.game.quest.GameMainQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.data.excels.QuestData.QuestCondition
;
import
emu.grasscutter.data.excels.QuestData.QuestCondition
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.GameQuest
;
...
@@ -11,7 +13,9 @@ public class ContentFinishPlot extends QuestBaseHandler {
...
@@ -11,7 +13,9 @@ public class ContentFinishPlot extends QuestBaseHandler {
@Override
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
return
condition
.
getParam
()[
0
]
==
params
[
0
];
MainQuestData
.
TalkData
talkData
=
quest
.
getMainQuest
().
getTalks
().
get
(
Integer
.
valueOf
(
params
[
0
]));
}
GameQuest
subQuest
=
quest
.
getMainQuest
().
getChildQuestById
(
params
[
0
]);
return
talkData
!=
null
||
subQuest
!=
null
;
}
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentLeaveScene.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.data.excels.QuestData.QuestCondition
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_CONTENT_LEAVE_SCENE
)
public
class
ContentLeaveScene
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
return
quest
.
getOwner
().
getScene
().
getPrevScene
()
==
params
[
0
];
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentNotFinishPlot.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.data.binout.MainQuestData
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameMainQuest
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_CONTENT_NOT_FINISH_PLOT
)
public
class
ContentNotFinishPlot
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
GameMainQuest
checkMainQuest
=
quest
.
getOwner
().
getQuestManager
().
getMainQuestById
(
params
[
0
]/
100
);
if
(
checkMainQuest
==
null
)
{
return
false
;}
MainQuestData
.
TalkData
talkData
=
checkMainQuest
.
getTalks
().
get
(
Integer
.
valueOf
(
params
[
0
]));
return
talkData
==
null
;
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentQuestStateEqual.java
View file @
797afd4c
...
@@ -11,13 +11,9 @@ public class ContentQuestStateEqual extends QuestBaseHandler {
...
@@ -11,13 +11,9 @@ public class ContentQuestStateEqual extends QuestBaseHandler {
@Override
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
public
boolean
execute
(
GameQuest
quest
,
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
GameQuest
checkQuest
=
quest
.
getOwner
().
getQuestManager
().
getQuestById
(
params
[
0
]);
GameQuest
checkQuest
=
quest
.
getOwner
().
getQuestManager
().
getQuestById
(
condition
.
getParam
()[
0
]);
if
(
checkQuest
==
null
)
{
return
false
;}
if
(
checkQuest
!=
null
)
{
return
checkQuest
.
getState
().
getValue
()
==
params
[
1
];
return
checkQuest
.
getState
().
getValue
()
==
params
[
1
];
}
return
false
;
}
}
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentQuestStateNotEqual.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_CONTENT_QUEST_STATE_NOT_EQUAL
)
public
class
ContentQuestStateNotEqual
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
GameQuest
checkQuest
=
quest
.
getOwner
().
getQuestManager
().
getQuestById
(
params
[
0
]);
if
(
checkQuest
!=
null
)
{
return
checkQuest
.
getState
().
getValue
()
!=
params
[
1
];
}
return
false
;
}
}
\ No newline at end of file
src/main/java/emu/grasscutter/game/quest/content/ContentQuestVarEqual.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_CONTENT_QUEST_VAR_EQUAL
)
public
class
ContentQuestVarEqual
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
int
questVarValue
=
quest
.
getMainQuest
().
getQuestVars
()[
params
[
0
]];
Grasscutter
.
getLogger
().
debug
(
"questVar {} : {}"
,
params
[
0
],
questVarValue
);
return
questVarValue
==
params
[
1
];
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentQuestVarGreater.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_CONTENT_QUEST_VAR_GREATER
)
public
class
ContentQuestVarGreater
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
int
questVarValue
=
quest
.
getMainQuest
().
getQuestVars
()[
params
[
0
]];
Grasscutter
.
getLogger
().
debug
(
"questVar {} : {}"
,
params
[
0
],
questVarValue
);
return
questVarValue
>
params
[
1
];
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentQuestVarLess.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_CONTENT_QUEST_VAR_LESS
)
public
class
ContentQuestVarLess
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
int
questVarValue
=
quest
.
getMainQuest
().
getQuestVars
()[
params
[
0
]];
Grasscutter
.
getLogger
().
debug
(
"questVar {} : {}"
,
params
[
0
],
questVarValue
);
return
questVarValue
<
params
[
1
];
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentTriggerFire.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.data.excels.TriggerExcelConfigData
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_CONTENT_TRIGGER_FIRE
)
public
class
ContentTriggerFire
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
if
(
quest
.
getTriggers
().
containsKey
(
quest
.
getTriggerNameById
(
params
[
0
])))
{
//We don't want to put a new key here
return
quest
.
getTriggers
().
get
(
quest
.
getTriggerNameById
(
params
[
0
]));
}
else
{
Grasscutter
.
getLogger
().
error
(
"quest {} doesn't have trigger {}"
,
quest
.
getSubQuestId
(),
params
[
0
]);
return
false
;
}
}
}
src/main/java/emu/grasscutter/game/quest/content/ContentUnlockTransPoint.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.content
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestBaseHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_CONTENT_UNLOCK_TRANS_POINT
)
public
class
ContentUnlockTransPoint
extends
QuestBaseHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestCondition
condition
,
String
paramStr
,
int
...
params
)
{
return
true
;
}
}
src/main/java/emu/grasscutter/game/quest/enums/QuestState.java
View file @
797afd4c
...
@@ -5,10 +5,17 @@ public enum QuestState {
...
@@ -5,10 +5,17 @@ public enum QuestState {
QUEST_STATE_UNSTARTED
(
1
),
QUEST_STATE_UNSTARTED
(
1
),
QUEST_STATE_UNFINISHED
(
2
),
QUEST_STATE_UNFINISHED
(
2
),
QUEST_STATE_FINISHED
(
3
),
QUEST_STATE_FINISHED
(
3
),
QUEST_STATE_FAILED
(
4
);
QUEST_STATE_FAILED
(
4
),
// Used by lua
NONE
(
0
),
UNSTARTED
(
1
),
UNFINISHED
(
2
),
FINISHED
(
3
),
FAILED
(
4
);
private
final
int
value
;
private
final
int
value
;
QuestState
(
int
id
)
{
QuestState
(
int
id
)
{
this
.
value
=
id
;
this
.
value
=
id
;
}
}
...
...
src/main/java/emu/grasscutter/game/quest/exec/ExecDecQuestGlobalVar.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.exec
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestExecHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_EXEC_DEC_QUEST_GLOBAL_VAR
)
public
class
ExecDecQuestGlobalVar
extends
QuestExecHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestExecParam
condition
,
String
...
paramStr
)
{
quest
.
getOwner
().
getQuestManager
().
decQuestGlobalVarValue
(
Integer
.
valueOf
(
paramStr
[
0
]),
Integer
.
valueOf
(
paramStr
[
1
]));
return
true
;
}
}
src/main/java/emu/grasscutter/game/quest/exec/ExecDecQuestVar.java
0 → 100644
View file @
797afd4c
package
emu.grasscutter.game.quest.exec
;
import
emu.grasscutter.data.excels.QuestData
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.QuestValue
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
import
emu.grasscutter.game.quest.handlers.QuestExecHandler
;
@QuestValue
(
QuestTrigger
.
QUEST_EXEC_DEC_QUEST_VAR
)
public
class
ExecDecQuestVar
extends
QuestExecHandler
{
@Override
public
boolean
execute
(
GameQuest
quest
,
QuestData
.
QuestExecParam
condition
,
String
...
paramStr
)
{
quest
.
getMainQuest
().
decQuestVar
(
Integer
.
parseInt
(
paramStr
[
0
]),
Integer
.
parseInt
(
paramStr
[
1
]));
return
true
;
}
}
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