少年修仙传客户端代码仓库
Client_PangDeRong
2018-10-13 68488b8a0429ede7baeae681289e730ba4971968
4074  【前端】限时抢购开发
8个文件已修改
68 ■■■■■ 已修改文件
Core/GameEngine/DataToCtl/PackageRegedit.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA18_tagMCFlashSaleAppointmentInfo.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/GMCommand/GMInputWin.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyModel.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyWin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleTimeCell.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OperationFlashRushToBuy.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/ModelCenter.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -369,6 +369,8 @@
        Register(typeof(HA318_tagMCFreeGoodsInfo), typeof(DTCA318_tagMCFreeGoodsInfo));
        Register(typeof(HAA12_tagMCFlashGiftbagInfo), typeof(DTCAA12_tagMCFlashGiftbagInfo));
        Register(typeof(HAA13_tagMCFlashGiftbagPlayerInfo), typeof(DTCAA13_tagMCFlashGiftbagPlayerInfo));
        Register(typeof(HAA17_tagMCFlashSaleInfo), typeof(DTCAA17_tagMCFlashSaleInfo));
        Register(typeof(HAA18_tagMCFlashSaleAppointmentInfo), typeof(DTCAA18_tagMCFlashSaleAppointmentInfo));
        #region 仙界盛典
        Register(typeof(HAC09_tagGCFairyCeremonyInfo), typeof(DTCAC09_tagGCFairyCeremonyInfo));
Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA18_tagMCFlashSaleAppointmentInfo.cs
@@ -1,11 +1,20 @@
using UnityEngine;
using System.Collections;
using Snxxz.UI;
// AA 18 限时抢购活动玩家预约信息 #tagMCFlashSaleAppointmentInfo
public class DTCAA18_tagMCFlashSaleAppointmentInfo : DtcBasic {
    FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
    public override void Done(GameNetPackBasic vNetPack) {
        base.Done(vNetPack);
        HAA18_tagMCFlashSaleAppointmentInfo vNetData = vNetPack as HAA18_tagMCFlashSaleAppointmentInfo;
        rushToBuyModel.UpdateFlashSaleAppointmentInfo(vNetData);
    }
}
System/GMCommand/GMInputWin.cs
@@ -88,21 +88,17 @@
                OnClickSendBtn();
            }
            //if(Input.GetKeyDown(KeyCode.J))
            //{
            //    EquipWashModel washModel = ModelCenter.Instance.GetModel<EquipWashModel>();
            //    LocalSave.SetBool(washModel.MasterGroup1ActiveKey, false);
            //    washModel.SetMasterGroupActiveRecord(2,1, washModel.MasterGroup1ActiveKey);
            //    WindowCenter.Instance.Open<WashMasterActiveWin>();
            //}
            if (Input.GetKeyDown(KeyCode.J))
            {
               if(ModelCenter.Instance.GetModel<FlashRushToBuyModel>().IsOpen)
                {
                    if (!WindowCenter.Instance.IsOpen<FlashRushToBuyWin>())
                    {
                        WindowCenter.Instance.Open<FlashRushToBuyWin>();
                    }
                }
            }
            //if (Input.GetKeyDown(KeyCode.O))
            //{
            //    EquipWashModel washModel = ModelCenter.Instance.GetModel<EquipWashModel>();
            //    LocalSave.SetInt(washModel.MasterGroup1RaiseKey, 2);
            //    washModel.SetMasterGroupRaiseRecord(4, 1, washModel.MasterGroup1RaiseKey);
            //    WindowCenter.Instance.Open<WashMasterActiveWin>();
            //}
        }
        private void CreateCmdCell()
System/OpenServerActivity/FlashRushToBuyModel.cs
@@ -25,7 +25,7 @@
        public void OnPlayerLoginOk()
        {
            UpdateRedpoint();
            //UpdateRedpoint();
        }
        public override void UnInit()
@@ -40,7 +40,12 @@
        {
            get
            {
                return OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FlashRushToBuy);
                var operation = GetOperationFlashRushToBuy();
                if(operation != null)
                {
                    return operation.SatisfyOpenCondition();
                }
                return false;
            }
        }
@@ -75,7 +80,7 @@
            for (int i = 0; i < operation.flashShops.Count; i++)
            {
                int days = operation.totalDays;
                int days = operation.totalDays + 1;
                int dayIndex = i / (operation.flashShops.Count / days);
                int timeIndex = i % (operation.flashShops.Count / days);
                int seconds = 0;
System/OpenServerActivity/FlashRushToBuyWin.cs
@@ -82,6 +82,7 @@
        private void UpdateSelectSaleTime()
        {
            CreateSaleItem();
            saleTimeCtrl.m_Scorller.RefreshActiveCellViews();
        }
        private void CreateOperationTimes()
System/OpenServerActivity/FlashSaleTimeCell.cs
@@ -38,7 +38,7 @@
            timeIndex = -1;
            if (operation == null) return;
            int days = operation.totalDays;
            int days = operation.totalDays + 1;
            dayIndex = cell.index/(operation.flashShops.Count / days);
            timeIndex = cell.index % (operation.flashShops.Count / days);
            if(dayIndex == rushToBuyModel.presentFlashShop.dayIndex 
@@ -57,7 +57,7 @@
        public void UpdateBuyState()
        {
            if (operation == null) return;
            if (operation == null || timeIndex == -1) return;
            int seconds = 0;
            OperationTime operationTime = operation.times[timeIndex];
@@ -75,8 +75,11 @@
                    remainText.text = StringUtility.Contact("秒杀进行中", TimeUtility.SecondsToHMS(seconds));
                    break;
                case 1:
                    if(selectImg.activeInHierarchy)
                    {
                        rushToBuyModel.SetDefaultSelectSaleTime();
                    }
                    this.gameObject.SetActive(false);
                    rushToBuyModel.UpdateSelectFlashSaleTime(dayIndex, timeIndex);
                    break;
            }
        }
System/OpenServerActivity/OperationFlashRushToBuy.cs
@@ -17,6 +17,7 @@
                if (shop.dayIndex == dayIndex
                    && shop.timeIndex == timeIndex)
                {
                    flashSaleShop = shop;
                    return true;
                }
            }
@@ -39,7 +40,7 @@
            var endTime = new DateTime(startDate.year, startDate.month,day, operationTime.endHour, operationTime.endHour, 0);
            int advanceSec = Mathf.CeilToInt((float)(startTime - time).TotalSeconds);
            int endSec = Mathf.CeilToInt((float)(endTime - time).TotalSeconds);
            if (seconds > 0)
            if (advanceSec > 0)
            {
                seconds = advanceSec;
                return -1;
@@ -67,7 +68,11 @@
        public override bool SatisfyOpenCondition()
        {
            return PlayerDatas.Instance.baseData.LV >= limitLv;
            if(PlayerDatas.Instance.baseData.LV >= limitLv && InDay(TimeUtility.ServerNow))
            {
                return true;
            }
            return false;
        }
        public override void Reset()
System/WindowBase/ModelCenter.cs
@@ -196,6 +196,7 @@
            RegisterModel<FeatureNoticeModel>();
            RegisterModel<AwardExchangeModel>();
            RegisterModel<WheelOfFortuneModel>();
            RegisterModel<FlashRushToBuyModel>();
            inited = true;
        }