zhaoyang 3 rokov pred
rodič
commit
12c2e70737

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

@@ -257,14 +257,14 @@ namespace GFGGame
         public static int GetCanFightTime(int levelCfgId)
         {
             var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
-            int times = (int)Math.Floor((float)GameGlobal.myNumericComponent.GetAsInt(NumericType.Power) / levelCfg.power);
+            int times = (int)Math.Floor((float)RoleDataManager.power / levelCfg.power);
             return times;
         }
 
         public static void GetCanFightTime(int type, int subType, int levelCfgId, out int times, out string title)
         {
             var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
-            times = (int)Math.Floor((float)GameGlobal.myNumericComponent.GetAsInt(NumericType.Power) / levelCfg.power);//体力次数
+            times = (int)Math.Floor((float)RoleDataManager.power / levelCfg.power);//体力次数
             title = "";
             if (type == ConstInstanceZonesType.Story && subType == ConstInstanceZonesSubType.Normal)
             {

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

@@ -86,7 +86,7 @@ namespace GFGGame
 
         public static bool CheckPowerFull()
         {
-            return GameGlobal.myNumericComponent.GetAsInt(NumericType.Power) >= GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit);
+            return RoleDataManager.power >= GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit);
         }
 
         public static void InitServerData()

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs

@@ -94,7 +94,7 @@ namespace GFGGame
         private void UpdateNumeric()
         {
             _valueBar.m_btnGold.text = "" + RoleDataManager.gold; //GameGlobal.myNumericComponent.GetAsInt(NumericType.Gold);
-            _valueBar.m_btnPower.text = string.Format("{0}/{1}", GameGlobal.myNumericComponent.GetAsInt(NumericType.Power), GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit));
+            _valueBar.m_btnPower.text = string.Format("{0}/{1}", RoleDataManager.power, GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit));
             _valueBar.m_btnDiamondPurple.text = "" + RoleDataManager.diaP;// GameGlobal.myNumericComponent.GetAsInt(NumericType.DiamondP);
             _valueBar.m_btnDiamondRed.text = "" + RoleDataManager.diaR;// GameGlobal.myNumericComponent.GetAsInt(NumericType.DiamondR);
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Field/FieldView.cs

@@ -124,7 +124,7 @@ namespace GFGGame
         private void OnClickBtnGo()
         {
 
-            if (GameGlobal.myNumericComponent.GetAsInt(NumericType.Power) < _curCfg.needPower)
+            if (RoleDataManager.power < _curCfg.needPower)
             {
                 PromptController.Instance.ShowFloatTextPrompt("体力不足");
                 return;