示例#1
0
        public override bool IsActionLimited(SkillObj self, ActionLimitType limit, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            int iLimit = -1;

            switch (limit)
            {
            case ActionLimitType.Attack:
                iLimit = self.GetBuffStateIntParam(buffConfig, key_AttackLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
                break;

            case ActionLimitType.Move:
                iLimit = self.GetBuffStateIntParam(buffConfig, key_MoveLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
                break;

            case ActionLimitType.UseSkill:
                iLimit = self.GetBuffStateIntParam(buffConfig, key_UseSkillLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
                break;

            default:
                Debug.Assert(false, "limit == default IsActionLimited:[{0}]".F(limit));
                break;
            }
            if (iLimit == 1)
            {
                return(true);
            }
            return(false);
        }
示例#2
0
        public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);

            if (ret == LogicStateTickRet.TimeFinish)
            {
                return(ret);
            }
            self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) - self.GetDeltaTime());
            //help harm 判断是否停留
            int  harmHelpType  = self.GetBuffStateIntParam(buffConfig, Key_Int__BuffConfig, self.GetBuffStateIndex(buffInfo));
            bool needNextState = false;

            switch (harmHelpType)
            {
            case 1:
                //这个是友好,没错
                needNextState = self.GetCamp() != self.GetSrcCamp(buffInfo);
                break;

            case 2:
                //这个是友好,没错敌对
                needNextState = self.GetCamp() == self.GetSrcCamp(buffInfo);
                break;
            }
            if (self.GetBuffStateTime(buffInfo) <= 0 || needNextState)
            {
                ret = LogicStateTickRet.NextState;
                self.LogInfo("ChargeState:buffObj[{0}] buff:[{1}] ShowEffectState Finish".F(self.GetID(), self.GetBuffID(buffInfo)));
            }
            return(ret);
        }
 public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);
     if (ret == LogicStateTickRet.TimeFinish)
     {
         return ret;
     }
     self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) - self.GetDeltaTime());
     //help harm 判断是否停留
     int harmHelpType = self.GetBuffStateIntParam(buffConfig, Key_Int__BuffConfig, self.GetBuffStateIndex(buffInfo));
     bool needNextState = false;
     switch(harmHelpType)
     {
         case 1:
             //这个是友好,没错
             needNextState = self.GetCamp() != self.GetSrcCamp(buffInfo);
             break;
         case 2:
             //这个是友好,没错敌对
             needNextState = self.GetCamp() == self.GetSrcCamp(buffInfo);
             break;
     }
     if (self.GetBuffStateTime(buffInfo) <= 0 || needNextState)
     {
         ret = LogicStateTickRet.NextState;
         self.LogInfo("ChargeState:buffObj[{0}] buff:[{1}] ShowEffectState Finish".F(self.GetID(), self.GetBuffID(buffInfo)));
     }
     return ret;
 }
 public override bool IsActionLimited(SkillObj self, ActionLimitType limit, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     int iLimit = -1;
     switch (limit)
     {
         case ActionLimitType.Attack:
             iLimit = self.GetBuffStateIntParam(buffConfig, key_AttackLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
             break;
         case ActionLimitType.Move:
             iLimit = self.GetBuffStateIntParam(buffConfig, key_MoveLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
             break;
         case ActionLimitType.UseSkill:
             iLimit = self.GetBuffStateIntParam(buffConfig, key_UseSkillLimit_SkillConfig, self.GetBuffStateIndex(buffInfo));
             break;
         default:
             Debug.Assert(false, "limit == default IsActionLimited:[{0}]".F(limit));
             break;
     }
     if (iLimit == 1)
     {
         return true;
     }
     return false;
 }
示例#5
0
 public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);
     if (ret == LogicStateTickRet.TimeFinish)
     {
         return ret;
     }
     if (self.GetBuffStateIntParam(buffInfo, key) == NotEffect)
     {
         self.SetBuffStateIntParam(buffInfo, key, Effected);
         return LogicStateTickRet.OnEffect;
     }
     else
     {
         return LogicStateTickRet.NextState;
     }
     return ret;
 }
示例#6
0
        public override LogicStateTickRet Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            LogicStateTickRet ret = base.Tick(self, buffInfo, buffConfig);

            if (ret == LogicStateTickRet.TimeFinish)
            {
                return(ret);
            }
            if (self.GetBuffStateIntParam(buffInfo, key) == NotEffect)
            {
                self.SetBuffStateIntParam(buffInfo, key, Effected);
                return(LogicStateTickRet.OnEffect);
            }
            else
            {
                return(LogicStateTickRet.NextState);
            }
            return(ret);
        }