A couple have divorced after the husband was caught having a virtual affair with a female character in an online game.