ybx_Gdn 11 ماه پیش
والد
کامیت
2f7352dfc9

+ 2 - 2
Assets/Lua/Logic/TaskItemDataNew.lua

@@ -54,7 +54,7 @@ function TaskItemDataNew:RefreshTaskItem(_data)
             local _needChangeEnum = self:IsNeedChangeEnum(_keyCon);
             local _totalConStr = tostring(_totalCon);
             if _needChangeEnum and _w <= _totalCon then
-                _totalConStr = CommonUtil.GetPreciseDecimalFloor(_totalCon/10000, 1) .. "萬";--w
+                _totalConStr = CommonUtil.GetPreciseDecimalFloor(_totalCon/10000, 1) .. CommonUtil.Get_Wan_string()--"萬";--w
             end
             local _progress = {
                 _key = _keyCon,
@@ -67,7 +67,7 @@ function TaskItemDataNew:RefreshTaskItem(_data)
             local _value, _state = self:GetProgressByKey(_progress._key, _data.progress);
             _progress._value = _value or 0;
             if _needChangeEnum and _w <= _progress._value then
-                _progress._valueStr = CommonUtil.GetPreciseDecimalFloor(_progress._value/10000, 1) .. "萬";--w
+                _progress._valueStr = CommonUtil.GetPreciseDecimalFloor(_progress._value/10000, 1) .. CommonUtil.Get_Wan_string()--"萬";--w
             else
                 _progress._valueStr = tostring(_progress._value)
             end

+ 1 - 1
Assets/Lua/UI/Common/IconItemCtr.lua

@@ -254,7 +254,7 @@ function IconItemCtr:RefreshIcon(wnd, itemlua, logicData, enterType, onClickOwne
             if iconType < 100 then
                 itemlua.num.text.text = CommonUtil.FormatNumber(num)
             else
-                itemlua.num.text.text = CommonUtil.GetPreciseDecimalFloor(num/10000, 1) .. "萬"--w
+                itemlua.num.text.text = CommonUtil.GetPreciseDecimalFloor(num/10000, 1) .. CommonUtil.Get_Wan_string()--"萬"--w
             end
         else
             itemlua.num.text.text = tostring(num)

+ 1 - 1
Assets/Lua/UI/Common/RuneShopRewardsItemCtr.lua

@@ -331,7 +331,7 @@ function RuneShopRewardsItemCtr:SetIconDatatt(wnd, itemlua, logicData, enterType
             if iconType < 100 then
                 itemlua.num.text.text = CommonUtil.FormatNumber(num)
             else
-                itemlua.num.text.text = CommonUtil.GetPreciseDecimalFloor(num/10000, 1) .. "萬"--w
+                itemlua.num.text.text = CommonUtil.GetPreciseDecimalFloor(num/10000, 1) ..CommonUtil.Get_Wan_string()-- "萬"--w
             end
         else
             itemlua.num.text.text = tostring(num)

+ 1 - 1
Assets/Lua/UI/UITips/UITipsExchangeView.lua

@@ -56,7 +56,7 @@ function UITipsExchangeView:Init()
 	if itemCfgData.ResType < 100 then
 		count = CommonUtil.FormatNumber(count)
 	else
-		count = CommonUtil.GetPreciseDecimalFloor(count/10000, 1) .. "萬"--w
+		count = CommonUtil.GetPreciseDecimalFloor(count/10000, 1) .. CommonUtil.Get_Wan_string()--"萬"--w
 	end
 	self.owned.text2.text.text = count
 

+ 11 - 2
Assets/Lua/Util/CommonUtil.lua

@@ -752,9 +752,9 @@ function FormatNumber(number,isReturnW)
         if num_length < 5 then
            return num_str
         elseif num_length >= 5 and num_length < 9 or isReturnW then--万
-           return handler_dot(number, 10^4) .. "萬"   
+           return handler_dot(number, 10^4) .. Get_Wan_string()--"萬"   
         elseif num_length >= 9 and not isReturnW then--亿
-           return handler_dot(number, 10^8) .. "億"
+           return handler_dot(number, 10^8) .. Get_Yi_string()--"億"
         end
     end
 end
@@ -3068,3 +3068,12 @@ function UpdatePetExtGoShowData(petData, heroData)
         end
     end
 end
+
+
+function Get_Wan_string()
+    return "萬"
+end
+
+function Get_Yi_string()
+    return "億"
+end