Esempio n. 1
0
    public void ShowInfoByPos(EPosType posType, int pos)
    {
        this.mPos     = pos;
        this.mPosType = posType;
        bool isDress = (posType == EPosType.RoleGem);

        ShowDress(isDress);
        XGem gem    = GTDataManager.Instance.GetGemDataByPos(posType, pos);
        int  itemID = gem.Id;
        DGem gemDB  = ReadCfgGem.GetDataById(itemID);

        gemLevel.text      = GTTools.Format("等级 {0}", gem.StrengthenLevel);
        gemFightValue.text = GTTools.Format("战斗力 {0}", AttrHelper.GetFightValue(gem));
        ShowBaseView(itemID);
        GTItemHelper.ShowGemPropertyText(gemPropertys, itemID, gem.StrengthenLevel);
        DGemSuit suitDB        = ReadCfgGemSuit.GetDataById(gemDB.Suit);
        int      activeSuitNum = isDress ? GemModule.Instance.GetActiveSameSuitsCountByPos(pos) : 0;
        bool     hasSuit       = ReadCfgGemSuit.ContainsKey(gemDB.Suit);

        if (hasSuit)
        {
            ShowHasSuit(gemDB);
            ShowSuitPropertysView(activeSuitNum, suitDB);
            ShowSameSuitGemsView(gemDB.Id);
        }
        else
        {
            ShowNoSuit();
        }
    }
Esempio n. 2
0
    public void ShowInfoByPos(EPosType posType, int pos)
    {
        this.mPos     = pos;
        this.mPosType = posType;
        ShowDress(posType == EPosType.RoleEquip);
        XEquip equip = GTDataManager.Instance.GetEquipDataByPos(mPosType, mPos);

        if (equip == null)
        {
            return;
        }
        int itemID = equip.Id;

        ShowBaseView(itemID);
        equipFightValue.text   = GTTools.Format("战斗力 {0}", AttrHelper.GetFightValue(equip));
        equipAdvanceLevel.text = EquipModule.Instance.GetEquipAdvanceNameByLevel(equip.AdvanceLevel);
        Dictionary <EAttr, int> propertys = AttrHelper.GetPropertys(equip);

        title3.text = GTTools.Format("装备星级 {0}", equip.StarLevel);
        title2.text = GTTools.Format("进阶等级 {0}", equip.AdvanceLevel);
        title1.text = GTTools.Format("强化等级 {0}", equip.StrengthenLevel);
        GTItemHelper.ShowPropertyText(this.equipPropertys, propertys, true);
        GTItemHelper.ShowEquipStrengthText(text1, itemID, equip.StrengthenLevel);
        GTItemHelper.ShowEquipAdvanceText(text2, itemID, equip.AdvanceLevel);
        GTItemHelper.ShowEquipStarText(text3, itemID, equip.StarLevel);
    }
Esempio n. 3
0
    private void ShowAdvanceView()
    {
        XEquip equip = GTDataManager.Instance.GetEquipDataByPos(mPosType, mPos);

        if (equip == null)
        {
            return;
        }
        int itemID = equip.Id;

        if (EquipModule.Instance.IsFullStarLevel(equip))
        {
            return;
        }
        GTItemHelper.ShowItemTexture(mEquipAdvance.nowEquipTexture, itemID);
        GTItemHelper.ShowItemQuality(mEquipAdvance.nowEquipQuality, itemID);
        GTItemHelper.ShowItemName(mEquipAdvance.nowEquipName, itemID);

        GTItemHelper.ShowItemTexture(mEquipAdvance.nexEquipTexture, itemID);
        GTItemHelper.ShowItemQuality(mEquipAdvance.nexEquipQuality, itemID);
        GTItemHelper.ShowItemName(mEquipAdvance.nexEquipName, itemID);

        Dictionary <EAttr, int> nowPropertys = AttrHelper.GetPropertys(equip);
        XEquip nexEquip = new XEquip();

        GTTools.Copy(nexEquip, equip);
        nexEquip.AdvanceLevel++;
        Dictionary <EAttr, int> nexPropertys = AttrHelper.GetPropertys(nexEquip);

        GTItemHelper.ShowPropertyText(mEquipAdvance.nowEquipPropertys, nowPropertys, false);
        GTItemHelper.ShowPropertyText(mEquipAdvance.nexEquipPropertys, nexPropertys, false);
        mEquipAdvance.nowEquipFightValue.text = AttrHelper.GetFightValue(nowPropertys).ToString();
        mEquipAdvance.nexEquipFightValue.text = AttrHelper.GetFightValue(nexPropertys).ToString();

        DEquip            equipDB = ReadCfgEquip.GetDataById(itemID);
        DEquipAdvanceCost db      = ReadCfgEquipAdvanceCost.GetDataById(equipDB.Quality * 1000 + equip.AdvanceLevel + 1);
        int hasItemNum            = GTDataManager.Instance.GetItemCountById(db.CostItemId);

        GTItemHelper.ShowItemTexture(mEquipAdvance.costItemTexture, db.CostItemId);
        GTItemHelper.ShowPriceText(mEquipAdvance.costItemNum, hasItemNum, db.CostItemNum);
        GTItemHelper.ShowItemQuality(mEquipAdvance.costItemQuality, itemID);
        if (db.CostEquipNum > 0)
        {
            mEquipAdvance.costEquipBtn.SetActive(true);
            GTItemHelper.ShowItemTexture(mEquipAdvance.costEquipTexture, itemID);
            GTItemHelper.ShowItemQuality(mEquipAdvance.costEquipQuality, itemID);
            int hasSameEquipNum = EquipModule.Instance.GetBagSameEquipList(equip).Count;
            GTItemHelper.ShowPriceText(mEquipAdvance.costEquipNum, hasSameEquipNum, db.CostEquipNum);
        }
        else
        {
            mEquipAdvance.costEquipBtn.SetActive(false);
        }
        GTItemHelper.ShowItemTexture(mEquipAdvance.costMoneyTexture, db.CostMoneyId);
        GTItemHelper.ShowItemNum(mEquipAdvance.costMoneyNum, db.CostMoneyNum);
        GTItemHelper.ShowEquipAdvanceText(mEquipAdvance.advanceText, itemID, equip.AdvanceLevel);
    }
Esempio n. 4
0
    private void ShowView()
    {
        XPartner data = DataDBSPartner.GetDataById(mSelectID);

        if (data == null)
        {
            data = GTDataFactory.CreatePartner(mSelectID);
        }
        partnerLevel.text      = GTTools.Format("等级 {0}", data.Level);
        partnerExp.text        = GTTools.Format("{0}/{1}", data.Exp, 2500);
        partnerExpValue.value  = 0;
        partnerFightValue.text = GTTools.Format("战斗力:{0}", AttrHelper.GetFightValue(data));
        partnerWakeLevel.text  = GTTools.Format("觉醒 {0}", data.Wake);
        DActor db = ReadCfgActor.GetDataById(mSelectID);

        GTItemHelper.ShowQualityText(partnerName, db.Name, db.Quality);
    }
Esempio n. 5
0
    private void ShowView()
    {
        for (int i = 0; i < mMoneyViewList.Count; i++)
        {
            MoneyView mv = mMoneyViewList[i];
            DItem     db = ReadCfgItem.GetDataById(i + 1);
            GTItemHelper.ShowItemTexture(mv.texture, db.Id);
            mv.labNum.text = GTDataManager.Instance.GetItemCountById(db.Id).ToString();
        }

        XCharacter role        = RoleModule.Instance.GetCurPlayer();
        DRoleLevel heroLevelDB = ReadCfgRoleLevel.GetDataById(role.Level);

        heroName.text    = role.Name;
        heroLevel.text   = GTTools.Format("等级 {0}", role.Level);
        heroVIP.text     = GTTools.Format("VIP {0}", role.VipLevel);
        heroExpNum.text  = GTTools.Format("{0}/{1}", role.CurExp, heroLevelDB.RequireExp);
        heroExpBar.value = role.CurExp / (heroLevelDB.RequireExp * 1f);

        int fightValue = AttrHelper.GetFightValue(role);

        heroFightValue.text = GTTools.Format("战斗力 {0}", fightValue);
    }