少年修仙传客户端代码仓库
client_Wu Xijin
2018-10-15 bd19eadbee8a0d3ec67c36a166a8cca4f87f454e
Merge branch 'master' into UserCenter
23个文件已修改
34个文件已添加
2189 ■■■■■ 已修改文件
Core/GameEngine/DataToCtl/PackageRegedit.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/SnxxzGame.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CAA SaleActivity/CAA05_tagCMFlashSaleAppointment.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CAA SaleActivity/CAA05_tagCMFlashSaleAppointment.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ClientPack.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ClientPack/ClientToMapServer.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0104_tagServerDisconnect.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA0_Sys/DTCA003_tagUniversalGameRecInfo.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA17_tagMCFlashSaleInfo.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA17_tagMCFlashSaleInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA18_tagMCFlashSaleAppointmentInfo.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA18_tagMCFlashSaleAppointmentInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DebugPkgCache.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/GameNetSystem.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA17_tagMCFlashSaleInfo.cs 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA17_tagMCFlashSaleInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA18_tagMCFlashSaleAppointmentInfo.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA18_tagMCFlashSaleAppointmentInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/ResModule/InstanceResourcesLoader.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcCollect.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorNpcFight.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorNpcNoFight.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorPlayerBase.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/GMCommand/GMInputWin.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PackSendQuestMgr.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Launch/LaunchWin.cs 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyCoolDown.cs 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyCoolDown.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyModel.cs 363 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyModel.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyNotify.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyNotify.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyWin.cs 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleItemCell.cs 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleItemCell.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleTimeCell.cs 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleTimeCell.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/ImpactRankModel.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OpenServerActivityNotifyBase.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OpenServerActivityNotifyBase.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OpenServerActivityNotifyModel.cs 193 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OpenServerActivityNotifyModel.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OpenServerActivityNotifyWin.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OpenServerActivityNotifyWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OpenServerActivityWin.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OperationFlashRushToBuy.cs 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OperationFlashRushToBuy.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/SystemSetting/ActivitiesPushMgr.cs 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/RotatePointer.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/WheelOfFortuneModel.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/WheelOfFortuneWin.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/OperationTimeHepler.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/ModelCenter.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/DebugMousePos.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/DebugMousePos.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/GlobalTimeEvent.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | 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/GameEngine/SnxxzGame.cs
@@ -71,16 +71,16 @@
                for (int i = 0; i < row + 1; ++i)
                {
                    _start = new Vector3(_startX, _hero.Pos.y + 0.1f, _startZ + i * size);
                    _end = new Vector3(_startX + column * .5f, _hero.Pos.y + 0.1f, _startZ + i * size);
                    _start = new Vector3(_startX, _hero.Pos.y + 0.001f, _startZ + i * size);
                    _end = new Vector3(_startX + column * .5f, _hero.Pos.y + 0.001f, _startZ + i * size);
                    Gizmos.DrawLine(_start, _end);
                }
                for (int i = 0; i < column + 1; ++i)
                {
                    _start = new Vector3(_startX + i * size, _hero.Pos.y + 0.1f, _startZ);
                    _end = new Vector3(_startX + i * size, _hero.Pos.y + 0.1f, _startZ + row* .5f);
                    _start = new Vector3(_startX + i * size, _hero.Pos.y + 0.001f, _startZ);
                    _end = new Vector3(_startX + i * size, _hero.Pos.y + 0.001f, _startZ + row* .5f);
                    Gizmos.DrawLine(_start, _end);
                }
Core/NetworkPackage/ClientPack/ClientToMapServer/CAA SaleActivity/CAA05_tagCMFlashSaleAppointment.cs
New file
@@ -0,0 +1,20 @@
using UnityEngine;
using System.Collections;
// AA 05 限时抢购预约 #tagCMFlashSaleAppointment
public class CAA05_tagCMFlashSaleAppointment : GameNetPackBasic {
    public uint GoodsID;    // 抢购商品标识
    public byte State;    // 1-预约 0-取消
    public CAA05_tagCMFlashSaleAppointment () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xAA05;
    }
    public override void WriteToBytes () {
        WriteBytes (GoodsID, NetDataType.DWORD);
        WriteBytes (State, NetDataType.BYTE);
    }
}
Core/NetworkPackage/ClientPack/ClientToMapServer/CAA SaleActivity/CAA05_tagCMFlashSaleAppointment.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0bd4980ed38baa24e8d85722181ec836
timeCreated: 1539228128
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ClientPack.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 722e5e3d30096674e811f5bd191246a0
folderAsset: yes
timeCreated: 1539228128
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ClientPack/ClientToMapServer.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a75d33f87d2bafb4191666d4978b2e08
folderAsset: yes
timeCreated: 1539228128
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0104_tagServerDisconnect.cs
@@ -28,6 +28,15 @@
                {
                    SDKUtility.Instance.FreePlatformLoginout();
                }
                if (vNetData.Reason != 0
                 && vNetData.Reason != 11
                 && vNetData.Reason != 28
                 && vNetData.Reason != 51
                 && vNetData.Reason != 110)
                {
                    DebugPkgCache.UpLoad();
                }
            }
            WindowCenter.Instance.Open<ServerForceExitHintWin>();
Core/NetworkPackage/DTCFile/ServerPack/HA0_Sys/DTCA003_tagUniversalGameRecInfo.cs
@@ -18,12 +18,11 @@
    {
        base.Done(vNetPack);
        var data = vNetPack as HA003_tagUniversalGameRecInfo;
        heavenModel.RefreshBattleInfo(data);
        if (onGetUniversalGameInfo != null)
        {
            onGetUniversalGameInfo(data);
        }
        heavenModel.RefreshBattleInfo(data);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA17_tagMCFlashSaleInfo.cs
New file
@@ -0,0 +1,20 @@
using UnityEngine;
using System.Collections;
using Snxxz.UI;
// AA 17 限时抢购活动信息 #tagMCFlashSaleInfo
public class DTCAA17_tagMCFlashSaleInfo : DtcBasic {
    public override void Done(GameNetPackBasic vNetPack) {
        base.Done(vNetPack);
        HAA17_tagMCFlashSaleInfo vNetData = vNetPack as HAA17_tagMCFlashSaleInfo;
        OperationTimeHepler.Instance.UpdateFlashRushToBuy(vNetData);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA17_tagMCFlashSaleInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: d00087bdecd7d4947a5c1f5e6d0e98a3
timeCreated: 1539228128
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA18_tagMCFlashSaleAppointmentInfo.cs
New file
@@ -0,0 +1,22 @@
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);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA18_tagMCFlashSaleAppointmentInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 32d6f801e94f8b84086c12c4672b5dcf
timeCreated: 1539228128
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DebugPkgCache.cs
@@ -26,6 +26,23 @@
    public static void UpLoad()
    {
        var _contents = new System.Text.StringBuilder();
        foreach (var _content in m_List)
        {
            _contents.Append("[");
            _contents.Append(_content.dataTime);
            _contents.Append("]");
            _contents.Append(_content.code);
            _contents.Append("\r\n");
        }
#if UNITY_EDITOR
        UnityEngine.Debug.Log("登陆异常: " + _contents.ToString());
#else
        ExceptionCatcher.ReportException("登陆异常", _contents.ToString());
#endif
        _contents = null;
        m_List.Clear();
    }
}
Core/NetworkPackage/GameNetSystem.cs
@@ -130,6 +130,7 @@
        if (socketController != null)
        {
            socketController.SendInfo(vNetPack);
            DebugPkgCache.Push(vNetPack);
        }
    }
@@ -157,6 +158,7 @@
                if (PackageRegedit.Contain(_package.cmd))
                {
                    packQueue.Enqueue(_package);
                    DebugPkgCache.Push(_package);
                }
                else
                {
Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA17_tagMCFlashSaleInfo.cs
New file
@@ -0,0 +1,81 @@
using UnityEngine;
using System.Collections;
// AA 17 限时抢购活动信息 #tagMCFlashSaleInfo
public class HAA17_tagMCFlashSaleInfo : GameNetPackBasic {
    public string StartDate;    // 开始日期 y-m-d
    public string EndtDate;    // 结束日期 y-m-d
    public ushort AdvanceMinutes;    // 提前显示分钟
    public byte ActivityTimeCount;
    public  tagMCFlashSaleTime[] ActivityTime;    //活动时间
    public byte IsDayReset;    //是否每天重置
    public ushort LimitLV;    // 限制等级
    public byte ShopCount;    // 商店数
    public  tagMCFlashSaleShop[] ShopInfo;    // 商店信息, 当有多个商店且有多个活动时间段时则每个时间段对应一个商店;
    public HAA17_tagMCFlashSaleInfo () {
        _cmd = (ushort)0xAA17;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out StartDate, vBytes, NetDataType.Chars, 10);
        TransBytes (out EndtDate, vBytes, NetDataType.Chars, 10);
        TransBytes (out AdvanceMinutes, vBytes, NetDataType.WORD);
        TransBytes (out ActivityTimeCount, vBytes, NetDataType.BYTE);
        ActivityTime = new tagMCFlashSaleTime[ActivityTimeCount];
        for (int i = 0; i < ActivityTimeCount; i ++) {
            ActivityTime[i] = new tagMCFlashSaleTime();
            TransBytes (out ActivityTime[i].StartTime, vBytes, NetDataType.Chars, 5);
            TransBytes (out ActivityTime[i].EndtTime, vBytes, NetDataType.Chars, 5);
        }
        TransBytes (out IsDayReset, vBytes, NetDataType.BYTE);
        TransBytes (out LimitLV, vBytes, NetDataType.WORD);
        TransBytes (out ShopCount, vBytes, NetDataType.BYTE);
        ShopInfo = new tagMCFlashSaleShop[ShopCount];
        for (int i = 0; i < ShopCount; i ++) {
            ShopInfo[i] = new tagMCFlashSaleShop();
            TransBytes (out ShopInfo[i].DayIndex, vBytes, NetDataType.BYTE);
            TransBytes (out ShopInfo[i].TimeIndex, vBytes, NetDataType.BYTE);
            TransBytes (out ShopInfo[i].GiftbagCount, vBytes, NetDataType.BYTE);
            ShopInfo[i].GiftbagInfo = new tagMCFlashSaleGiftbag[ShopInfo[i].GiftbagCount];
            for (int j = 0; j < ShopInfo[i].GiftbagCount; j ++) {
                ShopInfo[i].GiftbagInfo[j] = new tagMCFlashSaleGiftbag();
                TransBytes (out ShopInfo[i].GiftbagInfo[j].GiftID, vBytes, NetDataType.DWORD);
                TransBytes (out ShopInfo[i].GiftbagInfo[j].BuyCountLimit, vBytes, NetDataType.BYTE);
                TransBytes (out ShopInfo[i].GiftbagInfo[j].ServerBuyCountLimit, vBytes, NetDataType.WORD);
                TransBytes (out ShopInfo[i].GiftbagInfo[j].MoneyType, vBytes, NetDataType.BYTE);
                TransBytes (out ShopInfo[i].GiftbagInfo[j].MoneyNumber, vBytes, NetDataType.DWORD);
                TransBytes (out ShopInfo[i].GiftbagInfo[j].MoneyOriginal, vBytes, NetDataType.DWORD);
                TransBytes (out ShopInfo[i].GiftbagInfo[j].ItemID, vBytes, NetDataType.DWORD);
                TransBytes (out ShopInfo[i].GiftbagInfo[j].ItemCount, vBytes, NetDataType.WORD);
                TransBytes (out ShopInfo[i].GiftbagInfo[j].IsBind, vBytes, NetDataType.BYTE);
            }
        }
    }
    public struct tagMCFlashSaleGiftbag {
        public uint GiftID;        //商城表的物品ID
        public byte BuyCountLimit;        //限购数
        public ushort ServerBuyCountLimit;        //全服限购数
        public byte MoneyType;        //消耗货币类型
        public uint MoneyNumber;        //消耗货币数量
        public uint MoneyOriginal;        //原价
        public uint ItemID;
        public ushort ItemCount;
        public byte IsBind;
    }
    public struct tagMCFlashSaleShop {
        public byte DayIndex;        // 活动第几天
        public byte TimeIndex;        // 第几个时间段
        public byte GiftbagCount;        // 商店礼包数
        public  tagMCFlashSaleGiftbag[] GiftbagInfo;        // 礼包信息
    }
    public struct tagMCFlashSaleTime {
        public string StartTime;        // 开始时间 H:M
        public string EndtTime;        // 结束时间 H:M
    }
}
Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA17_tagMCFlashSaleInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: ed9668281d90fdc4f97232ce3fcd3c9d
timeCreated: 1539228128
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA18_tagMCFlashSaleAppointmentInfo.cs
New file
@@ -0,0 +1,31 @@
using UnityEngine;
using System.Collections;
// AA 18 限时抢购活动玩家预约信息 #tagMCFlashSaleAppointmentInfo
public class HAA18_tagMCFlashSaleAppointmentInfo : GameNetPackBasic {
    public byte IsAll;    // 是否全部
    public ushort GoodsCount;    // 商品数
    public  tagMCFlashSaleAppointmentState[] GoodsList;    // 预约的商品
    public HAA18_tagMCFlashSaleAppointmentInfo () {
        _cmd = (ushort)0xAA18;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out IsAll, vBytes, NetDataType.BYTE);
        TransBytes (out GoodsCount, vBytes, NetDataType.WORD);
        GoodsList = new tagMCFlashSaleAppointmentState[GoodsCount];
        for (int i = 0; i < GoodsCount; i ++) {
            GoodsList[i] = new tagMCFlashSaleAppointmentState();
            TransBytes (out GoodsList[i].GoodsMark, vBytes, NetDataType.DWORD);
            TransBytes (out GoodsList[i].State, vBytes, NetDataType.BYTE);
        }
    }
    public struct tagMCFlashSaleAppointmentState {
        public uint GoodsMark;        // 商品标识
        public byte State;        // 是否预约
    }
}
Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA18_tagMCFlashSaleAppointmentInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 44e6594130c5e614c8411949a184b843
timeCreated: 1539228128
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/ResModule/InstanceResourcesLoader.cs
@@ -26,6 +26,30 @@
        return LoadModelPrefab(raceSuffix, _m.MODE);
    }
    public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Fight()
    {
        return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
                                                          GeneralConfig.Instance.ModeDefaultConfig[1][1]);
    }
    public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Func()
    {
        return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
                                                          GeneralConfig.Instance.ModeDefaultConfig[0][1]);
    }
    public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Horse()
    {
        return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
                                                          GeneralConfig.Instance.ModeDefaultConfig[3][1]);
    }
    public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Pet()
    {
        return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
                                                          GeneralConfig.Instance.ModeDefaultConfig[2][1]);
    }
    public static GameObject LoadDefaultFightNPC()
    {
        return LoadMob(GeneralConfig.Instance.ModeDefaultConfig[1][0],
Fight/GameActor/GA_NpcCollect.cs
@@ -109,6 +109,17 @@
                m_Animator = m_Model.GetComponent<Animator>();
                if (m_Animator)
                {
                    RuntimeAnimatorController _controller = null;
                    if (m_LoadDefaultRes)
                    {
                        _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Func();
                    }
                    else
                    {
                        _controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, NpcConfig.MODE);
                    }
                    m_Animator.runtimeAnimatorController = _controller;
                    m_Animator.enabled = true;
                    m_Animator.SetInteger(GAStaticDefine.Param_ActorInstID, (int)clientInstID);
                }
Fight/GameActor/GActorNpcFight.cs
@@ -31,7 +31,7 @@
    {
        get
        {
            if (!m_Animator)
            if (!m_Animator || !m_Animator.runtimeAnimatorController)
            {
                return -1;
            }
@@ -40,7 +40,7 @@
        set
        {
            if (m_Animator)
            if (m_Animator && m_Animator.runtimeAnimatorController)
            {
                if (m_Animator.parameterCount > 0)
                {
@@ -127,7 +127,27 @@
                if (m_Animator)
                {
                    RuntimeAnimatorController _controller = null;
                    if (m_LoadDefaultRes)
                    {
                        if (this is GA_Pet)
                        {
                            _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Pet();
                        }
                        else
                        {
                            _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Fight();
                        }
                    }
                    else
                    {
                        _controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, NpcConfig.MODE);
                    }
                    m_Animator.runtimeAnimatorController = _controller;
                    m_Animator.enabled = true;
                    if (m_Animator.parameterCount > 0)
                    {
                        m_Animator.SetInteger(GAStaticDefine.Param_ActorInstID, (int)clientInstID);
@@ -254,6 +274,7 @@
        if (m_Animator)
        {
            m_Animator.runtimeAnimatorController = null;
            NextAction = 0;
            m_Animator.enabled = false;
            m_Animator = null;
@@ -731,6 +752,7 @@
    public sealed override void Polymorph(bool doOrNo, int npcID)
    {
        IsPolyMorph = doOrNo;
        var _npcConfig = Config.Instance.Get<NPCConfig>(npcID);
        if (IsPolyMorph)
        {
@@ -752,6 +774,16 @@
            var _a = m_SheepModel.GetComponent<Animator>();
            if (_a)
            {
                RuntimeAnimatorController _controller = null;
                if (m_SheepIsDefaultNpc)
                {
                    _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Fight();
                }
                else
                {
                    _controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, _npcConfig.MODE);
                }
                _a.enabled = true;
                _a.SetInteger(GAStaticDefine.Param_ActorInstID, (int)ClientInstID);
                m_Animator.enabled = false;
@@ -777,6 +809,7 @@
                if (_a)
                {
                    _a.enabled = false;
                    _a.runtimeAnimatorController = null;
                }
                if (m_SheepIsDefaultNpc)
Fight/GameActor/GActorNpcNoFight.cs
@@ -128,6 +128,7 @@
        if (m_Animator)
        {
            m_Animator.runtimeAnimatorController = null;
            m_Animator.enabled = false;
            m_Animator = null;
        }
@@ -141,7 +142,7 @@
            m_Dig = null;
        }
        if(Root)
        if (Root)
        {
            Root.localScale = Vector3.one;
        }
@@ -190,6 +191,16 @@
                m_Animator = m_Model.GetComponent<Animator>();
                if (m_Animator)
                {
                    RuntimeAnimatorController _controller = null;
                    if (m_LoadDefaultRes)
                    {
                        _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Func();
                    }
                    else
                    {
                        _controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, NpcConfig.MODE);
                    }
                    m_Animator.runtimeAnimatorController = _controller;
                    m_Animator.enabled = true;
                    m_Animator.SetInteger(GAStaticDefine.Param_ActorInstID, (int)clientInstID);
                }
Fight/GameActor/GActorPlayerBase.cs
@@ -1135,6 +1135,7 @@
            m_HorseModel = null;
            if (m_HorseAnimator)
            {
                m_HorseAnimator.runtimeAnimatorController = null;
                m_HorseAnimator.enabled = false;
                m_HorseAnimator = null;
            }
@@ -1225,6 +1226,7 @@
                m_HorseModel = null;
                if (m_HorseAnimator)
                {
                    m_HorseAnimator.runtimeAnimatorController = null;
                    m_HorseAnimator.enabled = false;
                    m_HorseAnimator = null;
                }
@@ -1251,6 +1253,18 @@
            m_HorseModel = GameObjectPoolManager.Instance.RequestGameObject(_prefab);
            m_HorseAnimator = m_HorseModel.GetComponent<Animator>();
            RuntimeAnimatorController _controller = null;
            if (m_LoadDefaultHorse)
            {
                _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Horse();
            }
            else
            {
                _controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, _modelResConfig.ResourcesName);
            }
            m_HorseAnimator.runtimeAnimatorController = _controller;
            m_HorseAnimator.enabled = true;
            // 先设置根节点
System/GMCommand/GMInputWin.cs
@@ -87,22 +87,6 @@
            {
                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.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/KnapSack/Logic/PackSendQuestMgr.cs
@@ -1113,7 +1113,7 @@
                }
            }
            int offsetGrid = needGridCnt - playerPack.GetReaminGridCount(PackType.rptItem) - 1;
            int offsetGrid = needGridCnt - playerPack.GetReaminGridCount(PackType.rptItem);
            if (offsetGrid > 0)
            {
                SysNotifyMgr.Instance.ShowTip("BagFull102", attrData.itemConfig.ItemName, offsetGrid);
System/Launch/LaunchWin.cs
@@ -16,8 +16,11 @@
    {
        [SerializeField] UIAlphaTween m_AlphaTween;
        [SerializeField] Image m_BackGround;
        [SerializeField] RectTransform m_AndroidProgressContainer;
        [SerializeField] SmoothSlider m_ProgressSlider;
        [SerializeField] Text m_Progress;
        [SerializeField] RectTransform m_IosProgressContainer;
        [SerializeField] Text m_IosProgressTip;
        [SerializeField] Text m_BuildTime;
        [SerializeField] Text m_Version;
@@ -61,11 +64,20 @@
                m_BuildTime.text = "";
            }
            m_Progress.text = VersionUtility.Instance.IsShangGu() ? "" : StringUtility.Contact(0, "%");
            UpdateLoadingProgress(Launch.currentStage, Launch.progress);
            Launch.progressEvent += UpdateLoadingProgress;
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                m_AndroidProgressContainer.gameObject.SetActive(false);
                m_IosProgressContainer.gameObject.SetActive(true);
                m_IosProgressTip.text = Language.GetFromLocal(30);
            }
            else
            {
                m_AndroidProgressContainer.gameObject.SetActive(true);
                m_IosProgressContainer.gameObject.SetActive(false);
                m_Progress.text = VersionUtility.Instance.IsShangGu() ? "" : StringUtility.Contact(0, "%");
                UpdateLoadingProgress(Launch.currentStage, Launch.progress);
                Launch.progressEvent += UpdateLoadingProgress;
            }
        }
        protected override void OnAfterOpen()
@@ -112,25 +124,36 @@
        {
            base.LateUpdate();
            if (trueProgress > 0.9599f)
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                behaviourProgress = Mathf.Clamp01(behaviourProgress + Time.deltaTime * 0.2f);
                m_IosProgressContainer.gameObject.SetActive(Launch.currentStage != Launch.LaunchStage.DownLoad);
                var remainder = ((int)Time.time) % 3;
                var dot = remainder == 0 ? "." : remainder == 1 ? ".." : "...";
                m_IosProgressTip.text = StringUtility.Contact(Language.GetFromLocal(30), dot);
            }
            else
            {
                behaviourProgress = Mathf.SmoothDamp(behaviourProgress, trueProgress, ref refProgress, 0.2f);
                if (trueProgress > 0.9599f)
                {
                    behaviourProgress = Mathf.Clamp01(behaviourProgress + Time.deltaTime * 0.2f);
                }
                else
                {
                    behaviourProgress = Mathf.SmoothDamp(behaviourProgress, trueProgress, ref refProgress, 0.2f);
                }
                m_ProgressSlider.value = behaviourProgress;
                m_Progress.text = VersionUtility.Instance.IsShangGu() ? stepDescription :
                    StringUtility.Contact(stepDescription, Mathf.RoundToInt(behaviourProgress * 100), "%");
                if (!assetBuildTimeShowed && AssetVersionUtility.assetsBuildTime != DateTime.MinValue)
                {
                    assetBuildTimeShowed = true;
                    var totalMinute = (int)(AssetVersionUtility.assetsBuildTime - new DateTime(2018, 1, 1)).TotalMinutes;
                    m_Version.text = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", totalMinute.ToString());
                }
            }
            m_ProgressSlider.value = behaviourProgress;
            m_Progress.text = VersionUtility.Instance.IsShangGu() ? stepDescription :
                StringUtility.Contact(stepDescription, Mathf.RoundToInt(behaviourProgress * 100), "%");
            if (!assetBuildTimeShowed && AssetVersionUtility.assetsBuildTime != DateTime.MinValue)
            {
                assetBuildTimeShowed = true;
                var totalMinute = (int)(AssetVersionUtility.assetsBuildTime - new DateTime(2018, 1, 1)).TotalMinutes;
                m_Version.text = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", totalMinute.ToString());
            }
        }
System/OpenServerActivity/FlashRushToBuyCoolDown.cs
New file
@@ -0,0 +1,85 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class FlashRushToBuyCoolDown : MonoBehaviour
    {
        [SerializeField] Text timeText;
        FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
        bool isReplace = false;
        bool isStartReplace = false;
        private void Awake()
        {
            GlobalTimeEvent.Instance.halfMinuteEvent += UpdateHalfMinute;
        }
        private void OnEnable()
        {
            SecondEvent();
            GlobalTimeEvent.Instance.secondEvent -= SecondEvent;
            GlobalTimeEvent.Instance.secondEvent += SecondEvent;
        }
        private void OnDisable()
        {
            GlobalTimeEvent.Instance.secondEvent -= SecondEvent;
        }
        private void UpdateHalfMinute()
        {
            if (!isStartReplace) return;
            isReplace = !isReplace;
        }
        private void SecondEvent()
        {
            DisplayTime();
        }
        void DisplayTime()
        {
            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
            if (operation == null) return;
            int seconds = 0;
            OperationTime operationTime;
            OperationFlashRushToBuy.FlashSaleShop saleShop;
            FlashRushToBuyModel.FlashRushToBuySate flashState = rushToBuyModel.GetActivityState(out seconds,out operationTime,out saleShop);
            isStartReplace = false;
            switch (flashState)
            {
                case FlashRushToBuyModel.FlashRushToBuySate.NoOpen:
                    break;
                case FlashRushToBuyModel.FlashRushToBuySate.InAdvance:
                    if(seconds <= 3600)
                    {
                        isStartReplace = true;
                        if(!isReplace)
                        {
                            timeText.text = TimeUtility.SecondsToHMS(seconds);
                        }
                        else
                        {
                            timeText.text = operation.ToDisplayBuyTime(operationTime.startHour, operationTime.startMinute);
                        }
                    }
                    else
                    {
                        timeText.text = operation.ToDisplayBuyTime(operationTime.startHour, operationTime.startMinute);
                    }
                    break;
                case FlashRushToBuyModel.FlashRushToBuySate.Begining:
                    timeText.text = "秒杀中";
                    break;
                case FlashRushToBuyModel.FlashRushToBuySate.End:
                    timeText.text = "活动已结束";
                    break;
            }
        }
    }
}
System/OpenServerActivity/FlashRushToBuyCoolDown.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 00bbdfc8d38efc7488d8dc83b041b07a
timeCreated: 1539088207
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/FlashRushToBuyModel.cs
New file
@@ -0,0 +1,363 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Snxxz.UI
{
    public class FlashRushToBuyModel : Model,IBeforePlayerDataInitialize,IPlayerLoginOk,IOpenServerActivity
    {
        StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
        HeavenBattleModel battleModel { get { return ModelCenter.Instance.GetModel<HeavenBattleModel>(); } }
        public override void Init()
        {
            OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent;
            OperationTimeHepler.Instance.operationEndEvent += OperationEndEvent;
            OperationTimeHepler.Instance.operationAdvanceEvent += OperationAdvanceEvent;
            OpenServerActivityCenter.Instance.Register((int)OpenServerActivityCenter.OSActivityType.FlashRushToBuy, this);
        }
        public void OnBeforePlayerDataInitialize()
        {
        }
        public void OnPlayerLoginOk()
        {
            //UpdateRedpoint();
        }
        public override void UnInit()
        {
            OperationTimeHepler.Instance.operationStartEvent -= OperationStartEvent;
            OperationTimeHepler.Instance.operationEndEvent -= OperationEndEvent;
            OperationTimeHepler.Instance.operationAdvanceEvent -= OperationAdvanceEvent;
        }
        public bool IsOpen
        {
            get
            {
                var operation = GetOperationFlashRushToBuy();
                if(operation != null)
                {
                    return operation.SatisfyOpenCondition();
                }
                return false;
            }
        }
        public bool priorityOpen
        {
            get
            {
                return flashSaleRedpoint.state == RedPointState.Simple;
            }
        }
        public bool IsAdvance
        {
            get
            {
                return OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.FlashRushToBuy);
            }
        }
        public void SetDefaultSelectSaleTime()
        {
            OperationFlashRushToBuy operation = GetOperationFlashRushToBuy();
            if (presentFlashShop != null)
            {
                int seconds = 0;
                int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow,presentFlashShop.dayIndex,presentFlashShop.timeIndex, out seconds);
                if(buyState != 1)
                {
                    return;
                }
            }
            for (int i = 0; i < operation.flashShops.Count; i++)
            {
                int days = operation.totalDays + 1;
                int dayIndex = i / (operation.flashShops.Count / days);
                int timeIndex = i % (operation.flashShops.Count / days);
                int seconds = 0;
                OperationTime operationTime = operation.times[timeIndex];
                var date = operation.startDate;
                int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, dayIndex, timeIndex, out seconds);
                switch(buyState)
                {
                    case -1:
                    case 0:
                        UpdateSelectFlashSaleTime(dayIndex,timeIndex);
                        return;
                }
            }
        }
        public void ResetFlashShop()
        {
            presentFlashShop = null;
        }
        #region 本地数据处理
        public OperationFlashRushToBuy.FlashSaleShop presentFlashShop { get; private set; }
        public event Action UpdateSelectSaleTimeEvent;
        public void UpdateSelectFlashSaleTime(int dayIndex,int timeIndex)
        {
            presentFlashShop = null;
            OperationFlashRushToBuy operation = GetOperationFlashRushToBuy();
            if(operation != null)
            {
                OperationFlashRushToBuy.FlashSaleShop flashShop;
                operation.TryGetFlashShop(dayIndex, timeIndex, out flashShop);
                presentFlashShop = flashShop;
                if(UpdateSelectSaleTimeEvent != null)
                {
                    UpdateSelectSaleTimeEvent();
                }
            }
        }
        public OperationFlashRushToBuy GetOperationFlashRushToBuy()
        {
            OperationBase operationBase;
            if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.FlashRushToBuy, out operationBase))
            {
                return operationBase as OperationFlashRushToBuy;
            }
            return null;
        }
        #endregion
        #region 协议
        public event Action UpdateAllAppointmentEvent;
        public event Action<int> UpdateAppointmentEvent;
        public void UpdateFlashSaleAppointmentInfo(HAA18_tagMCFlashSaleAppointmentInfo appointmentInfo)
        {
            var operation = GetOperationFlashRushToBuy();
            if (operation == null) return;
            if (appointmentInfo.IsAll == 1)
            {
                for (int j = 0; j < operation.flashShops.Count; j++)
                {
                    var saleItems = operation.flashShops[j].items;
                    for (int k = 0; k < saleItems.Length; k++)
                    {
                        saleItems[k].isAppointment = 0;
                    }
                }
            }
            for (int i = 0; i < appointmentInfo.GoodsCount; i++)
            {
                var saleItemInfo = appointmentInfo.GoodsList[i];
                for (int j = 0; j < operation.flashShops.Count; j++)
                {
                    var saleItems = operation.flashShops[j].items;
                    for (int k = 0; k < saleItems.Length; k++)
                    {
                       if (saleItems[k].shopGuid == saleItemInfo.GoodsMark)
                        {
                            if(saleItems[k].isAppointment != saleItemInfo.State)
                            {
                                saleItems[k].isAppointment = saleItemInfo.State;
                                if(UpdateAppointmentEvent != null)
                                {
                                    UpdateAppointmentEvent((int)saleItemInfo.GoodsMark);
                                }
                            }
                        }
                    }
                }
            }
            if(appointmentInfo.IsAll == 1)
            {
                if (UpdateAllAppointmentEvent != null)
                {
                    UpdateAllAppointmentEvent();
                }
            }
        }
        /// <summary>
        /// Value1  商品ID  Value2 全服购买次数
        /// </summary>
        /// <returns></returns>
        public GameRecInfo GetFullServerInfo()
        {
            var infolist = battleModel.GetBatterInfoListByType(8);
            if(infolist != null && infolist.Count > 0)
            {
                return infolist[0];
            }
            return null;
        }
        /// <summary>
        ///  限时抢购预约
        /// </summary>
        public void SendFlashSaleAppointment(int shopGuid,int state)
        {
            CAA05_tagCMFlashSaleAppointment appointment = new CAA05_tagCMFlashSaleAppointment();
            appointment.GoodsID = (uint)shopGuid;
            appointment.State = (byte)state;
            GameNetSystem.Instance.SendInfo(appointment);
        }
        #endregion
        /// <summary>
        /// 获得限时抢购活动状态
        /// </summary>
        /// <param name="seconds"></param>
        /// <returns></returns>
        public FlashRushToBuySate GetActivityState(out int seconds,out OperationTime operationTime,out OperationFlashRushToBuy.FlashSaleShop saleShop)
        {
            seconds = 0;
            saleShop = null;
            operationTime = default(OperationTime);
            var operation = GetOperationFlashRushToBuy();
            if (!IsOpen || operation == null) return FlashRushToBuySate.NoOpen;
            int openState = 0;
            int endState = 0;
            int openSeconds = 0;
            int endSeconds = 0;
            for(int i = 0; i < operation.flashShops.Count;i++)
            {
                OperationFlashRushToBuy.FlashSaleShop openSaleShop = operation.flashShops[i];
                operationTime = operation.times[openSaleShop.timeIndex];
                openState = operation.GetBuyTimeState(TimeUtility.ServerNow, openSaleShop.dayIndex, openSaleShop.timeIndex, out openSeconds);
                if(openState != 1)
                {
                    saleShop = openSaleShop;
                    break;
                }
            }
            if(operation.flashShops.Count > 0)
            {
                OperationFlashRushToBuy.FlashSaleShop endSaleShop = operation.flashShops[operation.flashShops.Count - 1];
                endState = operation.GetBuyTimeState(TimeUtility.ServerNow, endSaleShop.dayIndex, endSaleShop.timeIndex, out endSeconds);
            }
            switch(openState)
            {
                case -1:
                    seconds = openSeconds;
                    return FlashRushToBuySate.InAdvance;
                case 0:
                    return FlashRushToBuySate.Begining;
            }
            switch(endState)
            {
                case -1:
                    return FlashRushToBuySate.Begining;
                case 0:
                    return FlashRushToBuySate.Begining;
                case 1:
                    return FlashRushToBuySate.End;
                default:
                    return FlashRushToBuySate.NoOpen;
            }
        }
        public bool CheckIsPush(out OperationFlashRushToBuy.FlashSaleShop saleShop)
        {
            int seconds = 0;
            OperationTime operationTime;
            saleShop = null;
            var buyState = GetActivityState(out seconds,out operationTime,out saleShop);
            switch (buyState)
            {
                case FlashRushToBuySate.NoOpen:
                    break;
                case FlashRushToBuySate.InAdvance:
                    if(saleShop != null && seconds <= 180)
                    {
                       for(int i = 0; i < saleShop.items.Length; i++)
                        {
                            if(saleShop.items[i].isAppointment == 1)
                            {
                                return true;
                            }
                        }
                    }
                    break;
                case FlashRushToBuySate.Begining:
                    return true;
                case FlashRushToBuySate.End:
                    break;
            }
            return false;
        }
        private void OperationEndEvent(Operation type, int state)
        {
            if (type == Operation.FlashRushToBuy && state == 0)
            {
                UpdateRedpoint();
                if (onStateUpate != null)
                {
                    onStateUpate((int)OpenServerActivityCenter.OSActivityType.FlashRushToBuy);
                }
            }
        }
        private void OperationAdvanceEvent(Operation type)
        {
            if (type == Operation.FlashRushToBuy)
            {
                if (onStateUpate != null)
                {
                    onStateUpate((int)OpenServerActivityCenter.OSActivityType.FlashRushToBuy);
                }
            }
        }
        private void OperationStartEvent(Operation type, int state)
        {
            if (type == Operation.FlashRushToBuy && state == 0)
            {
                UpdateRedpoint();
                if (onStateUpate != null)
                {
                    onStateUpate((int)OpenServerActivityCenter.OSActivityType.FlashRushToBuy);
                }
            }
        }
        private void OnDayEvent()
        {
            UpdateRedpoint();
        }
        public void SetDayRemind()
        {
            if (flashSaleRedpoint.state == RedPointState.Simple)
            {
               // DayRemind.Instance.SetDayRemind(DayRemind.FLASHSALE_REDPOINT, true);
                UpdateRedpoint();
            }
        }
        public Redpoint flashSaleRedpoint = new Redpoint(MainRedDot.REDPOINT_OPENSERVER, 20914);
        public event Action<int> onStateUpate;
        private void UpdateRedpoint()
        {
            flashSaleRedpoint.state = RedPointState.None;
        }
        public enum FlashRushToBuySate
        {
            NoOpen, //活动未开启
            InAdvance,//提前
            Begining, //活动中
            End, //结束
        }
    }
}
System/OpenServerActivity/FlashRushToBuyModel.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 1155d8a33808d2640ab01bedff0bb06b
timeCreated: 1539086199
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/FlashRushToBuyNotify.cs
New file
@@ -0,0 +1,35 @@
namespace Snxxz.UI
{
    public class FlashRushToBuyNotify : OpenServerActivityNotifyBase
    {
        public FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
        public const string iconKey = "TB_BGL_2";
        private void OnEnable()
        {
            Display();
        }
        private void OnDisable()
        {
        }
        protected override void Display()
        {
            base.Display();
            titleText.text = "限时抢购";
            activityIcon.SetSprite(iconKey);
        }
        protected override void ClickGotoBtn()
        {
            base.ClickGotoBtn();
            this.gameObject.SetActive(false);
            WindowCenter.Instance.Open<FlashRushToBuyWin>();
        }
        protected override void ClickCloseBtn()
        {
            base.ClickCloseBtn();
        }
    }
}
System/OpenServerActivity/FlashRushToBuyNotify.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f1b3cf08873bf564ea2ec5d7d71afd41
timeCreated: 1539423553
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/FlashRushToBuyWin.cs
New file
@@ -0,0 +1,126 @@
using System;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class FlashRushToBuyWin : Window
    {
        [SerializeField] ScrollerController saleItemCtrl;
        [SerializeField] ScrollerController saleTimeCtrl;
        [SerializeField] Text opreationTimeText;
        [SerializeField] Image moneyIcon;
        [SerializeField] Text moneyNumText;
        StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
        FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
        OperationFlashRushToBuy operation = null;
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
        }
        protected override void OnPreOpen()
        {
            rushToBuyModel.SetDefaultSelectSaleTime();
            OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent;
            OperationTimeHepler.Instance.operationTimeUpdateEvent += OperationTimeUpdateEvent;
            rushToBuyModel.UpdateSelectSaleTimeEvent += UpdateSelectSaleTime;
            SetDisplayModel();
            Display();
        }
        protected override void OnAfterOpen()
        {
            rushToBuyModel.SetDayRemind();
        }
        protected override void OnPreClose()
        {
            rushToBuyModel.UpdateSelectSaleTimeEvent -= UpdateSelectSaleTime;
            OperationTimeHepler.Instance.operationStartEvent -= OperationStartEvent;
            OperationTimeHepler.Instance.operationTimeUpdateEvent -= OperationTimeUpdateEvent;
            rushToBuyModel.ResetFlashShop();
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        private void SetDisplayModel()
        {
            operation = null;
            OperationBase operationBase;
            if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.FlashRushToBuy, out operationBase))
            {
               operation = operationBase as OperationFlashRushToBuy;
            }
        }
        private void Display()
        {
            if (rushToBuyModel.presentFlashShop == null|| operation == null) return;
            opreationTimeText.text = StringUtility.Contact(Language.Get("ExpActivity_Text1"), operation.ToDisplayTime());
            if (rushToBuyModel.presentFlashShop.items.Length > 0)
            {
                var moneyType = rushToBuyModel.presentFlashShop.items[0].moneyType;
                moneyIcon.SetIconWithMoneyType(moneyType);
                moneyNumText.text = UIHelper.GetMoneyCnt(moneyType).ToString();
            }
            CreateOperationTimes();
            CreateSaleItem();
        }
        private void UpdateSelectSaleTime()
        {
            CreateSaleItem();
            saleTimeCtrl.m_Scorller.RefreshActiveCellViews();
        }
        private void CreateOperationTimes()
        {
            if (operation == null) return;
            saleTimeCtrl.Refresh();
            for (int i = 0; i < operation.flashShops.Count; i++)
            {
                saleTimeCtrl.AddCell(ScrollerDataType.Header, i);
            }
            saleTimeCtrl.Restart();
        }
        public void CreateSaleItem()
        {
            saleItemCtrl.Refresh();
            var flashItems = rushToBuyModel.presentFlashShop.items;
            for (int i = 0; i < flashItems.Length; i++)
            {
                saleItemCtrl.AddCell(ScrollerDataType.Header, i);
            }
            saleItemCtrl.Restart();
        }
        private void OperationTimeUpdateEvent(Operation type)
        {
            if (type == Operation.FlashRushToBuy)
            {
                Display();
            }
        }
        private void OperationStartEvent(Operation type, int state)
        {
            if (type == Operation.FlashRushToBuy && state == 0)
            {
                Display();
            }
        }
    }
}
System/OpenServerActivity/FlashRushToBuyWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e1ea7b55e1cc21b42906a2e6984b29cd
timeCreated: 1539069491
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/FlashSaleItemCell.cs
New file
@@ -0,0 +1,186 @@
using UnityEngine;
using UnityEngine.UI;
using EnhancedUI.EnhancedScroller;
using TableConfig;
using System;
namespace Snxxz.UI
{
    public class FlashSaleItemCell : ScrollerUI
    {
        [SerializeField] CommonItemBaisc itemBaisc;
        [SerializeField] Text originalPrice;
        [SerializeField] Image originalMoneyIcon;
        [SerializeField] Text presentPrice;
        [SerializeField] Image presentMoneyIcon;
        [SerializeField] Image stateImg;
        [SerializeField] Button flashSaleBtn;
        [SerializeField] Text btnStateText;
        [SerializeField] Text fullServerRemainNum;
        public const int RefreshFullServerBuyType = 8;
        FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
        StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
        HeavenBattleModel battleModel { get { return ModelCenter.Instance.GetModel<HeavenBattleModel>(); } }
        ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        OperationFlashRushToBuy.FlashSaleItem saleItem;
        int buyState = -1;
        private void OnEnable()
        {
            battleModel.RefreshGameRecInfoAct += UpdateFullServerBuy;
            storeModel.RefreshBuyShopLimitEvent += RefreshBuyShopLimitEvent;
            rushToBuyModel.UpdateAllAppointmentEvent += UpdateAllAppointmentInfo;
            rushToBuyModel.UpdateAppointmentEvent += UpdateAppointmentInfo;
        }
        private void OnDisable()
        {
            storeModel.RefreshBuyShopLimitEvent -= RefreshBuyShopLimitEvent;
            battleModel.RefreshGameRecInfoAct -= UpdateFullServerBuy;
            rushToBuyModel.UpdateAllAppointmentEvent -= UpdateAllAppointmentInfo;
            rushToBuyModel.UpdateAppointmentEvent -= UpdateAppointmentInfo;
        }
        public override void Refresh(CellView cell)
        {
            if (rushToBuyModel.presentFlashShop == null) return;
            saleItem = rushToBuyModel.presentFlashShop.items[cell.index];
            ItemCellModel cellModel = new ItemCellModel(saleItem.itemId,true,(ulong)saleItem.itemCount,saleItem.isBind);
            itemBaisc.Init(cellModel);
            itemBaisc.cellBtn.RemoveAllListeners();
            itemBaisc.cellBtn.AddListener(()=>
            {
                ItemAttrData attrData = new ItemAttrData(saleItem.itemId,true, (ulong)saleItem.itemCount, -1,saleItem.isBind);
                tipsModel.SetItemTipsModel(attrData);
            });
            originalMoneyIcon.SetIconWithMoneyType(saleItem.moneyType);
            presentMoneyIcon.SetIconWithMoneyType(saleItem.moneyType);
            originalPrice.text = saleItem.moneyOriginal.ToString();
            presentPrice.text = saleItem.moneyNumber.ToString();
            UpdateSaleItem();
            UpdateSaleItemSellState();
        }
        private void RefreshBuyShopLimitEvent()
        {
            UpdateSaleItemSellState();
        }
        private void UpdateFullServerBuy(int type)
        {
            if (type != RefreshFullServerBuyType) return;
            UpdateSaleItemSellState();
        }
        private void UpdateAllAppointmentInfo()
        {
            UpdateSaleItem();
        }
        private void UpdateAppointmentInfo(int shopGuid)
        {
            if (saleItem == null || shopGuid != saleItem.shopGuid) return;
            UpdateSaleItem();
        }
        private void UpdateSaleItem()
        {
            if (rushToBuyModel.presentFlashShop == null) return;
            StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(saleItem.shopId);
            flashSaleBtn.RemoveAllListeners();
            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
            int seconds = 0;
            buyState = operation.GetBuyTimeState(TimeUtility.ServerNow,rushToBuyModel.presentFlashShop.dayIndex,
                rushToBuyModel.presentFlashShop.timeIndex,out seconds);
            switch(buyState)
            {
                case -1:
                    if(saleItem.isAppointment == 0)
                    {
                        btnStateText.text = "预约";
                        flashSaleBtn.AddListener(() => { rushToBuyModel.SendFlashSaleAppointment(saleItem.shopGuid, 1); });
                    }
                    else
                    {
                        btnStateText.text = "取消预约";
                        flashSaleBtn.AddListener(() => { rushToBuyModel.SendFlashSaleAppointment(saleItem.shopGuid, 0); });
                    }
                    break;
                case 0:
                    btnStateText.text = "秒杀";
                    flashSaleBtn.AddListener(() => { storeModel.SendBuyShopItem(storeConfig,saleItem.itemCount); });
                    break;
            }
        }
        private void UpdateSaleItemSellState()
        {
            int fullSeverRemain = 0;
            int sellState = GetSellSate(out fullSeverRemain);
            fullServerRemainNum.text = fullSeverRemain.ToString();
            switch (sellState)
            {
                case 0:
                    stateImg.gameObject.SetActive(false);
                    flashSaleBtn.gameObject.SetActive(true);
                    break;
                case 1:
                    stateImg.gameObject.SetActive(true);
                    flashSaleBtn.gameObject.SetActive(false);
                    break;
                case 2:
                    stateImg.gameObject.SetActive(true);
                    flashSaleBtn.gameObject.SetActive(false);
                    break;
            }
        }
        /// <summary>
        /// 0 秒杀 1 已买到 2 已抢光
        /// </summary>
        /// <returns></returns>
        private int GetSellSate(out int fullRemainNum)
        {
            fullRemainNum = 0;
            var buyInfo = storeModel.GetBuyShopLimit((uint)saleItem.shopId);
            var buyCount = 0;
            var fullServerInfo = rushToBuyModel.GetFullServerInfo();
            if(buyState != -1)
            {
                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;
            }
            return 0;
        }
    }
}
System/OpenServerActivity/FlashSaleItemCell.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0159981474f2dbb4599489e57560e8e6
timeCreated: 1539070008
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/FlashSaleTimeCell.cs
New file
@@ -0,0 +1,87 @@
using UnityEngine;
using UnityEngine.UI;
using EnhancedUI.EnhancedScroller;
using System;
namespace Snxxz.UI
{
    public class FlashSaleTimeCell : ScrollerUI
    {
        [SerializeField] Text remainText;
        [SerializeField] Button saleTimeBtn;
        [SerializeField] GameObject unSelectImg;
        [SerializeField] GameObject selectImg;
        FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
        OperationFlashRushToBuy operation;
        int dayIndex = -1;
        int timeIndex = -1;
        private void Awake()
        {
            saleTimeBtn.AddListener(() =>
            {
                rushToBuyModel.UpdateSelectFlashSaleTime(dayIndex, timeIndex);
            });
        }
        private void OnEnable()
        {
            GlobalTimeEvent.Instance.secondEvent += UpdateBuyState;
        }
        private void OnDisable()
        {
            GlobalTimeEvent.Instance.secondEvent -= UpdateBuyState;
        }
        public override void Refresh(CellView cell)
        {
            operation = rushToBuyModel.GetOperationFlashRushToBuy();
            dayIndex = -1;
            timeIndex = -1;
            if (operation == null) return;
            int days = operation.totalDays + 1;
            dayIndex = cell.index/(operation.flashShops.Count / days);
            timeIndex = cell.index % (operation.flashShops.Count / days);
            if(dayIndex == rushToBuyModel.presentFlashShop.dayIndex
                && timeIndex == rushToBuyModel.presentFlashShop.timeIndex)
            {
                selectImg.SetActive(true);
                unSelectImg.SetActive(false);
            }
            else
            {
                selectImg.SetActive(false);
                unSelectImg.SetActive(true);
            }
            UpdateBuyState();
        }
        public void UpdateBuyState()
        {
            if (operation == null || timeIndex == -1) return;
            int seconds = 0;
            OperationTime operationTime = operation.times[timeIndex];
            var date = operation.startDate;
            int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, dayIndex, timeIndex, out seconds);
            switch (buyState)
            {
                case -1:
                    this.gameObject.SetActive(true);
                    string timeStr = operation.ToDisplayBuyTime(date.month, dayIndex + date.day, operationTime.startHour, operationTime.startMinute);
                    remainText.text = StringUtility.Contact(timeStr, "开抢");
                    break;
                case 0:
                    this.gameObject.SetActive(true);
                    remainText.text = StringUtility.Contact("秒杀进行中", TimeUtility.SecondsToHMS(seconds));
                    break;
                case 1:
                    if(selectImg.activeInHierarchy)
                    {
                        rushToBuyModel.SetDefaultSelectSaleTime();
                    }
                    this.gameObject.SetActive(false);
                    break;
            }
        }
    }
}
System/OpenServerActivity/FlashSaleTimeCell.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 45a3148a13dcdbb40b43bf5b9667ca8e
timeCreated: 1539070917
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/ImpactRankModel.cs
@@ -786,6 +786,8 @@
            FairyLeagueNotice,
            [Header("骑宠争夺预告")]
            FairyGrabBossNotice,
            [Header("限时抢购")]
            FlashRushToBuy,
        }
    }
System/OpenServerActivity/OpenServerActivityNotifyBase.cs
New file
@@ -0,0 +1,34 @@
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
     public class OpenServerActivityNotifyBase : MonoBehaviour
    {
        [SerializeField] protected Text titleText;
        [SerializeField] protected Image activityIcon;
        [SerializeField] protected Button gotoBtn;
        [SerializeField] protected Button closeBtn;
        private void Awake()
        {
            gotoBtn.AddListener(ClickGotoBtn);
            closeBtn.AddListener(ClickCloseBtn);
        }
        protected virtual void Display()
        {
        }
        protected virtual void ClickGotoBtn()
        {
        }
        protected virtual void ClickCloseBtn()
        {
            this.gameObject.SetActive(false);
        }
    }
}
System/OpenServerActivity/OpenServerActivityNotifyBase.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 22be8e7eacfacb343b53b11b5d22aa29
timeCreated: 1539422752
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/OpenServerActivityNotifyModel.cs
New file
@@ -0,0 +1,193 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Snxxz.UI
{
    public class OpenServerActivityNotifyModel : Model,IBeforePlayerDataInitialize,IPlayerLoginOk
    {
        public override void Init()
        {
        }
        public void OnBeforePlayerDataInitialize()
        {
            FlashRushToBuyActivityClose();
            GlobalTimeEvent.Instance.minuteEvent -= UpdateMinute;
            OperationTimeHepler.Instance.operationStartEvent -= OperationStartEvent;
            OperationTimeHepler.Instance.operationEndEvent -= OperationEndEvent;
            OperationTimeHepler.Instance.operationTimeUpdateEvent -= OperationTimeEvent;
            OperationTimeHepler.Instance.operationServerCloseEvent -= OperationServerCloseEvent;
            NewBieCenter.Instance.guideCompletedEvent -= GuideCompletedEvent;
        }
        public void OnPlayerLoginOk()
        {
            OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent;
            OperationTimeHepler.Instance.operationEndEvent += OperationEndEvent;
            OperationTimeHepler.Instance.operationTimeUpdateEvent += OperationTimeEvent;
            OperationTimeHepler.Instance.operationServerCloseEvent += OperationServerCloseEvent;
            NewBieCenter.Instance.guideCompletedEvent += GuideCompletedEvent;
            GlobalTimeEvent.Instance.minuteEvent += UpdateMinute;
            SetFlashRushToBuyNotify();
            if (!WindowCenter.Instance.IsOpen<OpenServerActivityNotifyWin>())
            {
                WindowCenter.Instance.Open<OpenServerActivityNotifyWin>();
            }
        }
        public override void UnInit()
        {
        }
        private void UpdateMinute()
        {
            SetFlashRushToBuyNotify();
        }
        private void OperationTimeEvent(Operation type)
        {
            switch (type)
            {
                case Operation.MultipleExp:
                    break;
                case Operation.ConsumeRebate:
                    break;
                case Operation.FlashSale:
                    break;
                case Operation.BossReborn:
                    break;
                case Operation.GiftPackage:
                    break;
                case Operation.FairyCeremony:
                    break;
                case Operation.MultipRealmPoint:
                    break;
                case Operation.FlashRushToBuy:
                    SetFlashRushToBuyNotify();
                    break;
                case Operation.max:
                    break;
            }
        }
        private void OperationStartEvent(Operation type, int state)
        {
            switch (type)
            {
                case Operation.MultipleExp:
                    break;
                case Operation.ConsumeRebate:
                    break;
                case Operation.FlashSale:
                    break;
                case Operation.BossReborn:
                    break;
                case Operation.GiftPackage:
                    break;
                case Operation.FairyCeremony:
                    break;
                case Operation.MultipRealmPoint:
                    break;
                case Operation.FlashRushToBuy:
                    SetFlashRushToBuyNotify();
                    break;
                case Operation.max:
                    break;
            }
        }
        private void OperationServerCloseEvent(Operation type)
        {
            switch (type)
            {
                case Operation.MultipleExp:
                    break;
                case Operation.ConsumeRebate:
                    break;
                case Operation.FlashSale:
                    break;
                case Operation.BossReborn:
                    break;
                case Operation.GiftPackage:
                    break;
                case Operation.FairyCeremony:
                    break;
                case Operation.MultipRealmPoint:
                    break;
                case Operation.FlashRushToBuy:
                    FlashRushToBuyActivityClose();
                    break;
                case Operation.max:
                    break;
            }
        }
        private void OperationEndEvent(Operation type, int state)
        {
            switch (type)
            {
                case Operation.MultipleExp:
                    break;
                case Operation.ConsumeRebate:
                    break;
                case Operation.FlashSale:
                    break;
                case Operation.BossReborn:
                    break;
                case Operation.GiftPackage:
                    break;
                case Operation.FairyCeremony:
                    break;
                case Operation.MultipRealmPoint:
                    break;
                case Operation.FlashRushToBuy:
                    FlashRushToBuyActivityClose();
                    break;
                case Operation.max:
                    break;
            }
        }
        private void GuideCompletedEvent(int id)
        {
            SetFlashRushToBuyNotify();
        }
        #region 限时抢购
        public event Action UpdateFlashRushToBuyEvent;
        FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
        public List<OperationFlashRushToBuy.FlashSaleShop> flashSaleShops = new List<OperationFlashRushToBuy.FlashSaleShop>();
        public void SetFlashRushToBuyNotify()
        {
            if (NewBieCenter.Instance.inGuiding) return;
            OperationFlashRushToBuy.FlashSaleShop saleShop = null;
            bool isPush = rushToBuyModel.CheckIsPush(out saleShop);
            if(isPush && !flashSaleShops.Contains(saleShop))
            {
                flashSaleShops.Add(saleShop);
                if(UpdateFlashRushToBuyEvent != null)
                {
                    UpdateFlashRushToBuyEvent();
                }
            }
        }
        public void FlashRushToBuyActivityClose()
        {
            flashSaleShops.Clear();
            if (UpdateFlashRushToBuyEvent != null)
            {
                UpdateFlashRushToBuyEvent();
            }
        }
        #endregion
    }
}
System/OpenServerActivity/OpenServerActivityNotifyModel.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 2a78df4065d071145b2e5877404cd6fd
timeCreated: 1539572551
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/OpenServerActivityNotifyWin.cs
New file
@@ -0,0 +1,54 @@
using System;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class OpenServerActivityNotifyWin : Window
    {
        [SerializeField] FlashRushToBuyNotify flashRushToBuyNotify;
        OpenServerActivityNotifyModel activityNotifyModel { get { return ModelCenter.Instance.GetModel<OpenServerActivityNotifyModel>(); } }
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
        }
        protected override void OnPreOpen()
        {
            activityNotifyModel.UpdateFlashRushToBuyEvent += CheckFlashRushToBuy;
            CheckFlashRushToBuy();
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
            activityNotifyModel.UpdateFlashRushToBuyEvent -= CheckFlashRushToBuy;
        }
        protected override void OnAfterClose()
        {
        }
        private void CheckFlashRushToBuy()
        {
            if(activityNotifyModel.flashSaleShops.Count > 0)
            {
                flashRushToBuyNotify.gameObject.SetActive(true);
            }
            else
            {
                flashRushToBuyNotify.gameObject.SetActive(false);
            }
        }
    }
}
System/OpenServerActivity/OpenServerActivityNotifyWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: aa084ec4d5a2ea446b5ec00c0e1cc687
timeCreated: 1539422752
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/OpenServerActivityWin.cs
@@ -574,6 +574,16 @@
                        WindowCenter.Instance.Open<FairyGrabBossNoticeWin>(true);
                    }
                    break;
                case 14:
                    if (windowState == WindowState.Opened)
                    {
                        WindowCenter.Instance.OpenWithoutAnimation<FlashRushToBuyWin>();
                    }
                    else
                    {
                        WindowCenter.Instance.Open<FlashRushToBuyWin>(true);
                    }
                    break;
            }
        }
@@ -609,6 +619,7 @@
            WindowCenter.Instance.CloseImmediately<VipInvestWin>();
            WindowCenter.Instance.CloseImmediately<FairyLeagueNoticeWin>();
            WindowCenter.Instance.CloseImmediately<FairyGrabBossNoticeWin>();
            WindowCenter.Instance.CloseImmediately<FlashRushToBuyWin>();
        }
        private int Compare(int order_x, int order_y)
System/OpenServerActivity/OperationFlashRushToBuy.cs
New file
@@ -0,0 +1,172 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Snxxz.UI
{
    public class OperationFlashRushToBuy : OperationBase
    {
        public List<FlashSaleShop> flashShops = new List<FlashSaleShop>();
        public bool TryGetFlashShop(int dayIndex,int timeIndex ,out FlashSaleShop flashSaleShop)
        {
           flashSaleShop = null;
           for (int i = 0; i < flashShops.Count; i++)
            {
                var shop = flashShops[i];
                if (shop.dayIndex == dayIndex
                    && shop.timeIndex == timeIndex)
                {
                    flashSaleShop = shop;
                    return true;
                }
            }
            return false;
        }
        public bool TryGetFlashItem(int shopGuid,out FlashSaleShop flashSaleShop, out FlashSaleItem saleItem)
        {
            saleItem = null;
            flashSaleShop = null;
            for (int i = 0; i < flashShops.Count; i++)
            {
                var saleItems = flashShops[i].items;
                for (int j = 0; j < saleItems.Length; j++)
                {
                    if (saleItems[j].shopGuid == shopGuid)
                    {
                        flashSaleShop = flashShops[i];
                        saleItem = saleItems[j];
                        return true;
                    }
                }
            }
            return false;
        }
        /// <summary>
        ///-1 未开始 0 开始 1结束
        /// </summary>
        /// <param name="time"></param>
        /// <param name="dayIndex"></param>
        /// <param name="timeIndex"></param>
        /// <returns></returns>
        public int GetBuyTimeState(DateTime time,int dayIndex,int timeIndex,out int seconds)
        {
            seconds = 0;
            int day = startDate.day + dayIndex;
            OperationTime operationTime = times[timeIndex];
            var startTime = new DateTime(startDate.year, startDate.month,day, operationTime.startHour, operationTime.startMinute,0);
            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 (advanceSec > 0)
            {
                seconds = advanceSec;
                return -1;
            }
            else if(endSec <= 0)
            {
                return 1;
            }
            else
            {
                seconds = endSec;
                return 0;
            }
        }
        public string ToDisplayBuyTime(int month,int day,int startHour,int startMinute)
        {
            return StringUtility.Contact(month, Language.Get("Month"), day, Language.Get("Day"), startHour.ToString("D2"), ":", startMinute.ToString("D2"));
        }
        public string ToDisplayBuyTime(int startHour, int startMinute)
        {
            return StringUtility.Contact(startHour.ToString("D2"), ":", startMinute.ToString("D2"));
        }
        public override bool SatisfyOpenCondition()
        {
            if(PlayerDatas.Instance.baseData.LV >= limitLv && InDay(TimeUtility.ServerNow))
            {
                return true;
            }
            return false;
        }
        public override void Reset()
        {
            base.Reset();
            flashShops.Clear();
        }
        public override string ToDisplayTime()
        {
            var textBuilder = OperationTimeHepler.textBuilder;
            textBuilder.Length = 0;
            textBuilder.Append(startDate.ToDisplay());
            if (startDate != endDate)
            {
                textBuilder.Append("—");
                textBuilder.Append(endDate.ToDisplay());
            }
            return textBuilder.ToString();
        }
        public void ParsePackage(HAA17_tagMCFlashSaleInfo package)
        {
            for (int i = 0; i < package.ShopCount; i++)
            {
                var gift = new FlashSaleShop();
                var shop = package.ShopInfo[i];
                gift.dayIndex = shop.DayIndex;
                gift.timeIndex = shop.TimeIndex;
                gift.items = new FlashSaleItem[shop.GiftbagCount];
                for (int k = 0; k < shop.GiftbagCount; k++)
                {
                    var item = new FlashSaleItem();
                    var saleItem = shop.GiftbagInfo[k];
                    item.shopId = (int)saleItem.GiftID;
                    item.shopGuid = shop.DayIndex*1000 + shop.TimeIndex*100 + k;
                    item.limitNum = saleItem.BuyCountLimit;
                    item.fullServerLimitNum = saleItem.ServerBuyCountLimit;
                    item.moneyType = saleItem.MoneyType;
                    item.moneyNumber = (int)saleItem.MoneyNumber;
                    item.moneyOriginal = (int)saleItem.MoneyOriginal;
                    item.itemId = (int)saleItem.ItemID;
                    item.itemCount = saleItem.ItemCount;
                    item.isBind = saleItem.IsBind;
                    item.isAppointment = 0;
                    gift.items[k] = item;
                }
                flashShops.Add(gift);
            }
        }
        public class FlashSaleShop
        {
            public int dayIndex; // 活动第几天
            public int timeIndex;//第几个时间段
            public FlashSaleItem[] items;
        }
        public class FlashSaleItem
        {
            public int shopId;
            public int shopGuid;
            public int limitNum;//个人限购数量
            public int fullServerLimitNum; //个人限购数量
            public int moneyType;
            public int moneyNumber;
            public int moneyOriginal;
            public int itemId;
            public int itemCount;
            public int isBind;
            public int isAppointment; //是否预约
        }
    }
}
System/OpenServerActivity/OperationFlashRushToBuy.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 6b7d522af470b8a42b9127be5090cb6f
timeCreated: 1539088859
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/SystemSetting/ActivitiesPushMgr.cs
@@ -11,8 +11,10 @@
    {
        public const int WholePeopleRankStart = 2091000; //全民冲榜开始
        public const int WholePeopleRankEnd = 20910000; //全民冲榜截止
        public const int FlashRushToBuy = 209014; //限时抢购
        ImpactRankModel impactRank { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } }
        FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
        private List<int> rankTypelist = new List<int>();
        public override void Init()
@@ -29,7 +31,10 @@
        public void OnBeforePlayerDataInitialize()
        {
            rushToBuyModel.UpdateAllAppointmentEvent -= UpdateAllAppointment;
            rushToBuyModel.UpdateAppointmentEvent -= UpdateAppointment;
            GlobalTimeEvent.Instance.minuteEvent -= RefreshMinuteTime;
            OpenServerActivityCenter.Instance.openServerActivityStateChange -= RefreshOpenServerState;
        }
        public void OnAfterPlayerDataInitialize()
@@ -41,10 +46,11 @@
        {
            SetRankStartPushInfo();
            SetRankEndPushInfo();
            GlobalTimeEvent.Instance.minuteEvent -= RefreshMinuteTime;
            SetFlashRushToBuyAppointmentInfo();
            GlobalTimeEvent.Instance.minuteEvent += RefreshMinuteTime;
            OpenServerActivityCenter.Instance.openServerActivityStateChange -= RefreshOpenServerState;
            OpenServerActivityCenter.Instance.openServerActivityStateChange += RefreshOpenServerState;
            rushToBuyModel.UpdateAllAppointmentEvent += UpdateAllAppointment;
            rushToBuyModel.UpdateAppointmentEvent += UpdateAppointment;
        }
        public override void UnInit()
@@ -57,6 +63,7 @@
        {
            RemovePushByTime(PushInfoType.RankStart,11);
            RemovePushByTime(PushInfoType.RankEnd,23);
            RemoveFlashRushToBuyAppointmentByTime();
        }
        private void RefreshOpenServerState()
@@ -65,8 +72,10 @@
            SetRankEndPushInfo();
            RemovePushByActiveClose(PushInfoType.RankStart);
            RemovePushByActiveClose(PushInfoType.RankEnd);
            SetFlashRushToBuyAppointmentInfo();
        }
        #region 开服活动冲榜推送
        private void SetRankStartPushInfo()
        {
            for(int i = 0; i <rankTypelist.Count; i++)
@@ -144,7 +153,7 @@
            }
        }
        private void RemovePushByTime(PushInfoType type,int time)
        private void RemovePushByTime(PushInfoType type, int time)
        {
            int remainHour = time - TimeUtility.ServerNow.Hour;
            int remainMinute = 0 - TimeUtility.ServerNow.Minute;
@@ -181,7 +190,98 @@
                    break;
            }
        }
        #endregion
        #region 限时抢购推送
        private void UpdateAllAppointment()
        {
            SetFlashRushToBuyAppointmentInfo();
        }
        private void UpdateAppointment(int shopGuid)
        {
            if (!rushToBuyModel.IsOpen) return;
            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
            int pushId = FlashRushToBuy * 10 + shopGuid;
            OperationFlashRushToBuy.FlashSaleItem saleItem;
            OperationFlashRushToBuy.FlashSaleShop saleShop;
            bool isSaleItem = operation.TryGetFlashItem(shopGuid,out saleShop,out saleItem);
            if(isSaleItem)
            {
                if(saleItem.isAppointment != 1)
                {
                    RemovePushInfo(pushId);
                }
                else
                {
                    int seconds = 0;
                    int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, saleShop.dayIndex, saleShop.timeIndex, out seconds);
                    if(seconds > 800)
                    {
                        int remainSecond = seconds - 600;
                        SendPushInfo(GetPushJsonData(pushId, remainSecond, "限时抢购", "亲爱的道友,您预约的限时抢购商品即将开抢,请尽快进入游戏秒杀!"));
                    }
                }
            }
        }
        private void SetFlashRushToBuyAppointmentInfo()
        {
            if (!rushToBuyModel.IsOpen) return;
            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
            for(int i = 0; i < operation.flashShops.Count; i++)
            {
                var flashShop = operation.flashShops[i];
                int seconds = 0;
                int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, flashShop.dayIndex,flashShop.timeIndex,out seconds);
                var saleItems = operation.flashShops[i].items;
                for (int j = 0; j < saleItems.Length; j++)
                {
                    int pushId = FlashRushToBuy * 10 + saleItems[j].shopGuid;
                    if (buyState == -1 && seconds > 800 && saleItems[j].isAppointment == 1)
                    {
                        int remainSecond = seconds - 600;
                        SendPushInfo(GetPushJsonData(pushId, remainSecond, "限时抢购", "亲爱的道友,您预约的限时抢购商品即将开抢,请尽快进入游戏秒杀!"));
                    }
                    else
                    {
                        RemovePushInfo(pushId);
                    }
                }
            }
        }
        private void RemoveFlashRushToBuyAppointmentByTime()
        {
            if (!rushToBuyModel.IsOpen) return;
            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
            for (int i = 0; i < operation.flashShops.Count; i++)
            {
                var flashShop = operation.flashShops[i];
                int seconds = 0;
                int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, flashShop.dayIndex, flashShop.timeIndex, out seconds);
                var saleItems = operation.flashShops[i].items;
                for (int j = 0; j < saleItems.Length; j++)
                {
                    int pushId = FlashRushToBuy * 10 + saleItems[j].shopGuid;
                    if (buyState != -1)
                    {
                        RemovePushInfo(pushId);
                    }
                    else
                    {
                        if(seconds <= 180)
                        {
                            RemovePushInfo(pushId);
                        }
                    }
                }
            }
        }
        #endregion
        public void RemovePushInfo(int pushId)
        {
            SDKUtility.Instance.GeTui_RemoveLocalMessage(pushId.ToString());
System/Vip/VipInvest/RotatePointer.cs
@@ -43,6 +43,10 @@
        {
        }
        private void OnDisable()
        {
            sequence.Kill();
        }
        private Sequence sequence;
        void Update()
        {
System/Vip/VipInvest/WheelOfFortuneModel.cs
@@ -99,6 +99,17 @@
                    {
                        flo = flo - 360f;
                    }
                    if (Math.Abs(flo- AngleSave)<=0.2)
                    {
                        if ((flo + 1f )> (AngleDic[Lattice].AngleStart + 1f) && (flo + 1f) < (AngleDic[Lattice].AngleEnd - 1f))
                        {
                            flo += 1;
                        }
                        else if ((flo - 1f) > (AngleDic[Lattice].AngleStart + 1f) && (flo - 1f) < (AngleDic[Lattice].AngleEnd - 1f))
                        {
                            flo -= 1;
                        }
                    }
                    LocalSave.SetFloat(StrKey, flo);
                    AngleSave = LocalSave.GetFloat(StrKey);
                }
@@ -124,7 +135,7 @@
        }
        private void RedPoint()
        {
            if (!FuncOpen.Instance.IsFuncOpen(144) /*|| Number<=0*/)
            if (!FuncOpen.Instance.IsFuncOpen(144))
            {
                return;
            }
System/Vip/VipInvest/WheelOfFortuneWin.cs
@@ -132,7 +132,15 @@
            int LotteryNumber = vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.BindJadeWheel);
            if (LotteryNumber <= wheelOfFortuneModel.Number)
            {
                LackOfVIP(); //VIP 不足
                if (PlayerDatas.Instance.baseData.VIPLv >= 10)
                {
                    SysNotifyMgr.Instance.ShowTip("BindJadeNoNum");
                }
                else
                {
                    LackOfVIP(); //VIP 不足
                }
                return;
            }
            else if (LotteryNumber > wheelOfFortuneModel.Number && (int)UIHelper.GetMoneyCnt(1) < wheelOfFortuneModel.NeedJade)
System/Welfare/OperationTimeHepler.cs
@@ -223,6 +223,45 @@
        }
        /// <summary>
        /// 限时抢购
        /// </summary>
        /// <param name="package"></param>
        public void UpdateFlashRushToBuy(HAA17_tagMCFlashSaleInfo package)
        {
            OperationBase operationBase = null;
            operationDict.TryGetValue(Operation.FlashRushToBuy, out operationBase);
            if (string.IsNullOrEmpty(package.StartDate) || string.IsNullOrEmpty(package.EndtDate))
            {
                ForceStopOperation(Operation.FlashRushToBuy);
            }
            else
            {
                if (operationBase == null)
                {
                    operationBase = new OperationFlashRushToBuy();
                    operationDict.Add(Operation.FlashRushToBuy, operationBase);
                }
                OperationFlashRushToBuy operation = operationBase as OperationFlashRushToBuy;
                operation.Reset();
                operation.limitLv = package.LimitLV;
                operation.startDate = ParseOperationDate(package.StartDate);
                operation.endDate = ParseOperationDate(package.EndtDate);
                operation.dayReset = package.IsDayReset == 1;
                operation.inAdvanceMinute = package.AdvanceMinutes;
                for (int i = 0; i < package.ActivityTimeCount; i++)
                {
                    operation.times.Add(ParseOperationTime(package.ActivityTime[i].StartTime,
                        package.ActivityTime[i].EndtTime));
                }
                operation.ParsePackage(package);
                if (operationTimeUpdateEvent != null)
                {
                    operationTimeUpdateEvent(Operation.FlashRushToBuy);
                }
            }
        }
        /// <summary>
        /// 限时礼包
        /// </summary>
        /// <param name="package"></param>
@@ -643,11 +682,12 @@
    {
        MultipleExp,
        ConsumeRebate,
        FlashSale,
        FlashSale,//限时特惠
        BossReborn,
        GiftPackage,
        FairyCeremony, //仙界盛典
        MultipRealmPoint, //N倍修行点
        FlashRushToBuy, //限时抢购
        max,
    }
}
System/WindowBase/ModelCenter.cs
@@ -196,6 +196,8 @@
            RegisterModel<FeatureNoticeModel>();
            RegisterModel<AwardExchangeModel>();
            RegisterModel<WheelOfFortuneModel>();
            RegisterModel<FlashRushToBuyModel>();
            RegisterModel<OpenServerActivityNotifyModel>();
            inited = true;
        }
Utility/DebugMousePos.cs
New file
@@ -0,0 +1,37 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DebugMousePos : MonoBehaviour
{
    [SerializeField] Text m_Content;
    float timer = 0.5f;
    private void LateUpdate()
    {
        if (CameraController.Instance == null)
        {
            return;
        }
        timer += Time.deltaTime;
        if (timer > 0.5f)
        {
            timer = 0f;
            Camera _mainCamera = CameraController.Instance.CameraObject;
            RaycastHit _hitInfo;
            Ray _ray = _mainCamera.ScreenPointToRay(Input.mousePosition);
            if (Physics.Raycast(_ray, out _hitInfo, 100, LayerUtility.WalkbleMask) == false)
            {
                return;
            }
            m_Content.text = StringUtility.Contact("M Pos:", new Vector2(_hitInfo.point.x * 2f + GA_Hero.MapOffset.x, _hitInfo.point.z * 2f + GA_Hero.MapOffset.z));
        }
    }
}
Utility/DebugMousePos.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 6162cab73fd1bea43b8c540484a634f3
timeCreated: 1539425015
licenseType: Free
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Utility/GlobalTimeEvent.cs
@@ -11,6 +11,7 @@
    public event Action tenMinuteEvent;
    public event Action halfHourEvent;
    public event Action hourEvent;
    public event Action halfMinuteEvent;
    int secondBuf = -1;
    int minuteBuf = -1;
@@ -18,6 +19,7 @@
    int tenMinuteBuf = -1;
    int halfHourBuf = -1;
    int hourBuf = -1;
    int halfMinuteBuf = -1;
    public void Begin()
    {
@@ -57,6 +59,26 @@
            }
        }
        var thirtySeconds = second / 30;
        if (halfMinuteBuf != thirtySeconds)
        {
            try
            {
                if (halfMinuteEvent != null)
                {
                    halfMinuteEvent();
                }
            }
            catch (Exception ex)
            {
                Debug.LogException(ex);
            }
            finally
            {
                halfMinuteBuf = thirtySeconds;
            }
        }
        var fiveMinute = minute / 5;
        if (fiveMinuteBuf != fiveMinute)
        {