| System/KnapSack/KnapsackTimeCDMgr.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/OpenServerActivity/FlashRushToBuyWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/OpenServerActivity/FlashSaleItemCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/KnapSack/KnapsackTimeCDMgr.cs
@@ -13,6 +13,7 @@ public event Action<string> RefresCoolTimeAct; public event Action<string> RefreshItemOverdueTimeAct; public event Action<string> RefreshItemOverdueAct; public event Action<int,int> RefreshNormalCDAct; int secondBuf = -1; int minuteBuf = -1; private void LateUpdate() @@ -45,7 +46,6 @@ { RefresCoolTimeAct(itemCDList[i].guid); } break; case TimeRefreshType.Minute: if(RefreshItemOverdueTimeAct != null) @@ -78,9 +78,9 @@ case TimeRefreshType.Frame: break; case TimeRefreshType.Second: if(normalCDList[i].func != null) if(RefreshNormalCDAct != null) { normalCDList[i].func(normalCDList[i].code,(int)remianCD); RefreshNormalCDAct(normalCDList[i].code,(int)remianCD); } break; case TimeRefreshType.Minute: @@ -109,7 +109,7 @@ } } public void Register(int code,double cdTime,Action<int,int> func) public void Register(int code,double cdTime) { int index; if (ContainsNormalCD(code, out index)) @@ -118,7 +118,7 @@ } else { NormalCDCool cool = new NormalCDCool(code,cdTime,func); NormalCDCool cool = new NormalCDCool(code,cdTime); normalCDList.Add(cool); } } @@ -252,13 +252,11 @@ public int code; public double totalTime; public DateTime startTime { get; private set; } public Action<int,int> func; public NormalCDCool(int code,double totalTime,Action<int,int> func) public NormalCDCool(int code,double totalTime) { this.code = code; this.totalTime = totalTime; this.startTime = DateTime.Now; this.func = func; } public void SetTime(double totalTime) System/OpenServerActivity/FlashRushToBuyWin.cs
@@ -136,6 +136,21 @@ saleItemCtrl.AddCell(ScrollerDataType.Header, i); } saleItemCtrl.Restart(); int seconds = 0; int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow,rushToBuyModel.presentFlashShop.dayIndex, rushToBuyModel.presentFlashShop.timeIndex,out seconds); if(buyState == 0) { for (int i = 0; i < flashItems.Length; i++) { if (flashItems[i].isAppointment == 1) { saleItemCtrl.JumpIndex(i); break; } } } } private void OperationTimeUpdateEvent(Operation type) System/OpenServerActivity/FlashSaleItemCell.cs
@@ -37,6 +37,7 @@ storeModel.RefreshBuyShopLimitEvent += RefreshBuyShopLimitEvent; rushToBuyModel.UpdateAllAppointmentEvent += UpdateAllAppointmentInfo; rushToBuyModel.UpdateAppointmentEvent += UpdateAppointmentInfo; KnapsackTimeCDMgr.Instance.RefreshNormalCDAct += RefreshCD; } private void OnDisable() @@ -45,6 +46,7 @@ battleModel.RefreshGameRecInfoAct -= UpdateFullServerBuy; rushToBuyModel.UpdateAllAppointmentEvent -= UpdateAllAppointmentInfo; rushToBuyModel.UpdateAppointmentEvent -= UpdateAppointmentInfo; KnapsackTimeCDMgr.Instance.RefreshNormalCDAct -= RefreshCD; } public override void Refresh(CellView cell) @@ -93,7 +95,7 @@ if(saleItem.isAppointment == 1) { cdTime = 10; KnapsackTimeCDMgr.Instance.Register(code, cdTime, RefreshCD); KnapsackTimeCDMgr.Instance.Register(this.code,cdTime); } UpdateSaleItem(); }