//将一个需要Ask的obj放入
    public bool TryAddLoadTask(int idObj)
    {
        //玩家自己不放入队列
        CObject pObj = CObjectManager.Instance.FindObject(idObj);

        if (pObj == null || pObj == CObjectManager.Instance.getPlayerMySelf())
        {
            return(false);
        }

        if (m_LoadDirect)
        {
            //立即请求
            CGCharAskBaseAttrib msgAskBaseAttrib = new CGCharAskBaseAttrib();
            msgAskBaseAttrib.setTargetID((uint)pObj.ServerID);
            GameProcedure.s_NetManager.SendPacket(msgAskBaseAttrib);
            //LogManager.LogWarning("Ask Char BaseAttrib id=" + pObj.ServerID);
        }
        else
        {
            //自己位置
            Vector3 fvPosMySelf = CObjectManager.Instance.getPlayerMySelf().GetPosition();
            float   fDistanceSq = Utility.TDU_GetDistSq(pObj.GetPosition(), fvPosMySelf);

            if (m_mapLoadTask.ContainsValue(idObj))
            {
                LogManager.LogWarning("该角色ID<" + idObj + ">已经在加载队列中");
            }
            else
            {
                m_mapLoadTask.Add(fDistanceSq, idObj);

                //LogManager.Log("Ask Char BaseAttrib in queue id" + idObj);
            }
        }

        return(true);
    }
    //工作桢
    public void             Tick()
    {
        if (m_mapLoadTask.Count != 0)
        {
            int nDoRealWork = 0;
            do
            {
                //存在需要加载的OBJ
                int idObj = m_mapLoadTask.Values[0];

                CObject pObj = CObjectManager.Instance.FindObject(idObj);
                if (pObj != null)
                {
                    //处理消息
                    CGCharAskBaseAttrib msgAskBaseAttrib = new CGCharAskBaseAttrib();
                    msgAskBaseAttrib.setTargetID((uint)pObj.ServerID);
                    GameProcedure.s_NetManager.SendPacket(msgAskBaseAttrib);
                    //LogManager.LogWarning("Ask Char BaseAttrib id=" + pObj.ServerID);
                    nDoRealWork++;
                }
                else
                {
                    //该Object已经被删除
                }

                //从队列中删除
                m_mapLoadTask.RemoveAt(0);

                //做过真实工作,退出
                if (nDoRealWork >= WORK_SPEED || m_mapLoadTask.Count == 0)
                {
                    break;
                }
            }while(true);
        }
    }
    public override void Init()
    {
        base.Init();
        m_pMySelf = s_pObjectManager.getPlayerMySelf();
        int m_nID = m_pMySelf.ServerID;
        //      m_pActiveSkill = NULL;
        //      m_pSkillArea = NULL;
        //      m_pMouseTarget = NULL;
        //      m_bAutoRun = FALSE;
        //      m_bAutoMoveAlong = FALSE;
        //------------------------------------------------------------------
        //重置LogicCount
        //	    m_pMySelf->ResetLogicCount();

        //------------------------------------------------------------------
        //清空加载队列
        //	    CObjectManager::GetMe()->GetLoadQueue()->ClearAllTask();

        //------------------------------------------------------------------
        //发送环境请求
        //	    CGEnvRequest msgEnvRequest;
        //	    CNetManager::GetMe()->SendPacket(&msgEnvRequest);

        //------------------------------------------------------------------
        //发送自身数据请求

        //自身基本信息
        CGCharAskBaseAttrib msgMyBaseAttrib = new CGCharAskBaseAttrib();

        msgMyBaseAttrib.setTargetID((uint)m_nID);
        s_NetManager.SendPacket(msgMyBaseAttrib);

        //基本属性
        CGAskDetailAttrib msgMyAttrib = new CGAskDetailAttrib();

        msgMyAttrib.ObjID = (uint)m_nID;
        s_NetManager.SendPacket(msgMyAttrib);

        ////自身装备(用于创建渲染层外形)
        //CGCharAskEquipment msgAskMyEquip;
        //msgAskMyEquip.setObjID(m_nID);
        //CNetManager::GetMe()->SendPacket(&msgAskMyEquip);

        //生活技能
        CGAskDetailAbilityInfo msgAbility = new CGAskDetailAbilityInfo();

        msgAbility.ObjID = m_nID;
        NetManager.GetNetManager().SendPacket(msgAbility);
        //
        //      //技能系
        CGAskSkillClass msgMySkillClass = new CGAskSkillClass();

        msgMySkillClass.ObjID = m_nID;
        s_NetManager.SendPacket(msgMySkillClass);

        //技能
        CGAskDetailSkillList msgMyDetailSkill = new CGAskDetailSkillList();

        msgMyDetailSkill.ObjID = m_nID;
        s_NetManager.SendPacket(msgMyDetailSkill);
        //
        //      //组队数据
        //      CUIDataPool::GetMe()->ClearTeamInfo();
        //      CGAskTeamInfo msgTeamInfo;
        //      msgTeamInfo.SetObjID( m_nID );
        //      CNetManager::GetMe()->SendPacket(&msgTeamInfo);
        //
        //      //如果是城市向服务器请求城市数据
        //      CGCityAskAttr	MsgCityBuilding;
        //      CNetManager::GetMe()->SendPacket( &MsgCityBuilding );
        //
        //      //所有称号
        //      CGCharAllTitles	msgAllTitles;
        //      msgAllTitles.setTargetID( m_nID );
        //      CNetManager::GetMe()->SendPacket(&msgAllTitles);

        //是第一次登陆
        if (GameProcedure.s_ProcEnter.GetEnterType() == (uint)ENTER_TYPE.ENTER_TYPE_FIRST)
        {
            //详细装备(用于在数据池中存储物品详细属性)
            CGAskDetailEquipList msgAskEquip = new CGAskDetailEquipList();
            msgAskEquip.ObjId = (uint)m_nID;
            msgAskEquip.Mode  = ASK_EQUIP_MODE.ASK_EQUIP_ALL;
            s_NetManager.SendPacket(msgAskEquip);

            //背包
            CGAskMyBagList msgMyBag = new CGAskMyBagList();
            msgMyBag.Mode = ASK_BAG_MODE.ASK_ALL;
            s_NetManager.SendPacket(msgMyBag);

            CGAskMail msgAskMail = new CGAskMail();
            msgAskMail.AskType = (byte)ASK_TYPE.ASK_TYPE_LOGIN;
            s_NetManager.SendPacket(msgAskMail);

            //MissionList
            CGAskMissionList msgMissionList = new CGAskMissionList();
            msgMissionList.ObjID = (uint)m_nID;
            s_NetManager.SendPacket(msgMissionList);

            //向服务器请求快捷栏数据
            CGAskSetting msgSetting = new CGAskSetting();
            s_NetManager.SendPacket(msgSetting);
            //请求法宝栏数据
            CGAskTalismanBag AskTalismanBag = new CGAskTalismanBag();
            s_NetManager.SendPacket(AskTalismanBag);



            //向服务器请求关系人列表
            CGRelation MsgRelation           = new CGRelation();
            MsgRelation.GetRelation().m_Type = (byte)RELATION_REQUEST_TYPE.REQ_RELATIONLIST;
            NetManager.GetNetManager().SendPacket(MsgRelation);

            //想服务器请求符印信息
            CGAskFlushCharmInfo msgFlushCharmInfo = new CGAskFlushCharmInfo();
            NetManager.GetNetManager().SendPacket(msgFlushCharmInfo);

            //广播第一次进入游戏,用来初始化ui或者一些组件
            CEventSystem.Instance.PushEvent(GAME_EVENT_ID.GE_APPLICATION_INITED);
        }
    }