public static List <BaseQuest> Quests(GenericReader reader, PlayerMobile player) { List <BaseQuest> quests = new List <BaseQuest>(); if (reader == null) { return(quests); } int version = Version(reader); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { BaseQuest quest = Construct(reader) as BaseQuest; if (quest == null) { if (version >= 0) { SubRead(reader, null); } continue; } quest.Owner = player; if (version < 0) { quest.Deserialize(reader); } else if (!SubRead(reader, quest.Deserialize)) { continue; } quests.Add(quest); } return(quests); }
public static List <BaseQuest> Quests(GenericReader reader, PlayerMobile player) { List <BaseQuest> quests = new List <BaseQuest>(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { BaseQuest quest = Construct(reader) as BaseQuest; if (quest == null) { continue; } quest.Owner = player; quest.Deserialize(reader); quests.Add(quest); } return(quests); }