Пример #1
0
        /// <summary>
        /// Checks if the conditionals to use this NPCChatDialogItemBase pass for the given <paramref name="user"/>
        /// and <paramref name="npc"/>.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <param name="npc">The NPC.</param>
        /// <returns>True if the conditionals to use this NPCChatDialogItemBase pass for the given <paramref name="user"/>
        /// and <paramref name="npc"/>; otherwise false.</returns>
        public bool CheckConditionals(object user, object npc)
        {
            var c = Conditionals;
            if (c == null)
                return true;

            return Conditionals.Evaluate(user, npc);
        }
Пример #2
0
        /// <summary>
        /// Checks if the conditionals to use this NPCChatResponseBase pass for the given <paramref name="user"/>
        /// and <paramref name="npc"/>.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <param name="npc">The NPC.</param>
        /// <returns>True if the conditionals to use this NPCChatResponseBase pass for the given <paramref name="user"/>
        /// and <paramref name="npc"/>; otherwise false.</returns>
        public bool CheckConditionals(object user, object npc)
        {
            var c = Conditionals;

            if (c == null)
            {
                return(true);
            }

            return(Conditionals.Evaluate(user, npc));
        }