public virtual void BaseDeserialize(GenericReader reader) { Type[] referenceTable = this.TypeReferenceTable; int version = reader.ReadEncodedInt(); switch (version) { case 0: { int count = reader.ReadEncodedInt(); m_Objectives = new ArrayList(count); for (int i = 0; i < count; ++i) { QuestObjective obj = QuestSerializer.DeserializeObjective(referenceTable, reader); if (obj != null) { obj.System = this; m_Objectives.Add(obj); } } count = reader.ReadEncodedInt(); m_Conversations = new ArrayList(count); for (int i = 0; i < count; ++i) { QuestConversation conv = QuestSerializer.DeserializeConversation(referenceTable, reader); if (conv != null) { conv.System = this; m_Conversations.Add(conv); } } break; } } ChildDeserialize(reader); }
public virtual void BaseDeserialize(IGenericReader reader) { var referenceTable = TypeReferenceTable; var version = reader.ReadEncodedInt(); switch (version) { case 0: { var count = reader.ReadEncodedInt(); Objectives = new List <QuestObjective>(count); for (var i = 0; i < count; ++i) { var obj = QuestSerializer.DeserializeObjective(referenceTable, reader); if (obj != null) { obj.System = this; Objectives.Add(obj); } } count = reader.ReadEncodedInt(); Conversations = new List <QuestConversation>(count); for (var i = 0; i < count; ++i) { var conv = QuestSerializer.DeserializeConversation(referenceTable, reader); if (conv != null) { conv.System = this; Conversations.Add(conv); } } break; } } ChildDeserialize(reader); }