|
@@ -43,24 +43,8 @@ namespace GFGGame
|
|
|
{
|
|
|
base.OnShown();
|
|
|
|
|
|
-
|
|
|
- if (TimeHelper.ClientNow() < TimeUtil.GetCurDayTime(GlobalCfgArray.globalCfg.refreshTime))
|
|
|
- {
|
|
|
- if (DateTime.Now.Month == 1)
|
|
|
- {
|
|
|
- _month = 12;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- _month = DateTime.Now.Month - 1;
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- _month = DateTime.Now.Month;
|
|
|
- }
|
|
|
- MonthlyCardCfg cardCfg = MonthlyCardCfgArray.Instance.GetCfg(MonthCardType.BlackGold);
|
|
|
- _ui.m_list.numItems = cardCfg.clothesIdArr.Length;
|
|
|
+ _month = TimeUtil.GetCurMonth();
|
|
|
+ _ui.m_list.numItems = MonthlyCardClothesCfgArray.Instance.GetCfgsByyear(TimeUtil.GetCurYear()).Count;
|
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
@@ -77,15 +61,16 @@ namespace GFGGame
|
|
|
|
|
|
private void RenderListItem(int index, GObject obj)
|
|
|
{
|
|
|
- MonthlyCardCfg cardCfg = MonthlyCardCfgArray.Instance.GetCfg(MonthCardType.BlackGold);
|
|
|
- ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cardCfg.clothesIdArr[index]);
|
|
|
|
|
|
- UI_ListBlackRewardtem item = UI_ListBlackRewardtem.Proxy(obj);
|
|
|
|
|
|
+ UI_ListBlackRewardtem item = UI_ListBlackRewardtem.Proxy(obj);
|
|
|
+ MonthlyCardClothesCfg clothesCfg = MonthlyCardClothesCfgArray.Instance.GetCfgsByyear(TimeUtil.GetCurYear())[index];
|
|
|
+ ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(clothesCfg.clothesArr[0]);
|
|
|
item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
|
|
|
- item.m_txtMonth.text = string.Format("{0}月", NumberUtil.GetChiniseNumberText(index + 1));
|
|
|
|
|
|
- bool isCurMonth = index + 1 == _month;
|
|
|
+ item.m_txtMonth.text = string.Format("{0}月", clothesCfg.month);
|
|
|
+
|
|
|
+ bool isCurMonth = clothesCfg.month == _month;
|
|
|
item.m_imgMask.visible = !isCurMonth;
|
|
|
item.m_grpMonth.visible = isCurMonth;
|
|
|
item.m_grpName.visible = isCurMonth;
|
|
@@ -94,7 +79,7 @@ namespace GFGGame
|
|
|
{
|
|
|
item.target.onClick.Add(OnBtnGetClick);
|
|
|
}
|
|
|
- item.target.data = _month;
|
|
|
+ item.target.data = clothesCfg.month;
|
|
|
|
|
|
UI_ListBlackRewardtem.ProxyEnd();
|
|
|
}
|