示例#1
0
        /// <summary>
        /// Compares an npc
        /// </summary>
        /// <param name="npcId">Id of the npc</param>
        /// <param name="currentNpc">Current npc, if null the npc will be loaded</param>
        /// <returns>Compare Result</returns>
        public async Task <CompareResult> CompareNpc(string npcId, KortistoNpc currentNpc = null)
        {
            if (currentNpc == null)
            {
                currentNpc = await _npcDbAccess.GetFlexFieldObjectById(npcId);
            }

            KortistoNpc oldNpc = await _npcSnapshotDbAccess.GetSnapshotById(npcId);

            return(CompareObjects(currentNpc, oldNpc));
        }
示例#2
0
        /// <summary>
        /// Compares an npc
        /// </summary>
        /// <param name="npcId">Id of the npc</param>
        /// <param name="currentNpc">Current npc, if null the npc will be loaded</param>
        /// <returns>Compare Result</returns>
        public async Task <CompareResult> CompareNpc(string npcId, KortistoNpc currentNpc = null)
        {
            if (currentNpc == null)
            {
                currentNpc = await _npcDbAccess.GetFlexFieldObjectById(npcId);
            }

            KortistoNpc oldNpc = await _npcSnapshotDbAccess.GetSnapshotById(npcId);

            CompareResult result = CompareObjects(currentNpc, oldNpc);

            await CompareExportSnippets(npcId, result);
            await CompareStateMachines(npcId, result);

            return(result);
        }