| | |
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | |
|
| | | OperationFlashRushToBuy.FlashSaleItem saleItem;
|
| | |
|
| | | int buyState = -1;
|
| | | private void OnEnable()
|
| | | {
|
| | | battleModel.RefreshGameRecInfoAct += UpdateFullServerBuy;
|
| | |
| | | flashSaleBtn.RemoveAllListeners();
|
| | | var operation = rushToBuyModel.GetOperationFlashRushToBuy();
|
| | | int seconds = 0;
|
| | | int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow,rushToBuyModel.presentFlashShop.dayIndex,
|
| | | buyState = operation.GetBuyTimeState(TimeUtility.ServerNow,rushToBuyModel.presentFlashShop.dayIndex,
|
| | | rushToBuyModel.presentFlashShop.timeIndex,out seconds);
|
| | |
|
| | | switch(buyState)
|
| | |
| | | /// <returns></returns>
|
| | | private int GetSellSate(out int fullRemainNum)
|
| | | {
|
| | | fullRemainNum = 0;
|
| | | |
| | | var buyInfo = storeModel.GetBuyShopLimit((uint)saleItem.shopId);
|
| | | var buyCount = 0;
|
| | | var fullServerInfo = rushToBuyModel.GetFullServerInfo();
|
| | | fullRemainNum = 0;
|
| | | if (fullServerInfo != null && fullServerInfo.Value1 == saleItem.shopId)
|
| | | if(buyState != -1)
|
| | | {
|
| | | fullRemainNum = saleItem.fullServerLimitNum - fullServerInfo.Value2;
|
| | | if (fullServerInfo != null && fullServerInfo.Value1 == saleItem.shopId)
|
| | | {
|
| | | fullRemainNum = saleItem.fullServerLimitNum - fullServerInfo.Value2;
|
| | | }
|
| | | else
|
| | | {
|
| | | fullRemainNum = saleItem.fullServerLimitNum;
|
| | | }
|
| | | if (buyInfo != null)
|
| | | {
|
| | | buyCount = buyInfo.BuyCnt;
|
| | | }
|
| | | if (buyCount >= saleItem.limitNum)
|
| | | {
|
| | | return 1;
|
| | | }
|
| | |
|
| | | if (fullRemainNum <= 0)
|
| | | {
|
| | | return 2;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | fullRemainNum = saleItem.fullServerLimitNum;
|
| | | }
|
| | | if (buyInfo != null)
|
| | | {
|
| | | buyCount = buyInfo.BuyCnt;
|
| | | }
|
| | | if(buyCount >= saleItem.limitNum)
|
| | | {
|
| | | return 1;
|
| | | }
|
| | |
|
| | | if (fullRemainNum <= 0)
|
| | | {
|
| | | return 2;
|
| | | }
|
| | |
|
| | | return 0;
|
| | | }
|
| | | }
|