Exemplo n.º 1
0
        private void InitContext(Action _action)
        {
            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(1);
            PoolObjHandle <ActorRoot> handle2     = _action.GetActorHandle(0);

            if ((actorHandle != 0) && (handle2 != 0))
            {
                SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");
                BuffSkill       skill          = _action.refParams.GetRefParamObject <BuffSkill>("SkillObj");
                ResDT_SkillFunc outSkillFunc   = null;
                if ((skill != null) && skill.FindSkillFunc((int)this.SkillFuncType, out outSkillFunc))
                {
                    this.m_context.inTargetObj  = actorHandle;
                    this.m_context.inOriginator = handle2;
                    this.m_context.inUseContext = refParamObject;
                    this.m_context.inSkillFunc  = outSkillFunc;
                    this.m_context.LocalParams  = new ResDT_IntParamArrayNode[6];
                    for (int i = 0; i < 6; i++)
                    {
                        this.m_context.LocalParams[i]        = new ResDT_IntParamArrayNode();
                        this.m_context.LocalParams[i].iParam = 0;
                    }
                    this.m_context.inAction       = _action;
                    this.m_context.inBuffSkill    = new PoolObjHandle <BuffSkill>(skill);
                    this.m_context.inDoCount      = 0;
                    this.m_context.inOverlayCount = skill.GetOverlayCount();
                    this.m_context.inLastEffect   = true;
                    this.m_context.InitSkillFuncContext();
                    this.bInit = true;
                }
            }
        }
Exemplo n.º 2
0
        public override void Process(AGE.Action _action, Track _track)
        {
            PoolObjHandle <ActorRoot> actorHandle    = _action.GetActorHandle(1);
            PoolObjHandle <ActorRoot> handle2        = _action.GetActorHandle(0);
            SkillUseContext           refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");
            BuffSkill       skill        = _action.refParams.GetRefParamObject <BuffSkill>("SkillObj");
            ResDT_SkillFunc outSkillFunc = null;

            if ((skill != null) && skill.FindSkillFunc((int)this.SkillFuncType, out outSkillFunc))
            {
                SSkillFuncContext inContext = new SSkillFuncContext {
                    inTargetObj    = actorHandle,
                    inOriginator   = handle2,
                    inUseContext   = refParamObject,
                    inSkillFunc    = outSkillFunc,
                    inStage        = ESkillFuncStage.Enter,
                    inAction       = new PoolObjHandle <AGE.Action>(_action),
                    inBuffSkill    = new PoolObjHandle <BuffSkill>(skill),
                    inOverlayCount = skill.GetOverlayCount(),
                    inLastEffect   = false
                };
                if (refParamObject != null)
                {
                    inContext.inEffectCount = refParamObject.EffectCount;
                    inContext.inMarkCount   = refParamObject.MarkCount;
                }
                inContext.InitSkillFuncContext();
                skill.SetBuffLevel(inContext.iSkillLevel);
                inContext.LocalParams = new SSkillFuncIntParam[6];
                for (int i = 0; i < 6; i++)
                {
                    inContext.LocalParams[i]        = new SSkillFuncIntParam();
                    inContext.LocalParams[i].iParam = 0;
                }
                if (!Singleton <BattleLogic> .GetInstance().isRuning || Singleton <BattleLogic> .GetInstance().isGameOver)
                {
                    return;
                }
                this.m_bSucceeded = Singleton <SkillFuncDelegator> .GetInstance().DoSkillFunc((int)this.SkillFuncType, ref inContext);
            }
            base.Process(_action, _track);
        }
        public override void Process(Action _action, Track _track)
        {
            PoolObjHandle <ActorRoot> actorHandle    = _action.GetActorHandle(1);
            PoolObjHandle <ActorRoot> actorHandle2   = _action.GetActorHandle(0);
            SkillUseContext           refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");
            BuffSkill       refParamObject2          = _action.refParams.GetRefParamObject <BuffSkill>("SkillObj");
            ResDT_SkillFunc inSkillFunc = null;

            if (refParamObject2 != null && refParamObject2.FindSkillFunc((int)this.SkillFuncType, out inSkillFunc))
            {
                SSkillFuncContext sSkillFuncContext = default(SSkillFuncContext);
                sSkillFuncContext.inTargetObj    = actorHandle;
                sSkillFuncContext.inOriginator   = actorHandle2;
                sSkillFuncContext.inUseContext   = refParamObject;
                sSkillFuncContext.inSkillFunc    = inSkillFunc;
                sSkillFuncContext.inStage        = ESkillFuncStage.Enter;
                sSkillFuncContext.inAction       = new PoolObjHandle <Action>(_action);
                sSkillFuncContext.inBuffSkill    = new PoolObjHandle <BuffSkill>(refParamObject2);
                sSkillFuncContext.inOverlayCount = refParamObject2.GetOverlayCount();
                sSkillFuncContext.inLastEffect   = false;
                if (refParamObject != null)
                {
                    sSkillFuncContext.inEffectCount = refParamObject.EffectCount;
                    sSkillFuncContext.inEffectCountInSingleTrigger = refParamObject.EffectCountInSingleTrigger;
                    sSkillFuncContext.inMarkCount = refParamObject.MarkCount;
                }
                sSkillFuncContext.InitSkillFuncContext();
                refParamObject2.SetBuffLevel(sSkillFuncContext.iSkillLevel);
                sSkillFuncContext.LocalParams = new SSkillFuncIntParam[8];
                for (int i = 0; i < 8; i++)
                {
                    sSkillFuncContext.LocalParams[i]        = default(SSkillFuncIntParam);
                    sSkillFuncContext.LocalParams[i].iParam = 0;
                }
                if (!Singleton <BattleLogic> .GetInstance().isRuning || Singleton <BattleLogic> .GetInstance().isGameOver)
                {
                    return;
                }
                this.m_bSucceeded = Singleton <SkillFuncDelegator> .GetInstance().DoSkillFunc((int)this.SkillFuncType, ref sSkillFuncContext);
            }
            base.Process(_action, _track);
        }
Exemplo n.º 4
0
        private void InitContext(Action _action)
        {
            PoolObjHandle <ActorRoot> actorHandle  = _action.GetActorHandle(1);
            PoolObjHandle <ActorRoot> actorHandle2 = _action.GetActorHandle(0);

            if (!actorHandle || !actorHandle2)
            {
                return;
            }
            SkillUseContext refParamObject  = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");
            BuffSkill       refParamObject2 = _action.refParams.GetRefParamObject <BuffSkill>("SkillObj");
            ResDT_SkillFunc inSkillFunc     = null;

            if (refParamObject2 != null && refParamObject2.FindSkillFunc(this.SkillFuncType, out inSkillFunc))
            {
                this.m_context.inTargetObj  = actorHandle;
                this.m_context.inOriginator = actorHandle2;
                this.m_context.inUseContext = refParamObject;
                this.m_context.inSkillFunc  = inSkillFunc;
                this.m_context.LocalParams  = new SSkillFuncIntParam[8];
                for (int i = 0; i < 8; i++)
                {
                    this.m_context.LocalParams[i]        = default(SSkillFuncIntParam);
                    this.m_context.LocalParams[i].iParam = 0;
                }
                this.m_context.inAction       = new PoolObjHandle <Action>(_action);
                this.m_context.inBuffSkill    = new PoolObjHandle <BuffSkill>(refParamObject2);
                this.m_context.inDoCount      = 0;
                this.m_context.inOverlayCount = refParamObject2.GetOverlayCount();
                this.m_context.inLastEffect   = true;
                if (refParamObject != null)
                {
                    this.m_context.inEffectCount = refParamObject.EffectCount;
                    this.m_context.inEffectCountInSingleTrigger = refParamObject.EffectCountInSingleTrigger;
                    this.m_context.inMarkCount = refParamObject.MarkCount;
                }
                this.m_context.InitSkillFuncContext();
                refParamObject2.SetBuffLevel(this.m_context.iSkillLevel);
                this.bInit = true;
            }
        }