Added handling of retrieve item quests, Added handling of giving quest rewards

Note: All changes may not be listed! Please view changes to get a better
idea, lots of changes compared to what I had before!
Changed ShowLootBox to use object id's instead of SWGObject
Added "A Speeder For Me" quest
Fixed quests so they advance to the next step properly and complete
properly
This commit is contained in:
Waverunner
2014-08-15 11:34:58 -04:00
parent d25286a3c7
commit ffbe209207
20 changed files with 878 additions and 154 deletions
+12 -2
View File
@@ -45,9 +45,8 @@ import resources.objects.intangible.IntangibleObject;
import resources.objects.resource.ResourceContainerObject;
import resources.objects.waypoint.WaypointObject;
import resources.quest.Quest;
import services.quest.QuestItem;
import engine.clients.Client;
import engine.resources.common.CRC;
import engine.resources.common.StringUtilities;
import engine.resources.objects.Baseline;
import engine.resources.scene.Planet;
import engine.resources.scene.Point3D;
@@ -96,6 +95,7 @@ public class PlayerObject extends IntangibleObject implements Serializable {
baseline.put("holoEmote", "");
baseline.put("holoEmoteUses", 0);
baseline.put("activeMissions", new ArrayList<Long>()); // TODO: Look at MissionCriticalObject in CREO4, could use that instead of this
baseline.put("questRetrieveItemTemplates", new TreeMap<String, QuestItem>());
return baseline;
}
@@ -595,6 +595,16 @@ public class PlayerObject extends IntangibleObject implements Serializable {
return (SWGList<Quest>) getBaseline(8).get("questJournal");
}
@SuppressWarnings("unchecked")
public TreeMap<String, QuestItem> getQuestRetrieveItemTemplates() {
return (TreeMap<String, QuestItem>) otherVariables.get("questRetrieveItemTemplates");
}
public boolean hasRetrieveItemTemplate(String template) {
TreeMap<String, QuestItem> templates = getQuestRetrieveItemTemplates();
return templates.containsKey(template);
}
public int getActiveQuest() {
return (int) getBaseline(8).get("activeQuest");
}