Complex sentence: In 1798, he was on the staff in Ireland, and in 1805 was at Gibraltar where he was promoted to major-general.
Split into simpler sentences: In 1798, he was on the staff in Ireland. In 1805, he was at Gibraltar where he was promoted to major-general.