#if USE_UNI_LUA
|
using LuaAPI = UniLua.Lua;
|
using RealStatePtr = UniLua.ILuaState;
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
#else
|
using LuaAPI = XLua.LuaDLL.Lua;
|
using RealStatePtr = System.IntPtr;
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
#endif
|
|
using XLua;
|
using System.Collections.Generic;
|
|
|
namespace XLua.CSObjectWrap
|
{
|
using Utils = XLua.Utils;
|
public class SnxxzUIConsumeRebateModelWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(Snxxz.UI.ConsumeRebateModel);
|
Utils.BeginObjectRegister(type, L, translator, 0, 10, 6, 2);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayerLoginOk", _m_OnPlayerLoginOk);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsRebateGot", _m_IsRebateGot);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GotConsumeRebate", _m_GotConsumeRebate);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateConsumeRebate", _m_UpdateConsumeRebate);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTotalConsume", _m_GetTotalConsume);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "consumeRebateUpdateEvent", _e_consumeRebateUpdateEvent);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "onStateUpate", _e_onStateUpate);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsOpen", _g_get_IsOpen);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "displayIndex", _g_get_displayIndex);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "costTotal", _g_get_costTotal);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "priorityOpen", _g_get_priorityOpen);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsAdvance", _g_get_IsAdvance);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "consumeRebateRedpoint", _g_get_consumeRebateRedpoint);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "displayIndex", _s_set_displayIndex);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "consumeRebateRedpoint", _s_set_consumeRebateRedpoint);
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
null, null, null);
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int __CreateInstance(RealStatePtr L)
|
{
|
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
if(LuaAPI.lua_gettop(L) == 1)
|
{
|
|
Snxxz.UI.ConsumeRebateModel gen_ret = new Snxxz.UI.ConsumeRebateModel();
|
translator.Push(L, gen_ret);
|
|
return 1;
|
}
|
|
}
|
catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.ConsumeRebateModel constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Init(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.Init( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_OnBeforePlayerDataInitialize(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.OnBeforePlayerDataInitialize( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_OnPlayerLoginOk(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.OnPlayerLoginOk( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_UnInit(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.UnInit( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_IsRebateGot(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _day = LuaAPI.xlua_tointeger(L, 2);
|
int __index = LuaAPI.xlua_tointeger(L, 3);
|
|
bool gen_ret = gen_to_be_invoked.IsRebateGot( _day, __index );
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GotConsumeRebate(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int __day = LuaAPI.xlua_tointeger(L, 2);
|
int __index = LuaAPI.xlua_tointeger(L, 3);
|
|
gen_to_be_invoked.GotConsumeRebate( __day, __index );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_UpdateConsumeRebate(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
HAA10_tagMCCostRebatePlayerInfo _package = (HAA10_tagMCCostRebatePlayerInfo)translator.GetObject(L, 2, typeof(HAA10_tagMCCostRebatePlayerInfo));
|
|
gen_to_be_invoked.UpdateConsumeRebate( _package );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetTotalConsume(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
int gen_ret = gen_to_be_invoked.GetTotalConsume( );
|
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))]
|
static int _g_get_IsOpen(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsOpen);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_displayIndex(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.displayIndex);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_costTotal(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.costTotal);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_priorityOpen(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.priorityOpen);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_IsAdvance(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsAdvance);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_consumeRebateRedpoint(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.consumeRebateRedpoint);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_displayIndex(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.displayIndex = LuaAPI.xlua_tointeger(L, 2);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_consumeRebateRedpoint(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.consumeRebateRedpoint = (Snxxz.UI.Redpoint)translator.GetObject(L, 2, typeof(Snxxz.UI.Redpoint));
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_consumeRebateUpdateEvent(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 3);
|
if (gen_delegate == null) {
|
return LuaAPI.luaL_error(L, "#3 need System.Action!");
|
}
|
|
if (gen_param_count == 3)
|
{
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
gen_to_be_invoked.consumeRebateUpdateEvent += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.consumeRebateUpdateEvent -= gen_delegate;
|
return 0;
|
}
|
|
}
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.ConsumeRebateModel.consumeRebateUpdateEvent!");
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_onStateUpate(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
Snxxz.UI.ConsumeRebateModel gen_to_be_invoked = (Snxxz.UI.ConsumeRebateModel)translator.FastGetCSObj(L, 1);
|
System.Action<int> gen_delegate = translator.GetDelegate<System.Action<int>>(L, 3);
|
if (gen_delegate == null) {
|
return LuaAPI.luaL_error(L, "#3 need System.Action<int>!");
|
}
|
|
if (gen_param_count == 3)
|
{
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
gen_to_be_invoked.onStateUpate += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.onStateUpate -= gen_delegate;
|
return 0;
|
}
|
|
}
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.ConsumeRebateModel.onStateUpate!");
|
return 0;
|
}
|
|
|
|
}
|
}
|