Inheritance: BaseSkill
Beispiel #1
0
        // Token: 0x06000011 RID: 17 RVA: 0x00002554 File Offset: 0x00000754
        protected override void ActivateLocally(Character _affectedCharacter, object[] _infos)
        {
            MeleeSkill       meleeSkill       = base.ParentItem as MeleeSkill;
            MeleeHitDetector meleeHitDetector = null;
            bool             flag;

            if (meleeSkill != null && meleeSkill.MeleeHitDetector != null)
            {
                meleeHitDetector = ((_affectedCharacter != null) ? _affectedCharacter.SkillMeleeDetector : null);
                flag             = (meleeHitDetector != null);
            }
            else
            {
                flag = false;
            }
            bool flag2 = flag;

            if (flag2)
            {
                meleeHitDetector.HitStarted(-1);
            }
            else
            {
                MeleeWeapon meleeWeapon = ((_affectedCharacter != null) ? _affectedCharacter.CurrentWeapon : null) as MeleeWeapon;
                bool        flag3       = meleeWeapon != null;
                if (flag3)
                {
                    meleeWeapon.HitStarted(-1);
                }
            }
        }
Beispiel #2
0
        public static void Prefix(Skill __instance, bool _tryingToActivate)
        {
            bool flag;

            if (_tryingToActivate)
            {
                MeleeSkill meleeSkill = __instance as MeleeSkill;
                if (meleeSkill != null && __instance.OwnerCharacter.NextAtkAllowed == 2)
                {
                    flag = meleeSkill.HasAllRequirements(false);
                    goto IL_26;
                }
            }
            flag = false;
IL_26:
            bool flag2 = flag;

            if (flag2)
            {
                __instance.OwnerCharacter.ForceCancel(true, true);
                At.SetValue <bool>(true, typeof(Character), __instance.OwnerCharacter, "m_inLocomotion");
                At.SetValue <bool>(true, typeof(Character), __instance.OwnerCharacter, "m_nextIsLocomotion");
            }
        }
Beispiel #3
0
        // Token: 0x06000007 RID: 7 RVA: 0x0000225C File Offset: 0x0000045C
        public static bool AdaptGrip(Character __instance, ref int _type, ref int _id)
        {
            Weapon weapon = (__instance != null) ? __instance.CurrentWeapon : null;
            bool   flag   = weapon == null;
            bool   result;

            if (flag)
            {
                result = false;
            }
            else
            {
                bool flag2 = _type == 2502;
                if (flag2)
                {
                    MeleeSkill meleeSkill = At.GetValue(typeof(Character), __instance, "m_lastUsedSkill") as MeleeSkill;
                    bool       flag3      = meleeSkill != null && meleeSkill.ActivateEffectAnimType == Character.SpellCastType.WeaponSkill1;
                    if (flag3)
                    {
                        bool flag4 = meleeSkill.RequiredWeaponTypes[0] != weapon.Type;
                        if (flag4)
                        {
                            CustomWeaponBehaviour.ChangeGrip(__instance, meleeSkill.RequiredWeaponTypes[0]);
                            return(true);
                        }
                    }
                }
                bool flag5 = weapon.HasTag(CustomWeaponBehaviour.FinesseTag);
                if (flag5)
                {
                    bool flag6 = _type == 1 && !BehaviourManager.IsComboAttack(__instance, _type, _id);
                    if (flag6)
                    {
                        CustomWeaponBehaviour.ChangeGrip(__instance, Weapon.WeaponType.Axe_1H);
                        return(true);
                    }
                }
                bool flag7 = BehaviourManager.IsHalfHandedMode(weapon);
                if (flag7)
                {
                    bool flag8 = _type == 1 && !BehaviourManager.IsComboAttack(__instance, _type, _id);
                    if (flag8)
                    {
                        CustomWeaponBehaviour.ChangeGrip(__instance, Weapon.WeaponType.Spear_2H);
                        return(true);
                    }
                }
                bool flag9 = BehaviourManager.IsBastardMode(weapon);
                if (flag9)
                {
                    Weapon.WeaponType?bastardType = BehaviourManager.GetBastardType(weapon.Type);
                    Weapon.WeaponType valueOrDefault;
                    bool flag10;
                    if (bastardType != null)
                    {
                        valueOrDefault = bastardType.GetValueOrDefault();
                        flag10         = true;
                    }
                    else
                    {
                        flag10 = false;
                    }
                    bool flag11 = flag10;
                    if (flag11)
                    {
                        bool flag12 = _type != 2502;
                        if (flag12)
                        {
                            CustomWeaponBehaviour.ChangeGrip(__instance, valueOrDefault);
                            return(true);
                        }
                    }
                }
                result = false;
            }
            return(result);
        }