Пример #1
0
    // Token: 0x06002846 RID: 10310 RVA: 0x00446118 File Offset: 0x00444318
    public void UpdateLevelState()
    {
        PetManager instance    = PetManager.Instance;
        PetTbl     recordByKey = instance.PetTable.GetRecordByKey(this.ID);
        bool       flag        = true;

        for (int i = 0; i < 4; i++)
        {
            if (recordByKey.PetSkill[i] != 0)
            {
                PetSkillTbl recordByKey2 = instance.PetSkillTable.GetRecordByKey(recordByKey.PetSkill[i]);
                if (recordByKey2.UpLevel != 0 && this.SkillLv[i] < recordByKey2.UpLevel)
                {
                    flag = false;
                }
            }
        }
        if (flag && this.Level == 60)
        {
            this.AddState(PetManager.EPetState.Limit);
        }
        else
        {
            this.Remove(PetManager.EPetState.Limit);
            uint needExp = instance.GetNeedExp(this.Level, recordByKey.Rare);
            if (this.Level >= this.GetMaxLevel(false) && this.Level != 60 && this.Exp >= needExp - 1u)
            {
                this.AddState(PetManager.EPetState.LockLimit);
            }
            else
            {
                this.Remove(PetManager.EPetState.LockLimit);
            }
        }
    }
Пример #2
0
    // Token: 0x06001729 RID: 5929 RVA: 0x0027DDF8 File Offset: 0x0027BFF8
    private byte GetPetState(byte lockStone)
    {
        PetData petData     = this.PM.GetPetData((int)this.PM.sortPetData[this.sortIndex]);
        PetTbl  recordByKey = this.PM.PetTable.GetRecordByKey(this.ID);
        bool    flag        = petData.Level == petData.GetMaxLevel(false);
        bool    flag2;

        if (petData.Enhance == 2 || petData.CheckState(PetManager.EPetState.Evolution))
        {
            flag2 = (flag = false);
        }
        else
        {
            flag2 = (DataManager.Instance.GetCurItemQuantity(this.PetStoneID, 0) >= this.PM.GetEvoNeed_Stone(petData.Enhance, recordByKey.Rare));
        }
        if (flag && flag2)
        {
            return(1);
        }
        if (!flag && flag2)
        {
            return(2);
        }
        if (lockStone == 0)
        {
            DataManager instance        = DataManager.Instance;
            ushort      propertiesValue = instance.EquipTable.GetRecordByKey(instance.EquipTable.GetRecordByKey(this.PetStoneID).SyntheticParts[1].SyntheticItem).PropertiesInfo[0].PropertiesValue;
            int         num             = 3;
            if (petData.Enhance == 0)
            {
                num = 1;
            }
            else if (petData.Enhance == 1)
            {
                num = 2;
            }
            for (int i = 0; i < num; i++)
            {
                if (propertiesValue == 0)
                {
                    break;
                }
                if (recordByKey.PetSkill[i] != 0 && petData.SkillLv[i] != 0)
                {
                    PetSkillTbl recordByKey2 = this.PM.PetSkillTable.GetRecordByKey(recordByKey.PetSkill[i]);
                    if (recordByKey2.UpLevel != petData.SkillLv[i])
                    {
                        if ((int)petData.SkillLv[i] > recordByKey2.OpenLevel.Length || recordByKey2.OpenLevel[(int)(petData.SkillLv[i] - 1)] <= petData.Level || petData.SkillExp[i] != this.GetNeedSkillExp(recordByKey2.Experience, petData.SkillLv[i]) - 1u)
                        {
                            if (instance.GetCurItemQuantity(this.PetStoneID, 0) >= this.PM.PetUI_UpNeedStoneCount)
                            {
                                return(3);
                            }
                        }
                    }
                }
            }
        }
        return(0);
    }
Пример #3
0
 // Token: 0x06001727 RID: 5927 RVA: 0x0027DA9C File Offset: 0x0027BC9C
 public void SetData(ushort ID, int Index, _PetItem._ItemType Type)
 {
     this.ID        = ID;
     this.sortIndex = Index;
     this.cellType  = Type;
     if (this.cellType == _PetItem._ItemType.Item)
     {
         if (this.DefObj != null)
         {
             this.DefObj.SetActive(false);
         }
         this.PetObj.SetActive(false);
         this.ItemObj.SetActive(true);
         GUIManager.Instance.ChangeHeroItemImg(this.ItemTrans, eHeroOrItem.Item, ID, 0, 0, 0);
         this.ItemBtn.m_BtnID2 = (int)ID;
         this.ItemBtn.m_BtnID3 = this.sortIndex;
         this.NumStr.ClearString();
         ushort num = DataManager.Instance.GetCurItemQuantity(ID, 0);
         if (num > 999)
         {
             num = 999;
         }
         this.NumStr.IntToFormat((long)num, 1, false);
         this.NumStr.AppendFormat("{0}");
         this.NumText.text = this.NumStr.ToString();
         this.NumText.SetAllDirty();
         this.NumText.cachedTextGenerator.Invalidate();
         this.NameText.text = DataManager.Instance.mStringTable.GetStringByID((uint)DataManager.Instance.EquipTable.GetRecordByKey(ID).EquipName);
     }
     else if (this.cellType == _PetItem._ItemType.Pet)
     {
         if (this.DefObj != null)
         {
             this.DefObj.SetActive(false);
         }
         this.PetObj.SetActive(true);
         this.ItemObj.SetActive(false);
         this.PetBtn.m_BtnID2 = (int)ID;
         this.PetBtn.m_BtnID3 = this.sortIndex;
         PetData petData     = this.PM.GetPetData((int)this.PM.sortPetData[this.sortIndex]);
         PetTbl  recordByKey = this.PM.PetTable.GetRecordByKey(ID);
         GUIManager.Instance.ChangeHeroItemImg(this.PetTrans, eHeroOrItem.Pet, petData.ID, petData.Enhance, petData.Rare, (int)petData.Level);
         this.NameText.text = DataManager.Instance.mStringTable.GetStringByID((uint)recordByKey.Name);
         this.PetStoneID    = recordByKey.SoulID;
         this.NewObj.SetActive(petData.CheckState(PetManager.EPetState.NewPet));
     }
     else if (this.DefObj != null)
     {
         this.DefObj.SetActive(true);
         this.PetObj.SetActive(false);
         this.ItemObj.SetActive(false);
     }
 }
Пример #4
0
    // Token: 0x0600171C RID: 5916 RVA: 0x0027C960 File Offset: 0x0027AB60
    public void SetEffectExpText(byte lv)
    {
        PetManager instance = PetManager.Instance;
        PetData    petData  = instance.FindPetData(this.m_PetID);

        if (petData == null)
        {
            return;
        }
        PetTbl    recordByKey  = instance.PetTable.GetRecordByKey(petData.ID);
        PetExpTbl recordByKey2 = instance.PetExpTable.GetRecordByKey((ushort)lv);
        uint      num;

        if (this.m_UIType == UIPetLevelUp.EUIType.PetLvUp)
        {
            num = instance.GetNeedExp(lv, recordByKey.Rare);
        }
        else
        {
            num = instance.GetPetSkillMaxExp(this.m_PetID, this.m_Skillidx);
        }
        if (this.m_EffectTextLV != null && this.m_EffectTextExp != null)
        {
            this.m_Str[4].ClearString();
            if (lv == instance.m_PetBeginLv)
            {
                this.m_Str[4].IntToFormat((long)((ulong)(num - instance.m_BeginExp)), 1, false);
            }
            else if (lv == instance.m_PetEndLv)
            {
                this.m_Str[4].IntToFormat((long)((ulong)instance.m_EndExp), 1, false);
            }
            else
            {
                this.m_Str[4].IntToFormat((long)((ulong)num), 1, false);
            }
            this.m_Str[4].AppendFormat(DataManager.Instance.mStringTable.GetStringByID(55u));
            this.m_EffectTextExp.text = this.m_Str[4].ToString();
            this.m_EffectTextExp.SetAllDirty();
            this.m_EffectTextExp.cachedTextGenerator.Invalidate();
        }
    }
Пример #5
0
    // Token: 0x06001C10 RID: 7184 RVA: 0x0031AD70 File Offset: 0x00318F70
    private byte GetNeedEnhance(PetData curPet)
    {
        byte result = 0;

        if (this.PetID > 0)
        {
            PetTbl recordByKey = PetManager.Instance.PetTable.GetRecordByKey(this.PetID);
            for (int i = 0; i < recordByKey.PetSkill.Length; i++)
            {
                if (recordByKey.PetSkill[i] == this.SkillID)
                {
                    if (curPet != null && (int)curPet.Enhance < i)
                    {
                        result = (byte)i;
                    }
                    break;
                }
            }
        }
        return(result);
    }
Пример #6
0
 // Token: 0x060016A5 RID: 5797 RVA: 0x00271288 File Offset: 0x0026F488
 private void RefreshSkill()
 {
     PetBuff.PetSkills.Clear();
     for (int i = 0; i < PetBuff.PetSkillList.Length; i++)
     {
         if (PetBuff.PetSkillList[i] == null)
         {
             PetBuff.PetSkillList[i] = new List <PetBuff.PetSkillData>();
         }
         else
         {
             PetBuff.PetSkillList[i].Clear();
         }
     }
     for (int j = 0; j < (int)PetManager.Instance.PetDataCount; j++)
     {
         PetData petData = PetManager.Instance.GetPetData((int)((byte)j));
         if (petData != null)
         {
             PetTbl recordByKey = PetManager.Instance.PetTable.GetRecordByKey(petData.ID);
             byte   b           = 0;
             while (recordByKey.PetSkill != null && (int)b < recordByKey.PetSkill.Length)
             {
                 if (recordByKey.PetSkill[(int)b] > 0 && petData.SkillLv != null && (int)b < petData.SkillLv.Length && petData.SkillLv[(int)b] > 0)
                 {
                     PetSkillTbl recordByKey2 = PetManager.Instance.PetSkillTable.GetRecordByKey(recordByKey.PetSkill[(int)b]);
                     if (recordByKey2.Type > 0 && recordByKey2.Subject == 1 && recordByKey2.Class >= 1 && (int)recordByKey2.Class <= PetBuff.PetSkillList.Length)
                     {
                         PetBuff.PetSkillList[(int)(recordByKey2.Class - 1)].Add(new PetBuff.PetSkillData((uint)recordByKey.PetSkill[(int)b], b, recordByKey2.Subject, petData.ID));
                     }
                 }
                 b += 1;
             }
         }
     }
 }
Пример #7
0
    // Token: 0x060016AB RID: 5803 RVA: 0x00271BC4 File Offset: 0x0026FDC4
    public void onUse(ushort PetId, ushort SkillId)
    {
        PetTbl recordByKey = PetManager.Instance.PetTable.GetRecordByKey(PetId);

        DataManager.MapDataController.UseMapWeapon(recordByKey.HeroID, SkillId);
    }
Пример #8
0
 // Token: 0x0600171F RID: 5919 RVA: 0x0027D18C File Offset: 0x0027B38C
 public void SetExpValue()
 {
     if (this.m_PetID != 0)
     {
         this.m_BeginLv = PetManager.Instance.m_PetBeginLv;
         this.m_EndLv   = PetManager.Instance.m_PetEndLv;
         uint beginExp = PetManager.Instance.m_BeginExp;
         uint endExp   = PetManager.Instance.m_EndExp;
         this.m_PetSkillID = PetManager.Instance.m_PetSkillLvUpID;
         PetTbl recordByKey = PetManager.Instance.PetTable.GetRecordByKey(this.m_PetID);
         uint   num;
         uint   num2;
         if (this.m_UIType == UIPetLevelUp.EUIType.PetLvUp)
         {
             num  = PetManager.Instance.GetNeedExp(this.m_BeginLv, recordByKey.Rare);
             num2 = PetManager.Instance.GetNeedExp(this.m_EndLv, recordByKey.Rare);
         }
         else
         {
             num  = PetManager.Instance.GetPetSkillMaxExpByID(this.m_PetSkillID, this.m_BeginLv);
             num2 = PetManager.Instance.GetPetSkillMaxExpByID(this.m_PetSkillID, this.m_EndLv);
             byte b = 0;
             while ((int)b < recordByKey.PetSkill.Length)
             {
                 if (recordByKey.PetSkill[(int)b] == this.m_PetSkillID)
                 {
                     this.m_Skillidx = b;
                 }
                 b += 1;
             }
         }
         if (num > 0u && num2 > 0u)
         {
             this.m_BeginExpRate = beginExp / num;
             this.m_EndExpRate   = endExp / num2;
         }
         else
         {
             this.m_BeginExpRate = 0f;
             this.m_EndExpRate   = 0f;
         }
         uint num3 = 0u;
         for (byte b2 = this.m_BeginLv; b2 <= this.m_EndLv; b2 += 1)
         {
             if (b2 == this.m_BeginLv)
             {
                 uint num4;
                 if (this.m_UIType == UIPetLevelUp.EUIType.PetLvUp)
                 {
                     num4 = PetManager.Instance.GetNeedExp(b2, recordByKey.Rare);
                 }
                 else
                 {
                     num4 = PetManager.Instance.GetPetSkillMaxExpByID(this.m_PetSkillID, b2);
                 }
                 num3 += num4 - beginExp;
             }
             else if (b2 == this.m_EndLv)
             {
                 num3 += endExp;
             }
             else if (this.m_UIType == UIPetLevelUp.EUIType.PetLvUp)
             {
                 num3 += PetManager.Instance.GetNeedExp(b2, recordByKey.Rare);
             }
             else
             {
                 num3 += PetManager.Instance.GetPetSkillMaxExpByID(this.m_PetSkillID, b2);
             }
         }
         if (this.m_EffectTextLV != null && this.m_EffectTextExp != null)
         {
             this.m_EffectTextLV.rectTransform.anchoredPosition  = this.BEGIN;
             this.m_EffectTextExp.rectTransform.anchoredPosition = this.EXP_BEGIN;
             this.m_EffectTextExp.gameObject.SetActive(true);
             this.m_Str[4].ClearString();
             this.m_Str[4].IntToFormat((long)((ulong)num3), 1, true);
             this.m_Str[4].AppendFormat(DataManager.Instance.mStringTable.GetStringByID(55u));
             this.m_EffectTextExp.text = this.m_Str[4].ToString();
             this.m_EffectTextExp.SetAllDirty();
             this.m_EffectTextExp.cachedTextGenerator.Invalidate();
         }
         PetSkillTbl recordByKey2 = PetManager.Instance.PetSkillTable.GetRecordByKey(this.m_PetSkillID);
         CString     cstring      = StringManager.Instance.StaticString1024();
         cstring.Append('s');
         cstring.IntToFormat((long)recordByKey2.Icon, 5, false);
         cstring.AppendFormat("{0}");
         this.m_Skill.sprite        = GUIManager.Instance.LoadSkillSprite(cstring);
         this.m_Skill.material      = GUIManager.Instance.GetSkillMaterial();
         this.m_SkillFrame.sprite   = GUIManager.Instance.LoadFrameSprite("sk");
         this.m_SkillFrame.material = GUIManager.Instance.GetFrameMaterial();
         this.m_State      = UIPetLevelUp.ExpState.Begin;
         this.m_State_Lv   = UIPetLevelUp.ELvState.None;
         this.m_State_Exp2 = UIPetLevelUp.EExpState.Move;
     }
 }
Пример #9
0
    // Token: 0x060016CA RID: 5834 RVA: 0x002735F8 File Offset: 0x002717F8
    public static bool UpdateSkill(int arg = 0)
    {
        Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door;

        if (door)
        {
            door.m_PetSkillBtnFlashGO.GetComponent <uTweener>().enabled = !PetBuff.Refreshed;
            door.m_PetSkillBtnFlashGO.GetComponent <Image>().color      = Color.white;
        }
        if (arg > 0 || !PetBuff.SkillInit)
        {
            PetBuff.SkillInit = true;
            for (int i = 0; i < PetBuff.ActiveSkill.Length; i++)
            {
                PetBuff.ActiveSkill[i] = 0;
            }
            for (int j = 0; j < PetBuff.PetSkillList.Length; j++)
            {
                if (PetBuff.PetSkillList[j] == null)
                {
                    PetBuff.PetSkillList[j] = new List <PetBuff.PetSkillData>();
                }
                else
                {
                    PetBuff.PetSkillList[j].Clear();
                }
            }
            for (int k = 0; k < (int)PetManager.Instance.PetDataCount; k++)
            {
                PetData petData = PetManager.Instance.GetPetData((int)((byte)k));
                if (petData != null)
                {
                    PetTbl recordByKey = PetManager.Instance.PetTable.GetRecordByKey(petData.ID);
                    byte   b           = 0;
                    while (recordByKey.PetSkill != null && (int)b < recordByKey.PetSkill.Length)
                    {
                        if (recordByKey.PetSkill[(int)b] > 0 && petData.SkillLv != null && (int)b < petData.SkillLv.Length && petData.Enhance >= b)
                        {
                            PetSkillTbl recordByKey2 = PetManager.Instance.PetSkillTable.GetRecordByKey(recordByKey.PetSkill[(int)b]);
                            if (recordByKey2.Subject > 0 && recordByKey2.Type == 1 && recordByKey2.Class >= 1 && (int)recordByKey2.Class <= PetBuff.PetSkillList.Length && (int)recordByKey2.Subject <= PetBuff.ActiveSkill.Length)
                            {
                                PetBuff.PetSkillList[(int)(recordByKey2.Class - 1)].Add(new PetBuff.PetSkillData((uint)recordByKey.PetSkill[(int)b], b, recordByKey2.Subject, petData.ID));
                            }
                        }
                        b += 1;
                    }
                }
            }
            if (arg > 0)
            {
                PetBuff.Update(6, 0, true);
            }
        }
        for (int l = 0; l < PetBuff.ActiveSkill.Length; l++)
        {
            if (PetBuff.ActiveSkill[l] > 0)
            {
                return(true);
            }
        }
        return(false);
    }
Пример #10
0
 // Token: 0x06001ED6 RID: 7894 RVA: 0x003AF68C File Offset: 0x003AD88C
 public void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
 {
     if (panelObjectIdx < 9)
     {
         if (!this.bFindScrollComp[panelObjectIdx])
         {
             this.bFindScrollComp[panelObjectIdx]            = true;
             this.ScrollComp[panelObjectIdx].LineImage       = item.transform.GetChild(0).GetComponent <Image>();
             this.ScrollComp[panelObjectIdx].HIBtn           = item.transform.GetChild(1).GetComponent <UIHIBtn>();
             this.ScrollComp[panelObjectIdx].HIBtn.m_Handler = this;
             this.ScrollComp[panelObjectIdx].LEBtn           = item.transform.GetChild(2).GetComponent <UILEBtn>();
             this.ScrollComp[panelObjectIdx].LEBtn.m_Handler = this;
             this.ScrollComp[panelObjectIdx].ItemName        = item.transform.GetChild(4).GetComponent <UIText>();
             this.ScrollComp[panelObjectIdx].ItemCountText   = item.transform.GetChild(5).GetComponent <UIText>();
             this.ScrollComp[panelObjectIdx].RankImg         = item.transform.GetChild(3).GetComponent <Image>();
             this.ScrollComp[panelObjectIdx].RankText        = item.transform.GetChild(3).GetChild(0).GetComponent <UIText>();
             this.ScrollComp[panelObjectIdx].Btn3            = item.transform.GetChild(6).GetComponent <UIButton>();
             this.ScrollComp[panelObjectIdx].Hint3           = item.transform.GetChild(6).GetComponent <UIButtonHint>();
             this.ScrollComp[panelObjectIdx].Hint3.m_Handler = this;
             this.ScrollComp[panelObjectIdx].Hint3.DelayTime = 0.2f;
             this.PriceStr[panelObjectIdx] = StringManager.Instance.SpawnString(30);
             this.NameStr[panelObjectIdx]  = StringManager.Instance.SpawnString(150);
             this.RankStr[panelObjectIdx]  = StringManager.Instance.SpawnString(30);
         }
         if (dataIdx < 0)
         {
             return;
         }
         ushort num  = 1;
         ushort num2 = 1;
         byte   b    = 1;
         bool   flag = false;
         this.NameStr[panelObjectIdx].Length            = 0;
         this.ScrollComp[panelObjectIdx].HIBtn.m_BtnID2 = panelObjectIdx;
         if (this.OpenKind == 1 || this.OpenKind == 4)
         {
             this.ScrollComp[panelObjectIdx].LineImage.color = new Color32(94, 183, 138, byte.MaxValue);
             if (this.tmpEquip.EquipKind == 18)
             {
                 if (this.IsGiftBox(this.BoxID))
                 {
                     if (dataIdx >= this.tmpGB.ItemData.Length)
                     {
                         return;
                     }
                     num  = this.tmpGB.ItemData[dataIdx].ItemID;
                     num2 = this.tmpGB.ItemData[dataIdx].ItemCount;
                 }
                 else
                 {
                     if (dataIdx >= this.tmpLB.ItemData.Length)
                     {
                         return;
                     }
                     num  = this.tmpLB.ItemData[dataIdx].ItemID;
                     num2 = this.tmpLB.ItemData[dataIdx].ItemCount;
                 }
                 Equip recordByKey = this.DM.EquipTable.GetRecordByKey(num);
                 flag = this.GM.IsLeadItem(recordByKey.EquipKind);
                 this.NameStr[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID((uint)recordByKey.EquipName));
                 if (flag)
                 {
                     if (this.EndRank == 0)
                     {
                         this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(this.BeginRank));
                         this.NameStr[panelObjectIdx].AppendFormat("({0})");
                     }
                     else
                     {
                         this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(this.BeginRank));
                         this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(this.EndRank));
                         this.NameStr[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7738u));
                     }
                 }
                 if (recordByKey.EquipKind == 30)
                 {
                     PetTbl recordByKey2 = PetManager.Instance.PetTable.GetRecordByKey(recordByKey.SyntheticParts[0].SyntheticItem);
                     this.RankStr[panelObjectIdx].Length = 0;
                     StringManager.IntToStr(this.RankStr[panelObjectIdx], (long)recordByKey2.Rare, 1, false);
                     this.ScrollComp[panelObjectIdx].RankText.text = this.RankStr[panelObjectIdx].ToString();
                     this.ScrollComp[panelObjectIdx].RankText.SetAllDirty();
                     this.ScrollComp[panelObjectIdx].RankText.cachedTextGenerator.Invalidate();
                     this.ScrollComp[panelObjectIdx].RankImg.gameObject.SetActive(true);
                 }
                 else
                 {
                     this.ScrollComp[panelObjectIdx].RankImg.gameObject.SetActive(false);
                 }
             }
             else
             {
                 if (this.tmpEquip.EquipKind != 19)
                 {
                     return;
                 }
                 if (dataIdx >= this.tmpCB.ItemData.Length)
                 {
                     return;
                 }
                 num  = this.tmpCB.ItemData[dataIdx].ItemID;
                 num2 = this.tmpCB.ItemData[dataIdx].ItemCount;
                 b    = this.tmpCB.ItemData[dataIdx].Rank;
                 Equip recordByKey = this.DM.EquipTable.GetRecordByKey(num);
                 flag = this.GM.IsLeadItem(recordByKey.EquipKind);
                 if (this.tmpCB.ItemData[dataIdx].Rank != 0)
                 {
                     this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(this.tmpCB.ItemData[dataIdx].Rank));
                     this.NameStr[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7739u));
                 }
                 else if (recordByKey.EquipKind == 18 && this.tmpEquip.PropertiesInfo[0].Propertieskey != 6)
                 {
                     byte itemRank = 1;
                     if (this.tmpEquip.PropertiesInfo[0].Propertieskey == 1)
                     {
                         itemRank = 3;
                     }
                     else if (this.tmpEquip.PropertiesInfo[0].Propertieskey == 2)
                     {
                         itemRank = 4;
                     }
                     else if (this.tmpEquip.PropertiesInfo[0].Propertieskey == 3)
                     {
                         itemRank = 5;
                     }
                     this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(itemRank));
                     this.NameStr[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7739u));
                 }
                 this.NameStr[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID((uint)recordByKey.EquipName));
             }
         }
         else if (this.OpenKind == 2)
         {
             this.ScrollComp[panelObjectIdx].LineImage.color = new Color32(94, 165, 183, byte.MaxValue);
             if (dataIdx >= this.GM.CommonItemData.Count)
             {
                 return;
             }
             num  = this.GM.CommonItemData[dataIdx].ItemID;
             num2 = this.GM.CommonItemData[dataIdx].Num;
             b    = this.GM.CommonItemData[dataIdx].ItemRank;
             Equip recordByKey = this.DM.EquipTable.GetRecordByKey(num);
             flag = this.GM.IsLeadItem(recordByKey.EquipKind);
             if (this.GM.CommonItemData[dataIdx].ItemRank != 0)
             {
                 this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(b));
                 this.NameStr[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7739u));
             }
             CString cstring = StringManager.Instance.StaticString1024();
             UIItemInfo.SetNameProperties(null, null, cstring, null, ref recordByKey, null);
             this.NameStr[panelObjectIdx].Append(cstring);
         }
         else if (this.OpenKind == 3)
         {
             this.ScrollComp[panelObjectIdx].LineImage.color = new Color32(94, 165, 183, byte.MaxValue);
             MerchantmanManager instance = MerchantmanManager.Instance;
             if (dataIdx >= (int)instance.MerchantmanExtraData.DataLen)
             {
                 return;
             }
             num  = instance.MerchantmanExtraData.ItemContain[dataIdx].ItemID;
             num2 = instance.MerchantmanExtraData.ItemContain[dataIdx].Num;
             b    = instance.MerchantmanExtraData.ItemContain[dataIdx].ItemRank;
             Equip recordByKey = this.DM.EquipTable.GetRecordByKey(num);
             flag = this.GM.IsLeadItem(recordByKey.EquipKind);
             if (b != 0)
             {
                 this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(b));
                 this.NameStr[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7739u));
             }
             CString cstring2 = StringManager.Instance.StaticString1024();
             UIItemInfo.SetNameProperties(null, null, cstring2, null, ref recordByKey, null);
             this.NameStr[panelObjectIdx].Append(cstring2);
         }
         if (flag)
         {
             GUIManager.Instance.ChangeLordEquipImg(this.ScrollComp[panelObjectIdx].LEBtn.transform, num, b, eLordEquipDisplayKind.OnlyItem, 0, 0, 0, 0, 0, false);
         }
         else
         {
             GUIManager.Instance.ChangeHeroItemImg(this.ScrollComp[panelObjectIdx].HIBtn.transform, eHeroOrItem.Item, num, 0, 0, 0);
         }
         this.ScrollComp[panelObjectIdx].LEBtn.gameObject.SetActive(flag);
         this.ScrollComp[panelObjectIdx].HIBtn.gameObject.SetActive(!flag);
         this.ScrollComp[panelObjectIdx].Hint3.Parm1 = num;
         this.ScrollComp[panelObjectIdx].Hint3.Parm2 = b;
         if (flag || (!MallManager.Instance.CheckCanOpenDetail(num) && !PetManager.Instance.IsFakePetItem(num)))
         {
             this.ScrollComp[panelObjectIdx].Hint3.enabled = true;
         }
         else
         {
             this.ScrollComp[panelObjectIdx].Hint3.enabled = false;
         }
         this.ScrollComp[panelObjectIdx].Btn3.gameObject.SetActive(this.ScrollComp[panelObjectIdx].Hint3.enabled);
         this.ScrollComp[panelObjectIdx].ItemName.text = this.NameStr[panelObjectIdx].ToString();
         this.ScrollComp[panelObjectIdx].ItemName.SetAllDirty();
         this.ScrollComp[panelObjectIdx].ItemName.cachedTextGenerator.Invalidate();
         this.PriceStr[panelObjectIdx].Length = 0;
         StringManager.IntToStr(this.PriceStr[panelObjectIdx], (long)num2, 1, true);
         this.ScrollComp[panelObjectIdx].ItemCountText.text = this.PriceStr[panelObjectIdx].ToString();
         this.ScrollComp[panelObjectIdx].ItemCountText.SetAllDirty();
         this.ScrollComp[panelObjectIdx].ItemCountText.cachedTextGenerator.Invalidate();
     }
 }