Ver Fonte

战斗数据位置迁移

zhaoyang há 2 anos atrás
pai
commit
9b46bde3ef

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -243,11 +243,11 @@ namespace GFGGame
             PoemGallerySProxy.ReqGalleryTheme().Coroutine();
 
             int storageAutoPlay = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY);
-            EquipDataCache.cacher.autoPlay = storageAutoPlay <= 0 ? false : true;
+            FightDataManager.Instance.autoPlay = storageAutoPlay <= 0 ? false : true;
             int fightSpeed = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_FIGHT_AUTO_PLAY_SPEED);
-            EquipDataCache.cacher.fightSpeed = fightSpeed <= 0 ? 1 : fightSpeed;
+            FightDataManager.Instance.fightSpeed = fightSpeed <= 0 ? 1 : fightSpeed;
             int dialogSpeed = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_DIALOG_AUTO_PLAY_SPEED);
-            EquipDataCache.cacher.dialogSpeed = dialogSpeed <= 0 ? 1 : dialogSpeed;
+            FightDataManager.Instance.dialogSpeed = dialogSpeed <= 0 ? 1 : dialogSpeed;
 
             int filingChapterId = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STUDIO_FILING_CHAPTERID);
             StudioDataManager.Instance.filingChapterId = filingChapterId <= 0 ? StudioDataManager.Instance.FilingDatas[0].id : filingChapterId;

+ 131 - 0
GameClient/Assets/Game/HotUpdate/Data/FightDataManager.cs

@@ -0,0 +1,131 @@
+using UnityEngine;
+
+namespace GFGGame
+{
+    public class FightDataManager : SingletonBase<FightDataManager>
+    {
+
+        public byte[] FightRoleRes { get; set; }
+        public Texture2D RoleTextuex { get; set; }
+
+        //角色基础分+部件基础分
+        private int _score;
+        public int score
+        {
+            get
+            {
+                return _score;
+            }
+            set
+            {
+                _score = value;
+                EventAgent.DispatchEvent(ConstMessage.DRESS_UP_SCORE_CHANGED, _score);
+            }
+        }
+        //最终得分
+        private int _totalScore;
+        public int totalScore
+        {
+            get
+            {
+                return _totalScore;
+            }
+            set
+            {
+                _totalScore = value;
+            }
+        }
+
+        //战斗对象最终得分
+        private int _targetTotalScore;
+        public int npcTotalScore
+        {
+            get
+            {
+                return _targetTotalScore;
+            }
+            set
+            {
+                _targetTotalScore = value;
+            }
+        }
+        private bool _autoPlay = false;
+        public bool autoPlay
+        {
+            get
+            {
+                return _autoPlay;
+            }
+            set
+            {
+                _autoPlay = value;
+                if (!_autoPlay) fightSpeed = 1;
+                StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_AUTO_PLAY, _autoPlay == true ? 1 : 0).Coroutine();
+            }
+        }
+        public int maxFightSpeed = 2;
+        private int _fightSpeed = 1;
+        public int fightSpeed
+        {
+            get
+            {
+                return _fightSpeed;
+            }
+            set
+            {
+
+                _fightSpeed = value;
+                StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_FIGHT_AUTO_PLAY_SPEED, _fightSpeed).Coroutine();
+
+            }
+        }
+        private int _storyDialogSpeed = 1;
+        public int dialogSpeed
+        {
+            get
+            {
+                return _storyDialogSpeed;
+            }
+            set
+            {
+
+                _storyDialogSpeed = value;
+                StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_DIALOG_AUTO_PLAY_SPEED, _storyDialogSpeed).Coroutine();
+
+            }
+        }
+
+
+        //根据位置原点和随机范围获取评分位置
+        public void GetCirclePos(Vector2 pos, int range, out float x, out float y)
+        {
+            int numX = UnityEngine.Random.Range(0, 2);
+            int signX = numX % 2 == 0 ? 1 : -1;
+            float rangeX = UnityEngine.Random.Range(0, range);
+            x = pos.x + signX * (rangeX);
+
+            int numY = UnityEngine.Random.Range(0, 2);
+            int signY = numY % 2 == 0 ? 1 : -1;
+            float rangeY = UnityEngine.Random.Range(0, range);
+            y = pos.y + signY * (rangeY);
+        }
+
+
+        public Texture2D GetPrintscreenNTexture(Camera camera)
+        {
+
+            RenderTexture rt = new RenderTexture(UnityEngine.Screen.width, UnityEngine.Screen.height, 0);//渲染一张1920*1080的图
+            camera.targetTexture = rt;//传到主摄像机上
+            camera.Render();//渲染
+            RenderTexture.active = rt;
+            Texture2D screenShot = new Texture2D(UnityEngine.Screen.width, UnityEngine.Screen.height, TextureFormat.ARGB32, false);
+            screenShot.ReadPixels(new Rect(0, 0, UnityEngine.Screen.width, UnityEngine.Screen.height), 0, 0);//读像素
+            screenShot.Apply();
+            camera.targetTexture = null;
+            RenderTexture.active = null;
+            Object.Destroy(rt);
+            return screenShot;
+
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Data/FightDataManager.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 94866132f286c3a498a4f09cc07e423e
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -259,7 +259,7 @@ namespace GFGGame
             bool hasFightTarget = fightCfg.targetName != null && fightCfg.targetName.Length > 0;
             if (hasFightTarget)
             {
-                npcScore = EquipDataCache.cacher.npcTotalScore;
+                npcScore = FightDataManager.Instance.npcTotalScore;
                 if (score > npcScore)
                 {
                     return true;//分数低于对战对象

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Data/VO/TravelData.cs

@@ -14,9 +14,9 @@ namespace GFGGame
         /// </summary>
         public long CreationTime;
         /// <summary>
-        /// 本次需要的时间(小时)
+        /// 游历结束时间(毫秒)
         /// </summary>
-        public int TravelNeedHour;
+        public long EndTime;
         /// <summary>
         /// 游历地点id
         /// </summary>

+ 4 - 108
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjDataCache.cs

@@ -42,9 +42,6 @@ namespace GFGGame
             }
         }
 
-        public byte[] FightRoleRes { get; set; }
-        public Texture2D RoleTextuex { get; set; }
-
         private List<int> _equipDatas = new List<int>();
         public List<int> equipDatas
         {
@@ -58,93 +55,6 @@ namespace GFGGame
             }
         }
 
-
-        //角色基础分+部件基础分
-        private int _score;
-        public int score
-        {
-            get
-            {
-                return _score;
-            }
-            private set
-            {
-                _score = value;
-                EventAgent.DispatchEvent(ConstMessage.DRESS_UP_SCORE_CHANGED, _score);
-            }
-        }
-        //最终得分
-        private int _totalScore;
-        public int totalScore
-        {
-            get
-            {
-                return _totalScore;
-            }
-            set
-            {
-                _totalScore = value;
-            }
-        }
-
-        //战斗对象最终得分
-        private int _targetTotalScore;
-        public int npcTotalScore
-        {
-            get
-            {
-                return _targetTotalScore;
-            }
-            set
-            {
-                _targetTotalScore = value;
-            }
-        }
-        private bool _autoPlay = false;
-        public bool autoPlay
-        {
-            get
-            {
-                return _autoPlay;
-            }
-            set
-            {
-                _autoPlay = value;
-                if (!_autoPlay) fightSpeed = 1;
-                StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_AUTO_PLAY, _autoPlay == true ? 1 : 0).Coroutine();
-            }
-        }
-        public int maxFightSpeed = 2;
-        private int _fightSpeed = 1;
-        public int fightSpeed
-        {
-            get
-            {
-                return _fightSpeed;
-            }
-            set
-            {
-
-                _fightSpeed = value;
-                StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_FIGHT_AUTO_PLAY_SPEED, _fightSpeed).Coroutine();
-
-            }
-        }
-        private int _storyDialogSpeed = 1;
-        public int dialogSpeed
-        {
-            get
-            {
-                return _storyDialogSpeed;
-            }
-            set
-            {
-
-                _storyDialogSpeed = value;
-                StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_DIALOG_AUTO_PLAY_SPEED, _storyDialogSpeed).Coroutine();
-
-            }
-        }
         public void Dispose()
         {
             _sceneObj = null;
@@ -156,7 +66,7 @@ namespace GFGGame
             {
                 _equipDatas.Add(value);
                 DressUpUtil.AddItem(value, _sceneObj, _needSetMask);
-                score += ItemDataManager.GetItemAdditionScore(value, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
+                FightDataManager.Instance.score += ItemDataManager.GetItemAdditionScore(value, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
             }
             int dressSuitId = CheckCurDressIsSuit();
             if (dressSuitId > 0) _suitId = dressSuitId;
@@ -172,7 +82,7 @@ namespace GFGGame
             {
                 _equipDatas.Remove(value);
                 DressUpUtil.RemoveItem(value, _sceneObj);
-                score -= ItemDataManager.GetItemAdditionScore(value, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
+                FightDataManager.Instance.score -= ItemDataManager.GetItemAdditionScore(value, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
             }
         }
         //检测当前穿戴是否是一件完整套装,且只穿了一件套装,返回套装id
@@ -456,10 +366,10 @@ namespace GFGGame
                 UpdatePicAction();
             }
             RoleLevelCfg roleLevelCfg = RoleLevelCfgArray.Instance.GetCfg(GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl));
-            score = roleLevelCfg.baseScore;
+            FightDataManager.Instance.score = roleLevelCfg.baseScore;
             foreach (int itemId in _equipDatas)
             {
-                score += ItemDataManager.GetItemAdditionScore(itemId, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
+                FightDataManager.Instance.score += ItemDataManager.GetItemAdditionScore(itemId, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
             }
         }
 
@@ -805,20 +715,6 @@ namespace GFGGame
             return true;
         }
 
-        //根据位置原点和随机范围获取评分位置
-        public void GetCirclePos(Vector2 pos, int range, out float x, out float y)
-        {
-            int numX = UnityEngine.Random.Range(0, 2);
-            int signX = numX % 2 == 0 ? 1 : -1;
-            float rangeX = UnityEngine.Random.Range(0, range);
-            x = pos.x + signX * (rangeX);
-
-            int numY = UnityEngine.Random.Range(0, 2);
-            int signY = numY % 2 == 0 ? 1 : -1;
-            float rangeY = UnityEngine.Random.Range(0, range);
-            y = pos.y + signY * (rangeY);
-        }
-
         public int GetItemIdBuyType(int subType)
         {
             for (int i = 0; i < equipDatas.Count; i++)

+ 0 - 16
GameClient/Assets/Game/HotUpdate/DressUp/DressUpUtil.cs

@@ -444,21 +444,5 @@ namespace GFGGame
             }
         }
 
-        public static Texture2D GetPrintscreenNTexture(Camera camera)
-        {
-
-            RenderTexture rt = new RenderTexture(UnityEngine.Screen.width, UnityEngine.Screen.height, 0);//渲染一张1920*1080的图
-            camera.targetTexture = rt;//传到主摄像机上
-            camera.Render();//渲染
-            RenderTexture.active = rt;
-            Texture2D screenShot = new Texture2D(UnityEngine.Screen.width, UnityEngine.Screen.height, TextureFormat.ARGB32, false);
-            screenShot.ReadPixels(new Rect(0, 0, UnityEngine.Screen.width, UnityEngine.Screen.height), 0, 0);//读像素
-            screenShot.Apply();
-            camera.targetTexture = null;
-            RenderTexture.active = null;
-            Object.Destroy(rt);
-            return screenShot;
-
-        }
     }
 }

+ 2 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/TravelSProxy.cs

@@ -27,7 +27,7 @@ namespace GFGGame
                     TravelData travelData = new TravelData();
                     travelData.Status = response.TravelGuideInfo.Status;
                     travelData.CreationTime = response.TravelGuideInfo.CreationTime;
-                    travelData.TravelNeedHour = response.TravelGuideInfo.TravelNeedHour;
+                    travelData.EndTime = response.TravelGuideInfo.EndTime;
                     travelData.TravelLocationId = response.TravelGuideInfo.TravelLocationId;
                     travelData.TravelCount = response.TravelGuideInfo.TravelCount;
                     travelData.TravelSuitId = response.TravelGuideInfo.TravelSuitId;
@@ -55,7 +55,7 @@ namespace GFGGame
                     TravelData travelData = new TravelData();
                     travelData.Status = response.TravelGuideInfo.Status;
                     travelData.CreationTime = response.TravelGuideInfo.CreationTime;
-                    travelData.TravelNeedHour = response.TravelGuideInfo.TravelNeedHour;
+                    travelData.EndTime = response.TravelGuideInfo.EndTime;
                     travelData.TravelLocationId = response.TravelGuideInfo.TravelLocationId;
                     travelData.TravelCount = response.TravelGuideInfo.TravelCount;
                     travelData.TravelSuitId = response.TravelGuideInfo.TravelSuitId;

+ 4 - 8
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -129,7 +129,7 @@ namespace GFGGame
             _ui.m_txtRecommendCount.SetVar("v2", GlobalCfgArray.globalCfg.recommendCount.ToString()).FlushVars();
 
             _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
-            _ui.m_btnAutoPlay.selected = EquipDataCache.cacher.autoPlay;
+            _ui.m_btnAutoPlay.selected = FightDataManager.Instance.autoPlay;
             _ui.m_btnAutoPlay.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
             _ui.m_btnRecommend.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false); ;
 
@@ -454,7 +454,7 @@ namespace GFGGame
 
             GameObject gameObject = _sceneObject.transform.Find("FightCamera").gameObject;
             Camera camera = gameObject.GetComponent<Camera>();
-            EquipDataCache.cacher.RoleTextuex = DressUpUtil.GetPrintscreenNTexture(camera);
+            FightDataManager.Instance.RoleTextuex = FightDataManager.Instance.GetPrintscreenNTexture(camera);
 
             yield return new WaitForEndOfFrame();
 
@@ -931,7 +931,7 @@ namespace GFGGame
 
         private void UpdateScore()
         {
-            _ui.m_txtScore.text = "" + EquipDataCache.cacher.score;
+            _ui.m_txtScore.text = "" + FightDataManager.Instance.score;
             // GuideController.TryGuideDressUpFightViewBtnNext(_ui.m_btnNext);
         }
 
@@ -941,7 +941,7 @@ namespace GFGGame
         }
         private void OnClickBtnAutoPlay()
         {
-            EquipDataCache.cacher.autoPlay = _ui.m_btnAutoPlay.selected;
+            FightDataManager.Instance.autoPlay = _ui.m_btnAutoPlay.selected;
         }
 
 
@@ -953,14 +953,10 @@ namespace GFGGame
             }
             if (_fightCfg.needSuitId > 0)
             {
-
-                // ViewManager.Show(ViewName.SUIT_GUIDE_VIEW, new object[] { _ui.m_compNeed.target.data, new object[] { ViewName.DRESS_UP_FIGHT_VIEW, this.viewData } }, new object[] { ViewName.DRESS_UP_FIGHT_VIEW, this.viewData });
                 ViewManager.Show<SuitPartsDetailView>(_fightCfg.needSuitId, new object[] { typeof(DressUpFightView).FullName, this.viewData });
             }
             else
             {
-
-                // ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { _ui.m_compNeed.target.data, new object[] { ViewName.DRESS_UP_FIGHT_VIEW, this.viewData }, 1 });
                 int itemId = (int)_ui.m_compNeed.target.data;
                 object[] sourceDatas = new object[] { itemId, new object[] { ViewName.DRESS_UP_FIGHT_VIEW, this.viewData }, 1 };
                 GoodsItemTipsController.ShowItemTips(itemId, sourceDatas);

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/InstanceZonesController.cs

@@ -62,10 +62,10 @@ namespace GFGGame
             {
                 StudioCfg filingCfg = StudioCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
                 float addition = StudioDataManager.Instance.GetAdditionBySuitId(filingCfg.suitId);
-                addition = addition / 10000 * EquipDataCache.cacher.totalScore;
-                EquipDataCache.cacher.totalScore += (int)Math.Round(addition);
+                addition = addition / 10000 * FightDataManager.Instance.totalScore;
+                FightDataManager.Instance.totalScore += (int)Math.Round(addition);
             }
-            var score = EquipDataCache.cacher.totalScore;
+            var score = FightDataManager.Instance.totalScore;
             //客户端先做判断,成功和失败处理不同
             var success = InstanceZonesDataManager.GetFightResult(score, out var npcScore);
             if (success)

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs

@@ -97,7 +97,7 @@ namespace GFGGame
             {
                 _sceneObject = GameObject.Instantiate(_scenePrefab);
             }
-            _speedAutoPlay = EquipDataCache.cacher.dialogSpeed;
+            _speedAutoPlay = FightDataManager.Instance.dialogSpeed;
             _autoPlay = false;
             UpdateSpeedUpBtn();
             _dialogListLookBack = new List<string>();
@@ -136,7 +136,7 @@ namespace GFGGame
                 // _ui.m_btnAutoPlay.selected = true;
                 OnClickBtnAutoPlay();
                 _speedAutoPlay = 1;
-                EquipDataCache.cacher.dialogSpeed = _speedAutoPlay;
+                FightDataManager.Instance.dialogSpeed = _speedAutoPlay;
             }
         }
 
@@ -215,7 +215,7 @@ namespace GFGGame
             {
                 _speedAutoPlay = 1;
             }
-            EquipDataCache.cacher.dialogSpeed = _speedAutoPlay;
+            FightDataManager.Instance.dialogSpeed = _speedAutoPlay;
             UpdateSpeedUpBtn();
         }
 

+ 8 - 8
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -98,15 +98,15 @@ namespace GFGGame
             ScoreSystemData.Instance.SetEquipDicWithType();
 
             _ui.m_comClickCircle.target.touchable = false;
-            _nTexture = new NTexture(EquipDataCache.cacher.RoleTextuex);
+            _nTexture = new NTexture(FightDataManager.Instance.RoleTextuex);
 
             // _ui.m_loaRole.texture = _nTexture;//EquipDataCache.cacher.FightRoleRes;
             ET.Log.Debug("Screen:" + UnityEngine.Screen.width + "  " + UnityEngine.Screen.height + "   _nTexture:" + _nTexture.width + "   " + _nTexture.height);
             _ui.m_imgRole.SetSize(GRoot.inst.width, GRoot.inst.height);
             _ui.m_imgRole.texture = _nTexture;
 
-            _ui.m_btnSpeedUp.visible = EquipDataCache.cacher.autoPlay;
-            _ui.m_btnSpeedUp.title = "x" + EquipDataCache.cacher.fightSpeed;
+            _ui.m_btnSpeedUp.visible = FightDataManager.Instance.autoPlay;
+            _ui.m_btnSpeedUp.title = "x" + FightDataManager.Instance.fightSpeed;
 
             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
@@ -175,7 +175,7 @@ namespace GFGGame
             _ui.m_loaGlass.SetXY(x, y);
             _ui.m_loaGlass.url = string.Format("ui://Main/zd_bl_{0}", UnityEngine.Random.Range(0, 3));
             _ui.m_t1.ignoreEngineTimeScale = false;
-            _ui.m_t1.timeScale = EquipDataCache.cacher.fightSpeed;
+            _ui.m_t1.timeScale = FightDataManager.Instance.fightSpeed;
             _ui.m_t1.SetValue("start", _ui.m_loaGlass.x, _ui.m_loaGlass.y);
             _ui.m_t1.SetValue("end", _ui.m_proScore.m_imgAni.LocalToGlobal(Vector2.zero).x - _ui.m_loaGlass.width / 2, _ui.m_proScore.target.y - _ui.m_loaGlass.height / 2);
 
@@ -193,7 +193,7 @@ namespace GFGGame
                     _ui.m_proScore.m_comBar.target.width = t.value.x;
                 }).OnComplete(() =>
                 {
-                    EquipDataCache.cacher.totalScore = _score;
+                    FightDataManager.Instance.totalScore = _score;
                     _ui.m_proScore.m_txtCount.text = string.Format("总分 {0}", _score);
                     GetCurStar(out int star, out Transition transition);
                     _ui.m_comScoreStage.m_c1.selectedIndex = star;
@@ -227,7 +227,7 @@ namespace GFGGame
             }
             else
             {
-                Timers.inst.Add(ConstScoreSystem.REFRESH_CIRCLE_WITE_TIME / EquipDataCache.cacher.fightSpeed, 1, SkillScore);//下个部分评分
+                Timers.inst.Add(ConstScoreSystem.REFRESH_CIRCLE_WITE_TIME / FightDataManager.Instance.fightSpeed, 1, SkillScore);//下个部分评分
             }
         }
 
@@ -262,8 +262,8 @@ namespace GFGGame
         }
         private void OnBtnSpeedUp()
         {
-            EquipDataCache.cacher.fightSpeed = EquipDataCache.cacher.fightSpeed == 1 ? EquipDataCache.cacher.maxFightSpeed : 1;
-            _ui.m_btnSpeedUp.title = "x" + EquipDataCache.cacher.fightSpeed;
+            FightDataManager.Instance.fightSpeed = FightDataManager.Instance.fightSpeed == 1 ? FightDataManager.Instance.maxFightSpeed : 1;
+            _ui.m_btnSpeedUp.title = "x" + FightDataManager.Instance.fightSpeed;
         }
 
         private void Skip(object param = null)

+ 9 - 9
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -271,7 +271,7 @@ namespace GFGGame
             _ui.m_proScore.m_txtMineScore.text = RoleDataManager.roleName + " 0";
             _ui.m_btnBack.visible = true;
 
-            _speed = EquipDataCache.cacher.fightSpeed;
+            _speed = FightDataManager.Instance.fightSpeed;
             if (_levelCfg.type == ConstInstanceZonesType.Field)
             {
                 _ui.m_btnBack.visible = false;
@@ -299,11 +299,11 @@ namespace GFGGame
             if (_index == 0 && GuideDataManager.IsGuideFinish(ConstGuideId.TARGET_FIGHT) <= 0)//引导中禁止自动战斗
             {
                 _speed = 1;
-                EquipDataCache.cacher.autoPlay = false;
+                FightDataManager.Instance.autoPlay = false;
                 _ui.m_btnSkill0.m_icon.touchable = false;
             }
 
-            if (_levelCfg.type == ConstInstanceZonesType.Field || EquipDataCache.cacher.autoPlay)
+            if (_levelCfg.type == ConstInstanceZonesType.Field || FightDataManager.Instance.autoPlay)
             {
                 _isAutoPlay = true;
             }
@@ -359,14 +359,14 @@ namespace GFGGame
             double partScore = ScoreSystemData.Instance.GetPartItemScore(partId);
             _ui.m_comMineCircle.m_txtCount.text = ((int)Math.Round(partScore)).ToString();
             _score += (int)Math.Round((partScore + _skillScore)); ;
-            EquipDataCache.cacher.totalScore = (int)Math.Round(_score);
+            FightDataManager.Instance.totalScore = (int)Math.Round(_score);
 
 
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
             double targetScore = fightCfg.targetPartsScoreArr[_index] * ConstScoreSystem.PART_SCORE;
             _ui.m_comTargetCircle.m_txtCount.text = ((int)Math.Round(targetScore)).ToString();
             _targetScore += targetScore;
-            EquipDataCache.cacher.npcTotalScore = (int)Math.Round(_targetScore);
+            FightDataManager.Instance.npcTotalScore = (int)Math.Round(_targetScore);
 
             ReleaseNpcSkill();
             PlayScoreAni();
@@ -660,8 +660,8 @@ namespace GFGGame
         }
         private void OnBtnSpeedUp()
         {
-            EquipDataCache.cacher.fightSpeed = EquipDataCache.cacher.fightSpeed == 1 ? EquipDataCache.cacher.maxFightSpeed : 1;
-            _speed = EquipDataCache.cacher.fightSpeed;
+            FightDataManager.Instance.fightSpeed = FightDataManager.Instance.fightSpeed == 1 ? FightDataManager.Instance.maxFightSpeed : 1;
+            _speed = FightDataManager.Instance.fightSpeed;
 
             _ui.m_btnSpeedUp.title = "x" + _speed;
         }
@@ -717,8 +717,8 @@ namespace GFGGame
         }
         private async void Skip(object param = null)
         {
-            EquipDataCache.cacher.totalScore = (int)Math.Round(_score);
-            EquipDataCache.cacher.npcTotalScore = (int)Math.Round(_targetScore);
+            FightDataManager.Instance.totalScore = (int)Math.Round(_score);
+            FightDataManager.Instance.npcTotalScore = (int)Math.Round(_targetScore);
             await InstanceZonesController.CheckStoryFightResult();
             Reset();
         }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StroyFightResultView.cs

@@ -78,7 +78,7 @@ namespace GFGGame
             InstanceZonesDataManager.isResultFighting = true;
 
 
-            NTexture nTexture = new NTexture(EquipDataCache.cacher.RoleTextuex);
+            NTexture nTexture = new NTexture(FightDataManager.Instance.RoleTextuex);
             _ui.m_comRoleResult.m_c1.selectedIndex = _resultData.Star;
             _ui.m_comRoleResult.m_comRole.m_imgRole.SetSize(GRoot.inst.width, GRoot.inst.height);
             _ui.m_comRoleResult.m_comRole.m_imgRole.texture = nTexture;

+ 2 - 3
GameClient/Assets/Game/HotUpdate/Views/Travel/TravelView.cs

@@ -87,7 +87,7 @@ namespace GFGGame
             }
             else if (_ui.m_c1.selectedIndex == (int)TravelGuideType.Travel)
             {
-                long endTime = TravelDataManager.Instance.TravelData.CreationTime + TravelDataManager.Instance.TravelData.TravelNeedHour * TimeUtil.SECOND_PER_HOUR * 1000;
+                long endTime = TravelDataManager.Instance.TravelData.EndTime;
                 long curTime = TimeHelper.ServerNow();
                 _ui.m_txtTime.text = "";
                 int secCount = (int)((endTime - curTime) / 1000);
@@ -97,8 +97,7 @@ namespace GFGGame
 
         private void UpdateTime(object param)
         {
-            long endTime = TravelDataManager.Instance.TravelData.CreationTime + TravelDataManager.Instance.TravelData.TravelNeedHour * TimeUtil.SECOND_PER_HOUR * 1000;
-
+            long endTime = TravelDataManager.Instance.TravelData.EndTime;
             long curTime = TimeHelper.ServerNow();
             if (curTime >= endTime)
             {