Removes the quests changed check as it was unreliable

This commit is contained in:
Kristian Knarvik 2022-11-02 13:52:23 +01:00
parent df72d37b74
commit 61fc07f58d
2 changed files with 9 additions and 18 deletions

View File

@ -42,7 +42,7 @@ public class QuestStagesInfoGenerator {
int mobTypes = stage.getMobsToKill().size();
for (int i = 0; i < mobTypes; i++) {
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();
for (int i = 0; i < deliveries; i++) {

View File

@ -18,7 +18,6 @@ import org.dynmap.markers.GenericMarker;
import org.dynmap.markers.MarkerIcon;
import org.dynmap.markers.MarkerSet;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@ -35,7 +34,6 @@ public class QuestsHandler extends AbstractTraitHandler {
private MarkerSet questMarkerSet;
private MarkerSet questAreaMarkerSet;
private Map<Icon, MarkerIcon> markerIcons;
private Collection<IQuest> loadedQuests;
private Map<UUID, NPCQuestInfo> questGiverInfo;
@Override
@ -64,12 +62,6 @@ public class QuestsHandler extends AbstractTraitHandler {
return;
}
//There is no point in updating if there has been no changes in quests
boolean questsChanged = loadedQuests == null || !loadedQuests.equals(questsAPI.getLoadedQuests());
loadedQuests = questsAPI.getLoadedQuests();
//Updates all quest area markers
if (questsChanged) {
//Remove old quest markers
questMarkerSet.getMarkers().forEach(GenericMarker::deleteMarker);
@ -82,7 +74,6 @@ public class QuestsHandler extends AbstractTraitHandler {
//Generate markers based on the generated info
generateAllMarkers();
}
}
/**
* Generates information about all NPCs involved in quests