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

        if (count == 0)
        {
            fogs.proto.config.DataConstruction obj = new fogs.proto.config.DataConstruction();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: fogs.proto.config.DataConstruction.New");
        }

        return(0);
    }
Beispiel #2
0
    static int get_value(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        fogs.proto.config.DataConstruction obj = (fogs.proto.config.DataConstruction)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name value");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index value on a nil value");
            }
        }

        LuaScriptMgr.Push(L, obj.value);
        return(1);
    }
Beispiel #3
0
    static int set_id(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        fogs.proto.config.DataConstruction obj = (fogs.proto.config.DataConstruction)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name id");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index id on a nil value");
            }
        }

        obj.id = (uint)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }