From 8d5671bc5b21f3f9150e0ae2f7f71c42bff557d1 Mon Sep 17 00:00:00 2001
From: Client_PangDeRong <593317293@qq.com>
Date: 星期三, 28 十一月 2018 11:54:54 +0800
Subject: [PATCH] 4534 【1.3】【前端】组队功能和助战积分优化
---
Lua/Gen/UIHelperWrap.cs | 47 +++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 45 insertions(+), 2 deletions(-)
diff --git a/Lua/Gen/UIHelperWrap.cs b/Lua/Gen/UIHelperWrap.cs
index 626b143..714e577 100644
--- a/Lua/Gen/UIHelperWrap.cs
+++ b/Lua/Gen/UIHelperWrap.cs
@@ -31,7 +31,7 @@
Utils.EndObjectRegister(type, L, translator, null, null,
null, null, null);
- Utils.BeginClassRegister(type, L, __CreateInstance, 46, 0, 0);
+ Utils.BeginClassRegister(type, L, __CreateInstance, 47, 0, 0);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSuitNameByName", _m_GetSuitNameByName_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSurplusSeconds", _m_GetSurplusSeconds_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetTime", _m_GetTime_xlua_st_);
@@ -40,6 +40,7 @@
Utils.RegisterFunc(L, Utils.CLS_IDX, "ReplaceNewLine", _m_ReplaceNewLine_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "ReplaceLargeNum", _m_ReplaceLargeNum_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "ReplacePercentage", _m_ReplacePercentage_xlua_st_);
+ Utils.RegisterFunc(L, Utils.CLS_IDX, "GetPropertyDecimalCount", _m_GetPropertyDecimalCount_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "HasSpecialCharac", _m_HasSpecialCharac_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetColorNameByItemColor", _m_GetColorNameByItemColor_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetUIColor", _m_GetUIColor_xlua_st_);
@@ -284,7 +285,22 @@
-
+ int gen_param_count = LuaAPI.lua_gettop(L);
+
+ if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
+ {
+ float _num = (float)LuaAPI.lua_tonumber(L, 1);
+ int _isPer = LuaAPI.xlua_tointeger(L, 2);
+ int _decimals = LuaAPI.xlua_tointeger(L, 3);
+
+ float gen_ret = UIHelper.ReplacePercentage( _num, _isPer, _decimals );
+ LuaAPI.lua_pushnumber(L, gen_ret);
+
+
+
+ return 1;
+ }
+ if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
{
float _num = (float)LuaAPI.lua_tonumber(L, 1);
int _isPer = LuaAPI.xlua_tointeger(L, 2);
@@ -301,6 +317,33 @@
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
+ return LuaAPI.luaL_error(L, "invalid arguments to UIHelper.ReplacePercentage!");
+
+ }
+
+ [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
+ static int _m_GetPropertyDecimalCount_xlua_st_(RealStatePtr L)
+ {
+ try {
+
+
+
+
+ {
+ int _property = LuaAPI.xlua_tointeger(L, 1);
+
+ int gen_ret = UIHelper.GetPropertyDecimalCount( _property );
+ LuaAPI.xlua_pushinteger(L, gen_ret);
+
+
+
+ return 1;
+ }
+
+ } catch(System.Exception gen_e) {
+ return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
+ }
+
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
--
Gitblit v1.8.0