Example #1
0
    private bool CanCreateSkill(int skillID)
    {
        SkillBase.SLog("CanCreateSkill");

        SkillSystemGrow skillGrow = m_CfgSkillProxy.GetSkillGrow(skillID);

        if (skillGrow.ByteBuffer == null)
        {
            SkillBase.SLog("没有这个技能");
            Debug.LogError("没有这个技能: " + skillID);
            return(false);
        }

        if (m_Property.IsMain() && m_Property.GetCurrentState().GetMainState() == EnumMainState.Cruise)
        {
            SkillBase.SLog("巡航模式不能放技能");
            Debug.Log("巡航模式不能放技能");
            return(false);
        }

        if (m_SkillProxy.IsOnCD(skillID) || m_SkillProxy.IsOnTriggerCD(skillID))
        {
            SkillBase.SLog("IsOnCD");
            return(false);
        }

        return(true);
    }