Ejemplo n.º 1
0
    static int UnRegisterOnListChanged(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        FriendData obj = (FriendData)LuaScriptMgr.GetNetObjectSelf(L, 1, "FriendData");

        FriendData.OnListChanged arg0 = null;
        LuaTypes funcType2            = LuaDLL.lua_type(L, 2);

        if (funcType2 != LuaTypes.LUA_TFUNCTION)
        {
            arg0 = (FriendData.OnListChanged)LuaScriptMgr.GetNetObject(L, 2, typeof(FriendData.OnListChanged));
        }
        else
        {
            LuaFunction func = LuaScriptMgr.GetLuaFunction(L, 2);
            arg0 = (param0) =>
            {
                int top = func.BeginPCall();
                LuaScriptMgr.Push(L, param0);
                func.PCall(top, 1);
                func.EndPCall(top);
            };
        }

        obj.UnRegisterOnListChanged(arg0);
        return(0);
    }
Ejemplo n.º 2
0
    static int FriendListChangedDelegate(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        LuaFunction arg0 = LuaScriptMgr.GetLuaFunction(L, 1);

        FriendData.OnListChanged o = FriendData.FriendListChangedDelegate(arg0);
        LuaScriptMgr.Push(L, o);
        return(1);
    }