mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-27 21:26:29 +01:00
Clarify Stage variable for kill location names
This commit is contained in:
parent
5c734afcaf
commit
f6f7bfc5eb
@ -1587,7 +1587,7 @@ public class QuestFactory implements ConversationAbandonedListener {
|
||||
}
|
||||
cc.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS, locs);
|
||||
cc.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS, stage.radiiToKillWithin);
|
||||
cc.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES, stage.areaNames);
|
||||
cc.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES, stage.killNames);
|
||||
}
|
||||
}
|
||||
if (stage.locationsToReach.isEmpty() == false) {
|
||||
|
@ -675,7 +675,7 @@ public class Quester {
|
||||
} else {
|
||||
String obj = Lang.get(getPlayer(), "killAtLocation");
|
||||
obj = obj.replace("<mob>", ChatColor.LIGHT_PURPLE + Quester.prettyMobString(e));
|
||||
obj = obj.replace("<location>", getCurrentStage(quest).areaNames.get(getCurrentStage(quest).mobsToKill.indexOf(e)));
|
||||
obj = obj.replace("<location>", getCurrentStage(quest).killNames.get(getCurrentStage(quest).mobsToKill.indexOf(e)));
|
||||
unfinishedObjectives.add(ChatColor.GREEN + obj + ChatColor.GREEN + ": "
|
||||
+ (getQuestData(quest).mobNumKilled.get(getQuestData(quest).mobsKilled.indexOf(e2)))
|
||||
+ "/" + (getCurrentStage(quest).mobNumToKill.get(getCurrentStage(quest).mobsToKill.indexOf(e))));
|
||||
@ -689,7 +689,7 @@ public class Quester {
|
||||
} else {
|
||||
String obj = Lang.get(getPlayer(), "killAtLocation");
|
||||
obj = obj.replace("<mob>", ChatColor.LIGHT_PURPLE + Quester.prettyMobString(e));
|
||||
obj = obj.replace("<location>", getCurrentStage(quest).areaNames.get(getCurrentStage(quest).mobsToKill.indexOf(e)));
|
||||
obj = obj.replace("<location>", getCurrentStage(quest).killNames.get(getCurrentStage(quest).mobsToKill.indexOf(e)));
|
||||
finishedObjectives.add(ChatColor.GRAY + obj + ChatColor.GRAY + ": "
|
||||
+ (getQuestData(quest).mobNumKilled.get(getQuestData(quest).mobsKilled.indexOf(e2)))
|
||||
+ "/" + (getCurrentStage(quest).mobNumToKill.get(getCurrentStage(quest).mobsToKill.indexOf(e))));
|
||||
|
@ -1750,7 +1750,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
oStage.mobNumToKill = mobNumToKill;
|
||||
oStage.locationsToKillWithin = locationsToKillWithin;
|
||||
oStage.radiiToKillWithin = radiiToKillWithin;
|
||||
oStage.areaNames = areaNames;
|
||||
oStage.killNames = areaNames;
|
||||
Map<Map<Enchantment, Material>, Integer> enchants = new HashMap<Map<Enchantment, Material>, Integer>();
|
||||
for (Enchantment e : enchantments) {
|
||||
Map<Enchantment, Material> map = new HashMap<Enchantment, Material>();
|
||||
|
@ -100,7 +100,7 @@ public class Stage {
|
||||
protected LinkedList<Integer> mobNumToKill = new LinkedList<Integer>();
|
||||
protected LinkedList<Location> locationsToKillWithin = new LinkedList<Location>();
|
||||
protected LinkedList<Integer> radiiToKillWithin = new LinkedList<Integer>();
|
||||
protected LinkedList<String> areaNames = new LinkedList<String>();
|
||||
protected LinkedList<String> killNames = new LinkedList<String>();
|
||||
protected LinkedList<Location> locationsToReach = new LinkedList<Location>();
|
||||
protected LinkedList<Integer> radiiToReachWithin = new LinkedList<Integer>();
|
||||
protected LinkedList<World> worldsToReachWithin = new LinkedList<World>();
|
||||
@ -270,13 +270,27 @@ public class Stage {
|
||||
public void setRadiiToKillWithin(LinkedList<Integer> radiiToKillWithin) {
|
||||
this.radiiToKillWithin = radiiToKillWithin;
|
||||
}
|
||||
|
||||
public LinkedList<String> getAreaNames() {
|
||||
return areaNames;
|
||||
|
||||
public LinkedList<String> getKillNames() {
|
||||
return killNames;
|
||||
}
|
||||
|
||||
public void setAreaNames(LinkedList<String> areaNames) {
|
||||
this.areaNames = areaNames;
|
||||
public void setKillNames(LinkedList<String> killNames) {
|
||||
this.killNames = killNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use getKillNames()
|
||||
*/
|
||||
public LinkedList<String> getAreaNames() {
|
||||
return killNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use setKillNames()
|
||||
*/
|
||||
public void setAreaNames(LinkedList<String> killNames) {
|
||||
this.killNames = killNames;
|
||||
}
|
||||
|
||||
public LinkedList<Location> getLocationsToReach() {
|
||||
|
Loading…
Reference in New Issue
Block a user