First Working Version of Party Kill Quest Completion

This commit is contained in:
Kam committed 2024-03-02 21:06:42 -05:00
1 parent 607b3f54d8
commit 2328b0dadf
16 files changed
+508 -104

No files matched your search

@@ -81,6 +81,22 @@ public class QuestDialog extends QuestInterface implements IQuestDialog {
return (IQuestObjective[])list.toArray(new IQuestObjective[list.size()]);
}
@Override
public IQuestObjective[] getPartyObjectives(Party party) {
List<IQuestObjective> list = new ArrayList();
for(int i = 0; i < 3; ++i) {
if (this.dialogs.containsKey(i)) {
Dialog dialog = (Dialog)DialogController.Instance.dialogs.get(this.dialogs.get(i));
if (dialog != null) {
list.add(new noppes.npcs.quests.QuestDialog.QuestDialogObjective(this, party, dialog));
}
}
}
return (IQuestObjective[])list.toArray(new IQuestObjective[list.size()]);
}
@Override
public Vector<String> getPartyQuestLogStatus(Party party) {
Vector<String> vec = new Vector<String>();
@@ -156,14 +172,23 @@ public class QuestDialog extends QuestInterface implements IQuestDialog {
class QuestDialogObjective implements IQuestObjective {
private final QuestDialog parent;
private final EntityPlayer player;
private final Party party;
private final Dialog dialog;
public QuestDialogObjective(QuestDialog this$0, EntityPlayer player, Dialog dialog) {
this.parent = this$0;
this.player = player;
this.dialog = dialog;
this.party = null;
}
public QuestDialogObjective(QuestDialog this$0, Party party, Dialog dialog) {
this.parent = this$0;
this.party = party;
this.dialog = dialog;
this.player = null;
}
public int getProgress() {
return this.isCompleted() ? 1 : 0;
}