mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-21 18:15:32 +01:00
Ignore quest requirements if empty, fixes #2083
This commit is contained in:
parent
0ee5e9e730
commit
3c8acea21a
@ -590,10 +590,12 @@ public class Quest implements IQuest {
|
||||
return false;
|
||||
}
|
||||
for (final IQuest q : quester.getCompletedQuestsTemp()) {
|
||||
if (!requirements.getNeededQuestIds().contains(q.getName())) {
|
||||
if (!requirements.getNeededQuestIds().isEmpty()
|
||||
&& requirements.getNeededQuestIds().contains(q.getName())) {
|
||||
return false;
|
||||
}
|
||||
if (!requirements.getBlockQuestIds().contains(q.getName())) {
|
||||
if (!requirements.getBlockQuestIds().isEmpty()
|
||||
&& !requirements.getBlockQuestIds().contains(q.getName())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1056,13 +1056,17 @@ public class Quester implements IQuester {
|
||||
}
|
||||
for (final IQuest q : completedQuests) {
|
||||
if (q != null) {
|
||||
if (requirements.getNeededQuestIds().contains(q.getId())) {
|
||||
finishedRequirements.add(ChatColor.GREEN + q.getName());
|
||||
} else {
|
||||
unfinishedRequirements.add(ChatColor.GRAY + q.getName());
|
||||
if (!requirements.getNeededQuestIds().isEmpty()) {
|
||||
if (requirements.getNeededQuestIds().contains(q.getId())) {
|
||||
finishedRequirements.add(ChatColor.GREEN + q.getName());
|
||||
} else {
|
||||
unfinishedRequirements.add(ChatColor.GRAY + q.getName());
|
||||
}
|
||||
}
|
||||
if (requirements.getBlockQuestIds().contains(q.getId())) {
|
||||
current.add(ChatColor.RED + quest.getName());
|
||||
if (!requirements.getBlockQuestIds().isEmpty()) {
|
||||
if (requirements.getBlockQuestIds().contains(q.getId())) {
|
||||
current.add(ChatColor.RED + quest.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user