Charlie Rules the World
It's Always Sunny in Philadelphia Season 8 Episode 8 (12/06/12)
Thanks to Dee, everyone in The Gang except Dennis gets sucked into the virtual world of "Techpocalypse", a Massively Multiplayer Online Role-Playing Game (or "MMORPG") that is very similar to the immensely popular franchise "World of Warcraft".
Charlie ends up excelling in the game, taking Dee as his wife, and accepting Mac into his tribe so he can dupe his biggest threat into letting her guard down. Meanwhile, Dennis' resistance to the game's charms lead him on a crusade to bring people back to reality and real life.
Dennis ends up having a vision that leads him to delete all of The Gang's characters in the game, thus ending their virtual reality.