Ver Fonte

万水千山月卡特权

hexiaojie há 2 anos atrás
pai
commit
c2d2a79ec8

+ 8 - 0
GameClient/Assets/Game/HotUpdate/Data/RoleDataManager.cs

@@ -205,6 +205,14 @@ namespace GFGGame
             }
         }
 
+        /// <summary>
+        /// 万水千山最大存储量
+        /// </summary>
+        public static int WanShuiQianShanMaxStorageCount
+        {
+            get { return GameGlobal.myNumericComponent.GetAsInt(NumericType.WanShuiQianShanMaxStorageCount); }
+        }
+
         public static bool CheckPowerFull()
         {
             return RoleDataManager.power >= powerLimit;

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

@@ -18,15 +18,15 @@ namespace GFGGame
         private EffectUI _effectUI1;
         private DressUpObjUI _dressUpObjUI;
         private GTextField _wordTextField;
-        //剧情完成回调
+        //鍓ф儏瀹屾垚鍥炶皟
         private OnCompleteStoryDialogCall _onCompleteStoryDialogCall;
         private object _onCompleteStoryDialogCallParam;
-        //回顾
+        //鍥為【
         private List<string> _dialogListLookBack;
-        //自动播放
+        //鑷�姩鎾�斁
         private int _speedAutoPlay = 1;
         private bool _autoPlay = false;
-        //剧情状态
+        //鍓ф儏鐘舵€�
         private List<StoryDialogCfg> _stepListToRead;
         private StoryDialogCfg _currentStepCfg;
         private string _nextStepId;
@@ -36,7 +36,7 @@ namespace GFGGame
         private string _currentWords;
         private string _stroyStartID;
 
-        //屏幕效果中
+        //灞忓箷鏁堟灉涓�
         private Action<object> _onScreenEffectComplete;
 
 
@@ -123,7 +123,7 @@ namespace GFGGame
             }
             if (LauncherConfig.netType == LauncherConfig.EnumNetType.TEMP && !InstanceZonesDataManager.CheckLevelPass(MainStoryDataManager.currentLevelCfgId))
             {
-                // 临时设置都可以跳过对话
+                // 涓存椂璁剧疆閮藉彲浠ヨ烦杩囧�璇�
                 skipable = false;
             }
             else
@@ -220,7 +220,7 @@ namespace GFGGame
 
         private void OnClickBtnSpeedUp()
         {
-            //如果没有自动播放先开始自动播放
+            //濡傛灉娌℃湁鑷�姩鎾�斁鍏堝紑濮嬭嚜鍔ㄦ挱鏀�
             if (!_autoPlay)
             {
                 _ui.m_btnAutoPlay.selected = true;
@@ -275,7 +275,7 @@ namespace GFGGame
             _ui.m_dialogName.target.visible = false;
             _ui.m_dialogHead.target.visible = false;
             float delay = 0;
-            //屏幕效果
+            //灞忓箷鏁堟灉
             if (_currentStepCfg != null)
             {
                 if (_currentStepCfg.blackScreenDur > 0)
@@ -291,7 +291,7 @@ namespace GFGGame
             }
             if (delay > 0)
             {
-                //转换成秒
+                //杞�崲鎴愮�
                 delay = delay / 1000f;
                 _onScreenEffectComplete = OnScreenEffectComplete;
                 Timers.inst.Add(delay, 1, OnScreenEffectComplete);
@@ -382,14 +382,14 @@ namespace GFGGame
             {
                 roleName = RoleDataManager.roleName;
             }
-            //回顾
+            //鍥為【
             if (roleName != null)
             {
                 _dialogListLookBack.Add("[color=#FDA2B1]" + roleName + "[/color]");
             }
             if (!string.IsNullOrEmpty(headAniRes) || storyDialogCfg.suitId > 0)
             {
-                //显示对话框半身像
+                //鏄剧ず瀵硅瘽妗嗗崐韬�儚
                 _ui.m_dialogText.target.visible = false;
                 _ui.m_dialogName.target.visible = false;
                 _ui.m_dialogHead.target.visible = true;
@@ -400,14 +400,14 @@ namespace GFGGame
                 var headAniCfg = HeadAniCfgArray.Instance.GetCfg(headAniRes);
                 if (headAniCfg != null && !string.IsNullOrEmpty(headAniCfg.headAni))
                 {
-                    //独立动画
+                    //鐙�珛鍔ㄧ敾
                     _ui.m_dialogHead.m_compDressUp.target.visible = false;
                     _ui.m_dialogHead.m_comphead.target.visible = true;
                     _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_dialogHead.m_comphead.m_holder, "ui_nzbq", headAniCfg.headAni);
                 }
                 else
                 {
-                    //换装
+                    //鎹㈣�
                     _ui.m_dialogHead.m_compDressUp.target.visible = true;
                     _ui.m_dialogHead.m_comphead.target.visible = false;
                     _dressUpObjUI.ResetSceneObj(80, true, false, null, false);
@@ -426,7 +426,7 @@ namespace GFGGame
                     }
                     if (headAniCfg != null && headAniCfg.faceId > 0)
                     {
-                        //表情
+                        //琛ㄦ儏
                         _dressUpObjUI.dressUpObj.AddOrRemove(headAniCfg.faceId, false);
                         _dressUpObjUI.UpdateWrapper(_ui.m_dialogHead.m_compDressUp.m_holder);
                     }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemPhotoView.cs

@@ -128,7 +128,7 @@ namespace GFGGame
                 _photoInfos = PoemPhotoDataManager.Instance.WsqsPhotoInfos;
                 _sourceType = (int)PictureSourceType.WanShuiQianShan;
                 _ui.m_listTravel.numItems = _photoInfos.Count;
-                _ui.m_txtCount.text = string.Format("({0}/{1})", _photoInfos.Count, GlobalCfgArray.globalCfg.maxTravelCount);
+                _ui.m_txtCount.text = string.Format("({0}/{1})", _photoInfos.Count, RoleDataManager.WanShuiQianShanMaxStorageCount);
             }
 
            

+ 14 - 7
GameClient/Assets/Game/HotUpdate/Views/Travel/TravelView.cs

@@ -17,11 +17,13 @@ namespace GFGGame
                 _valueBarController.Dispose();
                 _valueBarController = null;
             }
+
             if (_ui != null)
             {
                 _ui.Dispose();
                 _ui = null;
             }
+
             base.Dispose();
         }
 
@@ -43,8 +45,8 @@ namespace GFGGame
             _ui.m_btnFieldGuide.onClick.Add(OnBtnFieldGuideClick);
 
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("xc_bjbj");
-
         }
+
         protected override void AddEventListener()
         {
             base.AddEventListener();
@@ -78,7 +80,7 @@ namespace GFGGame
 
         private void UpdateView()
         {
-            _ui.m_c1.selectedIndex = TravelDataManager.Instance.TravelData.Status;
+            _ui.m_c1.selectedIndex = TravelDataManager.Instance.TravelData?.Status ?? 0;
             if (_ui.m_c1.selectedIndex == (int)TravelGuideType.NoTravel)
             {
                 ItemCfg cfg = ItemCfgArray.Instance.GetCfg(GlobalCfgArray.globalCfg.travelCostArr[0]);
@@ -105,11 +107,11 @@ namespace GFGGame
                 TravelDataManager.Instance.TravelData.Status = (int)TravelGuideType.TravelComplete;
                 _ui.m_txtTime.text = "";
                 UpdateView();
-
             }
-            _ui.m_txtTime.text = string.Format("大约{0}后归来", TimeUtil.FormattingTime(curTime, endTime));
 
+            _ui.m_txtTime.text = string.Format("大约{0}后归来", TimeUtil.FormattingTime(curTime, endTime));
         }
+
         private void OnBtnBackClick()
         {
             ViewManager.GoBackFrom(typeof(TravelView).FullName);
@@ -122,17 +124,19 @@ namespace GFGGame
 
         private void OnBtnGoClick()
         {
-            if (PoemPhotoDataManager.Instance.WsqsPhotoInfos.Count >= GlobalCfgArray.globalCfg.maxTravelCount)
+            if (PoemPhotoDataManager.Instance.WsqsPhotoInfos.Count >= RoleDataManager.WanShuiQianShanMaxStorageCount)
             {
                 PromptController.Instance.ShowFloatTextPrompt("明信片装不下了,先删除一些再去游历吧");
                 return;
             }
+
             long hasCount = ItemDataManager.GetItemNum(GlobalCfgArray.globalCfg.travelCostArr[0]);
             if (hasCount < GlobalCfgArray.globalCfg.travelCostArr[1])
             {
                 PromptController.Instance.ShowFloatTextPrompt("消耗不足");
                 return;
             }
+
             ViewManager.Show<TravelDressupView>(null, new object[] { typeof(TravelView).FullName, this.viewData });
         }
 
@@ -143,7 +147,8 @@ namespace GFGGame
 
         private void OnBtnPhotoClick()
         {
-            ViewManager.Show<PoemPhotoView>(PictureSourceType.WanShuiQianShan, new object[] { typeof(TravelView).FullName, this.viewData });
+            ViewManager.Show<PoemPhotoView>(PictureSourceType.WanShuiQianShan,
+                new object[] { typeof(TravelView).FullName, this.viewData });
         }
 
         private void OnBtnFieldGuideClick()
@@ -162,11 +167,13 @@ namespace GFGGame
                 Timers.inst.Remove(CheckGuide);
             }
         }
+
         protected override void UpdateToCheckGuide(object param)
         {
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
 
-            GuideController.TryGuide(null, ConstGuideId.TRAVEL, 1, "四方关津已经打通,带上心仪的服饰,就可以外出游历啦!", -1, true, _ui.m_btnPhoto.y + _ui.m_btnPhoto.height + 100);
+            GuideController.TryGuide(null, ConstGuideId.TRAVEL, 1, "四方关津已经打通,带上心仪的服饰,就可以外出游历啦!", -1, true,
+                _ui.m_btnPhoto.y + _ui.m_btnPhoto.height + 100);
             GuideController.TryCompleteGuide(ConstGuideId.TRAVEL, 1);
         }
     }