using System.Collections.Generic;
|
using UnityEngine;
|
|
public class HeroDebutCallHistoryCell : CellView
|
{
|
[SerializeField] Color nameColor;
|
[SerializeField] TextEx infoText;
|
public virtual void Display(int index, List<HeroDebutGameRec> list)
|
{
|
if (list?.Count <= index) return;
|
var rec = list[index];
|
|
var itemconfig = ItemConfig.Get(rec.ItemID);
|
if (itemconfig == null) return;
|
|
//150 整个武将
|
if (itemconfig.Type == 150)
|
{
|
HeroConfig heroConfig = HeroConfig.Get(rec.ItemID);
|
if (heroConfig == null) return;
|
int quality = heroConfig.Quality;
|
|
infoText.text = Language.Get("HeroDebut29",
|
UIHelper.AppendColor(nameColor, rec.PlayerName),
|
UIHelper.AppendColor(UIHelper.GetUIColorByFunc(quality), Language.Get(StringUtility.Concat("CommonQuality", quality.ToString()))),
|
UIHelper.AppendColor(UIHelper.GetUIColorByFunc(quality), heroConfig.Name.ToString())
|
);
|
}
|
else
|
{
|
int quality = itemconfig.ItemColor;
|
|
infoText.text = Language.Get("HeroDebut30",
|
UIHelper.AppendColor(nameColor, rec.PlayerName),
|
UIHelper.AppendColor(UIHelper.GetUIColorByFunc(quality), itemconfig.ItemName.ToString()),
|
rec.ItemCount.ToString()
|
);
|
}
|
|
}
|
|
}
|