Example #1
0
 public static int OnDamageExtraEffect(ref HurtDataInfo _hurt, int _hurtValue)
 {
     BuffSkill skill = null;
     SkillSlot slot = null;
     BufferLogicEffect logicEffect = null;
     List<PoolObjHandle<BuffSkill>> extraHurtList = null;
     if ((_hurt.atker != 0) && !_hurt.atker.handle.ActorControl.IsDeadState)
     {
         logicEffect = _hurt.atker.handle.BuffHolderComp.logicEffect;
         extraHurtList = logicEffect.GetExtraHurtList();
         for (int i = 0; i < extraHurtList.Count; i++)
         {
             if (_hurt.target == 0)
             {
                 return _hurtValue;
             }
             skill = extraHurtList[i];
             int num = skill.GetSkillFuncParam(0x48, 0, false);
             if ((_hurt.atkSlot == num) && _hurt.atker.handle.SkillControl.TryGetSkillSlot(_hurt.atkSlot, out slot))
             {
                 int num2 = skill.GetSkillFuncParam(0x48, 1, false);
                 int num3 = skill.GetSkillFuncParam(0x48, 2, false);
                 int num4 = skill.GetSkillFuncParam(0x48, 3, false);
                 int num5 = skill.GetSkillFuncParam(0x48, 4, false);
                 logicEffect.SetSkillSlotUseTime(_hurt.atkSlot, num5);
                 logicEffect.SetSkillSlotUseCount(_hurt.atkSlot, slot.GetSkillUseCount());
                 return logicEffect.DamageExtraEffect(ref _hurt, _hurtValue, num2, num3, num4);
             }
         }
     }
     return _hurtValue;
 }
Example #2
0
        public static int OnDamageExtraEffect(ref HurtDataInfo _hurt, int _hurtValue)
        {
            SkillSlot skillSlot = null;

            if (!_hurt.atker || _hurt.atker.handle.ActorControl.IsDeadState)
            {
                return(_hurtValue);
            }
            BufferLogicEffect logicEffect          = _hurt.atker.handle.BuffHolderComp.logicEffect;
            List <PoolObjHandle <BuffSkill> > list = logicEffect.GetExtraHurtList();

            for (int i = 0; i < list.get_Count(); i++)
            {
                if (!_hurt.target)
                {
                    return(_hurtValue);
                }
                BuffSkill buffSkill      = list.get_Item(i);
                int       skillFuncParam = buffSkill.GetSkillFuncParam(72, 0, false);
                if (_hurt.atkSlot == (SkillSlotType)skillFuncParam && _hurt.atker.handle.SkillControl.TryGetSkillSlot(_hurt.atkSlot, out skillSlot))
                {
                    int skillFuncParam2 = buffSkill.GetSkillFuncParam(72, 1, false);
                    int skillFuncParam3 = buffSkill.GetSkillFuncParam(72, 2, false);
                    int skillFuncParam4 = buffSkill.GetSkillFuncParam(72, 3, false);
                    int skillFuncParam5 = buffSkill.GetSkillFuncParam(72, 4, false);
                    logicEffect.SetSkillSlotUseTime(_hurt.atkSlot, skillFuncParam5);
                    logicEffect.SetSkillSlotUseCount(_hurt.atkSlot, skillSlot.GetSkillUseCount());
                    return(logicEffect.DamageExtraEffect(ref _hurt, _hurtValue, skillFuncParam2, skillFuncParam3, skillFuncParam4));
                }
            }
            return(_hurtValue);
        }
        public int OnDamage(ref HurtDataInfo _hurt, int _hurtValue)
        {
            if (!_hurt.bLastHurt)
            {
                this.clearRule.CheckBuffClear(1);
            }
            if (!_hurt.bExtraBuff)
            {
                SkillSlotType atkSlot = _hurt.atkSlot;
                SkillSlotType atkSlot2;
                bool          flag = this.OnChangeExtraEffectSkillSlot(_hurt.atker, _hurt.atkSlot, out atkSlot2);
                if (flag)
                {
                    _hurt.atkSlot = atkSlot2;
                }
                this.OnDamageTriggerEffect(_hurt.target, _hurt.atker);
                this.OnDamageExtraEffect(_hurt.atker, _hurt.atkSlot);
                if (flag)
                {
                    _hurt.atkSlot = atkSlot;
                }
            }
            int num = _hurtValue * _hurt.iEffectFadeRate / 10000;

            num = num * _hurt.iOverlayFadeRate / 10000;
            num = this.protectRule.ResistDamage(ref _hurt, num);
            num = BufferLogicEffect.OnDamageExtraEffect(ref _hurt, num);
            num = this.DealDamageContionType(ref _hurt, num);
            this.OnDamageExtraHurtFunc(ref _hurt, _hurt.atkSlot);
            return(num);
        }
 public override void OnUse()
 {
     base.OnUse();
     this.SpawnedBuffList.Clear();
     this.overlayRule     = null;
     this.clearRule       = null;
     this.protectRule     = null;
     this.changeSkillRule = null;
     this.markRule        = null;
     this.logicEffect     = null;
     this.bRemoveList     = true;
     this.delBuffList.Clear();
 }
Example #5
0
        private int DamageExtraEffect(ref HurtDataInfo _hurt, int _hurtVale, int _hurtRate, int _typeMask, int _typeSubMask)
        {
            SkillSlot skillSlot = null;

            if (_hurt.atker.handle.SkillControl.TryGetSkillSlot(_hurt.atkSlot, out skillSlot))
            {
                BufferLogicEffect logicEffect = _hurt.atker.handle.BuffHolderComp.logicEffect;
                int num = _hurtVale + logicEffect.GetSkillSlotExtraHurt(_hurt.atkSlot, _hurtRate);
                if (this.buffHolder.CheckTargetSubType(_typeMask, _typeSubMask, _hurt.target))
                {
                    this.AddSkillSlotHurt(_hurt.atkSlot, num);
                }
                return(num);
            }
            return(_hurtVale);
        }
 public override void Init()
 {
     this.overlayRule     = new BuffOverlayRule();
     this.clearRule       = new BuffClearRule();
     this.protectRule     = new BuffProtectRule();
     this.changeSkillRule = new BuffChangeSkillRule();
     this.markRule        = new BufferMarkRule();
     this.logicEffect     = new BufferLogicEffect();
     this.overlayRule.Init(this);
     this.clearRule.Init(this);
     this.protectRule.Init(this);
     this.changeSkillRule.Init(this);
     this.markRule.Init(this);
     this.logicEffect.Init(this);
     base.Init();
 }
Example #7
0
        public int OnDamage(ref HurtDataInfo _hurt, int _hurtValue)
        {
            int num = _hurtValue;

            if (!_hurt.bLastHurt)
            {
                this.clearRule.CheckBuffClear(RES_SKILLFUNC_CLEAR_RULE.RES_SKILLFUNC_CLEAR_DAMAGE);
            }
            if (!_hurt.bExtraBuff)
            {
                this.OnDamageExtraEffect(_hurt.atker, _hurt.atkSlot);
            }
            num = (num * _hurt.iEffectFadeRate) / 0x2710;
            num = (num * _hurt.iOverlayFadeRate) / 0x2710;
            num = this.protectRule.ResistDamage(ref _hurt, num);
            return(BufferLogicEffect.OnDamageExtraEffect(ref _hurt, num));
        }