示例#1
0
    private void GetBelleFragmentNum(out int have, out int need)
    {
        have = 0;
        need = 0;
        if (null == BelleInfoWindow.Instance())
        {
            return;
        }
        Tab_Belle belleTab = BelleInfoWindow.Instance().CurSellectedBelleData;

        if (null == belleTab)
        {
            return;
        }
        Belle curBelleData = null;

        if (BelleData.OwnedBelleMap.ContainsKey(belleTab.Id))
        {
            curBelleData = BelleData.OwnedBelleMap[belleTab.Id];
        }
        if (null == curBelleData)
        {
            return;
        }
        Tab_BelleLevelup curTabBelleLevelup = TableManager.GetBelleLevelupByID(curBelleData.id * Belle.ID_FACTOR + curBelleData.orgLevel, 0);

        if (null != curTabBelleLevelup && curTabBelleLevelup.getConsumeTypeCount() > 0)
        {
            need = curTabBelleLevelup.GetConsumeNumbyIndex(0);
        }
        BelleData.OwnedBelleAbsorbNum.TryGetValue(belleTab.Id, out have);
    }
示例#2
0
    /// <summary>
    /// 进化确认界面数据填充
    /// </summary>
    /// <param name="belle"></param>
    public void SetEvaWinData(Belle curBelleData)
    {
        if (null == curBelleData)
        {
            return;
        }

        m_EvaCurMianColor.text          = BelleData.GetBelleDescByColorLevel(curBelleData.colorLevel);
        m_EvaCurMianColorPic.spriteName = BelleData.GetBelleColorPicByColorLevel(curBelleData.colorLevel);
        m_EvaCurSubColor.text           = StrDictionary.GetClientDictionaryString("#{10811}", curBelleData.subLevel);
        // m_EvaCurMianColor.color = BelleData.GetBelleColorByColorLevel(curBelleData.colorLevel);
        // m_EvaCurSubColor.color = m_EvaCurMianColor.color;

        Tab_BelleLevelup curTabBelleLevelup  = TableManager.GetBelleLevelupByID(curBelleData.id * Belle.ID_FACTOR + curBelleData.orgLevel, 0);
        Tab_BelleLevelup nextTabBelleLevelup = TableManager.GetBelleLevelupByID(curBelleData.id * Belle.ID_FACTOR + curBelleData.orgLevel + 1, 0);

        if (null != curTabBelleLevelup && nextTabBelleLevelup != null)
        {
            m_EvaNextMainColor.text = BelleData.GetBelleDescByColorLevel(nextTabBelleLevelup.MainLevel);

            m_EvaNextMainColorPic.spriteName = BelleData.GetBelleColorPicByColorLevel(curBelleData.colorLevel);
            m_EvaNextSubColor.text           = StrDictionary.GetClientDictionaryString("#{10811}", nextTabBelleLevelup.SubLevel);
            //  m_EvaNextMainColor.color = BelleData.GetBelleColorByColorLevel(nextTabBelleLevelup.MainLevel);
            //m_EvaNextSubColor.color = m_EvaNextMainColor.color;

            //消耗类型图片 理论上应该消耗的统一接口,这里先这么着吧,改动不会经常改

            Tab_CommonItem item1 = TableManager.GetCommonItemByID(curTabBelleLevelup.GetConsumeSubTypebyIndex(0), 0);
            if (item1 != null)
            {
                m_EvaCostItem_1_Icon.spriteName = item1.Icon;
            }

            m_EvaCostItem_1_Count.text = curTabBelleLevelup.GetConsumeNumbyIndex(0).ToString();
            m_EvaCostItem_2_Count.text = curTabBelleLevelup.GetConsumeNumbyIndex(1).ToString();
            //
            //             string attrTypeName = BelleData.GetBelleDescByColorLevel(nextTabBelleLevelup.MainLevel);
            //             strTip = StrDictionary.GetClientDictionaryString("#{1404}", attrTypeName, nextTabBelleLevelup.SubLevel, curTabBelleLevelup.GetConsumeNumbyIndex(0), curTabBelleLevelup.GetConsumeNumbyIndex(1));
        }
        // MessageBoxLogic.OpenOKCancelBox(strTip, "", DoEvlolution);
    }
示例#3
0
    public void UpdateEvalutionInfo()
    {
        if (null == BelleInfoWindow.Instance())
        {
            return;
        }

        Tab_Belle belleTab = BelleInfoWindow.Instance().CurSellectedBelleData;

        if (null == belleTab)
        {
            return;
        }

        Belle curBelleData = null;

        if (BelleData.OwnedBelleMap.ContainsKey(belleTab.Id))
        {
            curBelleData = BelleData.OwnedBelleMap[belleTab.Id];
        }
        if (null == curBelleData)
        {
            return;
        }
        int belleSubItemId     = belleTab.BelleItemID;
        int belleTotalSubCount = 0;
        int belleCoinCount     = 0;
        Tab_BelleLevelup curTabBelleLevelup = TableManager.GetBelleLevelupByID(curBelleData.id * Belle.ID_FACTOR + curBelleData.orgLevel, 0);

        if (null != curTabBelleLevelup && curTabBelleLevelup.getConsumeTypeCount() > 0)
        {
            belleTotalSubCount = curTabBelleLevelup.GetConsumeNumbyIndex(0);
            belleCoinCount     = curTabBelleLevelup.GetConsumeNumbyIndex(1);
        }

        if (GameManager.gameManager.PlayerDataPool == null)
        {
            return;
        }
        Games.Item.GameItemContainer backPack = GameManager.gameManager.PlayerDataPool.BackPack;
        if (backPack == null)
        {
            return;
        }
        int belleSubItemCount = backPack.GetItemCountByDataId(belleSubItemId);
        int have = 0; int need = 0;

        GetBelleFragmentNum(out have, out need);
        m_curBelleItemCount.text = have.ToString() + "/" + need.ToString();
        if (need > 0)
        {
            BelleFragmentUS.transform.localScale = new Vector3((float)have / need, 1f, 1f);
        }
        Tab_CommonItem commItem = TableManager.GetCommonItemByID(belleTab.BelleItemID, 0);

        if (commItem != null)
        {
            m_curBelleItemIcon.spriteName = commItem.Icon;
        }
        if (belleSubItemCount < belleTotalSubCount)
        {
            m_curBelleEvaluteLab.text = StrDictionary.GetClientDictionaryString("#{10812}");
            messageBtn.functionName   = "OnGetItem";
            evoRedTipObj.gameObject.SetActive(false);
            if (BelleConfig.GetBelleEvoBitByIndex(belleTab.Id))
            {
                BelleConfig.SetBelleEvoCountByBit(belleTab.Id, '0');
            }
        }
        else
        {
            m_curBelleEvaluteLab.text = StrDictionary.GetClientDictionaryString("#{10813}");
            messageBtn.functionName   = "OnEvolutionClick";
            evoRedTipObj.gameObject.SetActive(!curBelleData.IsMaxLevel());
        }

        BelleData.m_belleEvoCount = BelleConfig.GetBelleEvoCount();
        //最大等级的一个判断


        m_EvaluBtnObj.SetActive(!curBelleData.IsMaxLevel());
        m_EvaluMaxLabel.gameObject.SetActive(curBelleData.IsMaxLevel());
    }
示例#4
0
    public void Advanced()
    {
        Tab_Belle belleTabC = BelleInfoWindow.Instance().CurSellectedBelleData;

        if (belleTabC != null && BelleData.OwnedBelleMap.ContainsKey(belleTabC.Id))
        {
            if (BelleData.OwnedBelleMap[belleTabC.Id].colorLevel == 5 && BelleData.OwnedBelleMap[belleTabC.Id].subLevel == 9)
            {
                GUIData.AddNotifyData2Client(false, "#{11321}");
                return;
            }
        }
        int have = 0;
        int need = 0;

        GetBelleFragmentNum(out have, out need);
        if (have >= need)
        {
            Tab_Belle belleTab = BelleInfoWindow.Instance().CurSellectedBelleData;
            if (belleTab == null || !BelleData.OwnedBelleMap.ContainsKey(belleTab.Id))
            {
                return;
            }

            Tab_BelleLevelup belleLevL = TableManager.GetBelleLevelupByID(belleTab.Id * Belle.ID_FACTOR + BelleData.OwnedBelleMap[belleTab.Id].orgLevel, 0);
            if (belleLevL.GetConsumeTypebyIndex(1) == 2)
            {
                MessageBoxLogic.OpenCostBox(StrDictionary.GetClientDictionaryString("#{11467}"), "", StrDictionary.GetClientDictionaryString("#{11466}"), StrDictionary.GetClientDictionaryString("#{11312}"), "qian1", "X" + belleLevL.GetConsumeNumbyIndex(1), AdvanceOK, null);
            }
        }
        else
        {
            if (AdvancePlane != null)
            {
                AdvancePlane.SetActive(!AdvancePlane.activeInHierarchy);
            }
        }
        if (BelleController.Instance() != null)
        {
            if (BelleController.Instance().FTEIndex == 3)
            {
                BelleController.Instance().DoFTE(4);
            }
            else if (BelleController.Instance().FTEIndex == 5)
            {
                BelleController.Instance().DoFTE(6);
            }
        }
    }