Пример #1
0
 public static bool CheckIfNullObjectCasting(object objToCheck, SkillData skill, CharacterInstance ch,
                                             CastingFunctionType castingType = CastingFunctionType.Failed, CharacterInstance victim = null,
                                             ObjectInstance obj = null)
 {
     if (objToCheck != null)
     {
         return(false);
     }
     ExecuteCastingType(castingType, skill, ch, victim, obj);
     return(true);
 }
Пример #2
0
        private static void ExecuteCastingType(CastingFunctionType castingType, SkillData skill, CharacterInstance ch,
                                               CharacterInstance victim = null, ObjectInstance obj = null)
        {
            switch (castingType)
            {
            case CastingFunctionType.Success:
                ch.SuccessfulCast(skill, victim, obj);
                break;

            case CastingFunctionType.Immune:
                ch.ImmuneCast(skill, victim, obj);
                break;

            default:
                ch.FailedCast(skill, victim, obj);
                break;
            }
        }