James Duff, 4th Earl Fife — Spanish general