|
@@ -92,7 +92,7 @@ namespace GFGGame
|
|
|
EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdateListItemData);
|
|
|
EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateListItemData);
|
|
|
EventAgent.AddEventListener(ConstMessage.LUCKY_BOX_FREE_TIME_CHANGED, UpdateFreeInfo);
|
|
|
-
|
|
|
+ EventAgent.AddEventListener(ConstMessage.LUCKY_BOX_ACTIVITY_REWARD, UpdateBtnReward);
|
|
|
}
|
|
|
protected override void OnShown()
|
|
|
{
|
|
@@ -219,6 +219,7 @@ namespace GFGGame
|
|
|
LuckyBoxDataManager.Instance.luckyBoxIndex = _curIndex;
|
|
|
}
|
|
|
|
|
|
+ List<GObject> _listActivityBtnObj = new List<GObject>();
|
|
|
private void UpdateListItem()
|
|
|
{
|
|
|
int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[_curIndex];
|
|
@@ -227,7 +228,7 @@ namespace GFGGame
|
|
|
|
|
|
GObject obj = _ui.m_listBg.GetChildAt(_curIndex);
|
|
|
UI_ComBox1 comBox = UI_ComBox1.Proxy(obj);
|
|
|
-
|
|
|
+ _listActivityBtnObj.Add(obj);
|
|
|
int activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitTsy);
|
|
|
if (activityId > 0 && boxId == LuckyBoxDataManager.BOX_ID_2) {
|
|
|
comBox.m_showActivityType.selectedIndex = 1;
|
|
@@ -302,7 +303,13 @@ namespace GFGGame
|
|
|
UI_ComBox1.ProxyEnd();
|
|
|
UpdateListItemData();
|
|
|
UpdateFreeInfo();
|
|
|
+ UpdateBtnReward();
|
|
|
+ }
|
|
|
|
|
|
+ private void UpdateBtnReward()
|
|
|
+ {
|
|
|
+ GObject obj = _ui.m_listBg.GetChildAt(1);
|
|
|
+ UI_ComBox1 comBox = UI_ComBox1.Proxy(obj);
|
|
|
RedDotController.Instance.SetComRedDot(comBox.m_btnReward, RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy));
|
|
|
}
|
|
|
|
|
@@ -526,7 +533,7 @@ namespace GFGGame
|
|
|
{
|
|
|
ViewManager.Show<LuckyBoxStarView>(null, new object[] { typeof(LuckyBoxView).FullName, boxId });
|
|
|
LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.ZAI_XING, 2);
|
|
|
-
|
|
|
+ UpdateBtnReward();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -554,6 +561,7 @@ namespace GFGGame
|
|
|
EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, UpdateListItemData);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateListItemData);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.LUCKY_BOX_FREE_TIME_CHANGED, UpdateFreeInfo);
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.LUCKY_BOX_ACTIVITY_REWARD, UpdateBtnReward);
|
|
|
}
|
|
|
|
|
|
private void OnClickBtnBack()
|