public object Clone() { Quest quest = new Quest(); quest.AssetName = AssetName; foreach (WorldEntry <Chest> chestEntry in chestEntries) { WorldEntry <Chest> worldEntry = new WorldEntry <Chest>(); worldEntry.Content = chestEntry.Content.Clone() as Chest; worldEntry.ContentName = chestEntry.ContentName; worldEntry.Count = chestEntry.Count; worldEntry.Direction = chestEntry.Direction; worldEntry.MapContentName = chestEntry.MapContentName; worldEntry.MapPosition = chestEntry.MapPosition; quest.chestEntries.Add(worldEntry); } quest.completionMessage = completionMessage; quest.description = description; quest.destinationMapContentName = destinationMapContentName; quest.destinationNpcContentName = destinationNpcContentName; quest.destinationObjectiveMessage = destinationObjectiveMessage; quest.experienceReward = experienceReward; quest.fixedCombatEntries.AddRange(fixedCombatEntries); quest.gearRequirements.AddRange(gearRequirements); quest.gearRewardContentNames.AddRange(gearRewardContentNames); quest.gearRewards.AddRange(gearRewards); quest.goldReward = goldReward; quest.monsterRequirements.AddRange(monsterRequirements); quest.name = name; quest.objectiveMessage = objectiveMessage; quest.stage = stage; return(quest); }
/// <summary> /// Reads a WorldEntry object from the content pipeline. /// </summary> protected override WorldEntry <T> Read(ContentReader input, WorldEntry <T> existingInstance) { WorldEntry <T> desc = existingInstance; if (desc == null) { desc = new WorldEntry <T>(); } input.ReadRawObject <MapEntry <T> >(desc as MapEntry <T>); desc.MapContentName = input.ReadString(); return(desc); }