Ejemplo n.º 1
0
    public static int LoginByAuthToken(IntPtr l)
    {
        int result;

        try
        {
            NetWorkClient netWorkClient = (NetWorkClient)LuaObject.checkSelf(l);
            string        serverAddress;
            LuaObject.checkType(l, 2, out serverAddress);
            int serverPort;
            LuaObject.checkType(l, 3, out serverPort);
            string authToken;
            LuaObject.checkType(l, 4, out authToken);
            string clientVersion;
            LuaObject.checkType(l, 5, out clientVersion);
            string clientDeviceId;
            LuaObject.checkType(l, 6, out clientDeviceId);
            string localization;
            LuaObject.checkType(l, 7, out localization);
            int loginChannelId;
            LuaObject.checkType(l, 8, out loginChannelId);
            int bornChannelId;
            LuaObject.checkType(l, 9, out bornChannelId);
            bool b = netWorkClient.LoginByAuthToken(serverAddress, serverPort, authToken, clientVersion, clientDeviceId, localization, loginChannelId, bornChannelId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }