public void CopyTo(Quest quest) { if (quest == null) { Debug.LogWarning("Quest Machine: QuestProxy.CopyTo destination quest is null."); return; } quest.isInstance = isInstance; quest.id = new StringField(id); quest.title = new StringField(displayName); quest.group = new StringField(group); quest.labels = StringsToStringFields(labels); quest.icon = QuestMachine.GetImage(iconPath); quest.questGiverID = new StringField(giver); quest.isTrackable = isTrackable; quest.showInTrackHUD = track; quest.isAbandonable = isAbandonable; quest.rememberIfAbandoned = rememberIfAbandoned; quest.autostartConditionSet = autostartConditionSet.CreateConditionSet(); quest.offerConditionSet = offerConditionSet.CreateConditionSet(); quest.offerConditionsUnmetContentList = QuestContentProxy.CreateList(offerUnmetContentList); quest.offerContentList = QuestContentProxy.CreateList(offerContentList); quest.maxTimes = maxTimes; quest.timesAccepted = timesAccepted; quest.UpdateCooldown(); quest.cooldownSeconds = cooldownSecs; quest.cooldownSecondsRemaining = cooldownSecsRemain; quest.stateInfoList = QuestStateInfoProxy.CreateList(stateInfoList); quest.counterList = QuestCounterProxy.CreateList(counterList); quest.nodeList = QuestNodeProxy.CreateList(nodeList); quest.tagDictionary = new TagDictionary(tags); quest.indicatorStates = QuestIndicatorStateRecordProxy.ArrayToDictionary(indicators); quest.goalEntityTypeName = goalEntity; quest.SetRuntimeReferences(); quest.SetState(state, false); QuestNodeProxy.CopyStatesTo(nodeList, quest); }
public override void OnAfterProxyDeserialization() { base.OnAfterProxyDeserialization(); contentList = QuestContentProxy.CreateList(m_contentListSerializationProxy); m_contentListSerializationProxy = null; // After deserializing, free proxy memory. }