Ejemplo n.º 1
0
    static public bool CheckSkillCost(uint objId, int skillid)
    {
        BaseScene scn = SceneManager.Instance.GetCurScene();

        if (scn == null)
        {
            return(false);
        }

        ObjectBase obj = scn.FindObject(objId);

        if (obj == null || !ObjectType.IsBattleUnit(obj.Type))
        {
            return(false);
        }

        BattleUnit battleUnit = (BattleUnit)obj;

        if (battleUnit.CheckSkillCost(skillid) == ErrorCode.InsufficientMana)
        {
            return(false);
        }
        else
        {
            return(true);
        }
    }