Core/GameEngine/Login/Launch.cs
@@ -231,21 +231,14 @@ OperationLogCollect.Instance.RecordLauchEvent(2); OperationLogCollect.Instance.RecordEvent(2); if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 1) if (VersionUtility.Instance.NeedDownAsset()) { m_CurrentStage = LaunchStage.DownLoad; switch (VersionConfig.Get().assetAccess) { case InstalledAsset.IngoreDownLoad: break; case InstalledAsset.NullAsset: case InstalledAsset.HalfAsset: case InstalledAsset.FullAsset: AssetVersionUtility.GetAssetVersionFile(); progressBuf = progress; timer = 0f; duration = 1.5f; AssetVersionUtility.GetAssetVersionFile(); while (!AssetVersionUtility.checkAssetCompleted) { timer += Time.deltaTime; @@ -268,9 +261,9 @@ { AssetVersionUtility.BeginDownLoadTask(false); } break; } } GameNotice.OpenGameNotice(); if (!AssetSource.allFromEditor) { Core/GameEngine/Login/LoginStage.cs
@@ -52,7 +52,7 @@ SoundPlayer.Instance.PlayLoginMusic(); if (!AssetVersionUtility.hasDownLoadFullAsset) if (VersionUtility.Instance.NeedDownAsset() && !AssetVersionUtility.hasDownLoadFullAsset) { InGameDownLoad.Instance.inGameDownLoadAllow = true; InGameDownLoad.Instance.TryDownLoad(InGameDownLoad.Dominant.None); Core/GameEngine/Model/ConfigManager.cs
@@ -27,6 +27,11 @@ SnxxzGame.Instance.AddApplicationOutAction(OnApplicationOut); } public void LoadPriorBundleConfig() { StartSyncTask<PriorBundleConfig>(AssetPath.Resource); } public void PreLoadConfigs() { StartSyncTask<PriorBundleConfig>(AssetPath.Resource); Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC09_tagGCFairyCeremonyInfo.cs
@@ -6,7 +6,8 @@ public class DTCAC09_tagGCFairyCeremonyInfo : DtcBasic { public class DTCAC09_tagGCFairyCeremonyInfo : DtcBasic { FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } } Core/NetworkPackage/ServerPack/HAC_Activity/HAC09_tagGCFairyCeremonyInfo.cs
@@ -8,6 +8,7 @@ public string EndtDate; // 结束日期 y-m-d public ushort WorldLV; // 世界等级 public ushort LimitLV; // 限制等级 public byte ResetType; // 重置类型 0-0点重置 1-5点重置 public HAC09_tagGCFairyCeremonyInfo () { _cmd = (ushort)0xAC09; @@ -18,6 +19,7 @@ TransBytes (out EndtDate, vBytes, NetDataType.Chars, 10); TransBytes (out WorldLV, vBytes, NetDataType.WORD); TransBytes (out LimitLV, vBytes, NetDataType.WORD); TransBytes (out ResetType, vBytes, NetDataType.BYTE); } } Fight/PreFightMission.cs
@@ -1556,13 +1556,13 @@ private IEnumerator Co_Destroy() { WindowCenter.Instance.Close<MainInterfaceWin>(); if (IsFinished()) { yield break; } WindowCenter.Instance.Close<MainInterfaceWin>(); CameraController.Instance.MaskCamera.gameObject.SetActive(false); if (m_MoveToEffect) Fight/Stage/CreateRoleStage.cs
@@ -22,7 +22,7 @@ SystemSetting.Instance.SetQualityLevel(SystemSetting.Instance.GetCurrentQualityLevel()); SoundPlayer.Instance.PlayLoginMusic(); if (!AssetVersionUtility.hasDownLoadFullAsset) if (VersionUtility.Instance.NeedDownAsset() && !AssetVersionUtility.hasDownLoadFullAsset) { InGameDownLoad.Instance.TryDownLoad(InGameDownLoad.Dominant.None); } Fight/Stage/SelectRoleStage.cs
@@ -20,7 +20,7 @@ SystemSetting.Instance.SetQualityLevel(SystemSetting.Instance.GetCurrentQualityLevel()); SoundPlayer.Instance.PlayLoginMusic(); if (!AssetVersionUtility.hasDownLoadFullAsset) if (VersionUtility.Instance.NeedDownAsset() && !AssetVersionUtility.hasDownLoadFullAsset) { InGameDownLoad.Instance.TryDownLoad(InGameDownLoad.Dominant.None); } System/AssetVersion/AssetVersionUtility.cs
@@ -18,23 +18,13 @@ static bool m_PriorAssetDownLoadDone = false; public static bool priorAssetDownLoadDone { get { if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 0) if (VersionUtility.Instance.NeedDownAsset()) { return true; return m_PriorAssetDownLoadDone; } else { switch (VersionConfig.Get().assetAccess) { case InstalledAsset.NullAsset: case InstalledAsset.HalfAsset: case InstalledAsset.FullAsset: return m_PriorAssetDownLoadDone; case InstalledAsset.IngoreDownLoad: return true; default: return true; } } } } @@ -42,23 +32,13 @@ static bool m_UnPriorAssetDownLoadDone = false; public static bool unPriorAssetDownLoadDone { get { if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 0) if (VersionUtility.Instance.NeedDownAsset()) { return true; return m_UnPriorAssetDownLoadDone; } else { switch (VersionConfig.Get().assetAccess) { case InstalledAsset.NullAsset: case InstalledAsset.HalfAsset: case InstalledAsset.FullAsset: return m_UnPriorAssetDownLoadDone; case InstalledAsset.IngoreDownLoad: return true; default: return true; } } } } @@ -201,18 +181,15 @@ public static bool IsUnpriorAssetDownLoadOk() { if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 0) if (VersionUtility.Instance.NeedDownAsset() ) { return true; } if (VersionConfig.Get().assetAccess == InstalledAsset.IngoreDownLoad) { return true; } return unPriorAssetDownLoadDone; } else { return true; } } } System/AssetVersion/DownLoadAndDiscompressTask.cs
@@ -78,6 +78,8 @@ { step = Step.DownLoad; SnxxzGame.Instance.StartCoroutine(Co_StartDownLoad()); GameNotice.OpenGameNotice(); } IEnumerator Co_StartDownLoad() System/ClientVersion/VersionUtility.cs
@@ -115,7 +115,7 @@ { if (IsMaoErGame()) { return versionInfo.downAsset == 0 && versionInfo.VersionCount > 0; return versionInfo != null && versionInfo.downAsset == 0 && versionInfo.VersionCount > 0; } else { @@ -125,7 +125,7 @@ public bool NeedNormalUpdate() { return versionInfo.downAsset == 1 && versionInfo.VersionCount > 0; return versionInfo != null && versionInfo.downAsset == 1 && versionInfo.VersionCount > 0; } public string GetApkLocalUrl() @@ -289,6 +289,7 @@ var content = string.Empty; if (textAsset != null) { content = textAsset.text; if (DateTime.TryParse(content, out dateTime)) { return DateTime.Now < dateTime; @@ -309,6 +310,18 @@ } } public bool NeedDownAsset() { if (versionInfo != null && versionInfo.downAsset == 1 && VersionConfig.Get().assetAccess != InstalledAsset.IngoreDownLoad) { return true; } else { return false; } } public class VersionInfo { public int ForceCount; System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs
@@ -116,7 +116,7 @@ if (_isUnLocked) { var config = Config.Instance.Get<DogzDungeonConfig>(bossId); var refreshTime = DateTime.Now; var refreshTime = TimeUtility.ServerNow; switch (config.MonsterType) { case 1: @@ -135,9 +135,9 @@ break; } if (refreshTime > DateTime.Now) if (refreshTime > TimeUtility.ServerNow) { m_CoolDown.Begin(refreshTime, OnBossCoolDownCompleted); m_CoolDown.Begin((int)(refreshTime - TimeUtility.ServerNow).TotalSeconds, OnBossCoolDownCompleted); } else { System/DogzDungeon/DogzDungeonModel.cs
@@ -396,7 +396,7 @@ public void UpdateBoxRefreshTime(int _seconds) { refreshTime = DateTime.Now + new TimeSpan(_seconds * TimeSpan.TicksPerSecond); refreshTime = TimeUtility.ServerNow + new TimeSpan(_seconds * TimeSpan.TicksPerSecond); if (refreshTimeEvent != null) { refreshTimeEvent(); @@ -428,7 +428,7 @@ public void UpdateEliteRefreshTime(int _seconds) { refreshTime = DateTime.Now + new TimeSpan(_seconds * TimeSpan.TicksPerSecond); refreshTime = TimeUtility.ServerNow + new TimeSpan(_seconds * TimeSpan.TicksPerSecond); if (refreshTimeEvent != null) { refreshTimeEvent(); System/Dungeon/DungeonBossBriefInfoBehaviour.cs
@@ -57,7 +57,7 @@ { if (!bossInfo.IsBossAlive()) { m_RebornTime.Begin(bossInfo.refreshTime); m_RebornTime.Begin((int)(bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds); } else { @@ -92,7 +92,7 @@ } } var rebornAtOnce = bossInfo.refreshTime < DateTime.Now && !isAlive; var rebornAtOnce = bossInfo.refreshTime < TimeUtility.ServerNow && !isAlive; if (rebornAtOnce) { System/Dungeon/TrialDungeonModel.cs
@@ -22,12 +22,19 @@ bool serverInited = false; public const int TRIALEXCHANGE_GUIDE = 91; int m_TrialExchangeRemindLevel = 250; public int trialExchangeRemindLevel { get { return m_TrialExchangeRemindLevel; } } public override void Init() { ParseConfig(); packModel.RefreshItemCountAct += RefreshItemCountAct; FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent; dungeonModel.dungeonRecordChangeEvent += DungeonRecordChangeEvent; PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent; } private void DungeonRecordChangeEvent(int _dungeonId) @@ -105,10 +112,27 @@ dict.Add(trialRewards[i].grade, items); } } funcConfig = Config.Instance.Get<FuncConfigConfig>("MunekadoRedPoint"); if (funcConfig != null) { m_TrialExchangeRemindLevel = int.Parse(funcConfig.Numerical1); } } public override void UnInit() { PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent; } private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType) { if (refreshType == PlayerDataRefresh.LV || refreshType == PlayerDataRefresh.LV2 || refreshType == PlayerDataRefresh.LVEx) { UpdateRedpoint(); } } private void RefreshItemCountAct(PackType packType, int arg2, int itemId) @@ -359,7 +383,8 @@ void UpdateRedpoint() { dailyQuestModel.trialExchangeRedpoint.state = RedPointState.None; if (!FuncOpen.Instance.IsFuncOpen(88)) if (!FuncOpen.Instance.IsFuncOpen(88) || PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel) { return; } @@ -444,6 +469,10 @@ public bool IsAnySatisfyExchangeBetter(int _itemId) { if (PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel) { return false; } if (!trialTokens.Contains(_itemId)) { return false; System/Dungeon/TrialExchangeBehaviour.cs
@@ -120,7 +120,8 @@ m_Down.gameObject.SetActive(equipCompare == -1); var exchangeItemConfig = Config.Instance.Get<ItemConfig>(model.GetExchangeItemByJob(config)); m_Redpoint.gameObject.SetActive(count >= config.tokenCount && (equipBetter || exchangeItemConfig.EquipPlace == 0)); m_Redpoint.gameObject.SetActive(count >= config.tokenCount && (equipBetter || exchangeItemConfig.EquipPlace == 0) && PlayerDatas.Instance.baseData.LV < model.trialExchangeRemindLevel); } } } System/FindPrecious/DemonJarBossRebornCoolDown.cs
@@ -48,8 +48,8 @@ if (!bossInfo.IsBossAlive()) { m_Timer.Begin(bossInfo.refreshTime); m_Timer.timeShow.color = demonJarModel.GetSurplusTimes() > 0 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red); m_Timer.Begin((int)(bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds); m_Timer.timeShow.color = UIHelper.GetUIColor(demonJarModel.GetSurplusTimes() > 0 ? TextColType.Green : TextColType.Red); } } else @@ -60,7 +60,7 @@ private void OnDungeonRecodChange(int _dataMapId) { m_Timer.timeShow.color = demonJarModel.GetSurplusTimes() > 0 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red); m_Timer.timeShow.color = UIHelper.GetUIColor(demonJarModel.GetSurplusTimes() > 0 ? TextColType.Green : TextColType.Red); } } System/FindPrecious/DemonJarWin.cs
@@ -310,7 +310,7 @@ if (dungeonModel.TryGetCountRemainTime(DemonJarModel.DEMONJAR_MAPID, out endTime)) { m_CountRemainTime.gameObject.SetActive(true); m_CountRemainTime.Begin(endTime); m_CountRemainTime.Begin((int)(endTime - TimeUtility.ServerNow).TotalSeconds); } else { System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
@@ -51,7 +51,7 @@ FindPreciousModel.BossInfo bossInfo = null; if (findPreciousModel.TryGetBossInfo(bossId, out bossInfo)) { return !findPreciousModel.IsBossAlive(bossId) && DateTime.Now > bossInfo.refreshTime; return !findPreciousModel.IsBossAlive(bossId) && TimeUtility.ServerNow > bossInfo.refreshTime; } else { @@ -142,13 +142,13 @@ FindPreciousModel.BossInfo bossInfo; if (findPreciousModel.TryGetBossInfo(bossId, out bossInfo) && !bossInfo.IsBossAlive()) { if (DateTime.Now > bossInfo.refreshTime) if (TimeUtility.ServerNow > bossInfo.refreshTime) { m_CoolDown.gameObject.SetActive(false); } else { m_CoolDown.Begin(bossInfo.refreshTime, OnBossCoolDownCompleted); m_CoolDown.Begin((int)(bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds, OnBossCoolDownCompleted); } } else System/FindPrecious/FindPreciousModel.cs
@@ -189,7 +189,7 @@ } else { if ((bossInfos[bossId].refreshTime - DateTime.Now).TotalSeconds < PREPOSE_SECONDS) if ((bossInfos[bossId].refreshTime - TimeUtility.ServerNow).TotalSeconds < PREPOSE_SECONDS) { AddOneBossRebornNotify(bossId); } @@ -484,7 +484,7 @@ } else { if (IsBossAlive(bossId) || (bossInfos[bossId].refreshTime - DateTime.Now).TotalSeconds < PREPOSE_SECONDS) if (IsBossAlive(bossId) || (bossInfos[bossId].refreshTime - TimeUtility.ServerNow).TotalSeconds < PREPOSE_SECONDS) { AddOneBossRebornNotify(bossId); } @@ -526,7 +526,7 @@ } } refreshTime = DateTime.Now + new TimeSpan(_bossInfo.RefreshSecond * TimeSpan.TicksPerSecond); refreshTime = TimeUtility.ServerNow + new TimeSpan(_bossInfo.RefreshSecond * TimeSpan.TicksPerSecond); } public bool IsBossAlive() System/FindPrecious/FindPreciousTimer.cs
@@ -51,7 +51,7 @@ for (int i = bossIds.Count - 1; i >= 0; i--) { var clock = clocks[bossIds[i]]; if ((clock.rebornTime - DateTime.Now).TotalSeconds < FindPreciousModel.PREPOSE_SECONDS) if ((clock.rebornTime - TimeUtility.ServerNow).TotalSeconds < FindPreciousModel.PREPOSE_SECONDS) { clocks.Remove(bossIds[i]); bossIds.RemoveAt(i); @@ -68,7 +68,7 @@ private bool IsValidClockSetting(DateTime _rebornTime) { return (_rebornTime - DateTime.Now).TotalSeconds >= FindPreciousModel.PREPOSE_SECONDS; return (_rebornTime - TimeUtility.ServerNow).TotalSeconds >= FindPreciousModel.PREPOSE_SECONDS; } public class BossRebornClock System/KnapSack/New/BatchUseModel.cs
System/Login/GameNotice.cs
@@ -9,10 +9,22 @@ public static void OpenGameNotice() { #if !UNITY_EDITOR var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch); try { var url = string.Empty; if (VersionUtility.Instance.versionInfo != null) { url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch); } if (!string.IsNullOrEmpty(url) && !noticeShowed) { SDKUtility.Instance.OpenUrl(url); noticeShowed = true; } } catch (System.Exception ex) { noticeShowed = true; } #endif @@ -21,8 +33,22 @@ public static bool HasNotice() { #if !UNITY_EDITOR try { if (VersionUtility.Instance.versionInfo!=null ) { var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch); return !string.IsNullOrEmpty(url); } else { return false; } } catch (System.Exception ex) { return false; } #else return false; #endif @@ -31,11 +57,23 @@ public static void OpenGameNoticeForce() { #if !UNITY_EDITOR var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch); try { var url = string.Empty; if (VersionUtility.Instance.versionInfo != null) { url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch); } if (!string.IsNullOrEmpty(url) ) { SDKUtility.Instance.OpenUrl(url); } } catch (System.Exception ex) { Debug.Log(ex); } #endif } System/Login/LoginModel.cs
@@ -278,6 +278,8 @@ send.Extra = ""; break; case VersionAuthority.Release: send.ExtraLen = 0; send.Extra = ""; if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Free) { send.IDType = 1; System/OpenServerActivity/FlashSaleCoolDown.cs
@@ -84,7 +84,7 @@ void DisplayTime(int seconds) { m_Time.timeShow.color = seconds > 3600 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red); m_Time.Begin(DateTime.Now.AddTicks(seconds * TimeSpan.TicksPerSecond)); m_Time.Begin(seconds); } void DisplayAdvance(int seconds) System/Rune/RuneModel.cs
@@ -1105,6 +1105,40 @@ return false; } public void IsSameRune(int id, ref List<int> sameHoles) { sameHoles.Clear(); var _runeConfig = Config.Instance.Get<RuneConfig>(id); if (_runeConfig == null) { return; } for (int i = 0; i < _runeConfig.AttrType.Length; i++) { var sameHole = SameRuneHole(_runeConfig.AttrType[i]); if (sameHole != -1) { sameHoles.Add(sameHole); } } } public int SameRuneHole(int type) { foreach (int key in runeHoleData.Keys) { RuneConfig _runeCfg = Config.Instance.Get<RuneConfig>(runeHoleData[key].id); for (int i = 0; i < _runeCfg.AttrType.Length; i++) { if (type == _runeCfg.AttrType[i]) { return key; } } } return -1; } public int GetOpenTowerCnt(bool includeSpecial = false) { int Cnt = 0; System/Rune/RunePackCell.cs
@@ -79,12 +79,32 @@ MessageWin.Inst.ShowFixedTip(Language.Get("L1061")); return; } var sltHoleRune = model.GetHoleRune(model.sltRuneHole); bool switchOtherSameHole = false; List<int> sameHoles = new List<int>(); if (sltHoleRune == null || runeComposeModel.m_RuneBothPropertys.Contains(sltHoleRune.id) || !runeComposeModel.m_RuneBothPropertys.Contains(_rune.id)) { if (model.IsSameInHoleRune(_rune.id, model.sltRuneHole)) { MessageWin.Inst.ShowFixedTip(Language.Get("L1078")); return; } var sltHoleRune = model.GetHoleRune(model.sltRuneHole); } else { model.IsSameRune(_rune.id, ref sameHoles); if (sameHoles.Count > 0 && !sameHoles.Contains(model.sltRuneHole)) { MessageWin.Inst.ShowFixedTip(Language.Get("L1078")); return; } if (sameHoles.Count > 1) { switchOtherSameHole = true; } } if (runeComposeModel.m_RuneBothPropertys.Contains(_rune.id) && model.GetDoublePropLimitCount() <= model.GetCurrentDoublePropCount() && (sltHoleRune == null || !runeComposeModel.m_RuneBothPropertys.Contains(sltHoleRune.id))) @@ -93,14 +113,37 @@ SysNotifyMgr.Instance.ShowTip("RuneGridUnEnough", _count); return; } C073D_tagCPackItemExchange runeInlayPack = new C073D_tagCPackItemExchange(); runeInlayPack.SrcBackpack = (byte)_rune.packtype; runeInlayPack.SrcIndex = (ushort)_rune.index; runeInlayPack.DesBackPack = (int)PackType.rptInterimPack; runeInlayPack.DestIndex = (ushort)model.sltRuneHole; GameNetSystem.Instance.SendInfo(runeInlayPack); if (switchOtherSameHole) { var otherSameHole = sameHoles[0] == model.sltRuneHole ? sameHoles[1] : sameHoles[0]; var otherRune = model.GetHoleRune(otherSameHole); ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("SwitchDoublePropertyRune"), (bool isOk) => { if (isOk) { SwitchRune(otherRune.packtype, otherSameHole, _rune.packtype, 0); SwitchRune(_rune.packtype, _rune.index, (int)PackType.rptInterimPack, model.sltRuneHole); WindowCenter.Instance.CloseImmediately<RunePackWin>(); } }); } else { SwitchRune(_rune.packtype, _rune.index, (int)PackType.rptInterimPack, model.sltRuneHole); WindowCenter.Instance.CloseImmediately<RunePackWin>(); } } void SwitchRune(int srcpackType,int scrIndex,int destpackType,int destIndex) { C073D_tagCPackItemExchange pak = new C073D_tagCPackItemExchange(); pak.SrcBackpack = (byte)srcpackType; pak.SrcIndex = (ushort)scrIndex; pak.DesBackPack = (byte)destpackType; pak.DestIndex = (ushort)destIndex; GameNetSystem.Instance.SendInfo(pak); } } } System/Strengthening/EquipWashModel.cs
@@ -44,9 +44,13 @@ public delegate void OnRefreshWashModel(); public event OnRefreshWashModel RefreshWashModelEvent; public int[] washGroups1 { get; private set; } public int[] washGroups2 { get; private set; } public int[] washGroups3 { get; private set; } private Dictionary<int, WashProCount> washEquipProDict = new Dictionary<int, WashProCount>(); private FuncConfigConfig funcModel; private Dictionary<int, int> _equipWashLimitDict; private Dictionary<int, Dictionary<int, int>> _equipWashLimitDict = new Dictionary<int, Dictionary<int, int>>(); private List<WashProCount> orderWashProlist = new List<WashProCount>(); PlayerPackModel _playerPack; PlayerPackModel playerPack @@ -88,10 +92,31 @@ public override void Init() { _equipWashLimitDict = null; funcModel = Config.Instance.Get<FuncConfigConfig>("EquipWashMaxLV"); if (funcModel != null) _equipWashLimitDict = ConfigParse.GetDic<int, int>(funcModel.Numerical1); _equipWashLimitDict.Clear(); FuncConfigConfig washGroup1Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup1"); FuncConfigConfig washGroup2Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup2"); FuncConfigConfig washGroup3Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup3"); washGroups1 = ConfigParse.GetMultipleStr<int>(washGroup1Model.Numerical1); washGroups2 = ConfigParse.GetMultipleStr<int>(washGroup2Model.Numerical1); washGroups3 = ConfigParse.GetMultipleStr<int>(washGroup3Model.Numerical1); SetEquipWashMaxLV(washGroups1, washGroup1Model.Numerical2); SetEquipWashMaxLV(washGroups2, washGroup2Model.Numerical2); SetEquipWashMaxLV(washGroups3, washGroup3Model.Numerical2); } private void SetEquipWashMaxLV(int[] groups,string limit) { Dictionary<int,int> limitDict = ConfigParse.GetDic<int, int>(limit); if (groups != null && limitDict != null) { for (int i = 0; i < groups.Length; i++) { if (!_equipWashLimitDict.ContainsKey(groups[i])) { _equipWashLimitDict.Add(groups[i], limitDict); } } } } public override void UnInit() @@ -302,28 +327,22 @@ //得到洗练群组类型 public int OnGetWashType(int itemPlace) { FuncConfigConfig washGroup1Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup1"); FuncConfigConfig washGroup2Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup2"); FuncConfigConfig washGroup3Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup3"); int[] _equipPlacelist1 = ConfigParse.GetMultipleStr<int>(washGroup1Model.Numerical1); int[] _equipPlacelist2 = ConfigParse.GetMultipleStr<int>(washGroup2Model.Numerical1); int[] _equipPlacelist3 = ConfigParse.GetMultipleStr<int>(washGroup3Model.Numerical1); int i = 0; for (i = 0; i < _equipPlacelist1.Length; i++) for (i = 0; i < washGroups1.Length; i++) { if (_equipPlacelist1[i] == itemPlace) if (washGroups1[i] == itemPlace) return 1; } for (i = 0; i < _equipPlacelist2.Length; i++) for (i = 0; i < washGroups2.Length; i++) { if (_equipPlacelist2[i] == itemPlace) if (washGroups2[i] == itemPlace) return 2; } for (i = 0; i < _equipPlacelist3.Length; i++) for (i = 0; i < washGroups3.Length; i++) { if (_equipPlacelist3[i] == itemPlace) if (washGroups3[i] == itemPlace) return 3; } return 0; @@ -391,16 +410,31 @@ /// </summary> /// <param name="equipLv"></param> /// <returns></returns> public int GetWashFullLv(int equipLv) public int GetWashFullLv(int equipPlace,int equipLv) { if (_equipWashLimitDict == null) return 0; if (_equipWashLimitDict.ContainsKey(equipLv)) return _equipWashLimitDict[equipLv]; else if (_equipWashLimitDict.ContainsKey(equipPlace)) { if(_equipWashLimitDict[equipPlace].ContainsKey(equipLv)) { return _equipWashLimitDict[equipPlace][equipLv]; } } return 0; } public int GetEquipWashMinLv(int equipPlace) { if (_equipWashLimitDict.ContainsKey(equipPlace)) { List<int> lvlist = _equipWashLimitDict[equipPlace].Keys.ToList(); if (lvlist != null && lvlist.Count > 0) { return lvlist[0]; } } return 0; } /// <summary> /// 判断当前装备是否洗练满阶 @@ -413,7 +447,7 @@ return false; chinItemModel = Config.Instance.Get<ItemConfig>((int)model.itemInfo.ItemID); int fullLv = GetWashFullLv(chinItemModel.LV); int fullLv = GetWashFullLv(chinItemModel.EquipPlace,chinItemModel.LV); if (washPro.XLAttrLV == fullLv) { if (washPro.proValuelist[0].XLAttrValue < tagEquipWash.attMax1) @@ -443,41 +477,37 @@ public bool IsCanWash(ItemModel model) { if (model == null || _equipWashLimitDict == null) if (model == null) return false; chinItemModel = Config.Instance.Get<ItemConfig>((int)model.itemInfo.ItemID); int[] equipLvs = _equipWashLimitDict.Keys.ToArray(); if (chinItemModel.LV >= equipLvs[0]) return true; else return false; } public int WashMinLV() if(chinItemModel.LV >= GetEquipWashMinLv(chinItemModel.EquipPlace)) { if (_equipWashLimitDict == null) return -1; int[] equipLvs = _equipWashLimitDict.Keys.ToArray(); return equipLvs[0]; return true; } return false; } /// <summary> /// 得到装备位最大洗练等级 /// </summary> /// <returns></returns> public int GetMaxWashLv() public int GetMaxWashLv(int equipPlace) { if (_equipWashLimitDict == null) if (_equipWashLimitDict.ContainsKey(equipPlace)) { List<int> washLvlist = _equipWashLimitDict[equipPlace].Values.ToList(); if (washLvlist != null && washLvlist.Count > 0) { return washLvlist[washLvlist.Count - 1]; } } return 0; int[] washLvs = _equipWashLimitDict.Values.ToArray(); return washLvs[washLvs.Length - 1]; } public string GetCurWashLvStr(WashProCount washPro, EquipWashConfig tagEquipWash) { int maxWashLv = GetMaxWashLv(); int maxWashLv = GetMaxWashLv(washPro.EquipPlace); if (washPro.XLAttrLV < maxWashLv) { System/Strengthening/WashTips.cs
@@ -490,14 +490,14 @@ { if (equipWashModel.IsWashFull(_itemModel, _washProModel, _tagWashModel)) { if(_washProModel.XLAttrLV >= equipWashModel.GetMaxWashLv() && _washProModel.XLAttrLV <= equipWashModel.GetWashFullLv(_itemModel.chinItemModel.LV)) if(_washProModel.XLAttrLV >= equipWashModel.GetMaxWashLv(_itemModel.chinItemModel.EquipPlace) && _washProModel.XLAttrLV <= equipWashModel.GetWashFullLv(_itemModel.chinItemModel.EquipPlace, _itemModel.chinItemModel.LV)) { _washFullLvText.text = Language.Get("WashLevelFulled"); } else { _washFullLvText.text = Language.Get("EquipWash113", _itemModel.chinItemModel.LV, equipWashModel.GetWashFullLv(_itemModel.chinItemModel.LV)); _washFullLvText.text = Language.Get("EquipWash113", _itemModel.chinItemModel.LV, equipWashModel.GetWashFullLv(_itemModel.chinItemModel.EquipPlace, _itemModel.chinItemModel.LV)); } ObjHideOrShow(false, false, false, false, true); } @@ -536,7 +536,7 @@ } else { _washFullLvText.text = Language.Get("EquipWash114", equipWashModel.WashMinLV()); _washFullLvText.text = Language.Get("EquipWash114", equipWashModel.GetEquipWashMinLv(_itemModel.chinItemModel.EquipPlace)); ObjHideOrShow(false, false, false, false, true); } System/Team/MyTeamWin.cs
@@ -412,7 +412,7 @@ m_MatchState.text = model.isMatching ? Language.Get("StopMatching") : Language.Get("TeamListAutoMatching"); if (model.isMatching) { m_MatchingCoolDown.Begin(model.matchingEndTime); m_MatchingCoolDown.Begin((int)(model.matchingEndTime - DateTime.Now).TotalSeconds); } else { System/Vip/LimitedTimePackageTime.cs
@@ -7,9 +7,11 @@ using UnityEngine.UI; using System; namespace Snxxz.UI { namespace Snxxz.UI { public class LimitedTimePackageTime:MonoBehaviour { public class LimitedTimePackageTime : MonoBehaviour { [SerializeField] TimerBehaviour m_Time; [SerializeField] RectTransform m_ContainerAdvance; @@ -83,7 +85,7 @@ void DisplayTime(int seconds) { m_Time.timeShow.color = seconds > 3600 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red); m_Time.Begin(DateTime.Now.AddTicks(seconds * TimeSpan.TicksPerSecond)); m_Time.Begin(seconds); } void DisplayAdvance(int seconds) { System/Welfare/OperationTimeHepler.cs
@@ -310,6 +310,7 @@ operation.startDate = ParseOperationDate(package.StartDate); operation.endDate = ParseOperationDate(package.EndtDate); operation.limitLv = package.LimitLV; operation.resetType = package.ResetType; if (operationTimeUpdateEvent != null) { operationTimeUpdateEvent(Operation.FairyCeremony); System/WindowJump/WindowJumpMgr.cs
@@ -87,280 +87,8 @@ public void WindowJumpTo(JumpUIType jumpType) { _tagWinSearchModel = Config.Instance.Get<WindowSearchConfig>((int)jumpType); if (_tagWinSearchModel == null) { return; } if (!FuncOpen.Instance.IsFuncOpen(_tagWinSearchModel.Lv) && _tagWinSearchModel.Lv != 0) { FuncOpen.Instance.ProcessorFuncErrorTip(_tagWinSearchModel.Lv); return; } switch (jumpType) { case JumpUIType.UnionFunc1: case JumpUIType.UnionFunc2: case JumpUIType.UnionWarehouse: case JumpUIType.UnionHall: case JumpUIType.UnionTask: case JumpUIType.UnionTask2: case JumpUIType.UnionActive1: case JumpUIType.UnionActive2: case JumpUIType.UnionBoss: if (!PlayerDatas.Instance.fairyData.HasFairy) { SysNotifyMgr.Instance.ShowTip("DailyQuestwinUnionLimit"); return; } break; case JumpUIType.UnionMethod: if (!fairyModel.fairyMethodToOpen) { fairyModel.ProcessMethodToErrorTip(); return; } break; case JumpUIType.UnionStore: if (!fairyModel.fairyStoreOpen) { fairyModel.ProcessErrorTip(); return; } break; case JumpUIType.BigMap: if(!mapModel.CanOpenLocalMapWin(PlayerDatas.Instance.baseData.MapID)) { SysNotifyMgr.Instance.ShowTip("MapInfo1"); return; } break; case JumpUIType.TreasureFindHostFunc1: case JumpUIType.TreasureFindHostFunc2: case JumpUIType.TreasureFindHostFunc3: case JumpUIType.TreasureFindHostFunc1Type2: case JumpUIType.TreasureFindHostFunc2Type2: case JumpUIType.TreasureFindHostFunc3Type2: bool isUnlock = hostModel.IsUnlockTreasure(int.Parse(_tagWinSearchModel.SelectActive)); if (!isUnlock) { hostModel.jumpTreasureId = 0; return; } break; case JumpUIType.FirstRecharge: var model = ModelCenter.Instance.GetModel<VipModel>(); if (model.firstChargeRewardGet) { model.AreadyGetFirstRecharge(); return; } break; case JumpUIType.XMZZBattle: case JumpUIType.AncientBattle: case JumpUIType.IceCrystal: case JumpUIType.FairyLand: DailyQuestConfig dailyConfig = Config.Instance.Get<DailyQuestConfig>(_tagWinSearchModel.SelectActive); if (dailyQuestModel.GetQuestState(dailyConfig.ID) != DailyQuestModel.DailyQuestState.Normal) { SysNotifyMgr.Instance.ShowTip("FBIsNotOpen"); return; } break; case JumpUIType.PlotTaskFunc3: var taskmodel = ModelCenter.Instance.GetModel<PlayerTaskDatas>(); if (taskmodel.SideQuestsDic.Count < 1) { SysNotifyMgr.Instance.ShowTip("SideQuest_None"); return; } break; case JumpUIType.PrayforDrug: var prayModel = ModelCenter.Instance.GetModel<PrayForDurgModel>(); if(!prayModel.CheckPrayDrugIsOpen()) { return; } break; case JumpUIType.FaBaoSoul_BenYuan: case JumpUIType.FaBaoSoul_FengMo: case JumpUIType.FaBaoSoul_Strength: case JumpUIType.FaBaoSoul_Rune: case JumpUIType.FaBaoSoul_Mount: case JumpUIType.FaBaoSoul_Pet: case JumpUIType.FaBaoSoul_Boss: case JumpUIType.FaBaoSoul_Wings: case JumpUIType.FaBaoSoul_Suit: case JumpUIType.FaBaoSoul_Wash: var soulId = 0; if (int.TryParse(_tagWinSearchModel.SelectActive, out soulId)) { var soulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>(); if (!soulModel.IsOpenTreasureSoul(soulId)) { return; } } else { return; } break; case JumpUIType.TrialExchange: if (!trialDungeonModel.CompleteTrialFloor(0)) { trialDungeonModel.ProcessOpenTrialExchangeError(); return; } break; case JumpUIType.Kylin: case JumpUIType.Kylin1: case JumpUIType.Kylin2: case JumpUIType.Kylin3: case JumpUIType.Kylin4: case JumpUIType.Kylin5: case JumpUIType.Kylin6: if (!FuncOpen.Instance.IsFuncOpen(85)) { FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.Kylin); return; } break; case JumpUIType.OpenServerMountRank: var type = int.Parse(_tagWinSearchModel.SelectActive); if (rankModel.IsLock(type)) { SysNotifyMgr.Instance.ShowTip("InOperationTimeError"); return; } if (TimeUtility.OpenDay >= rankModel.openServerActivityDays) { SysNotifyMgr.Instance.ShowTip("ActiveOutTime"); return; } break; case JumpUIType.FlashSale: { if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { OperationTimeHepler.Instance.ProcessConditionError(Operation.FlashSale); return; } } break; case JumpUIType.ConsumreRebate: { if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { OperationTimeHepler.Instance.ProcessConditionError(Operation.ConsumeRebate); return; } } break; case JumpUIType.LimitedTimePackage: { if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { OperationTimeHepler.Instance.ProcessConditionError(Operation.GiftPackage); return; } } break; case JumpUIType.BossReborn: { if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { OperationTimeHepler.Instance.ProcessConditionError(Operation.BossReborn); return; } } break; case JumpUIType.VipRechargeFunc3: { if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { ModelCenter.Instance.GetModel<FairyJadeInvestmentModel>().MessageNotification(); return; } } break; case JumpUIType.VipRechargeFunc5: if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { return; } break; case JumpUIType.OpenServerRank: case JumpUIType.OSTimeLimitGift: case JumpUIType.OpenServerActivityFunc2_1: case JumpUIType.OpenServerActivityFunc2_2: if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { SysNotifyMgr.Instance.ShowTip("ActiveOutTime"); return; } break; case JumpUIType.OpenServerGift1: case JumpUIType.OpenServerGift2: case JumpUIType.OpenServerGift3: var giftModel = ModelCenter.Instance.GetModel<OSGiftModel>(); int giftId = 0; int.TryParse(_tagWinSearchModel.SelectActive, out giftId); if (!giftModel.CheckActivate()) { if (PlayerDatas.Instance.baseData.coinPointTotal <= 0 || !ModelCenter.Instance.GetModel<VipModel>().firstChargeRewardGet) { SysNotifyMgr.Instance.ShowTip("GiftNoOpen"); } else if (giftModel.IsGiftBuy(giftId)) { SysNotifyMgr.Instance.ShowTip("GiftAlreadyBuy"); } else if (giftModel.IsGiftOverdue(giftId)) { SysNotifyMgr.Instance.ShowTip("MissSell"); } return; } break; case JumpUIType.OpenServerGift: return; case JumpUIType.EquipCompose1: case JumpUIType.EquipCompose2: case JumpUIType.EquipCompose3: case JumpUIType.EquipCompose4: case JumpUIType.ComposeTicketFairy: case JumpUIType.ComposeTicketGod: case JumpUIType.ComposeTicketIce: int[] types = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive); if (types.Length > 0) { if (!composeModel.CheckIsComposeByType(_tagWinSearchModel.TABID+1,types[0],types[1])) { return; } } break; case JumpUIType.CeremonyRecharge: case JumpUIType.CeremonyFire: case JumpUIType.CeremonyPeopleToHi: case JumpUIType.CeremonyOutof: if (!OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony)) { SysNotifyMgr.Instance.ShowTip("InOperationTimeError"); return; } break; } if (!CheckIsJump(jumpType)) return; DebugEx.Log("WindowJumpTo" + jumpType); GetPreAllOpenWin(); #region 条件判段 switch (jumpType) { @@ -868,6 +596,286 @@ } private bool CheckIsJump(JumpUIType jumpType) { _tagWinSearchModel = Config.Instance.Get<WindowSearchConfig>((int)jumpType); if (_tagWinSearchModel == null) { return false; } if (!FuncOpen.Instance.IsFuncOpen(_tagWinSearchModel.Lv) && _tagWinSearchModel.Lv != 0) { FuncOpen.Instance.ProcessorFuncErrorTip(_tagWinSearchModel.Lv); return false; } switch (jumpType) { case JumpUIType.UnionFunc1: case JumpUIType.UnionFunc2: case JumpUIType.UnionWarehouse: case JumpUIType.UnionHall: case JumpUIType.UnionTask: case JumpUIType.UnionTask2: case JumpUIType.UnionActive1: case JumpUIType.UnionActive2: case JumpUIType.UnionBoss: if (!PlayerDatas.Instance.fairyData.HasFairy) { SysNotifyMgr.Instance.ShowTip("DailyQuestwinUnionLimit"); return false; } break; case JumpUIType.UnionMethod: if (!fairyModel.fairyMethodToOpen) { fairyModel.ProcessMethodToErrorTip(); return false; } break; case JumpUIType.UnionStore: if (!fairyModel.fairyStoreOpen) { fairyModel.ProcessErrorTip(); return false; } break; case JumpUIType.BigMap: if (!mapModel.CanOpenLocalMapWin(PlayerDatas.Instance.baseData.MapID)) { SysNotifyMgr.Instance.ShowTip("MapInfo1"); return false; } break; case JumpUIType.TreasureFindHostFunc1: case JumpUIType.TreasureFindHostFunc2: case JumpUIType.TreasureFindHostFunc3: case JumpUIType.TreasureFindHostFunc1Type2: case JumpUIType.TreasureFindHostFunc2Type2: case JumpUIType.TreasureFindHostFunc3Type2: bool isUnlock = hostModel.IsUnlockTreasure(int.Parse(_tagWinSearchModel.SelectActive)); if (!isUnlock) { hostModel.jumpTreasureId = 0; return false; } break; case JumpUIType.FirstRecharge: var model = ModelCenter.Instance.GetModel<VipModel>(); if (model.firstChargeRewardGet) { model.AreadyGetFirstRecharge(); return false; } break; case JumpUIType.XMZZBattle: case JumpUIType.AncientBattle: case JumpUIType.IceCrystal: case JumpUIType.FairyLand: DailyQuestConfig dailyConfig = Config.Instance.Get<DailyQuestConfig>(_tagWinSearchModel.SelectActive); if (dailyQuestModel.GetQuestState(dailyConfig.ID) != DailyQuestModel.DailyQuestState.Normal) { SysNotifyMgr.Instance.ShowTip("FBIsNotOpen"); return false; } break; case JumpUIType.PlotTaskFunc3: var taskmodel = ModelCenter.Instance.GetModel<PlayerTaskDatas>(); if (taskmodel.SideQuestsDic.Count < 1) { SysNotifyMgr.Instance.ShowTip("SideQuest_None"); return false; } break; case JumpUIType.PrayforDrug: var prayModel = ModelCenter.Instance.GetModel<PrayForDurgModel>(); if (!prayModel.CheckPrayDrugIsOpen()) { return false; } break; case JumpUIType.FaBaoSoul_BenYuan: case JumpUIType.FaBaoSoul_FengMo: case JumpUIType.FaBaoSoul_Strength: case JumpUIType.FaBaoSoul_Rune: case JumpUIType.FaBaoSoul_Mount: case JumpUIType.FaBaoSoul_Pet: case JumpUIType.FaBaoSoul_Boss: case JumpUIType.FaBaoSoul_Wings: case JumpUIType.FaBaoSoul_Suit: case JumpUIType.FaBaoSoul_Wash: var soulId = 0; if (int.TryParse(_tagWinSearchModel.SelectActive, out soulId)) { var soulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>(); if (!soulModel.IsOpenTreasureSoul(soulId)) { return false; } } else { return false; } break; case JumpUIType.TrialExchange: if (!trialDungeonModel.CompleteTrialFloor(0)) { trialDungeonModel.ProcessOpenTrialExchangeError(); return false; } break; case JumpUIType.Kylin: case JumpUIType.Kylin1: case JumpUIType.Kylin2: case JumpUIType.Kylin3: case JumpUIType.Kylin4: case JumpUIType.Kylin5: case JumpUIType.Kylin6: if (!FuncOpen.Instance.IsFuncOpen(85)) { FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.Kylin); return false; } break; case JumpUIType.OpenServerMountRank: var type = int.Parse(_tagWinSearchModel.SelectActive); if (rankModel.IsLock(type)) { SysNotifyMgr.Instance.ShowTip("InOperationTimeError"); return false; } if (TimeUtility.OpenDay >= rankModel.openServerActivityDays) { SysNotifyMgr.Instance.ShowTip("ActiveOutTime"); return false; } break; case JumpUIType.FlashSale: { if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { OperationTimeHepler.Instance.ProcessConditionError(Operation.FlashSale); return false; } } break; case JumpUIType.ConsumreRebate: { if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { OperationTimeHepler.Instance.ProcessConditionError(Operation.ConsumeRebate); return false; } } break; case JumpUIType.LimitedTimePackage: { if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { OperationTimeHepler.Instance.ProcessConditionError(Operation.GiftPackage); return false; } } break; case JumpUIType.BossReborn: { if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { OperationTimeHepler.Instance.ProcessConditionError(Operation.BossReborn); return false; } } break; case JumpUIType.VipRechargeFunc3: { if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { ModelCenter.Instance.GetModel<FairyJadeInvestmentModel>().MessageNotification(); return false; } } break; case JumpUIType.VipRechargeFunc5: if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { return false; } break; case JumpUIType.OpenServerRank: case JumpUIType.OSTimeLimitGift: case JumpUIType.OpenServerActivityFunc2_1: case JumpUIType.OpenServerActivityFunc2_2: if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID)) { SysNotifyMgr.Instance.ShowTip("ActiveOutTime"); return false; } break; case JumpUIType.OpenServerGift1: case JumpUIType.OpenServerGift2: case JumpUIType.OpenServerGift3: var giftModel = ModelCenter.Instance.GetModel<OSGiftModel>(); int giftId = 0; int.TryParse(_tagWinSearchModel.SelectActive, out giftId); if (!giftModel.CheckActivate()) { if (PlayerDatas.Instance.baseData.coinPointTotal <= 0 || !ModelCenter.Instance.GetModel<VipModel>().firstChargeRewardGet) { SysNotifyMgr.Instance.ShowTip("GiftNoOpen"); } else if (giftModel.IsGiftBuy(giftId)) { SysNotifyMgr.Instance.ShowTip("GiftAlreadyBuy"); } else if (giftModel.IsGiftOverdue(giftId)) { SysNotifyMgr.Instance.ShowTip("MissSell"); } return false; } break; case JumpUIType.OpenServerGift: return false; case JumpUIType.EquipCompose1: case JumpUIType.EquipCompose2: case JumpUIType.EquipCompose3: case JumpUIType.EquipCompose4: case JumpUIType.ComposeTicketFairy: case JumpUIType.ComposeTicketGod: case JumpUIType.ComposeTicketIce: int[] types = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive); if (types.Length > 0) { if (!composeModel.CheckIsComposeByType(_tagWinSearchModel.TABID + 1, types[0], types[1])) { return false; } } break; case JumpUIType.CeremonyRecharge: case JumpUIType.CeremonyFire: case JumpUIType.CeremonyPeopleToHi: case JumpUIType.CeremonyOutof: if (!OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony)) { SysNotifyMgr.Instance.ShowTip("InOperationTimeError"); return false; } break; } return true; } private void CheckJumpWin<T>(int _functionalOrder = 0, bool _forceSync = true) where T : Window { string curOpenWin = typeof(T).Name; } private void GotoNormalDungeon(int _dailyQuestId, int _lineId = 0) { var config = Config.Instance.Get<DailyQuestConfig>(_dailyQuestId); @@ -902,26 +910,20 @@ SetJumpLogic<MultipleDifficultyDungeonWin>(0); } private void SetJumpLogic<T>(int _functionalOrder = 0, bool _forceSync = true) where T : Window { string curOpenWin = typeof(T).Name; if(jumpWinNameDict.ContainsKey(jumpPhase - 1)) if (WindowCenter.Instance.IsOpen(curOpenWin)) { if(jumpWinNameDict[jumpPhase - 1] != curOpenWin) { Window window = WindowCenter.Instance.Get(curOpenWin); window.functionOrder = _functionalOrder; window.ChildActive(); return; } GetPreAllOpenWin(); jumpWinNameDict.Add(jumpPhase, curOpenWin); } else { openWindows[jumpPhase].Clear(); jumpPhase -= 1; } } else { jumpWinNameDict.Add(jumpPhase, curOpenWin); } jumpType = _tagWinSearchModel.Type; switch (_tagWinSearchModel.Type) { @@ -973,6 +975,10 @@ case 1: case 4: openWinlist = openWindows[jumpPhase]; if(openWinlist.Contains(obj.name)) { openWinlist.Remove(obj.name); } WindowCenter.Instance.CloseAll(WindowCenter.CloseAllIgnoreType.SystemAndCustom); for (i = 0; i < openWinlist.Count; i++) { @@ -1020,6 +1026,10 @@ break; case 2: openWinlist = openWindows[1]; if (openWinlist.Contains(obj.name)) { openWinlist.Remove(obj.name); } WindowCenter.Instance.CloseAll(WindowCenter.CloseAllIgnoreType.SystemAndCustom); if (!WindowCenter.Instance.IsOpen<MainInterfaceWin>()) { UI/Common/TimerBehaviour.cs
@@ -22,11 +22,11 @@ float secondTimer = 0f; public void Begin(DateTime _endTime, Action _callBack = null) public void Begin(int seconds, Action _callBack = null) { endTime = _endTime; endTime = TimeUtility.ServerNow + new TimeSpan(seconds * TimeSpan.TicksPerSecond); onTime = _callBack; if (endTime > DateTime.Now) if (endTime > TimeUtility.ServerNow) { this.gameObject.SetActive(true); UpdateTimeShow(); @@ -46,7 +46,7 @@ private void LateUpdate() { if (DateTime.Now > endTime) if (TimeUtility.ServerNow > endTime) { if (onTime != null) { @@ -69,7 +69,7 @@ protected virtual void UpdateTimeShow() { var lastSecond = (float)(endTime - DateTime.Now).TotalSeconds; var lastSecond = (float)(endTime - TimeUtility.ServerNow).TotalSeconds; switch (m_Pattern) { UI/HUD/HeadUpName.cs
@@ -305,7 +305,7 @@ { m_RebornTime.gameObject.SetActive(true); (m_TimeBehaviour as TimerToChsBehaviour).addtionInfo = Language.Get("BossReborn_RefreshTime"); m_TimeBehaviour.Begin(_bossInfo.refreshTime, () => m_TimeBehaviour.Begin( (int)(_bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds, () => { m_NpcAppearTxt.gameObject.SetActive(true); });