Example #1
0
    static int GetConfig(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2)
        {
            RankConfig obj = (RankConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "RankConfig");
            fogs.proto.msg.RankType      arg0 = (fogs.proto.msg.RankType)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.RankType));
            fogs.proto.config.RankConfig o    = obj.GetConfig(arg0);
            LuaScriptMgr.PushObject(L, o);
            return(1);
        }
        else if (count == 3)
        {
            RankConfig obj = (RankConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "RankConfig");
            fogs.proto.msg.RankType      arg0 = (fogs.proto.msg.RankType)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.RankType));
            fogs.proto.msg.RankSubType   arg1 = (fogs.proto.msg.RankSubType)LuaScriptMgr.GetNetObject(L, 3, typeof(fogs.proto.msg.RankSubType));
            fogs.proto.config.RankConfig o    = obj.GetConfig(arg0, arg1);
            LuaScriptMgr.PushObject(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: RankConfig.GetConfig");
        }

        return(0);
    }
Example #2
0
    static int IntToEnum(IntPtr L)
    {
        int arg0 = (int)LuaDLL.lua_tonumber(L, 1);

        fogs.proto.msg.RankType o = (fogs.proto.msg.RankType)arg0;
        LuaScriptMgr.Push(L, o);
        return(1);
    }