public override void LoadFromData(QuestData data) { int numStages = data.stages.Length; this.stages = new SellingQuestStage[numStages]; for (int i = 0; i < numStages; i++) { this.stages[i] = SellingQuestStage.LoadQuestStageFromData(data.stages[i] as SellingQuestStage.SellingQuestStageData); } this.currentStage = data.currentStage; this.active = data.active; }
protected override QuestStage[] GenerateQuestStages() { if (base.reporter == null) { return(null); } QuestStage[] stages = new QuestStage[NUM_STAGES]; Item common = ItemManager.instance.GetRandomCommonItem(base.reporter.GetInventory().items); stages[0] = new SellingQuestStage(common, 15); Item uncommon = ItemManager.instance.GetRandomUncommonItem(base.reporter.GetInventory().items); stages[1] = new SellingQuestStage(uncommon, 20); Item rare = ItemManager.instance.GetRandomRareItem(base.reporter.GetInventory().items); stages[2] = new SellingQuestStage(rare, 25); return(stages); }
public SellingQuestStageData(SellingQuestStage stage) : base(stage) { this.itemRequirement = stage.itemRequirement; }