public static string SafeName(this WoWUnit unit) { if (unit.IsPlayer) { WoWPlayer player = (WoWPlayer)unit; if (player == StyxWoW.Me) { return("Me"); } string prefix = ""; if (player.IsInMyPartyOrRaid) { prefix = "Party"; } return(string.Format("{0}{1}_{2}", prefix, player.Class.ToString(), player.ShortGuid())); } else { return(unit.Name); } }