Core/GameEngine/Login/Launch.cs
@@ -119,25 +119,9 @@ break; } m_CurrentStage = LaunchStage.ClientVersion; if (!Application.isEditor || InGameDownTestUtility.enable) { VersionUtility.Instance.RequestVersionCheck(); progressBuf = progress; timer = 0f; duration = 1f; while (!VersionUtility.Instance.completed) { timer += Time.deltaTime; progress = Mathf.Clamp(progressBuf + timer / duration * 0.1f, progressBuf, progressBuf + 0.1f); yield return null; } } #endif #if UNITY_IOS && !UNITY_EDITOR #if UNITY_ANDROID if (!VersionUtility.Instance.InIosAuditTime()) { m_CurrentStage = LaunchStage.ClientVersion; @@ -156,6 +140,31 @@ } } } #endif #if UNITY_IOS if (!VersionUtility.Instance.InIosAuditTime()) { m_CurrentStage = LaunchStage.ClientVersion; if (!Application.isEditor || InGameDownTestUtility.enable) { VersionUtility.Instance.RequestVersionCheck(); progressBuf = progress; timer = 0f; duration = 1f; while (!VersionUtility.Instance.completed) { timer += Time.deltaTime; progress = Mathf.Clamp(progressBuf + timer / duration * 0.1f, progressBuf, progressBuf + 0.1f); yield return null; } } } #endif #if UNITY_IOS && !UNITY_EDITOR if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 1) { Core/GameEngine/Login/LoginStage.cs
@@ -18,6 +18,11 @@ backGroundWin.ShowLoginEffect(); } if (VersionUtility.Instance.InIosAuditTime()) { ServerListCenter.Instance.ParseServerLocalServerList(); } if (VersionConfig.Get().isBanShu) { WindowCenter.Instance.Open<BanShuLoginWin>(true); Core/GameEngine/Model/Config/LoginSeverListConfig.cs
New file @@ -0,0 +1,50 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Saturday, September 29, 2018 //-------------------------------------------------------- using UnityEngine; using System; namespace TableConfig { public partial class LoginSeverListConfig : ConfigBase { public int ID { get ; private set ; } public string ip { get ; private set; } public string pagePort { get ; private set; } public int gatePort { get ; private set ; } public string serverName { get ; private set; } public override string getKey() { return ID.ToString(); } public override void Parse() { try { ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; ip = rawContents[1].Trim(); pagePort = rawContents[2].Trim(); gatePort=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; serverName = rawContents[4].Trim(); } catch (Exception ex) { DebugEx.Log(ex); } } } } Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 26aef6c81733c0440a426102e8c58da7 timeCreated: 1538225014 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/GameEngine/Model/ConfigManager.cs
@@ -31,6 +31,7 @@ { StartSyncTask<PriorBundleConfig>(AssetPath.Resource); StartSyncTask<PriorLanguageConfig>(AssetPath.Resource); StartSyncTask<LoginSeverListConfig>(AssetSource.refdataFromEditor ? AssetPath.ResourceOut : AssetPath.External); } List<ConfigTask> configTasks = new List<ConfigTask>(); @@ -203,7 +204,7 @@ } } var allowTaskCount = completedCount <= 7 ? GetMinWorkingTaskCount() : GetMaxWorkingTaskCount(); var allowTaskCount = completedCount <= 8 ? GetMinWorkingTaskCount() : GetMaxWorkingTaskCount(); var workingCount = 0; for (int i = 0; i < configTasks.Count; i++) { System/Dogz/DogzModel.cs
@@ -229,6 +229,22 @@ } } public void MakeUseAddAssistNum() { if (IsAddMaxAssist()) { SysNotifyMgr.Instance.ShowTip("DogzNumLimit"); return; } var _itemConfig = Config.Instance.Get<ItemConfig>(AddAssistItem); ConfirmCancel.ShowItemConfirm(Language.Get("DogzFunc102", _itemConfig.ItemName,GetAssistItemCnt()), AddAssistItem, GetAssistItemCnt(), () => { SendBuyAssistCnt(); }); } public bool IsAddMaxAssist() { if (curSumAssistNum < DogzAssistMaxCnt) @@ -300,6 +316,7 @@ } UpdateDogzAssistRed(); UpdateDogzEquipPlaceRed(); UpdateAssistNumRed(); } public event Action UpdateAssistDogzEvent; System/FairylandCeremony/CeremonyFirepartyWin.cs
@@ -18,6 +18,8 @@ ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } } PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } } StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } } StoreConfig storeConfig; protected override void BindController() { @@ -110,8 +112,8 @@ SysNotifyMgr.Instance.ShowTip("BagFull"); return; } BatchUseModel.Instance.SetBatchBuyModel(storeConfig); storeModel.OnClickShopCell(storeConfig); } } } System/FairylandCeremony/ToHiTaskCell.cs
@@ -29,6 +29,7 @@ public void Init(AllPeoplePartyConfig taskConfig) { activeNameText.gameObject.SetActive(false); this.taskConfig = taskConfig; activeIcon.SetSprite(taskConfig.IconKey); SetTaskState(ceremonyModel.GetPeopleTaskTimesById(taskConfig.ID),taskConfig.TotalTimes); System/KnapSack/Logic/BoxGetItemWin.cs
@@ -66,6 +66,11 @@ ShowUICtrl(); } protected override void OnActived() { UpdateFireEffect(); } protected override void OnAfterOpen() { this.transform.SetAsLastSibling(); @@ -91,6 +96,33 @@ private void RefreshGetIem(int useId, int useCnt, BoxGetItemInfo[] info) { ShowUICtrl(); } private void UpdateFireEffect() { if (BoxModel.getItems == null) return; bool isFireBox = false; foreach (var key in ceremonyModel.fireDict.Keys) { StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(ceremonyModel.fireDict[key]); if (storeConfig != null) { if (storeConfig.ItemID == BoxModel.itemId) { isFireBox = true; if (!fireEffect.IsPlaying) { fireEffect.Play(); return; } } } } if(!isFireBox) { fireEffect.Stop(); } } private void ShowUICtrl() @@ -125,27 +157,6 @@ else { getCoinsText.gameObject.SetActive(false); } foreach(var key in ceremonyModel.fireDict.Keys) { StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(ceremonyModel.fireDict[key]); if(storeConfig != null) { if(storeConfig.ItemID == BoxModel.itemId) { if (!fireEffect.IsPlaying) { fireEffect.Play(); return; } } } } if (fireEffect.IsPlaying) { fireEffect.Stop(); } } System/KnapSack/Logic/PackSendQuestMgr.cs
@@ -93,6 +93,9 @@ get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); } } DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } } #region 发送穿戴装备的请求 ItemConfig sendItemConfig = null; public ItemModel sendItemModel = null; @@ -834,6 +837,11 @@ return; } if(dogzModel.AddAssistItem == itemModel.itemInfo.ItemID) { dogzModel.MakeUseAddAssistNum(); return; } ulong maxValue = 0; playerPack.IsReachUseLimit(itemModel.itemInfo.ItemGUID, out maxValue); System/Login/ServerData.cs
@@ -86,6 +86,23 @@ public int level; public DateTime last_login_time; public ServerData(LoginSeverListConfig config) { region_flag = config.ID; name = config.serverName; running_status = 1; statue = 1; is_recommend = 0; region_domain = config.ip; int.TryParse(config.pagePort, out login_port); game_port = config.gatePort; start_date = DateTime.Now; job = string.Empty; roleid = string.Empty; level = 0; last_login_time = DateTime.Now; } public static int Compare(ServerData _lhs, ServerData _rhs) { if (_lhs.is_recommend != _rhs.is_recommend) System/Login/ServerListCenter.cs
@@ -18,11 +18,9 @@ public ServerInfoCommon serverInfoCommon { get; private set; } ServerData m_CurrentServer; public ServerData currentServer { public ServerData currentServer { get { return m_CurrentServer; } set { set { m_CurrentServer = value; m_SelectedServer = true; @@ -36,14 +34,11 @@ } string m_CurrentServerGroup = string.Empty; public string currentServerGroup { get { public string currentServerGroup { get { return m_CurrentServerGroup; } set { set { if (m_CurrentServerGroup != value) { m_CurrentServerGroup = value; @@ -60,8 +55,7 @@ bool serverListPlayerPartGot = false; bool serverListCommonPartGot = false; public bool serverListGot { public bool serverListGot { get { return serverListCommonPartGot; } } @@ -72,14 +66,11 @@ public event Action serverSelectEvent; const string LOGIN_SERVER = "LoginServer"; public int localSaveServerId { get { public int localSaveServerId { get { return LocalSave.GetInt(LOGIN_SERVER); } set { set { LocalSave.SetInt(LOGIN_SERVER, value); } } @@ -142,6 +133,11 @@ public void RequestJumpUrl() { if (VersionUtility.Instance.InIosAuditTime()) { return; } var url = StringUtility.Contact(JUMP_URL[jumpUrlIndex % 2], "flag=", VersionConfig.Get().appId, "_", VersionConfig.Get().branch, "_", VersionConfig.Get().version); jumpUrlIndex++; HttpRequest.Instance.RequestHttpGet(url, HttpRequest.defaultHttpContentType, 1, OnRequestJumpUrl); @@ -178,6 +174,11 @@ void RequestServerCommonList() { if (VersionUtility.Instance.InIosAuditTime()) { return; } HttpRequest.Instance.RequestHttpGet(SERVERLIST_URL_COMMON, HttpRequest.defaultHttpContentType, 1, OnGetServerList); } @@ -222,6 +223,11 @@ public void RequestServerListPlayer(string _accountName) { if (VersionUtility.Instance.InIosAuditTime()) { return; } accountNameBuf = _accountName; var url = string.Empty; var tables = new Dictionary<string, string>(); @@ -293,6 +299,30 @@ return false; } public void ParseServerLocalServerList() { serverListCommonPartGot = true; var configs = Config.Instance.GetAllValues<LoginSeverListConfig>(); var count = configs.Count; serverInfoCommon = new ServerInfoCommon(); serverInfoCommon.common = new ServerGroup[1]; serverInfoCommon.common[0] = new ServerGroup(); serverInfoCommon.common[0].group_title = "1区"; serverInfoCommon.common[0].group_list = new ServerData[count]; for (var i = 0; i < count; i++) { var config = configs[i]; serverInfoCommon.common[0].group_list[i] = new ServerData(config); } FiltrateDefaultServerAndServerGroup(); if (onServerListRefreshEvent != null) { onServerListRefreshEvent(); } } public List<string> GetAllServerGroup() { var serverGroupTitles = new List<string>(); @@ -319,7 +349,6 @@ return serverGroupTitles; } private void ProcessRecentServerData() { System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
@@ -538,6 +538,29 @@ int IndexOf = GroupLowIndexList.IndexOf(highBtnRecord.Index); if (IndexOf == 0) { if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony))//精灵盛典 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } } } else if (IndexOf == 1) { var _funcOrder = 0; if (OpenServerActivityCenter.Instance.IsAnyActivityOpen(out _funcOrder))//精彩活动 { @@ -561,11 +584,10 @@ } } } } else if (IndexOf == 1) { else if (IndexOf == 2) { if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && limitedTimePackageItemModel.IsExpired())//限时礼包 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 @@ -586,8 +608,9 @@ } } } else if (IndexOf == 2) else if (IndexOf == 3) { bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(4); if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//限时特惠 @@ -609,33 +632,12 @@ AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } } } else if (IndexOf == 3) { bool Isopen = impactRankModel.IsInImpactRank; if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//全民冲榜 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } } } else if (IndexOf == 4) { if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.InOperationTime(Operation.FairyCeremony))//精灵盛典 bool Isopen = impactRankModel.IsInImpactRank; if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//全民冲榜 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 { System/MainInterfacePanel/TaskListTip.cs
@@ -166,9 +166,9 @@ } private void MainCardLevelChange(int _id)//主线任务卡级状态改变 { TaskScheduling(); ChangeSort(); TaskJump(_id); //TaskScheduling(); //ChangeSort(); //TaskJump(_id); } private void SetLength() System/MainWin/AttackButton.cs
@@ -25,7 +25,7 @@ } else { return m_IsDown; return Input.GetMouseButton(0) && m_IsDown; } } }