Removes the quests changed check as it was unreliable
This commit is contained in:
parent
df72d37b74
commit
61fc07f58d
@ -42,7 +42,7 @@ public class QuestStagesInfoGenerator {
|
|||||||
int mobTypes = stage.getMobsToKill().size();
|
int mobTypes = stage.getMobsToKill().size();
|
||||||
for (int i = 0; i < mobTypes; i++) {
|
for (int i = 0; i < mobTypes; i++) {
|
||||||
questInfo.append("<li>Kill ").append(QuestsHelper.normalizeName(stage.getMobsToKill().get(i).name())).append(
|
questInfo.append("<li>Kill ").append(QuestsHelper.normalizeName(stage.getMobsToKill().get(i).name())).append(
|
||||||
" X ").append(stage.getMobNumToKill().get(i)).append("</li>");
|
" x ").append(stage.getMobNumToKill().get(i)).append("</li>");
|
||||||
}
|
}
|
||||||
int deliveries = stage.getItemDeliveryTargets().size();
|
int deliveries = stage.getItemDeliveryTargets().size();
|
||||||
for (int i = 0; i < deliveries; i++) {
|
for (int i = 0; i < deliveries; i++) {
|
||||||
|
@ -18,7 +18,6 @@ import org.dynmap.markers.GenericMarker;
|
|||||||
import org.dynmap.markers.MarkerIcon;
|
import org.dynmap.markers.MarkerIcon;
|
||||||
import org.dynmap.markers.MarkerSet;
|
import org.dynmap.markers.MarkerSet;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -35,7 +34,6 @@ public class QuestsHandler extends AbstractTraitHandler {
|
|||||||
private MarkerSet questMarkerSet;
|
private MarkerSet questMarkerSet;
|
||||||
private MarkerSet questAreaMarkerSet;
|
private MarkerSet questAreaMarkerSet;
|
||||||
private Map<Icon, MarkerIcon> markerIcons;
|
private Map<Icon, MarkerIcon> markerIcons;
|
||||||
private Collection<IQuest> loadedQuests;
|
|
||||||
private Map<UUID, NPCQuestInfo> questGiverInfo;
|
private Map<UUID, NPCQuestInfo> questGiverInfo;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -64,24 +62,17 @@ public class QuestsHandler extends AbstractTraitHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//There is no point in updating if there has been no changes in quests
|
//Remove old quest markers
|
||||||
boolean questsChanged = loadedQuests == null || !loadedQuests.equals(questsAPI.getLoadedQuests());
|
questMarkerSet.getMarkers().forEach(GenericMarker::deleteMarker);
|
||||||
loadedQuests = questsAPI.getLoadedQuests();
|
|
||||||
|
|
||||||
//Updates all quest area markers
|
//Update all area markers for quests
|
||||||
if (questsChanged) {
|
updateQuestAreas();
|
||||||
//Remove old quest markers
|
|
||||||
questMarkerSet.getMarkers().forEach(GenericMarker::deleteMarker);
|
|
||||||
|
|
||||||
//Update all area markers for quests
|
//Generate information about all NPCs involved in quests
|
||||||
updateQuestAreas();
|
generateQuestNPCInfo();
|
||||||
|
|
||||||
//Generate information about all NPCs involved in quests
|
//Generate markers based on the generated info
|
||||||
generateQuestNPCInfo();
|
generateAllMarkers();
|
||||||
|
|
||||||
//Generate markers based on the generated info
|
|
||||||
generateAllMarkers();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user