/// <summary>
    ///
    /// </summary>
    void OnClickEquipSwordsMan4()
    {
        SwordsMan oSwordsMan = GameManager.gameManager.PlayerDataPool.SwordsManEquipPack.GetSwordsMan(3);

        if (oSwordsMan != null && oSwordsMan.IsValid())
        {
            SwordsManToolTipsLogic.ShowSwordsManTooltip(oSwordsMan, SwordsManToolTipsLogic.SwordsMan_ShowType.Equiped);
        }
    }
    /// <summary>
    ///
    /// </summary>
    void OnLoadSwordsManItem(GameObject resObj, object param)
    {
        if (null == m_SwordsManGrid)
        {
            LogModule.ErrorLog("OnLoadSwordsManItem m_SwordsManGrid is null");
            return;
        }
        Utils.CleanGrid(m_SwordsManGrid.gameObject);
        SwordsManContainer oSwordsManContainer = GameManager.gameManager.PlayerDataPool.GetSwordsManContainer(SwordsManContainer.PACK_TYPE.TYPE_BACKPACK);

        if (null == oSwordsManContainer)
        {
            LogModule.ErrorLog("OnLoadSwordsManItem::oSwordsManContainer is null");
            return;
        }
        List <SwordsMan> itemlist = SwordsManTool.ItemFilter(oSwordsManContainer);

        for (int i = 0; i < itemlist.Count; i++)
        {
            SwordsMan oSwordsMan = itemlist[i];
            if (null == oSwordsMan)
            {
                LogModule.ErrorLog("OnLoadSwordsManItem::oSwordsMan is null");
                break;
            }
            if (false == oSwordsMan.IsValid())
            {
                continue;
            }
            SwordsManItem oSwordsManItem = SwordsManItem.CreateItem(m_SwordsManGrid, resObj, i.ToString(), this);
            if (null == oSwordsManItem)
            {
                LogModule.ErrorLog("OnLoadSwordsManItem::oSwordsManItem is null");
                break;
            }
            oSwordsManItem.SetData(oSwordsMan);
        }
        m_SwordsManGrid.GetComponent <UIGrid>().repositionNow = true;

        if (m_LabelPacSize != null)
        {
            m_LabelPacSize.text = StrDictionary.GetClientDictionaryString("#{3337}", oSwordsManContainer.GetSwordsManCount(), oSwordsManContainer.ContainerSize);
        }
    }
    /// <summary>
    /// 更新侠客信息
    /// </summary>
    void OnLoadSwordsManItem(GameObject resObj, object param)
    {
        if (null == m_SwordsManGrid)
        {
            LogModule.ErrorLog("OnLoadSwordsManItem m_SwordsManGrid is null");
            return;
        }
        Utils.CleanGrid(m_SwordsManGrid.gameObject);

        SwordsManContainer oSwordsManBackContainer = GameManager.gameManager.PlayerDataPool.GetSwordsManContainer(SwordsManContainer.PACK_TYPE.TYPE_BACKPACK);

        if (null == oSwordsManBackContainer)
        {
            LogModule.ErrorLog("OnLoadSwordsManItem::oSwordsManBackContainer is null");
            return;
        }
        SwordsManContainer Container = GameManager.gameManager.PlayerDataPool.GetSwordsManContainer(m_PackType);

        if (null == Container)
        {
            LogModule.ErrorLog("OnLoadSwordsManItem::Container is null");
            return;
        }
        SwordsMan CurSwordsMan = Container.GetSwordsManByGuid(m_SwordsManGuid);

        if (CurSwordsMan == null)
        {
            return;
        }
        List <SwordsMan> itemlist = SwordsManTool.ItemFilter(oSwordsManBackContainer);

        itemlist  = SwordsManTool.ItemFilter(itemlist, (int)m_curChooseQuality);
        m_nEatExp = 0;
        for (int i = 0; i < itemlist.Count; i++)
        {
            SwordsMan oSwordsMan = itemlist[i];
            if (null == oSwordsMan)
            {
                LogModule.ErrorLog("OnLoadSwordsManItem::oSwordsMan is null");
                break;
            }
            if (false == oSwordsMan.IsValid())
            {
                continue;
            }
            SwordsManItem oSwordsManItem = SwordsManItem.CreateItem(m_SwordsManGrid, resObj, i.ToString(), this);
            if (null == oSwordsManItem)
            {
                LogModule.ErrorLog("OnLoadSwordsManItem::oSwordsManItem is null");
                break;
            }
            oSwordsManItem.SetData(oSwordsMan);
            if (oSwordsMan.Guid == CurSwordsMan.Guid)
            {
                continue;
            }
            if (oSwordsMan.Quality > CurSwordsMan.Quality)
            {
                continue;
            }
            if (oSwordsMan.Locked)
            {
                continue;
            }
            oSwordsManItem.OnSelectSwordsMan();
            m_nEatExp += oSwordsManItem.m_oSwordsMan.GetEatExp();
        }
        m_SwordsManGrid.GetComponent <UIGrid>().repositionNow = true;
        if (m_TopGrid != null)
        {
            m_TopGrid.Recenter(true);
        }
        ShowSwordsManExp();
    }
    /// <summary>
    ///
    /// </summary>
    public void UpdateSwordsManEquipPack()
    {
        SwordsManContainer oSwordsManContainer = GameManager.gameManager.PlayerDataPool.GetSwordsManContainer(SwordsManContainer.PACK_TYPE.TYPE_EQUIPPACK);

        if (null == oSwordsManContainer)
        {
            LogModule.ErrorLog("UpdateSwordsManEquipPack::oSwordsManContainer is null");
            return;
        }
        int nCombatValue = 0;

        for (int i = 0; i < m_SwordsManIcons.Length && i < m_SwordsManQualitys.Length && i < m_SwordsManLock.Length && i < m_SlotLock.Length && i < m_SwordsManLevel.Length && i < m_LabelSlots.Length; i++)
        {
            if (i < oSwordsManContainer.ContainerSize)
            {
                SwordsMan oSwordsMan = oSwordsManContainer.GetSwordsMan(i);
                if (null == oSwordsMan)
                {
                    LogModule.ErrorLog("OnLoadSwordsManItem::oSwordsMan is null");
                    break;
                }
                m_SlotLock[i].SetActive(false);
                if (oSwordsMan.IsValid())
                {
                    m_SwordsManIcons[i].SetActive(true);
                    m_SwordsManIcons[i].GetComponent <UISprite>().spriteName    = oSwordsMan.GetIcon();
                    m_SwordsManQualitys[i].GetComponent <UISprite>().spriteName = SwordsMan.GetQualitySpriteName((SwordsMan.SWORDSMANQUALITY)oSwordsMan.Quality);
                    m_SwordsManQualitys[i].SetActive(true);

                    m_SwordsManLevel[i].gameObject.SetActive(true);
                    m_SwordsManLevel[i].text = StrDictionary.GetClientDictionaryString("#{2673}", oSwordsMan.Level);

                    if (oSwordsMan.Locked)
                    {
                        m_SwordsManLock[i].SetActive(true);
                    }
                    else
                    {
                        m_SwordsManLock[i].SetActive(false);
                    }
                    nCombatValue = nCombatValue + oSwordsMan.GetCombatValue();
                }
                else
                {
                    m_SwordsManQualitys[i].SetActive(false);
                    m_SwordsManIcons[i].SetActive(false);
                    m_SwordsManLock[i].SetActive(false);
                    m_SwordsManLevel[i].gameObject.SetActive(false);
                }
                m_LabelSlots[i].gameObject.SetActive(false);
            }
            else
            {
                //需要解锁

                m_SlotLock[i].SetActive(true);
                m_SwordsManQualitys[i].SetActive(false);
                m_SwordsManIcons[i].SetActive(false);
                m_LabelSlots[i].gameObject.SetActive(true);
                m_SwordsManLevel[i].gameObject.SetActive(false);
                Tab_SwordsEquipPackUnlock SwordsManUnLockTable = TableManager.GetSwordsEquipPackUnlockByID(i + 1, 0);
                if (SwordsManUnLockTable != null)
                {
                    //string strUnLock = SwordsManUnLockTable.NeedLevel.ToString() + "级开放";
                    string strUnLock = StrDictionary.GetClientDictionaryString("#{2674}", SwordsManUnLockTable.NeedLevel);
                    m_LabelSlots[i].text = strUnLock;
                }
            }
        }
        if (m_LabelCombatValue != null)
        {
            m_LabelCombatValue.text = nCombatValue.ToString();
        }
    }