mirror of
https://github.com/PikaMug/Quests.git
synced 2025-02-22 07:21:46 +01:00
Target delivery NPCs for compass and GPS, fixes #610
This commit is contained in:
parent
fc15de9172
commit
32b6cab5e6
@ -258,6 +258,11 @@ public class Quest {
|
|||||||
}
|
}
|
||||||
} else if (stage.locationsToReach != null && stage.locationsToReach.size() > 0) {
|
} else if (stage.locationsToReach != null && stage.locationsToReach.size() > 0) {
|
||||||
targetLocations.addAll(stage.locationsToReach);
|
targetLocations.addAll(stage.locationsToReach);
|
||||||
|
} else if (stage.itemDeliveryTargets != null && stage.itemDeliveryTargets.size() > 0) {
|
||||||
|
for (Integer i : stage.itemDeliveryTargets) {
|
||||||
|
NPC npc = Quests.citizens.getNPCRegistry().getById(i);
|
||||||
|
targetLocations.add(npc.getStoredLocation());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (targetLocations != null && !targetLocations.isEmpty()) {
|
if (targetLocations != null && !targetLocations.isEmpty()) {
|
||||||
int index = 1;
|
int index = 1;
|
||||||
@ -305,6 +310,9 @@ public class Quest {
|
|||||||
targetLocation = plugin.getNPCLocation(nextStage.citizensToKill.getFirst());
|
targetLocation = plugin.getNPCLocation(nextStage.citizensToKill.getFirst());
|
||||||
} else if (nextStage.locationsToReach != null && nextStage.locationsToReach.size() > 0) {
|
} else if (nextStage.locationsToReach != null && nextStage.locationsToReach.size() > 0) {
|
||||||
targetLocation = nextStage.locationsToReach.getFirst();
|
targetLocation = nextStage.locationsToReach.getFirst();
|
||||||
|
} else if (nextStage.itemDeliveryTargets != null && nextStage.itemDeliveryTargets.size() > 0) {
|
||||||
|
NPC npc = Quests.citizens.getNPCRegistry().getById(nextStage.itemDeliveryTargets.getFirst());
|
||||||
|
targetLocation = npc.getStoredLocation();
|
||||||
}
|
}
|
||||||
if (targetLocation != null) {
|
if (targetLocation != null) {
|
||||||
if (targetLocation.getWorld().getName().equals(quester.getPlayer().getWorld().getName())) {
|
if (targetLocation.getWorld().getName().equals(quester.getPlayer().getWorld().getName())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user