少年修仙传客户端代码仓库
hch
2025-03-03 28785d6ddf9c08e49527ede9405c7b6c93c6ed32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using UnityEngine;
 
namespace vnxbqy.UI
{
    public class YunShiXBProbabilityCell : CellView
    {
        [SerializeField] TextEx txtName;
        [SerializeField] TextEx txtRate;
 
        public void Display(int index, CellView cell)
        {
            int itemId = cell.info.Value.infoInt1;
            int count = cell.info.Value.infoInt2;
            int rate = cell.info.Value.infoInt3;
            if (!ItemConfig.Has(itemId))
                return;
            ItemConfig itemConfig = ItemConfig.Get(itemId);
 
            txtName.text = StringUtility.Contact(itemConfig.ItemName, " ", Language.Get("CelestialPalace13", count));
            double partRate = (double)rate / 100;
            txtRate.text = StringUtility.Contact(partRate.ToString("F2"), "%");
        }
    }
}