|
@@ -150,8 +150,10 @@ namespace GFGGame
|
|
|
if (comBox.m_btnPreview.target.data == null)
|
|
|
{
|
|
|
comBox.m_btnPreview.target.onClick.Add(OnClickBtnPreview);
|
|
|
+ comBox.m_btnOpenServer.onClick.Add(OnClickBtnPreview);
|
|
|
}
|
|
|
comBox.m_btnPreview.target.data = _luckyBoxCfg.id;
|
|
|
+ comBox.m_btnOpenServer.data = _luckyBoxCfg.id;
|
|
|
|
|
|
comBox.target.data = _luckyBoxCfg.id;
|
|
|
|
|
@@ -165,18 +167,22 @@ namespace GFGGame
|
|
|
LuckyBoxDataManager.Instance.GetOwnedCount(_luckyBoxCfg.id, out int count, out int totalCount);
|
|
|
comBox.m_txtOwned.SetVar("v1", "" + count).FlushVars();
|
|
|
comBox.m_txtOwned.SetVar("v2", "" + totalCount).FlushVars();
|
|
|
+ comBox.m_txtOpenServerOwned.SetVar("v1", "" + count).FlushVars();
|
|
|
+ comBox.m_txtOpenServerOwned.SetVar("v2", "" + totalCount).FlushVars();
|
|
|
int boughtCount = GameGlobal.myNumericComponent.GetAsInt(_luckyBoxCfg.numericType);
|
|
|
comBox.m_txtRemainTimes.text = string.Format("今日剩余次数:{0}", _luckyBoxCfg.maxCount - boughtCount);
|
|
|
- UI_ComBox.ProxyEnd();
|
|
|
-
|
|
|
- string strDrawCount = "";
|
|
|
- if (_activityType == ConstLimitTimeActivityType.ActLimitLuckyBox)
|
|
|
- strDrawCount = ActivityDataManager.Instance.lastDrawCount.ToString();
|
|
|
- else if (_activityType == ConstLimitTimeActivityType.ActLimitStlyc)
|
|
|
- strDrawCount = ActivityDataManager.Instance.lastStlycDrawCount.ToString();
|
|
|
|
|
|
- _ui.m_txtCount.SetVar("value", strDrawCount).FlushVars();
|
|
|
- _ui.m_txtCount.SetVar("name", _luckyBoxCfg.name).FlushVars();
|
|
|
+ if (_activityType == ConstLimitTimeActivityType.ActLimitLuckyBox) {
|
|
|
+ string strDrawCount = ActivityDataManager.Instance.lastDrawCount.ToString();
|
|
|
+ comBox.m_txtCount.SetVar("value", strDrawCount).FlushVars();
|
|
|
+ comBox.m_txtCount.SetVar("name", _luckyBoxCfg.name).FlushVars();
|
|
|
+ }
|
|
|
+ else if (_activityType == ConstLimitTimeActivityType.ActLimitStlyc){
|
|
|
+ string strLimitStlycDrawCount = ActivityDataManager.Instance.lastStlycDrawCount.ToString();
|
|
|
+ comBox.m_txtOpenServerCount.SetVar("value", strLimitStlycDrawCount).FlushVars();
|
|
|
+ comBox.m_txtOpenServerCount.SetVar("name", _luckyBoxCfg.name).FlushVars();
|
|
|
+ }
|
|
|
+ UI_ComBox.ProxyEnd();
|
|
|
}
|
|
|
private void UpGiftBox()
|
|
|
{
|
|
@@ -290,13 +296,9 @@ namespace GFGGame
|
|
|
var list = activityInfoByTypeList
|
|
|
.Where(a => a.EndTime > TimeInfo.Instance.ServerNow()).ToList();
|
|
|
if (list.Count == 0)
|
|
|
- {
|
|
|
PromptController.Instance.ShowFloatTextPrompt("活动已结束");
|
|
|
- }
|
|
|
else
|
|
|
- {
|
|
|
ViewManager.Show<RushSaleGiftBoxView>(new object[] { ActivityType.XSLB3, this.viewData });
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
@@ -312,7 +314,6 @@ namespace GFGGame
|
|
|
base.RemoveEventListener();
|
|
|
EventAgent.RemoveEventListener(ConstMessage.ACTIVITY_LUCKY_BOX, UpdateView);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
private void OnClickBtnBack()
|