Пример #1
0
        public bool UseSkill(int ownerID, SkillParam skillParam)
        {
            Skill skill = GetSkill(ownerID, skillParam.templateID);

            if (null == skill)
            {
                LogManager.Log("UseSkill : skill not exist. id : " + skillParam.templateID, LogType.Error);
                return(false);
            }

            ISkillLogic logic = SkillLogicManager.GetSkillLogic(skill.Template.id);

            if (logic != null)
            {
                logic.OnActive(ownerID, skillParam);
            }

            return(false);
        }
Пример #2
0
        public bool CanUseSkill(int ownerID, SkillParam skillParam)
        {
            Skill skill = GetSkill(ownerID, skillParam.templateID);

            if (null == skill)
            {
                LogManager.Log("CanUseSkill : skill not exist. id : " + skillParam.templateID, LogType.Error);
                return(false);
            }

            // to do : check can use ?

            ISkillLogic logic = SkillLogicManager.GetSkillLogic(skill.Template.id);

            if (logic != null)
            {
                ;
            }

            return(false);
        }