|
@@ -24,6 +24,7 @@ namespace GFGGame
|
|
|
private bool isActiveBoxOpen = false;
|
|
|
private int _activeBoxId = 0;
|
|
|
private int _curIndex = 0;
|
|
|
+ private int _activityId = 0;
|
|
|
|
|
|
public override void Dispose()
|
|
|
{
|
|
@@ -102,9 +103,7 @@ namespace GFGGame
|
|
|
LuckyBoxDataManager.Instance.luckyBoxIds.Add(LuckyBoxDataManager.BOX_ID_2);
|
|
|
LuckyBoxDataManager.Instance.luckyBoxIds.Add(LuckyBoxDataManager.BOX_ID_3);
|
|
|
_activeBoxId = 0;
|
|
|
- int activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitTsy);
|
|
|
- if (activityId > 0)
|
|
|
- GetWishingPoolInfo(activityId);
|
|
|
+ _activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitTsy);
|
|
|
|
|
|
if (LuckyBoxDataManager.Instance.RotatingId > 0)
|
|
|
{
|
|
@@ -123,6 +122,9 @@ namespace GFGGame
|
|
|
if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0)
|
|
|
boxId = LuckyBoxDataManager.BOX_ID_1;
|
|
|
|
|
|
+ if (_activityId > 0 && boxId == LuckyBoxDataManager.BOX_ID_2)
|
|
|
+ GetWishingPoolInfo(_activityId);
|
|
|
+
|
|
|
LuckyBoxDataManager.Instance.currentBoxId = boxId;
|
|
|
|
|
|
if (_activeBoxId > 0 || boxId == LuckyBoxDataManager.BOX_ID_2) Timers.inst.Add(1, 0, CheckTime);
|
|
@@ -194,6 +196,9 @@ namespace GFGGame
|
|
|
int index = _curIndex - 1;
|
|
|
if (index < 0) return;
|
|
|
_ui.m_listBg.ScrollToView(index, true);
|
|
|
+
|
|
|
+ if (_activityId > 0 && _curIndex == LuckyBoxDataManager.BOX_ID_2)
|
|
|
+ GetWishingPoolInfo(_activityId);
|
|
|
}
|
|
|
|
|
|
private void OnBtnRightClick()
|
|
@@ -202,6 +207,9 @@ namespace GFGGame
|
|
|
// if (index >= LuckyBoxDataManager.Instance.luckyBoxIds.Count) return;
|
|
|
index = Mathf.Min(_ui.m_listBg.numItems - 1, index);
|
|
|
_ui.m_listBg.ScrollToView(index, true);
|
|
|
+
|
|
|
+ if (_activityId > 0 && _curIndex == LuckyBoxDataManager.BOX_ID_2)
|
|
|
+ GetWishingPoolInfo(_activityId);
|
|
|
}
|
|
|
|
|
|
private void OnListBgScroll()
|