private void OnDeadExtraEffect(PoolObjHandle <ActorRoot> _attack)
        {
            if (!_attack)
            {
                return;
            }
            ResDT_SkillFunc skillFunc = null;

            for (int i = 0; i < _attack.get_handle().BuffHolderComp.SpawnedBuffList.get_Count(); i++)
            {
                BuffSkill buffSkill = _attack.get_handle().BuffHolderComp.SpawnedBuffList.get_Item(i);
                if (buffSkill != null && buffSkill.FindSkillFunc(33, out skillFunc))
                {
                    int skillFuncParam  = buffSkill.GetSkillFuncParam(skillFunc, 0, false);
                    int skillFuncParam2 = buffSkill.GetSkillFuncParam(skillFunc, 1, false);
                    int skillFuncParam3 = buffSkill.GetSkillFuncParam(skillFunc, 2, false);
                    int skillFuncParam4 = buffSkill.GetSkillFuncParam(skillFunc, 3, false);
                    int skillFuncParam5 = buffSkill.GetSkillFuncParam(skillFunc, 4, false);
                    if (skillFuncParam3 == 1 && this.CheckTargetSubType(skillFuncParam4, skillFuncParam5, this.actorPtr))
                    {
                        SkillUseParam skillUseParam = default(SkillUseParam);
                        skillUseParam.Init();
                        skillUseParam.SetOriginator(_attack);
                        skillUseParam.bExposing = buffSkill.skillContext.bExposing;
                        _attack.get_handle().SkillControl.SpawnBuff(_attack, ref skillUseParam, skillFuncParam, true);
                    }
                }
            }
        }
示例#2
0
 private void OnDeadExtraEffect(PoolObjHandle <ActorRoot> _attack)
 {
     if (_attack != 0)
     {
         BuffSkill       skill        = null;
         ResDT_SkillFunc outSkillFunc = null;
         for (int i = 0; i < _attack.handle.BuffHolderComp.SpawnedBuffList.Count; i++)
         {
             skill = _attack.handle.BuffHolderComp.SpawnedBuffList[i];
             if ((skill != null) && skill.FindSkillFunc(0x21, out outSkillFunc))
             {
                 int inSkillCombineId = skill.GetSkillFuncParam(0x21, 0, false);
                 int num3             = skill.GetSkillFuncParam(0x21, 1, false);
                 int num4             = skill.GetSkillFuncParam(0x21, 2, false);
                 int typeMask         = skill.GetSkillFuncParam(0x21, 3, false);
                 int typeSubMask      = skill.GetSkillFuncParam(0x21, 4, false);
                 if ((num4 == 1) && this.CheckTargetSubType(typeMask, typeSubMask, base.actorPtr))
                 {
                     SkillUseParam inParam = new SkillUseParam();
                     inParam.SetOriginator(_attack);
                     _attack.handle.SkillControl.SpawnBuff(_attack, ref inParam, inSkillCombineId, true);
                 }
             }
         }
     }
 }
        private void OnDamageTriggerEffect(PoolObjHandle <ActorRoot> _selfActor, PoolObjHandle <ActorRoot> _attacker)
        {
            ResDT_SkillFunc skillFunc = null;

            if (!_selfActor || !_attacker || _attacker.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
            {
                return;
            }
            for (int i = 0; i < _selfActor.get_handle().BuffHolderComp.SpawnedBuffList.get_Count(); i++)
            {
                BuffSkill buffSkill = _selfActor.get_handle().BuffHolderComp.SpawnedBuffList.get_Item(i);
                if (buffSkill != null && buffSkill.FindSkillFunc(84, out skillFunc))
                {
                    int skillFuncParam = buffSkill.GetSkillFuncParam(skillFunc, 0, false);
                    if (skillFuncParam > 0)
                    {
                        SkillUseParam skillUseParam = default(SkillUseParam);
                        skillUseParam.Init();
                        skillUseParam.SetOriginator(_selfActor);
                        skillUseParam.bExposing = buffSkill.skillContext.bExposing;
                        _selfActor.get_handle().SkillControl.SpawnBuff(_attacker, ref skillUseParam, skillFuncParam, true);
                        _selfActor.get_handle().BuffHolderComp.RemoveBuff(buffSkill);
                    }
                }
            }
        }
        public void OnAssistEffect(ref PoolObjHandle <ActorRoot> deadActor)
        {
            ResDT_SkillFunc skillFunc = null;

            for (int i = 0; i < this.SpawnedBuffList.get_Count(); i++)
            {
                BuffSkill buffSkill = this.SpawnedBuffList.get_Item(i);
                if (buffSkill != null && buffSkill.FindSkillFunc(33, out skillFunc))
                {
                    int skillFuncParam  = buffSkill.GetSkillFuncParam(skillFunc, 0, false);
                    int skillFuncParam2 = buffSkill.GetSkillFuncParam(skillFunc, 1, false);
                    int skillFuncParam3 = buffSkill.GetSkillFuncParam(skillFunc, 2, false);
                    int skillFuncParam4 = buffSkill.GetSkillFuncParam(skillFunc, 3, false);
                    int skillFuncParam5 = buffSkill.GetSkillFuncParam(skillFunc, 4, false);
                    if (skillFuncParam3 == 2 && this.CheckTargetSubType(skillFuncParam4, skillFuncParam5, deadActor))
                    {
                        SkillUseParam skillUseParam = default(SkillUseParam);
                        skillUseParam.Init();
                        skillUseParam.SetOriginator(this.actorPtr);
                        skillUseParam.bExposing = buffSkill.skillContext.bExposing;
                        this.actor.SkillControl.SpawnBuff(this.actorPtr, ref skillUseParam, skillFuncParam, true);
                    }
                }
            }
        }
示例#5
0
        private void TriggerAction(PoolObjHandle <ActorRoot> _originator)
        {
            SkillUseParam param = new SkillUseParam();

            param.SetOriginator(_originator);
            param.TargetActor = this.sourceActor;
            this.Use(_originator, ref param);
        }
示例#6
0
        private void OnDamageExtraEffect(PoolObjHandle <ActorRoot> _attack, SkillSlotType _slotType)
        {
            BuffSkill       inBuff       = null;
            ResDT_SkillFunc outSkillFunc = null;

            if (_attack != 0)
            {
                for (int i = 0; i < _attack.handle.BuffHolderComp.SpawnedBuffList.Count; i++)
                {
                    inBuff = _attack.handle.BuffHolderComp.SpawnedBuffList[i];
                    if ((inBuff != null) && inBuff.FindSkillFunc(0x21, out outSkillFunc))
                    {
                        bool flag             = false;
                        bool flag2            = true;
                        int  inSkillCombineId = inBuff.GetSkillFuncParam(0x21, 0, false);
                        int  num3             = inBuff.GetSkillFuncParam(0x21, 1, false);
                        int  num4             = inBuff.GetSkillFuncParam(0x21, 2, false);
                        int  typeMask         = inBuff.GetSkillFuncParam(0x21, 3, false);
                        int  typeSubMask      = inBuff.GetSkillFuncParam(0x21, 4, false);
                        int  num7             = inBuff.GetSkillFuncParam(0x21, 5, false);
                        if ((num4 == 0) && this.CheckTargetSubType(typeMask, typeSubMask, base.actorPtr))
                        {
                            if (num3 == 0)
                            {
                                flag = true;
                            }
                            else if ((num3 & (((int)1) << _slotType)) > 0)
                            {
                                flag = true;
                            }
                            if (num7 > 0)
                            {
                                if ((Singleton <FrameSynchr> .GetInstance().LogicFrameTick - inBuff.controlTime) >= num7)
                                {
                                    flag2 = true;
                                }
                                else
                                {
                                    flag2 = false;
                                }
                            }
                            if (flag && flag2)
                            {
                                SkillUseParam inParam = new SkillUseParam();
                                inParam.SetOriginator(_attack);
                                _attack.handle.SkillControl.SpawnBuff(base.actorPtr, ref inParam, inSkillCombineId, true);
                                inBuff.controlTime = Singleton <FrameSynchr> .GetInstance().LogicFrameTick;

                                if (num7 == -1)
                                {
                                    _attack.handle.BuffHolderComp.RemoveBuff(inBuff);
                                }
                            }
                        }
                    }
                }
            }
        }
示例#7
0
 private void SpawnSkillEffect(int _skillCombineID)
 {
     if (base.sourceActor != 0)
     {
         SkillUseParam inParam = new SkillUseParam();
         inParam.SetOriginator(base.sourceActor);
         this.sourceActor.handle.SkillControl.SpawnBuff(base.sourceActor, ref inParam, _skillCombineID, true);
     }
 }
示例#8
0
 private void SpawnSkillEffect(int _skillCombineID)
 {
     if (this.buffHolder.actorPtr != 0)
     {
         SkillUseParam inParam = new SkillUseParam();
         inParam.SetOriginator(this.buffHolder.actorPtr);
         this.buffHolder.actorPtr.handle.SkillControl.SpawnBuff(this.buffHolder.actorPtr, ref inParam, _skillCombineID, true);
     }
 }
示例#9
0
        private int ResistDeadDamage(ref HurtDataInfo _hurt, int _hurtValue)
        {
            ResDT_SkillFunc skillFunc = null;

            if (this.buffHolder == null || this.buffHolder.actor == null)
            {
                return(_hurtValue);
            }
            ActorRoot actor = this.buffHolder.actor;

            for (int i = 0; i < actor.BuffHolderComp.SpawnedBuffList.get_Count(); i++)
            {
                BuffSkill buffSkill = actor.BuffHolderComp.SpawnedBuffList.get_Item(i);
                if (buffSkill != null && buffSkill.FindSkillFunc(54, out skillFunc))
                {
                    int skillFuncParam = buffSkill.GetSkillFuncParam(skillFunc, 0, false);
                    if (buffSkill.GetSkillFuncParam(skillFunc, 1, false) == 0)
                    {
                        if (actor.ValueComponent.actorHp <= _hurtValue)
                        {
                            SkillUseParam skillUseParam = default(SkillUseParam);
                            skillUseParam.SetOriginator(_hurt.atker);
                            skillUseParam.bExposing = buffSkill.skillContext.bExposing;
                            actor.SkillControl.SpawnBuff(actor.SelfPtr, ref skillUseParam, skillFuncParam, true);
                            this.buffHolder.RemoveBuff(buffSkill);
                            DefaultGameEventParam defaultGameEventParam = new DefaultGameEventParam(this.buffHolder.actorPtr, _hurt.atker);
                            Singleton <GameEventSys> .get_instance().SendEvent <DefaultGameEventParam>(GameEventDef.Event_ActorImmuneDeadHurt, ref defaultGameEventParam);

                            _hurtValue = 0;
                        }
                    }
                    else
                    {
                        SkillUseParam skillUseParam2 = default(SkillUseParam);
                        skillUseParam2.SetOriginator(_hurt.atker);
                        skillUseParam2.bExposing = buffSkill.skillContext.bExposing;
                        actor.SkillControl.SpawnBuff(actor.SelfPtr, ref skillUseParam2, skillFuncParam, true);
                        this.buffHolder.RemoveBuff(buffSkill);
                        _hurtValue = 0;
                    }
                }
                if (_hurt.atkSlot == SkillSlotType.SLOT_SKILL_0 && buffSkill != null && buffSkill.FindSkillFunc(67, out skillFunc) && _hurt.atker && _hurt.atker.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                {
                    int skillFuncParam2 = buffSkill.GetSkillFuncParam(skillFunc, 0, false);
                    int skillFuncParam3 = buffSkill.GetSkillFuncParam(skillFunc, 4, false);
                    if (skillFuncParam2 == 1)
                    {
                        _hurtValue = _hurtValue * (10000 - skillFuncParam3) / 10000;
                    }
                    else if (skillFuncParam2 == 0)
                    {
                        _hurtValue -= skillFuncParam3;
                    }
                }
            }
            return(_hurtValue);
        }
示例#10
0
        private int ResistDeadDamage(ref HurtDataInfo _hurt, int _hurtValue)
        {
            BuffSkill       inBuff       = null;
            ResDT_SkillFunc outSkillFunc = null;

            if ((this.buffHolder != null) && (this.buffHolder.actor != null))
            {
                ActorRoot actor = this.buffHolder.actor;
                for (int i = 0; i < actor.BuffHolderComp.SpawnedBuffList.Count; i++)
                {
                    inBuff = actor.BuffHolderComp.SpawnedBuffList[i];
                    if ((inBuff != null) && inBuff.FindSkillFunc(0x36, out outSkillFunc))
                    {
                        int inSkillCombineId = inBuff.GetSkillFuncParam(0x36, 0, false);
                        if (inBuff.GetSkillFuncParam(0x36, 1, false) == 0)
                        {
                            if (actor.ValueComponent.actorHp <= _hurtValue)
                            {
                                SkillUseParam inParam = new SkillUseParam();
                                inParam.SetOriginator(_hurt.atker);
                                actor.SkillControl.SpawnBuff(actor.SelfPtr, ref inParam, inSkillCombineId, true);
                                this.buffHolder.RemoveBuff(inBuff);
                                DefaultGameEventParam prm = new DefaultGameEventParam(this.buffHolder.actorPtr, _hurt.atker);
                                Singleton <GameEventSys> .instance.SendEvent <DefaultGameEventParam>(GameEventDef.Event_ActorImmuneDeadHurt, ref prm);

                                _hurtValue = 0;
                            }
                        }
                        else
                        {
                            SkillUseParam param3 = new SkillUseParam();
                            param3.SetOriginator(_hurt.atker);
                            actor.SkillControl.SpawnBuff(actor.SelfPtr, ref param3, inSkillCombineId, true);
                            this.buffHolder.RemoveBuff(inBuff);
                            _hurtValue = 0;
                        }
                    }
                    if ((((_hurt.atkSlot == SkillSlotType.SLOT_SKILL_0) && (inBuff != null)) && (inBuff.FindSkillFunc(0x43, out outSkillFunc) && (_hurt.atker != 0))) && (_hurt.atker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero))
                    {
                        int num4 = inBuff.GetSkillFuncParam(0x43, 0, false);
                        int num5 = inBuff.GetSkillFuncParam(0x43, 4, false);
                        switch (num4)
                        {
                        case 1:
                            _hurtValue = (_hurtValue * (0x2710 - num5)) / 0x2710;
                            break;

                        case 0:
                            _hurtValue -= num5;
                            break;
                        }
                    }
                }
            }
            return(_hurtValue);
        }
 private void SpawnSkillEffect(int _skillCombineID)
 {
     if (this.sourceActor)
     {
         SkillUseParam skillUseParam = default(SkillUseParam);
         skillUseParam.Init();
         skillUseParam.SetOriginator(this.sourceActor);
         this.sourceActor.get_handle().SkillControl.SpawnBuff(this.sourceActor, ref skillUseParam, _skillCombineID, true);
     }
 }
示例#12
0
 private void EnableEquipBuff(CEquipBuffInfo equipBuffInfo)
 {
     if (!equipBuffInfo.m_isEnabled)
     {
         SkillUseParam inParam = new SkillUseParam();
         inParam.SetOriginator(base.actorPtr);
         base.actor.SkillControl.SpawnBuff(base.actorPtr, ref inParam, (int)equipBuffInfo.m_buffID, false);
         equipBuffInfo.m_isEnabled = true;
     }
 }
示例#13
0
 private void SpawnSkillEffect(int _skillCombineID, SkillSlotType _slotType, bool inExposing)
 {
     if (this.buffHolder.actorPtr)
     {
         SkillUseParam skillUseParam = default(SkillUseParam);
         skillUseParam.SlotType = _slotType;
         skillUseParam.SetOriginator(this.buffHolder.actorPtr);
         skillUseParam.bExposing = inExposing;
         this.buffHolder.actorPtr.get_handle().SkillControl.SpawnBuff(this.buffHolder.actorPtr, ref skillUseParam, _skillCombineID, true);
     }
 }
示例#14
0
 public void RecoverClearBuff()
 {
     for (int i = 0; i < this.CacheBufferList.get_Count(); i++)
     {
         int           inSkillCombineId = this.CacheBufferList.get_Item(i);
         SkillUseParam skillUseParam    = default(SkillUseParam);
         skillUseParam.SetOriginator(this.buffHolder.actorPtr);
         this.buffHolder.actor.SkillControl.SpawnBuff(this.buffHolder.actorPtr, ref skillUseParam, inSkillCombineId, false);
     }
     this.CacheBufferList.Clear();
 }
示例#15
0
 private void SpawnSkillEffect(int _skillCombineID)
 {
     if (this.sourceActor)
     {
         SkillUseParam skillUseParam = default(SkillUseParam);
         skillUseParam.Init();
         skillUseParam.SetOriginator(this.sourceActor);
         skillUseParam.skillUseFrom = SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_PASSIVESKILL;
         this.sourceActor.handle.SkillControl.SpawnBuff(this.sourceActor, ref skillUseParam, _skillCombineID, true);
     }
 }
示例#16
0
        private void TriggerAction(PoolObjHandle <ActorRoot> _originator, SkillUseContext inUseContext)
        {
            SkillUseParam skillUseParam = default(SkillUseParam);

            skillUseParam.Init();
            skillUseParam.SetOriginator(_originator);
            skillUseParam.TargetActor = this.sourceActor;
            if (inUseContext != null)
            {
                skillUseParam.bExposing = inUseContext.bExposing;
            }
            this.Use(_originator, ref skillUseParam);
        }
示例#17
0
        public void RecoverClearBuff()
        {
            int inSkillCombineId = 0;

            for (int i = 0; i < this.CacheBufferList.Count; i++)
            {
                inSkillCombineId = this.CacheBufferList[i];
                SkillUseParam inParam = new SkillUseParam();
                inParam.SetOriginator(this.buffHolder.actorPtr);
                this.buffHolder.actor.SkillControl.SpawnBuff(this.buffHolder.actorPtr, ref inParam, inSkillCombineId, false);
            }
            this.CacheBufferList.Clear();
        }
        private void TriggerAction(PoolObjHandle <ActorRoot> _originator, SkillUseContext inUseContext, int triggerLayer)
        {
            SkillUseParam skillUseParam = default(SkillUseParam);

            skillUseParam.Init();
            skillUseParam.SetOriginator(_originator);
            skillUseParam.TargetActor = this.sourceActor;
            if (inUseContext != null)
            {
                skillUseParam.bExposing    = inUseContext.bExposing;
                skillUseParam.uiFromId     = inUseContext.uiFromId;
                skillUseParam.skillUseFrom = inUseContext.skillUseFrom;
                skillUseParam.MarkCount    = triggerLayer;
            }
            this.Use(_originator, ref skillUseParam);
        }
示例#19
0
        protected void Trigger()
        {
            SkillUseParam skillUseParam = default(SkillUseParam);

            skillUseParam.Init(this.passiveSkill.SlotType);
            skillUseParam.SetOriginator(this.sourceActor);
            if (!this.triggerActor)
            {
                skillUseParam.TargetActor = this.sourceActor;
            }
            else
            {
                skillUseParam.TargetActor = this.triggerActor;
            }
            this.passiveSkill.Use(this.sourceActor, ref skillUseParam);
            this.deltaTime = this.cfgData.iCoolDown;
        }
示例#20
0
        protected void Trigger()
        {
            SkillUseParam param = new SkillUseParam();

            param.Init(this.passiveSkill.SlotType);
            param.SetOriginator(this.sourceActor);
            if (this.triggerActor == 0)
            {
                param.TargetActor = this.sourceActor;
            }
            else
            {
                param.TargetActor = this.triggerActor;
            }
            this.passiveSkill.Use(this.sourceActor, ref param);
            this.deltaTime = this.cfgData.iCoolDown;
        }
示例#21
0
 public override bool Use(PoolObjHandle <ActorRoot> user, ref SkillUseParam param)
 {
     param.SetOriginator(user);
     param.Instigator = user;
     this.skillAbort.InitAbort(false);
     this.bDelayAbortSkill   = false;
     this.bProtectAbortSkill = false;
     if (!base.Use(user, ref param))
     {
         return(false);
     }
     if (param.SlotType == SkillSlotType.SLOT_SKILL_0)
     {
         this.SetSkillSpeed(user);
     }
     return(true);
 }
示例#22
0
        public void OnDead(PoolObjHandle <ActorRoot> _attack)
        {
            BuffSkill       inBuff       = null;
            ResDT_SkillFunc outSkillFunc = null;

            if (this.clearRule != null)
            {
                this.clearRule.CheckBuffNoClear(RES_SKILLFUNC_CLEAR_RULE.RES_SKILLFUNC_CLEAR_DEAD);
            }
            if (this.logicEffect != null)
            {
                this.logicEffect.Clear();
            }
            if (this.actorPtr.handle.ActorControl.IsKilledByHero())
            {
                _attack = this.actorPtr.handle.ActorControl.LastHeroAtker;
            }
            for (int i = 0; i < this.SpawnedBuffList.Count; i++)
            {
                inBuff = this.SpawnedBuffList[i];
                if ((inBuff != null) && inBuff.FindSkillFunc(0x20, out outSkillFunc))
                {
                    int  reviveTime  = inBuff.GetSkillFuncParam(0x20, 0, false);
                    int  reviveLife  = inBuff.GetSkillFuncParam(0x20, 1, false);
                    bool autoReset   = inBuff.GetSkillFuncParam(0x20, 2, false) == 1;
                    bool bBaseRevive = inBuff.GetSkillFuncParam(0x20, 3, false) == 0;
                    bool bCDReset    = inBuff.GetSkillFuncParam(0x20, 4, false) == 1;
                    base.actor.ActorControl.SetReviveContext(reviveTime, reviveLife, autoReset, bBaseRevive, bCDReset);
                    this.RemoveBuff(inBuff);
                }
                if ((((base.actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && (_attack != 0)) && ((_attack.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && (inBuff != null))) && ((inBuff.cfgData != null) && (inBuff.cfgData.bIsInheritByKiller == 1)))
                {
                    this.RemoveBuff(inBuff);
                    SkillUseParam inParam = new SkillUseParam();
                    inParam.SetOriginator(_attack);
                    _attack.handle.SkillControl.SpawnBuff(_attack, ref inParam, inBuff.SkillID, true);
                }
            }
            this.OnDeadExtraEffect(_attack);
            this.markRule.Clear();
        }
        public void OnDead(PoolObjHandle <ActorRoot> _attack)
        {
            ResDT_SkillFunc skillFunc = null;

            if (this.clearRule != null)
            {
                this.clearRule.CheckBuffNoClear(2);
            }
            if (this.logicEffect != null)
            {
                this.logicEffect.Clear();
            }
            if (this.actorPtr.get_handle().ActorControl.IsKilledByHero())
            {
                _attack = this.actorPtr.get_handle().ActorControl.LastHeroAtker;
            }
            for (int i = 0; i < this.SpawnedBuffList.get_Count(); i++)
            {
                BuffSkill buffSkill = this.SpawnedBuffList.get_Item(i);
                if (buffSkill != null && buffSkill.FindSkillFunc(32, out skillFunc))
                {
                    int  skillFuncParam  = buffSkill.GetSkillFuncParam(skillFunc, 0, false);
                    int  skillFuncParam2 = buffSkill.GetSkillFuncParam(skillFunc, 1, false);
                    bool autoReset       = buffSkill.GetSkillFuncParam(skillFunc, 2, false) == 1;
                    bool bBaseRevive     = buffSkill.GetSkillFuncParam(skillFunc, 3, false) == 0;
                    bool bCDReset        = buffSkill.GetSkillFuncParam(skillFunc, 4, false) == 1;
                    this.actor.ActorControl.SetReviveContext(skillFuncParam, skillFuncParam2, autoReset, bBaseRevive, bCDReset);
                    this.RemoveBuff(buffSkill);
                }
                if (this.actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && _attack && _attack.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && buffSkill != null && buffSkill.cfgData != null && buffSkill.cfgData.bIsInheritByKiller == 1)
                {
                    this.RemoveBuff(buffSkill);
                    SkillUseParam skillUseParam = default(SkillUseParam);
                    skillUseParam.SetOriginator(_attack);
                    skillUseParam.bExposing = buffSkill.skillContext.bExposing;
                    _attack.get_handle().SkillControl.SpawnBuff(_attack, ref skillUseParam, buffSkill.SkillID, true);
                }
            }
            this.OnDeadExtraEffect(_attack);
            this.markRule.Clear();
        }
示例#24
0
        private void CopyActorBuff(ref PoolObjHandle <ActorRoot> targetActor)
        {
            if (!targetActor)
            {
                return;
            }
            if (targetActor.handle.BuffHolderComp == null || this.actor.BuffHolderComp == null)
            {
                return;
            }
            List <BuffSkill> spawnedBuffList = this.actor.BuffHolderComp.SpawnedBuffList;

            if (spawnedBuffList != null)
            {
                int count = spawnedBuffList.get_Count();
                for (int i = 0; i < count; i++)
                {
                    this.actor.BuffHolderComp.RemoveBuff(spawnedBuffList.get_Item(i).SkillID);
                }
            }
            List <BuffSkill> spawnedBuffList2 = targetActor.handle.BuffHolderComp.SpawnedBuffList;

            if (spawnedBuffList2 != null)
            {
                int count2 = spawnedBuffList2.get_Count();
                for (int j = 0; j < count2; j++)
                {
                    if (spawnedBuffList2.get_Item(j) != null && spawnedBuffList2.get_Item(j).GetSkillUseContext() != null)
                    {
                        SkillUseParam skillUseParam = default(SkillUseParam);
                        skillUseParam.SetOriginator(spawnedBuffList2.get_Item(j).GetSkillUseContext().Originator);
                        skillUseParam.bExposing    = spawnedBuffList2.get_Item(j).skillContext.bExposing;
                        skillUseParam.uiFromId     = spawnedBuffList2.get_Item(j).skillContext.uiFromId;
                        skillUseParam.skillUseFrom = spawnedBuffList2.get_Item(j).skillContext.skillUseFrom;
                        this.actor.SkillControl.SpawnBuff(this.actorPtr, ref skillUseParam, spawnedBuffList2.get_Item(j).SkillID, true);
                    }
                }
            }
        }
示例#25
0
        public bool Use()
        {
            BuffSkill inBuff = ClassObjPool <BuffSkill> .Get();

            inBuff.Init(this.BuffID);
            if (inBuff.cfgData == null)
            {
                inBuff.Release();
                return(false);
            }
            SkillUseParam param = new SkillUseParam();

            param.Init(SkillSlotType.SLOT_SKILL_VALID, this.TargetActor.handle.ObjID);
            param.SetOriginator(this.SrcActor);
            if (!inBuff.Use(this.SrcActor, ref param))
            {
                inBuff.Release();
                return(false);
            }
            this.buffSkill = new BuffFense(inBuff);
            return(true);
        }
示例#26
0
        public bool Use()
        {
            BuffSkill buffSkill = ClassObjPool <BuffSkill> .Get();

            buffSkill.Init(this.BuffID);
            if (buffSkill.cfgData == null)
            {
                buffSkill.Release();
                return(false);
            }
            SkillUseParam skillUseParam = default(SkillUseParam);

            skillUseParam.Init(SkillSlotType.SLOT_SKILL_VALID, this.TargetActor.get_handle().ObjID);
            skillUseParam.SetOriginator(this.SrcActor);
            if (!buffSkill.Use(this.SrcActor, ref skillUseParam))
            {
                buffSkill.Release();
                return(false);
            }
            this.buffSkill = new BuffFense(buffSkill);
            return(true);
        }
示例#27
0
        public bool Use()
        {
            BuffSkill buffSkill = ClassObjPool <BuffSkill> .Get();

            buffSkill.Init(this.BuffID);
            if (buffSkill.cfgData == null)
            {
                buffSkill.Release();
                return(false);
            }
            SkillUseParam skillUseParam = default(SkillUseParam);

            skillUseParam.Init(SkillSlotType.SLOT_SKILL_VALID, this.TargetActor.handle.ObjID);
            skillUseParam.SetOriginator(this.SrcActor);
            skillUseParam.skillUseFrom = SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_AREATRIGGER;
            skillUseParam.uiFromId     = (uint)this.BuffID;
            if (!buffSkill.Use(this.SrcActor, ref skillUseParam))
            {
                buffSkill.Release();
                return(false);
            }
            this.buffSkill = new BuffFense(buffSkill);
            return(true);
        }
示例#28
0
        public void OnAssistEffect(ref PoolObjHandle <ActorRoot> deadActor)
        {
            BuffSkill       skill        = null;
            ResDT_SkillFunc outSkillFunc = null;

            for (int i = 0; i < this.SpawnedBuffList.Count; i++)
            {
                skill = this.SpawnedBuffList[i];
                if ((skill != null) && skill.FindSkillFunc(0x21, out outSkillFunc))
                {
                    int inSkillCombineId = skill.GetSkillFuncParam(0x21, 0, false);
                    int num3             = skill.GetSkillFuncParam(0x21, 1, false);
                    int num4             = skill.GetSkillFuncParam(0x21, 2, false);
                    int typeMask         = skill.GetSkillFuncParam(0x21, 3, false);
                    int typeSubMask      = skill.GetSkillFuncParam(0x21, 4, false);
                    if ((num4 == 2) && this.CheckTargetSubType(typeMask, typeSubMask, deadActor))
                    {
                        SkillUseParam inParam = new SkillUseParam();
                        inParam.SetOriginator(base.actorPtr);
                        base.actor.SkillControl.SpawnBuff(base.actorPtr, ref inParam, inSkillCombineId, true);
                    }
                }
            }
        }
        private void OnDamageExtraEffect(PoolObjHandle <ActorRoot> _attack, SkillSlotType _slotType)
        {
            ResDT_SkillFunc skillFunc = null;

            if (!_attack)
            {
                return;
            }
            for (int i = 0; i < _attack.get_handle().BuffHolderComp.SpawnedBuffList.get_Count(); i++)
            {
                BuffSkill buffSkill = _attack.get_handle().BuffHolderComp.SpawnedBuffList.get_Item(i);
                if (buffSkill != null && buffSkill.FindSkillFunc(33, out skillFunc))
                {
                    bool flag            = false;
                    bool flag2           = true;
                    int  skillFuncParam  = buffSkill.GetSkillFuncParam(skillFunc, 0, false);
                    int  skillFuncParam2 = buffSkill.GetSkillFuncParam(skillFunc, 1, false);
                    int  skillFuncParam3 = buffSkill.GetSkillFuncParam(skillFunc, 2, false);
                    int  skillFuncParam4 = buffSkill.GetSkillFuncParam(skillFunc, 3, false);
                    int  skillFuncParam5 = buffSkill.GetSkillFuncParam(skillFunc, 4, false);
                    int  skillFuncParam6 = buffSkill.GetSkillFuncParam(skillFunc, 5, false);
                    int  skillFuncParam7 = buffSkill.GetSkillFuncParam(skillFunc, 6, false);
                    int  skillFuncParam8 = buffSkill.GetSkillFuncParam(skillFunc, 7, false);
                    if (skillFuncParam3 == 0 && this.CheckTargetSubType(skillFuncParam4, skillFuncParam5, this.actorPtr))
                    {
                        if (skillFuncParam7 == 0 || this.CheckTriggerCondtion(skillFuncParam7, skillFuncParam8, _attack, this.actorPtr))
                        {
                            if (skillFuncParam2 == 0)
                            {
                                flag = true;
                            }
                            else if ((skillFuncParam2 & 1 << (int)_slotType) > 0)
                            {
                                flag = true;
                            }
                            if (skillFuncParam6 > 0)
                            {
                                flag2 = (Singleton <FrameSynchr> .GetInstance().LogicFrameTick - buffSkill.controlTime >= (ulong)((long)skillFuncParam6));
                            }
                            if (flag && flag2)
                            {
                                if (skillFuncParam6 != -2 || !buffSkill.IsNextDestroy())
                                {
                                    SkillUseParam skillUseParam = default(SkillUseParam);
                                    skillUseParam.Init();
                                    skillUseParam.SetOriginator(_attack);
                                    skillUseParam.bExposing = buffSkill.skillContext.bExposing;
                                    if (buffSkill.skillContext != null)
                                    {
                                        if (buffSkill.skillContext.SlotType != SkillSlotType.SLOT_SKILL_COUNT)
                                        {
                                            skillUseParam.SlotType = _slotType;
                                        }
                                        else
                                        {
                                            skillUseParam.SlotType = buffSkill.skillContext.SlotType;
                                        }
                                    }
                                    else
                                    {
                                        skillUseParam.SlotType = _slotType;
                                    }
                                    _attack.get_handle().SkillControl.SpawnBuff(this.actorPtr, ref skillUseParam, skillFuncParam, true);
                                    buffSkill.controlTime = Singleton <FrameSynchr> .GetInstance().LogicFrameTick;

                                    if (skillFuncParam6 == -1 || skillFuncParam6 == -2)
                                    {
                                        _attack.get_handle().BuffHolderComp.RemoveBuff(buffSkill);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }