Exemple #1
0
    // 增加活动点击的tip
    //=========================================================
    private void OnClickDungeonItem(int nIndex)
    {
        Tab_CangJingGeInfo pCangJingGeInfo = TableManager.GetCangJingGeInfoByID(CopySceneId + 200, 0);

        if (pCangJingGeInfo != null)
        {
            Tab_CommonItem pItem = TableManager.GetCommonItemByID(pCangJingGeInfo.GetDropbyIndex(nIndex), 0);
            if (pItem != null)
            {
                GameItem item = new GameItem();
                item.DataID = pItem.Id;
                if (item.IsEquipMent())
                {
                    EquipTooltipsLogic.ShowEquipTooltip(item, EquipTooltipsLogic.ShowType.Info);
                }
                else
                {
                    ItemTooltipsLogic.ShowItemTooltip(item, ItemTooltipsLogic.ShowType.Info);
                }
            }
        }
    }
Exemple #2
0
    public void UpdateInfo()
    {
        int _Tier = GetTier();

        if (GameDefine_Globe.MAX_COPYSCENE_CJGTIER < _Tier)
        {
            _Tier = GameDefine_Globe.MAX_COPYSCENE_CJGTIER;
        }

        int nMul = GameManager.gameManager.PlayerDataPool.CommonData.GetCopySceneMultiple(CopySceneId);

        if (GameDefine_Globe.CopyScene_PlayType.SINGLE == CopyScenePlayerMode)
        {
            m_SweepYanbao.text = "0";
            if (GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData((int)Games.UserCommonData.USER_COMMONDATA.CD_COPYSCENE_CANGJINGGE_SWEEP) >= GameManager.gameManager.PlayerDataPool.CommonData.GetCopySceneMultiple(CopySceneId))
            {
                m_SweepYanbao.text = "10";//StrDictionary.GetClientDictionaryString("#{2100}", 10);
            }

            int _Sweep = GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData((int)Games.UserCommonData.USER_COMMONDATA.CD_COPYSCENE_CANGJINGGE_SWEEP);

            //m_Sweep.text = StrDictionary.GetClientDictionaryString("#{2088}", (nMul * 3 - _Sweep).ToString() + "/" + (nMul * 3).ToString()) + strVipSweep;
            if (_Sweep >= nMul)
            {
                int nCurMul = nMul * 3 - _Sweep;
                if (nCurMul < 0)
                {
                    nCurMul = 0;
                }
                m_Sweep.text = (nCurMul).ToString() + "/" + (nMul * 3 - nMul).ToString();
                //m_ObjectSweepCost.SetActive(true);
                m_ObjectSweepFree.SetActive(false);
            }
            else
            {
                int nCurMul = nMul - _Sweep;
                if (nCurMul < 0)
                {
                    nCurMul = 0;
                }
                m_Sweep.text = (nCurMul).ToString() + "/" + nMul.ToString();
                //m_ObjectSweepCost.SetActive(false);
                m_ObjectSweepFree.SetActive(true);
            }
        }
        else
        {
            m_ObjectSweepCost.SetActive(false);
            m_ObjectSweepFree.SetActive(false);
        }

        m_Tier.text = StrDictionary.GetClientDictionaryString("#{10631}", _Tier);

        m_DropIconSprite1.spriteName = "";
        m_DropIconSprite2.spriteName = "";
        m_DropIconSprite3.spriteName = "";
        m_DropItemName1.text         = "";
        m_DropItemName2.text         = "";
        m_DropItemName3.text         = "";
        m_nDropItemID1 = -1;
        m_nDropItemID2 = -1;
        m_nDropItemID3 = -1;
        Tab_CangJingGeInfo pCangJingGeInfo = TableManager.GetCangJingGeInfoByID(_Tier, 0);

        if (pCangJingGeInfo == null)
        {
            return;
        }
        string strColor = "";
        int    nZhanli  = GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.CombatValue;

        if (pCangJingGeInfo.Calculat > nZhanli)
        {
            strColor = "[ff0006]";
        }
        m_CalculatValue.text = strColor + pCangJingGeInfo.Calculat.ToString();

        Tab_CommonItem pItem = TableManager.GetCommonItemByID(pCangJingGeInfo.GetDropbyIndex(0), 0);

        if (pItem != null)
        {
            m_DropIconSprite1.spriteName = pItem.Icon.ToString();
            m_DropIconSprite1.transform.parent.FindChild("BG").GetComponent <UISprite>().spriteName = GlobeVar.QualityColorGrid[pItem.Quality - 1];
            m_DropItemName1.text = pItem.Name;
            m_DropItemName1.gameObject.SetActive(false);
            m_nDropItemID1 = pItem.Id;
        }

        pItem = TableManager.GetCommonItemByID(pCangJingGeInfo.GetDropbyIndex(1), 0);
        if (pItem != null)
        {
            m_DropIconSprite2.spriteName = pItem.Icon.ToString();
            m_DropIconSprite2.transform.parent.FindChild("BG").GetComponent <UISprite>().spriteName = GlobeVar.QualityColorGrid[pItem.Quality - 1];
            m_DropItemName2.text = pItem.Name;
            m_DropItemName2.gameObject.SetActive(false);
            m_nDropItemID2 = pItem.Id;
        }

        pItem = TableManager.GetCommonItemByID(pCangJingGeInfo.GetDropbyIndex(2), 0);
        if (pItem != null)
        {
            m_DropIconSprite3.spriteName = pItem.Icon.ToString();
            m_DropIconSprite3.transform.parent.FindChild("BG").GetComponent <UISprite>().spriteName = GlobeVar.QualityColorGrid[pItem.Quality - 1];
            m_DropItemName3.text = pItem.Name;
            m_DropItemName3.gameObject.SetActive(false);
            m_nDropItemID3 = pItem.Id;
            m_DropIconSprite3.transform.parent.gameObject.SetActive(true);
        }
        else
        {
            m_DropIconSprite3.transform.parent.gameObject.SetActive(false);
        }

        Tab_SceneClass pSceneClass = TableManager.GetSceneClassByID(CopySceneId, 0);

        if (pSceneClass == null)
        {
            return;
        }
        Tab_CopyScene pCopyScene = TableManager.GetCopySceneByID(pSceneClass.CopySceneID, 0);

        if (pCopyScene == null)
        {
            return;
        }
        //藏经阁 不分组队难度,所以取0下标
        Tab_CopySceneRule pCopySceneRule;

        if (GameDefine_Globe.CopyScene_PlayType.SINGLE == CopyScenePlayerMode)
        {
            pCopySceneRule = TableManager.GetCopySceneRuleByID(pCopyScene.GetRulebyIndex(0), 0);
        }
        else
        {
            pCopySceneRule = TableManager.GetCopySceneRuleByID(pCopyScene.GetRuleTeambyIndex(0), 0);
        }

        if (pCopySceneRule == null)
        {
            return;
        }
        int ExtraNum  = GameManager.gameManager.PlayerDataPool.CommonData.GetCopySceneExtraNumber(CopySceneId, (int)CopyScenePlayerMode);
        int nTabNum   = pCopySceneRule.Number;
        int nNum      = GameManager.gameManager.PlayerDataPool.CommonData.GetCopySceneNumber(CopySceneId, (int)CopyScenePlayerMode);
        int nTotalNum = nTabNum * nMul + ExtraNum;
        int nCurNum   = nTotalNum - nNum;

        if (nCurNum < 0)
        {
            nCurNum = 0;
        }
        m_TiaoZhanCount.text = (nCurNum).ToString() + "/" + nTotalNum.ToString();
    }
Exemple #3
0
    public void OnOpenCopyScene(int nSceneId)
    {
        Diffcult = 1;
        m_cangjingge.gameObject.SetActive(false);
        m_Level.text         = StrDictionary.GetClientDictionaryString("#{2791}");
        m_ZhanLi.text        = StrDictionary.GetClientDictionaryString("#{2791}");
        m_ShengYuCiShu.text  = StrDictionary.GetClientDictionaryString("#{2791}");
        m_TiNengXiaoHao.text = StrDictionary.GetClientDictionaryString("#{2791}");
        m_Exp.text           = StrDictionary.GetClientDictionaryString("#{2791}");
        m_Money.text         = StrDictionary.GetClientDictionaryString("#{2791}");
        m_ZhanLiDesc.text    = "";
        if (Singleton <ObjManager> .Instance.MainPlayer)
        {
            m_TiNeng.text = Singleton <ObjManager> .Instance.MainPlayer.BaseAttr.CurStamina.ToString() + "/100";
        }
        CopySceneId = nSceneId;
        Tab_SceneClass pSceneClass = TableManager.GetSceneClassByID(CopySceneId, 0);

        if (pSceneClass == null)
        {
            return;
        }

        if (m_SceneName)
        {
            m_SceneName.text = pSceneClass.Name;
        }
        //客户端掉落显示
        Tab_CangJingGeInfo pCangJingGeInfo = TableManager.GetCangJingGeInfoByID(CopySceneId + 200, 0);

        if (pCangJingGeInfo != null)
        {
            for (int i = 0; i < pCangJingGeInfo.getDropCount() && i < m_DropItem.Length && i < m_DropItemSprite.Length; i++)
            {
                Tab_CommonItem pItem = TableManager.GetCommonItemByID(pCangJingGeInfo.GetDropbyIndex(i), 0);
                if (pItem == null)
                {
                    m_DropItem[i].SetActive(false);
                    continue;
                }
                m_DropItem[i].SetActive(true);
                m_DropItemSprite[i].spriteName = pItem.Icon.ToString();
                m_DropItemSprite[i].transform.parent.FindChild("SprQuality").GetComponent <UISprite>().spriteName = GlobeVar.QualityColorGrid[pItem.Quality - 1];
            }
        }
        Tab_CopyScene pCopyScene = TableManager.GetCopySceneByID(pSceneClass.CopySceneID, 0);

        if (pCopyScene == null)
        {
            return;
        }
        m_Story.text = pCopyScene.DescInfo;
        m_Title.text = pCopyScene.Name;


        if (nSceneId == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_FBSHAOSHISHAN)
        {
            m_BtnDanren.SetActive(false);
            m_BtnDuiWu.SetActive(true);
            m_TabNum.ChangeTab("DuiWu");
        }
        else if (nSceneId == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_HUTOUZHANCHUAN)
        {
            m_BtnDanren.SetActive(true);
            m_BtnDuiWu.SetActive(false);
            m_TabNum.ChangeTab("DanRen");
        }
        else if (nSceneId == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_YANMENGUANDEFENCE)
        {
            m_BtnDanren.SetActive(false);
            m_BtnDuiWu.SetActive(true);
            m_TabNum.ChangeTab("DuiWu");
        }
        else
        {
            m_BtnDanren.SetActive(true);
            m_BtnDuiWu.SetActive(true);
            m_TabNum.ChangeTab("DanRen");
        }
        if (nSceneId == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_FBSHAOSHISHAN ||
            nSceneId == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_JUXIANZHUANG ||
            nSceneId == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_YANMENGUANDEFENCE)
        {
            m_ZhanLiDesc.text = Utils.GetDicByID(2736);
        }
        else
        {
            m_ZhanLiDesc.text = Utils.GetDicByID(2735);
        }

        // 选中合适的难度
        int nDiffcult = GetMaxDiffcult();

        if (1 == nDiffcult)
        {
            m_TabLevel.ChangeTab("KunNan");
        }
        else if (2 == nDiffcult)
        {
            m_TabLevel.ChangeTab("TiaoZhan");
        }
        else
        {
            m_TabLevel.ChangeTab("JianDan");
        }

        // 新手指引放这吧
        Check_NewPlayerGuide();
    }