bool isAttackableSkill(CActionItem item)
    {
        if (item == null)
        {
            return(false);
        }
        bool          result = false;
        SCLIENT_SKILL pSkill = item.GetImpl() as SCLIENT_SKILL;

        switch (item.GetType())
        {
        case ACTION_OPTYPE.AOT_SKILL:
        {
            if (pSkill == null)
            {
                break;
            }
            ENUM_SELECT_TYPE typeSel = (ENUM_SELECT_TYPE)pSkill.m_pDefine.m_nSelectType;
            switch (typeSel)
            {
            case ENUM_SELECT_TYPE.SELECT_TYPE_CHARACTER:
            case ENUM_SELECT_TYPE.SELECT_TYPE_DIR:
            case ENUM_SELECT_TYPE.SELECT_TYPE_POS:
            case ENUM_SELECT_TYPE.SELECT_TYPE_NONE:
                result = true;
                break;

            default:
                break;
            }
        }
        break;

        default:
            break;
        }

        if (result)
        {
            OPERATE_RESULT retVal = pSkill.IsCanUse_CheckCoolDown();
            if (retVal != OPERATE_RESULT.OR_OK)
            {
                return(false);
            }

            retVal = pSkill.IsCanUse_CheckPassive();
            if (retVal != OPERATE_RESULT.OR_OK)
            {
                return(false);
            }

            retVal = pSkill.IsCanUse_CheckLevel(CObjectManager.Instance.getPlayerMySelf().ID, pSkill.m_nLevel);
            if (retVal != OPERATE_RESULT.OR_OK)
            {
                return(false);
            }

            retVal = pSkill.IsCanUse_CheckFightState(CObjectManager.Instance.getPlayerMySelf().ID);
            if (retVal != OPERATE_RESULT.OR_OK)
            {
                return(false);
            }

            retVal = pSkill.IsCanUse_CheckDeplete(CObjectManager.Instance.getPlayerMySelf().ID);
            if (retVal != OPERATE_RESULT.OR_OK)
            {
                return(false);
            }

            retVal = pSkill.IsCanUse_Leaned();
            if (retVal != OPERATE_RESULT.OR_OK)
            {
                return(false);
            }
        }
        return(result);
    }
    //激活动作
    public override void DoAction()
    {
        SCLIENT_SKILL pSkill = (SCLIENT_SKILL)GetSkillImpl();

        if (pSkill == null)
        {
            return;
        }

        OPERATE_RESULT oResult;

        //
        oResult = pSkill.IsCanUse_Leaned();
        if (GameDefineResult.Instance.OR_FAILED(oResult))
        {
            CEventSystem.Instance.PushEvent(GAME_EVENT_ID.GE_INFO_SELF, GameDefineResult.Instance.GetOResultText(oResult));
            return;
        }
        ////检查冷却是否结束
        oResult = pSkill.IsCanUse_CheckCoolDown();
        if (GameDefineResult.Instance.OR_FAILED(oResult))
        {
            CEventSystem.Instance.PushEvent(GAME_EVENT_ID.GE_INFO_SELF, GameDefineResult.Instance.GetOResultText(oResult));
            return;
        }



        // 消耗检测
        int idUser;
        CObject_PlayerMySelf pMySelf = CObjectManager.Instance.getPlayerMySelf();

        idUser  = (pMySelf != null) ? (pMySelf.ID) : (MacroDefine.INVALID_ID);
        oResult = pSkill.IsCanUse_CheckDeplete(idUser);
        if (GameDefineResult.Instance.OR_FAILED(oResult))
        {
            CEventSystem.Instance.PushEvent(GAME_EVENT_ID.GE_INFO_SELF, GameDefineResult.Instance.GetOResultText(oResult));
            return;
        }

        oResult = pSkill.IsCanUse_CheckLevel(idUser, pSkill.m_nLevel);
        if (GameDefineResult.Instance.OR_FAILED(oResult))
        {
            CEventSystem.Instance.PushEvent(GAME_EVENT_ID.GE_INFO_SELF, GameDefineResult.Instance.GetOResultText(oResult));
            return;
        }

        //如果是连续的那么就换为选中状态。
        AutoKeepOn();
        //根据操作类型
        switch ((ENUM_SELECT_TYPE)pSkill.m_pDefine.m_nSelectType)
        {
        case ENUM_SELECT_TYPE.SELECT_TYPE_NONE:
        {
            CObjectManager.Instance.getPlayerMySelf().Player_UseSkill(GetDefineID());
            //恢复激活Action
            CActionSystem.Instance.SetDefaultAction(CObjectManager.Instance.getPlayerMySelf().GetActiveSkill());
        }
        break;

        case ENUM_SELECT_TYPE.SELECT_TYPE_CHARACTER:
        {
            //取得技能数据
            int idMyself = CObjectManager.Instance.getPlayerMySelf().ServerID;

            if (CObjectManager.Instance.GetMainTarget() != null)
            {
                int idTarget = CObjectManager.Instance.GetMainTarget().ServerID;
                // 陈治要求使用增益型技能的时候,选中为敌人的情况下,强制改为自己 [11/14/2011 Ivan edit]
                if (pSkill.m_pDefine.m_nFriendness >= 0 &&
                    idTarget != idMyself)        // 减少判断
                {
                    CObject_Character pTargetObj = (CObject_Character)CObjectManager.Instance.FindServerObject(idTarget);
                    //阵营判断
                    ENUM_RELATION eCampType = pTargetObj.GetCampType(CObjectManager.Instance.getPlayerMySelf());

                    // 通过PK模式判断是否为敌人 [8/19/2011 edit by ZL]
                    if (eCampType != ENUM_RELATION.RELATION_ENEMY)
                    {
                        int tempRelation = CObjectManager.Instance.getPlayerMySelf().GetRelationOther(pTargetObj);
                        eCampType = (ENUM_RELATION)tempRelation;
                    }
                    // 增益型技能:目标不是友好对象的情况下必须强制对自己使用 [11/14/2011 Ivan edit]
                    if (eCampType != ENUM_RELATION.RELATION_FRIEND)
                    {
                        idTarget = idMyself;
                    }
                }
                CObjectManager.Instance.getPlayerMySelf().Player_UseSkill(GetDefineID(), idTarget);
            }
            else
            {
                // 陈治要求如果增益型技能没有选中对象,则默认目标为自己 [11/14/2011 Ivan edit]
                if (pSkill.m_pDefine.m_nFriendness >= 0)
                {
                    CObjectManager.Instance.getPlayerMySelf().Player_UseSkill(GetDefineID(), idMyself);
                }
                else
                {
                    CEventSystem.Instance.PushEvent(GAME_EVENT_ID.GE_INFO_SELF, GameDefineResult.Instance.GetOResultText(OPERATE_RESULT.OR_NO_TARGET));
                    CObjectManager.Instance.getPlayerMySelf().Player_UseSkill(GetDefineID(), (uint)idMyself);
                }
            }
            //恢复激活Action
            CActionSystem.Instance.SetDefaultAction(CObjectManager.Instance.getPlayerMySelf().GetActiveSkill());
        }
        break;

        case ENUM_SELECT_TYPE.SELECT_TYPE_POS:
            CActionSystem.Instance.SetDefaultAction(this);
            break;

        case ENUM_SELECT_TYPE.SELECT_TYPE_DIR:
            CActionSystem.Instance.SetDefaultAction(this);
            //CActionSystem.Instance.SetDefaultAction(CObjectManager.Instance.getPlayerMySelf().GetActiveSkill());
            //		CGameProcedure::s_pGameInterface->Skill_SetActive(this);
            break;

        case ENUM_SELECT_TYPE.SELECT_TYPE_SELF:
        {
            CObjectManager.Instance.getPlayerMySelf().Player_UseSkill(GetDefineID(), CObjectManager.Instance.getPlayerMySelf().ServerID);
            //恢复激活Action
            //  CActionSystem.Instance.SetDefaultAction(GameProcedure.Skill_GetActive());
        }
        break;

        case ENUM_SELECT_TYPE.SELECT_TYPE_HUMAN_GUID:
        {
            //待实现
            //当前是否已经选择了一个队友
            //uint guid;
            //CObjectManager::GetMe()->GetMainTarget(guid);
            //if(guid == (GUID_t)-1)
            //{
            //    //尚未选择合法的对象
            //    CEventSystem::GetMe()->PushEvent(GE_INFO_SELF, "无效目标");
            //    return;
            //}

            //CGameProcedure::s_pGameInterface->Player_UseSkill(GetID(), (GUID_t)guid);
            ////恢复激活Action
            //CActionSystem::GetMe()->SetDefaultAction(CGameProcedure::s_pGameInterface->Skill_GetActive());
        }
        break;
        }
    }