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);
                    }
                }
            }
        }
        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);
                    }
                }
            }
        }
        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);
                    }
                }
            }
        }
 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);
     }
 }
Exemple #5
0
        public void ExecCommand(IFrameCommand cmd)
        {
            Player player = Singleton <GamePlayerCenter> .GetInstance().GetPlayer(cmd.playerID);

            if (player != null && player.Captain)
            {
                SkillUseParam skillUseParam = default(SkillUseParam);
                skillUseParam.Init(this.SlotType, this.ObjectID);
                player.Captain.get_handle().ActorControl.CmdUseSkill(cmd, ref skillUseParam);
            }
        }
        public void ExecCommand(IFrameCommand cmd)
        {
            Player player = Singleton <GamePlayerCenter> .GetInstance().GetPlayer(cmd.playerID);

            if ((player != null) && (player.Captain != 0))
            {
                SkillUseParam param = new SkillUseParam();
                param.Init(this.SlotType, this.Direction, false);
                player.Captain.handle.ActorControl.CmdUseSkill(cmd, ref param);
            }
        }
Exemple #7
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);
     }
 }
        public void ExecCommand(IFrameCommand cmd)
        {
            Player player = Singleton <GamePlayerCenter> .GetInstance().GetPlayer(cmd.playerID);

            if (player != null && player.Captain)
            {
                SkillUseParam skillUseParam = default(SkillUseParam);
                VInt3         inVec         = VInt3.right.RotateY((int)this.Degree);
                skillUseParam.Init(this.SlotType, inVec, false, this.dwObjectID);
                player.Captain.handle.ActorControl.CmdUseSkill(cmd, ref skillUseParam);
            }
        }
Exemple #9
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);
        }
        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);
        }
Exemple #11
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;
        }
        public void ExecCommand(IFrameCommand cmd)
        {
            Player player = Singleton <GamePlayerCenter> .GetInstance().GetPlayer(cmd.playerID);

            if (player != null && player.Captain)
            {
                SkillUseParam skillUseParam = default(SkillUseParam);
                VInt3         vInt          = new VInt3(this.Position.x, 0, this.Position.y);
                VInt          vInt2         = 0;
                if (PathfindingUtility.GetGroundY(vInt, out vInt2))
                {
                    vInt.y = vInt2.i;
                }
                skillUseParam.Init(this.SlotType, vInt);
                player.Captain.handle.ActorControl.CmdUseSkill(cmd, ref skillUseParam);
            }
        }
Exemple #13
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;
        }
Exemple #14
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);
        }
Exemple #15
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);
        }
Exemple #16
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);
        }
        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);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }