|
@@ -239,40 +239,49 @@ namespace GFGGame
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- int _index = index >= 29 && _ui.m_list.numItems > 29 ? index - 1 : index;
|
|
|
- DailySignBonusCfg bonusCfg = DailySignBonusCfgArray.Instance.GetCfgsBymonth(_month)[_index];
|
|
|
- int itemType = ItemDataManager.GetItemType(bonusCfg.bonusArr[0][0]);
|
|
|
- bool isGot = MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsLong(NumericType.SignDay), bonusCfg.day);
|
|
|
- if (bonusCfg.day == _day && !isGot && _effectUI3 == null)
|
|
|
+ try
|
|
|
{
|
|
|
- _effectUI3 = EffectUIPool.CreateEffectUI(item.m_holderSign, "ui_Activity", "everyday_kuang");
|
|
|
- m_holderSign = item.m_holderSign;
|
|
|
- }
|
|
|
+ int _index = index >= 29 && _ui.m_list.numItems > 29 ? index - 1 : index;
|
|
|
+ DailySignBonusCfg bonusCfg = DailySignBonusCfgArray.Instance.GetCfgsBymonth(_month)[_index];
|
|
|
+ int itemType = ItemDataManager.GetItemType(bonusCfg.bonusArr[0][0]);
|
|
|
+ bool isGot = MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsLong(NumericType.SignDay), bonusCfg.day);
|
|
|
+ if (bonusCfg.day == _day && !isGot && _effectUI3 == null)
|
|
|
+ {
|
|
|
+ _effectUI3 = EffectUIPool.CreateEffectUI(item.m_holderSign, "ui_Activity", "everyday_kuang");
|
|
|
+ m_holderSign = item.m_holderSign;
|
|
|
+ }
|
|
|
|
|
|
- item.m_holderSign.visible = false;
|
|
|
- item.m_c1.selectedIndex = itemType == ConstItemType.DRESS_UP ? 0 : bonusCfg.type;
|
|
|
- item.m_txtDay.text = NumberUtil.GetChiniseNumberText(bonusCfg.day); // bonusCfg.day.ToString();
|
|
|
- if (item.m_comItem.data == null)
|
|
|
- {
|
|
|
- item.m_comItem.data = new ItemView(item.m_comItem);
|
|
|
- }
|
|
|
+ item.m_holderSign.visible = false;
|
|
|
+ item.m_c1.selectedIndex = itemType == ConstItemType.DRESS_UP ? 0 : bonusCfg.type;
|
|
|
+ item.m_txtDay.text = NumberUtil.GetChiniseNumberText(bonusCfg.day); // bonusCfg.day.ToString();
|
|
|
+ if (item.m_comItem.data == null)
|
|
|
+ {
|
|
|
+ item.m_comItem.data = new ItemView(item.m_comItem);
|
|
|
+ }
|
|
|
|
|
|
- ItemData itemData = ItemUtil.createItemData(bonusCfg.bonusArr[0]);
|
|
|
- (item.m_comItem.data as ItemView).SetData(itemData);
|
|
|
- (item.m_comItem.data as ItemView).ShowTips = false;
|
|
|
- (item.m_comItem.data as ItemView).ChangeTxtCountStyle();
|
|
|
+ ItemData itemData = ItemUtil.createItemData(bonusCfg.bonusArr[0]);
|
|
|
+ (item.m_comItem.data as ItemView).SetData(itemData);
|
|
|
+ (item.m_comItem.data as ItemView).ShowTips = false;
|
|
|
+ (item.m_comItem.data as ItemView).ChangeTxtCountStyle();
|
|
|
|
|
|
- item.m_imgMask.visible = isGot || bonusCfg.day < _day && !isGot;
|
|
|
- item.m_imgGot.visible = isGot;
|
|
|
- item.m_imgNotGet.visible = bonusCfg.day < _day && !isGot;
|
|
|
- RedDotController.Instance.SetComRedDot(item.target, bonusCfg.day == _day && !isGot);
|
|
|
- if (item.target.data == null)
|
|
|
+ item.m_imgMask.visible = isGot || bonusCfg.day < _day && !isGot;
|
|
|
+ item.m_imgGot.visible = isGot;
|
|
|
+ item.m_imgNotGet.visible = bonusCfg.day < _day && !isGot;
|
|
|
+ RedDotController.Instance.SetComRedDot(item.target, bonusCfg.day == _day && !isGot);
|
|
|
+ if (item.target.data == null)
|
|
|
+ {
|
|
|
+ item.target.onClick.Add(OnGetSignBonus);
|
|
|
+ }
|
|
|
+
|
|
|
+ item.target.data = bonusCfg.day;
|
|
|
+ UI_ListSignItem.ProxyEnd();
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
{
|
|
|
- item.target.onClick.Add(OnGetSignBonus);
|
|
|
+ Console.WriteLine(e);
|
|
|
+ throw;
|
|
|
}
|
|
|
-
|
|
|
- item.target.data = bonusCfg.day;
|
|
|
- UI_ListSignItem.ProxyEnd();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private async void OnGetSignBonus(EventContext context)
|