Пример #1
0
    static int _CreatePvpRegularInfo(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

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

        return(0);
    }
Пример #2
0
    static int get_race_times(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        fogs.proto.msg.PvpRegularInfo obj = (fogs.proto.msg.PvpRegularInfo)o;

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

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

        LuaScriptMgr.Push(L, obj.race_times);
        return(1);
    }
Пример #3
0
    static int set_steal_king(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        fogs.proto.msg.PvpRegularInfo obj = (fogs.proto.msg.PvpRegularInfo)o;

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

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

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