예제 #1
0
        public static bool VerifyTo(SkillTriggerParameters parameters, SkillTriggableConditions conditions)
        {
            if (parameters == null)
            {
                return(false);
            }

            if (conditions == null)
            {
                return(false);
            }

            if (conditions.list == null || conditions.list.Count <= 0)
            {
                return(false);
            }

            bool ret = true;

            foreach (var keyValue in conditions.list)
            {
                var param = parameters.GetParam(keyValue.key);
                var value = param?.value ?? 0;
                ret &= keyValue.condition.Verify(value);
            }

            return(ret);
        }
예제 #2
0
 public bool Verify(SkillTriggableConditions conditions)
 {
     return(VerifyTo(_parameters, conditions));
 }