Format code [skip actions]

This commit is contained in:
github-actions 2023-06-03 14:55:55 +00:00
parent e28575c80f
commit 7fc7b5087c
4 changed files with 9 additions and 7 deletions

View File

@ -8,7 +8,6 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

View File

@ -155,8 +155,8 @@ public class GameQuest {
// TODO improve
var oldState = state;
if (questData.getFinishCond() != null && questData.getFinishCond().size() != 0) {
for(var condition : questData.getFinishCond()) {
if(condition.getType() == QuestContent.QUEST_CONTENT_LUA_NOTIFY) {
for (var condition : questData.getFinishCond()) {
if (condition.getType() == QuestContent.QUEST_CONTENT_LUA_NOTIFY) {
this.getOwner().getPlayerProgress().resetCurrentProgress(condition.getParamStr());
}
}
@ -164,8 +164,8 @@ public class GameQuest {
}
if (questData.getFailCond() != null && questData.getFailCond().size() != 0) {
for(var condition : questData.getFailCond()) {
if(condition.getType() == QuestContent.QUEST_CONTENT_LUA_NOTIFY) {
for (var condition : questData.getFailCond()) {
if (condition.getType() == QuestContent.QUEST_CONTENT_LUA_NOTIFY) {
this.getOwner().getPlayerProgress().resetCurrentProgress(condition.getParamStr());
}
}

View File

@ -14,7 +14,8 @@ public class ContentAddQuestProgress extends BaseContent {
public boolean execute(
GameQuest quest, QuestData.QuestContentCondition condition, String paramStr, int... params) {
val progressId = condition.getParam()[0];
val currentCount = quest.getOwner().getPlayerProgress().getCurrentProgress(String.valueOf(progressId));
val currentCount =
quest.getOwner().getPlayerProgress().getCurrentProgress(String.valueOf(progressId));
// if the condition count is 0 I think it is safe to assume that the
// condition count from EXEC only needs to be 1

View File

@ -12,6 +12,8 @@ public class ContentLuaNotify extends BaseContent {
@Override
public boolean execute(
GameQuest quest, QuestData.QuestContentCondition condition, String paramStr, int... params) {
return condition.getParamStr().equals(paramStr) && condition.getCount() <= quest.getOwner().getPlayerProgress().getCurrentProgress(paramStr);
return condition.getParamStr().equals(paramStr)
&& condition.getCount()
<= quest.getOwner().getPlayerProgress().getCurrentProgress(paramStr);
}
}