Ver código fonte

配置扩展

guodong 1 ano atrás
pai
commit
246f11dd1d

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

@@ -632,7 +632,7 @@ namespace GFGGame
             shopCfgs = ShopDataManager.Instance.RemoveNotOpenCfg(shopCfgs);
             for (int i = 0; i < shopCfgs.Count; i++)
             {
-                if (shopCfgs[i].price == 0 && ShopDataManager.Instance.GetGoodsBuyNumById(shopCfgs[i].id) < shopCfgs[i].maxBuyNum) return true;
+                if (shopCfgs[i].Price == 0 && ShopDataManager.Instance.GetGoodsBuyNumById(shopCfgs[i].id) < shopCfgs[i].maxBuyNum) return true;
             }
             return false;
         }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs

@@ -51,7 +51,7 @@ namespace GFGGame
             ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(buyId);
 
             costId = shopCfg.costId;
-            costNum = shopCfg.price * count;
+            costNum = shopCfg.Price * count;
             buyNum = count;
         }
 
@@ -238,8 +238,8 @@ namespace GFGGame
         public int GetShopGoodsDiscount(int goodsId)
         {
             ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(goodsId);
-            if (shopCfg.price == 0) return 0;
-            return (int)(((double)shopCfg.originalPrice / (double)shopCfg.price) * 100);
+            if (shopCfg.Price == 0) return 0;
+            return (int)(((double)shopCfg.originalPrice / (double)shopCfg.Price) * 100);
         }
 
 

+ 7 - 7
GameClient/Assets/Game/HotUpdate/Data/ShopViewManager.cs

@@ -77,14 +77,14 @@ namespace GFGGame
             item.m_txtName.text = shopCfg.itemName;
             item.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
 
-            item.m_grpDiscount.visible = shopCfg.price < shopCfg.originalPrice;
+            item.m_grpDiscount.visible = shopCfg.Price < shopCfg.originalPrice;
             if (item.m_grpDiscount.visible)
             {
                 EffectUI _effectUI = EffectUIPool.CreateEffectUI(item.m_holderfEff, "ui_Small_parts", "store_Value");
                 _effectUIs.Add(_effectUI);
-                item.m_holderfEff.visible = shopCfg.price < shopCfg.originalPrice;
+                item.m_holderfEff.visible = shopCfg.Price < shopCfg.originalPrice;
             }
-            item.m_txtDesc.text = shopCfg.price <= 0 ? "" : ShopDataManager.Instance.GetShopGoodsDiscount(shopCfg.id).ToString();
+            item.m_txtDesc.text = shopCfg.Price <= 0 ? "" : ShopDataManager.Instance.GetShopGoodsDiscount(shopCfg.id).ToString();
 
             item.m_txtEndTime.SetVar("value", ShopDataManager.Instance.GetEndTime(shopCfg.id)).FlushVars();
             item.m_txtEndTime.visible = shopCfg.endTime != "";
@@ -100,11 +100,11 @@ namespace GFGGame
             if (item.m_c1.selectedIndex == 0)//可购买
             {
                 item.m_btnBuy.m_txtOriginalPrice.text = NumberUtil.ChangeNumberUnit(shopCfg.originalPrice);
-                if (shopCfg.price > 0 && shopCfg.costType != CostType.FREE)//不免费
+                if (shopCfg.Price > 0 && shopCfg.costType != CostType.FREE)//不免费
                 {
-                    item.m_btnBuy.m_grpOriginalPrice.visible = shopCfg.originalPrice > 0 && shopCfg.originalPrice != shopCfg.price;
+                    item.m_btnBuy.m_grpOriginalPrice.visible = shopCfg.originalPrice > 0 && shopCfg.originalPrice != shopCfg.Price;
                     item.m_btnBuy.m_loaIcon.visible = true;
-                    item.m_btnBuy.m_txtPrice.text = NumberUtil.ChangeNumberUnit(shopCfg.price);// cfg.price.ToString();
+                    item.m_btnBuy.m_txtPrice.text = NumberUtil.ChangeNumberUnit(shopCfg.Price);// cfg.price.ToString();
 
                     if (shopCfg.costType == CostType.RMB)//人民币
                     {
@@ -134,7 +134,7 @@ namespace GFGGame
                 item.target.onClick.Add(OnBtnBugItem);
             }
             item.target.data = shopCfg;
-            bool isRed = item.m_c1.selectedIndex == 0 && item.m_c2.selectedIndex == 0 && shopCfg.price == 0;
+            bool isRed = item.m_c1.selectedIndex == 0 && item.m_c2.selectedIndex == 0 && shopCfg.Price == 0;
 
             RedDotController.Instance.SetComRedDot(item.target, isRed, "", -6, 100);
             UI_ListShopItem.ProxyEnd();

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/ClothingShop/ClothingShopView.cs

@@ -318,7 +318,7 @@ namespace GFGGame
             ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(cfg.costId);
             listItem.m_iconPrice.url = "ui://CommonGame/" + costItemCfg.res;
             listItem.m_imgOwned.visible = ItemDataManager.GetItemNum(cfg.itemId) > 0;
-            listItem.m_txtPrice.text = ItemDataManager.GetItemNum(cfg.costId) >= cfg.price ? StringUtil.GetColorText(cfg.price.ToString(), "#DD994A") : StringUtil.GetColorText(cfg.price.ToString(), "#F2989B");
+            listItem.m_txtPrice.text = ItemDataManager.GetItemNum(cfg.costId) >= cfg.Price ? StringUtil.GetColorText(cfg.Price.ToString(), "#DD994A") : StringUtil.GetColorText(cfg.Price.ToString(), "#F2989B");
             listItem.m_loaMainScore.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (itemCfg.mainScore));
 
             UI_ListClothingShopItem.ProxyEnd();
@@ -351,7 +351,7 @@ namespace GFGGame
             RarityIconController.UpdateRarityIcon(_ui.m_compItemInfo.m_rarity, _cfgSelected.itemId, false);
             ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.costId);
             _ui.m_compItemInfo.m_iconPrice.url = "ui://CommonGame/" + costItemCfg.res;
-            _ui.m_compItemInfo.m_txtPrice.text = "" + _cfgSelected.price;
+            _ui.m_compItemInfo.m_txtPrice.text = "" + _cfgSelected.Price;
             _ui.m_compItemInfo.m_txtGong.text = "" + itemCfg.score1;
             _ui.m_compItemInfo.m_txtShang.text = "" + itemCfg.score2;
             _ui.m_compItemInfo.m_txtJue.text = "" + itemCfg.score3;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/ClothingShop/GalleryShopView.cs

@@ -231,7 +231,7 @@ namespace GFGGame
             listItem.m_iconPrice.url = "ui://CommonGame/" + costItemCfg.res;
             listItem.m_imgOwned.visible = ItemDataManager.GetItemNum(cfg.itemId) > 0;
             // listItem.m_txtPrice.text = ItemDataManager.GetItemNum(cfg.costID) >= cfg.costNum ? StringUtil.GetColorText(cfg.costNum.ToString(), "#DD994A") : StringUtil.GetColorText(cfg.costNum.ToString(), "#F2989B");
-            listItem.m_txtPrice.text = cfg.price.ToString();
+            listItem.m_txtPrice.text = cfg.Price.ToString();
             UI_ListGalleryShopItem.ProxyEnd();
         }
         private void OnClickListShopItem(EventContext context)

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

@@ -123,7 +123,7 @@ namespace GFGGame
             if (buyType == ConstBuyType.TYPE_SHOP)
             {
                 ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(buyId);
-                int maxBuyCount = (int)Math.Floor((decimal)(ItemDataManager.GetItemNum(shopCfg.costId) / shopCfg.price));
+                int maxBuyCount = (int)Math.Floor((decimal)(ItemDataManager.GetItemNum(shopCfg.costId) / shopCfg.Price));
                 _maxCanBuy = Math.Min(maxCount, maxBuyCount);
                 _itemId = shopCfg.itemId;
 

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs

@@ -209,13 +209,13 @@ namespace GFGGame
                 item.m_btnBuy.m_txtNewPrice.x = 90;
             }
 
-            item.m_btnBuy.m_txtNewPrice.text = $"{shopCfg.price + mTxtOldPrice}";
+            item.m_btnBuy.m_txtNewPrice.text = $"{shopCfg.Price + mTxtOldPrice}";
             item.m_comLeftGiftBox.target.data = itemCfg;
             item.m_comLeftGiftBox.target.onClick.Add(OnListSelectorItemClick);
 
-            if (shopCfg.originalPrice != shopCfg.price)
+            if (shopCfg.originalPrice != shopCfg.Price)
             {
-                var roundedNumStr = NumberUtil.CalculateDiscount(shopCfg.originalPrice, shopCfg.price);
+                var roundedNumStr = NumberUtil.CalculateDiscount(shopCfg.originalPrice, shopCfg.Price);
                 item.m_comLeftGiftBox.m_comDiscount.target.visible = true;
                 item.m_comLeftGiftBox.m_comDiscount.m_txtDiscountNum.text = $"{roundedNumStr}折"; //之后再计算赋值
             }
@@ -229,7 +229,7 @@ namespace GFGGame
                 //日刷
                 item.m_comLeftGiftBox.m_comGouMaiGetText.target.visible = false;
                 item.m_txtUrc.text = string.Format("今日剩余{0}/{1}", remainBuyNum, shopCfg.maxBuyNum);
-                item.m_txtLrc.text = string.Format("可获得{0}会员积分", shopCfg.price * 10);
+                item.m_txtLrc.text = string.Format("可获得{0}会员积分", shopCfg.Price * 10);
                 item.m_txtWeekPrompt.visible = false;
                 item.m_btnIcoWeekPromptTag.visible = false;
                 numItems = childItemCfg.itemsArr.Length;

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/RushSaleGiftBoxView.cs

@@ -223,7 +223,7 @@ namespace GFGGame
             {
                 //货币
                 ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(shopCfg.costId);
-                mTxtNewPrice = shopCfg.price.ToString();
+                mTxtNewPrice = shopCfg.Price.ToString();
                 _ui.m_btnBuyPink.m_loaIcon.visible = true;
                 _ui.m_btnBuyPink.m_loaIcon.url = ResPathUtil.GetIconPath(costCfg);
                 //_ui.m_btnBuyPink.m_txtNewPrice.x = 166;
@@ -231,10 +231,10 @@ namespace GFGGame
             else if (shopCfg.costType == CostType.RMB)
             {
                 //人民币
-                mTxtNewPrice = $"{shopCfg.price}元";
+                mTxtNewPrice = $"{shopCfg.Price}元";
                 //_ui.m_btnBuyPink.m_txtNewPrice.align = AlignType.Left;
                 //_ui.m_btnBuyPink.m_txtNewPrice.x = 166;
-                _ui.m_txtLrc.text = $"可获得{shopCfg.price * 10}会员积分";
+                _ui.m_txtLrc.text = $"可获得{shopCfg.Price * 10}会员积分";
             }
             else
             {
@@ -277,7 +277,7 @@ namespace GFGGame
             _ui.m_txtBoxResidueTime.text = TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), list[0].EndTime);
             _ui.m_txtUrc.text = mTxtUrc;
             _ui.m_comDiscount.m_txtDiscountNum.text =
-                NumberUtil.CalculateDiscount(shopCfg.originalPrice, shopCfg.price);
+                NumberUtil.CalculateDiscount(shopCfg.originalPrice, shopCfg.Price);
             _ui.m_btnBuyPink.m_txtNewPrice.text = mTxtNewPrice;
             _ui.m_btnBuyPink.target.data = shopCfg;
 

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/SpecialOfferGiftBoxView.cs

@@ -131,7 +131,7 @@ namespace GFGGame
             {
                 //货币
                 ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(shopCfg.costId);
-                mTxtNewPrice = shopCfg.price.ToString();
+                mTxtNewPrice = shopCfg.Price.ToString();
                 uiItem.m_btnBuy.m_loaIcon.visible = true;
                 uiItem.m_btnBuy.m_txtNewPrice.x = 134;
                 uiItem.m_btnBuy.m_txtOldPrice.x = 21;
@@ -140,11 +140,11 @@ namespace GFGGame
             else if (shopCfg.costType == CostType.RMB)
             {
                 //人民币 
-                mTxtNewPrice = $"{shopCfg.price}元";
+                mTxtNewPrice = $"{shopCfg.Price}元";
                 uiItem.m_btnBuy.m_txtNewPrice.align = AlignType.Left;
                 uiItem.m_btnBuy.m_txtNewPrice.x = 125;
                 uiItem.m_btnBuy.m_txtOldPrice.x = 30;
-                uiItem.m_txtGetJf.text = $"可获得{shopCfg.price * 10}会员积分";
+                uiItem.m_txtGetJf.text = $"可获得{shopCfg.Price * 10}会员积分";
             }
             else
             {
@@ -183,7 +183,7 @@ namespace GFGGame
             }
 
             uiItem.m_comDiscount.m_txtDiscountNum.text =
-                NumberUtil.CalculateDiscount(shopCfg.originalPrice, shopCfg.price);
+                NumberUtil.CalculateDiscount(shopCfg.originalPrice, shopCfg.Price);
             uiItem.target.data = shopCfg;
             uiItem.m_btnBuy.m_txtNewPrice.text = mTxtNewPrice;
             uiItem.m_txtUrc.text = mTxtUrc;

+ 7 - 7
GameClient/Assets/Game/HotUpdate/Views/Store/ItemExchangeView.cs

@@ -63,12 +63,12 @@ namespace GFGGame
             else
             {
                 long itemCount = ItemDataManager.GetItemNum(_shopCfg.costId);
-                long curMoneyCanBuy = itemCount / _shopCfg.price;
+                long curMoneyCanBuy = itemCount / _shopCfg.Price;
                 if (_shopCfg.menu1 == ConstStoreTabId.STORE_ARENA)
                 {
                     itemCount = ItemDataManager.GetItemNum(ConstItemID.ARENA_CUR_COST);
                     long itemCountOther = ItemDataManager.GetItemNum(ConstItemID.ARENA_PAST_COST);
-                    curMoneyCanBuy = (itemCount + itemCountOther) / _shopCfg.price;
+                    curMoneyCanBuy = (itemCount + itemCountOther) / _shopCfg.Price;
                 }
                 if (_shopCfg.maxBuyNum == 0)
                 {
@@ -162,14 +162,14 @@ namespace GFGGame
             {
                 _ui.m_comCost.target.visible = false;
                 _ui.m_txtRmbCost.visible = true;
-                _ui.m_txtRmbCost.text = string.Format("¥ {0}", _shopCfg.price);
+                _ui.m_txtRmbCost.text = string.Format("¥ {0}", _shopCfg.Price);
                 // _ui.m_txtRmbCost.SetVar("value", _shopCfg.price.ToString()).FlushVars();
             }
             else
             {
                 _ui.m_comCost.target.visible = true;
                 _ui.m_txtRmbCost.visible = false;
-                ItemUtil.UpdateItemNeedNum(_ui.m_comCost.target, _shopCfg.costId, (int)_buyCount * _shopCfg.price);
+                ItemUtil.UpdateItemNeedNum(_ui.m_comCost.target, _shopCfg.costId, (int)_buyCount * _shopCfg.Price);
             }
         }
 
@@ -210,8 +210,8 @@ namespace GFGGame
                 {
                     costId = cfg.oldSeasonCostId;
                 }
-                if (costId == ConstItemID.ARENA_PAST_COST && ItemDataManager.GetItemNum(costId) < cfg.price
-                && ItemDataManager.GetItemNum(costId) + ItemDataManager.GetItemNum(ConstItemID.ARENA_CUR_COST) >= cfg.price)
+                if (costId == ConstItemID.ARENA_PAST_COST && ItemDataManager.GetItemNum(costId) < cfg.Price
+                && ItemDataManager.GetItemNum(costId) + ItemDataManager.GetItemNum(ConstItemID.ARENA_CUR_COST) >= cfg.Price)
                 {
                     string oldSeasonName = ItemCfgArray.Instance.GetCfg(ConstItemID.ARENA_PAST_COST).name;
                     string curSeasonName = ItemCfgArray.Instance.GetCfg(ConstItemID.ARENA_CUR_COST).name;
@@ -223,7 +223,7 @@ namespace GFGGame
                     });
                     return;
                 }
-                else if (ItemDataManager.GetItemNum(costId) < cfg.price)
+                else if (ItemDataManager.GetItemNum(costId) < cfg.Price)
                 {
                     PromptController.Instance.ShowFloatTextPrompt("道具不足");
                     return;

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/Store/StoreChargeView.cs

@@ -89,7 +89,7 @@ namespace GFGGame
             ShopCfg shopCfg = _shopCfgs[index];
             UI_ListChargeItem item = UI_ListChargeItem.Proxy(obj);
             item.m_btnBuy.m_c1.selectedIndex = 1;
-            item.m_btnBuy.m_txtTitle.text = shopCfg.price.ToString();
+            item.m_btnBuy.m_txtTitle.text = shopCfg.Price.ToString();
             if (item.target.data == null)
             {
                 item.target.onClick.Add(OnClickBtnBuy);
@@ -117,7 +117,7 @@ namespace GFGGame
             GObject obj = context.sender as GObject;
             int index = (int)obj.data;
             ShopCfg itemData = _shopCfgs[index];
-            if (!AntiAddictionController.CheckAntiAddictionRecharge(itemData.price))
+            if (!AntiAddictionController.CheckAntiAddictionRecharge(itemData.Price))
             {
                 ShopSProxy.ReqShopBuy(itemData.id, 1).Coroutine();
                 LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);

+ 5 - 5
GameClient/Assets/Game/HotUpdate/Views/Store/StoreGiftBagAddRebateView.cs

@@ -149,13 +149,13 @@ namespace GFGGame
                 item.m_btnBuy.m_txtNewPrice.x = 90;
             }
 
-            item.m_btnBuy.m_txtNewPrice.text = $"{shopCfg.price + mTxtOldPrice}";
+            item.m_btnBuy.m_txtNewPrice.text = $"{shopCfg.Price + mTxtOldPrice}";
             item.m_comLeftGiftBox.target.data = itemCfg;
             item.m_comLeftGiftBox.target.onClick.Add(OnListSelectorItemClick);
 
-            if (shopCfg.originalPrice != shopCfg.price)
+            if (shopCfg.originalPrice != shopCfg.Price)
             {
-                var roundedNumStr = NumberUtil.CalculateDiscount(shopCfg.originalPrice, shopCfg.price);
+                var roundedNumStr = NumberUtil.CalculateDiscount(shopCfg.originalPrice, shopCfg.Price);
                 item.m_comLeftGiftBox.m_comDiscount.target.visible = true;
                 item.m_comLeftGiftBox.m_comDiscount.m_txtDiscountNum.text = $"{roundedNumStr}折"; //之后再计算赋值
             }
@@ -169,7 +169,7 @@ namespace GFGGame
                 //日刷
                 item.m_comLeftGiftBox.m_comGouMaiGetText.target.visible = false;
                 item.m_txtUrc.text = string.Format("今日剩余{0}/{1}", remainBuyNum, shopCfg.maxBuyNum);
-                item.m_txtLrc.text = string.Format("可获得{0}会员积分", shopCfg.price * 10);
+                item.m_txtLrc.text = string.Format("可获得{0}会员积分", shopCfg.Price * 10);
                 item.m_txtWeekPrompt.visible = false;
                 item.m_btnIcoWeekPromptTag.visible = false;
                 numItems = childItemCfg.itemsArr.Length;
@@ -289,7 +289,7 @@ namespace GFGGame
             item.m_list.numItems = numItems;
             UI_ComCurSupplyItem.ProxyEnd();
 
-            RedDotController.Instance.SetComRedDot(obj.asCom, menu2 == ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY && shopCfg.price == 0 && ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id) < shopCfg.maxBuyNum, "", 5, 76);
+            RedDotController.Instance.SetComRedDot(obj.asCom, menu2 == ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY && shopCfg.Price == 0 && ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id) < shopCfg.maxBuyNum, "", 5, 76);
         }
 
         // ReSharper disable Unity.PerformanceAnalysis

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Store/StoreGiftBagView.cs

@@ -79,7 +79,7 @@ namespace GFGGame
         {
             ShopCfg shopCfg = _shopCfgs[index];
             ShopViewManager.Instance.UptadeItem(obj, shopCfg);
-            RedDotController.Instance.SetComRedDot(obj.asCom, menu2 == ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY && shopCfg.price == 0 && ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id) < shopCfg.maxBuyNum, "", 5, 76);
+            RedDotController.Instance.SetComRedDot(obj.asCom, menu2 == ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY && shopCfg.Price == 0 && ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id) < shopCfg.maxBuyNum, "", 5, 76);
         }
     }
 }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/Store/StoreMonthView.cs

@@ -153,8 +153,8 @@ namespace GFGGame
                 }
             }
             _ui.m_btnBuy.m_txtOriginalPrice.text = shopCfg.originalPrice.ToString();
-            _ui.m_btnBuy.m_grpOriginalPrice.visible = shopCfg.price < shopCfg.originalPrice;
-            int price = shopCfg.price;
+            _ui.m_btnBuy.m_grpOriginalPrice.visible = shopCfg.Price < shopCfg.originalPrice;
+            int price = shopCfg.Price;
             _ui.m_btnBuy.m_txtPrice.text = price.ToString();
             _ui.m_btnBuy.target.data = shopCfg.id;
             _ui.m_txtTips.SetVar("value", (price * 10).ToString()).FlushVars();
@@ -197,7 +197,7 @@ namespace GFGGame
             GObject obj = context.sender as GObject;
             int index = (int)obj.data;
             ShopCfg itemData = _shopCfgs[index];
-            if (!AntiAddictionController.CheckAntiAddictionRecharge(itemData.price))
+            if (!AntiAddictionController.CheckAntiAddictionRecharge(itemData.Price))
             {
                 bool result = await ShopSProxy.ReqShopBuy(itemData.id, 1);
                 if (result)