guodong 3 жил өмнө
parent
commit
e36d79912e

+ 1 - 1
GameClient/Assets/Game/CSShare

@@ -1 +1 @@
-Subproject commit 36bc27be1863260697ba14637b4d5aca26926e3d
+Subproject commit 6e640d573c4fbaea6b613c9a56f32865145a6c67

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/Cache/LuckyBoxBonusDataCache.cs

@@ -149,7 +149,7 @@ namespace GFGGame
             }
             }
             else
             else
             {
             {
-                ExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(itemId);
+                ItemExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(itemId);
                 int costHasNum = ItemDataManager.GetItemNum(currencyRatioCfg.costId);
                 int costHasNum = ItemDataManager.GetItemNum(currencyRatioCfg.costId);
                 int costNeedNum = ItemUtil.GetCostItemCount(itemId, count - hasNum);
                 int costNeedNum = ItemUtil.GetCostItemCount(itemId, count - hasNum);
                 if (costHasNum >= costNeedNum)
                 if (costHasNum >= costNeedNum)

+ 9 - 9
GameClient/Assets/Game/HotUpdate/Utils/ItemUtil.cs

@@ -14,7 +14,7 @@ namespace GFGGame
         /// <param name="showTxtBuyTips">是否显示购买提示</param>
         /// <param name="showTxtBuyTips">是否显示购买提示</param>
         public static void ExchangeItemById(int itemId, int num, bool showTips = true, Action onSuccess = null, bool openSource = false, int maxCount = 9990, bool showTxtBuyTips = false, string prefix = "")
         public static void ExchangeItemById(int itemId, int num, bool showTips = true, Action onSuccess = null, bool openSource = false, int maxCount = 9990, bool showTxtBuyTips = false, string prefix = "")
         {
         {
-            ExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(itemId);
+            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(itemId);
             if (itemId == ConstItemID.GOLD)
             if (itemId == ConstItemID.GOLD)
             {
             {
                 AddGold(num, onSuccess);
                 AddGold(num, onSuccess);
@@ -30,15 +30,15 @@ namespace GFGGame
             }
             }
         }
         }
 
 
-        public static ExchangeCfg GetCurrencyRatioCfgById(int itemId)
+        public static ItemExchangeCfg GetCurrencyRatioCfgById(int itemId)
         {
         {
-            ExchangeCfg[] currencyRatioCfgs = ExchangeCfgArray.Instance.GetCfgs(itemId);
+            ItemExchangeCfg[] currencyRatioCfgs = ItemExchangeCfgArray.Instance.GetCfgs(itemId);
             if (currencyRatioCfgs.Length == 0)
             if (currencyRatioCfgs.Length == 0)
             {
             {
                 UnityEngine.Debug.LogWarning(itemId + "在h货币换算.xlsx中没有配置");
                 UnityEngine.Debug.LogWarning(itemId + "在h货币换算.xlsx中没有配置");
                 return null;
                 return null;
             }
             }
-            ExchangeCfg currencyRatioCfg;
+            ItemExchangeCfg currencyRatioCfg;
             if (itemId == ConstItemID.POWER)
             if (itemId == ConstItemID.POWER)
             {
             {
                 int powerBuyTimes = GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerBuyTimes);
                 int powerBuyTimes = GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerBuyTimes);
@@ -60,7 +60,7 @@ namespace GFGGame
         }
         }
         public static void AddPower(string prefix = "", Action onSuccess = null)
         public static void AddPower(string prefix = "", Action onSuccess = null)
         {
         {
-            ExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(ConstItemID.POWER);
+            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(ConstItemID.POWER);
             int count = GetCostItemCount(ConstItemID.POWER, currencyRatioCfg.num);
             int count = GetCostItemCount(ConstItemID.POWER, currencyRatioCfg.num);
             int powerBuyTimes = GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerBuyTimes);
             int powerBuyTimes = GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerBuyTimes);
             int lastBuyCount = currencyRatioCfg.maxLimit - powerBuyTimes;
             int lastBuyCount = currencyRatioCfg.maxLimit - powerBuyTimes;
@@ -79,7 +79,7 @@ namespace GFGGame
 
 
         public static void AddGold(int value = 0, Action onSuccess = null)
         public static void AddGold(int value = 0, Action onSuccess = null)
         {
         {
-            ExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(ConstItemID.GOLD);
+            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(ConstItemID.GOLD);
             int count = value > 0 ? value : currencyRatioCfg.num;
             int count = value > 0 ? value : currencyRatioCfg.num;
             int costCount = GetCostItemCount(ConstItemID.GOLD, count);
             int costCount = GetCostItemCount(ConstItemID.GOLD, count);
             int lastBuyCount = currencyRatioCfg.maxLimit - GameGlobal.myNumericComponent.GetAsInt(NumericType.GoldBuyTimes);
             int lastBuyCount = currencyRatioCfg.maxLimit - GameGlobal.myNumericComponent.GetAsInt(NumericType.GoldBuyTimes);
@@ -112,7 +112,7 @@ namespace GFGGame
         public static void AddDiamondRed(int value = 0, Action onSuccess = null)
         public static void AddDiamondRed(int value = 0, Action onSuccess = null)
         {
         {
 
 
-            ExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(ConstItemID.DIAMOND_RED);
+            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(ConstItemID.DIAMOND_RED);
             BuyItemConteoller.Show(currencyRatioCfg.id, currencyRatioCfg.costId, currencyRatioCfg.num, currencyRatioCfg.costNum, value > 0 ? value : currencyRatioCfg.num, onSuccess, true, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED);
             BuyItemConteoller.Show(currencyRatioCfg.id, currencyRatioCfg.costId, currencyRatioCfg.num, currencyRatioCfg.costNum, value > 0 ? value : currencyRatioCfg.num, onSuccess, true, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED);
             BuyItemConteoller.showTxtBuyTips = true;
             BuyItemConteoller.showTxtBuyTips = true;
         }
         }
@@ -121,7 +121,7 @@ namespace GFGGame
         /// </summary>
         /// </summary>
         public static int GetCostItemCount(int itemId, int count)
         public static int GetCostItemCount(int itemId, int count)
         {
         {
-            ExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(itemId);
+            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(itemId);
             if (currencyRatioCfg != null)
             if (currencyRatioCfg != null)
             {
             {
                 return (int)Math.Ceiling((decimal)count / currencyRatioCfg.num * currencyRatioCfg.costNum);
                 return (int)Math.Ceiling((decimal)count / currencyRatioCfg.num * currencyRatioCfg.costNum);
@@ -137,7 +137,7 @@ namespace GFGGame
         /// </summary>
         /// </summary>
         public static int GetItemExChangeCount(int itemId, int costCount)
         public static int GetItemExChangeCount(int itemId, int costCount)
         {
         {
-            ExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(itemId);
+            ItemExchangeCfg currencyRatioCfg = GetCurrencyRatioCfgById(itemId);
             if (currencyRatioCfg != null)
             if (currencyRatioCfg != null)
             {
             {
                 return (int)Math.Floor((decimal)costCount / currencyRatioCfg.costNum * currencyRatioCfg.num);
                 return (int)Math.Floor((decimal)costCount / currencyRatioCfg.costNum * currencyRatioCfg.num);

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

@@ -50,7 +50,7 @@ namespace GFGGame
             {
             {
                 int luckyBoxId = LuckyBoxBonusDataCache.currentBoxId;
                 int luckyBoxId = LuckyBoxBonusDataCache.currentBoxId;
                 LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
                 LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
-                ExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(luckyBoxCfg.costID);
+                ItemExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(luckyBoxCfg.costID);
                 ItemUtil.ExchangeItemById(luckyBoxCfg.costID, (int)(currencyRatioCfg != null ? currencyRatioCfg.num : 20), true);
                 ItemUtil.ExchangeItemById(luckyBoxCfg.costID, (int)(currencyRatioCfg != null ? currencyRatioCfg.num : 20), true);
 
 
             }));
             }));

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyConfirmView.cs

@@ -86,7 +86,7 @@ namespace GFGGame
                     Alert.Show(costCfg.name + "不足,是否前往购买?").SetLeftButton(true).SetRightButton(true, "确认", (AlertWindow.AlertCallback)((object data) =>
                     Alert.Show(costCfg.name + "不足,是否前往购买?").SetLeftButton(true).SetRightButton(true, "确认", (AlertWindow.AlertCallback)((object data) =>
                                        {
                                        {
                                            int costNeedCount = _costCount - ItemDataManager.GetItemNum(_costId);
                                            int costNeedCount = _costCount - ItemDataManager.GetItemNum(_costId);
-                                           ExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(_costId);
+                                           ItemExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(_costId);
                                            BuyItemConteoller.Show(_costId, (int)currencyRatioCfg.costId, (int)currencyRatioCfg.num, (int)currencyRatioCfg.costNum, costNeedCount, null, true, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED);
                                            BuyItemConteoller.Show(_costId, (int)currencyRatioCfg.costId, (int)currencyRatioCfg.num, (int)currencyRatioCfg.costNum, costNeedCount, null, true, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED);
                                        }));
                                        }));
                     OnClickBtnCancel();
                     OnClickBtnCancel();
@@ -94,7 +94,7 @@ namespace GFGGame
 
 
                 return;
                 return;
             }
             }
-            ExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(_itemId);
+            ItemExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(_itemId);
 
 
             // int count = (int)Math.Ceiling((decimal)_costCount / currencyRatioCfg.costNum * currencyRatioCfg.num);
             // int count = (int)Math.Ceiling((decimal)_costCount / currencyRatioCfg.costNum * currencyRatioCfg.num);
             int count = ItemUtil.GetItemExChangeCount(_itemId, _costCount);
             int count = ItemUtil.GetItemExChangeCount(_itemId, _costCount);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyTipsView.cs

@@ -54,7 +54,7 @@ namespace GFGGame
         }
         }
         private void OnClickBtnSure()
         private void OnClickBtnSure()
         {
         {
-            ExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(_itemId);
+            ItemExchangeCfg currencyRatioCfg = ItemUtil.GetCurrencyRatioCfgById(_itemId);
 
 
             int count = ItemUtil.GetItemExChangeCount(_itemId, _costCount);
             int count = ItemUtil.GetItemExChangeCount(_itemId, _costCount);
             ItemUtil.AddItemUseCost(_itemId, count, _costId, _costCount);
             ItemUtil.AddItemUseCost(_itemId, count, _costId, _costCount);

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes