API GetUnitName

Returns the name and optionally the realm of the unit. name = GetUnitName("unit", showServerName)

Arguments

 * unit : String - The UnitId to query (e.g. "player", "party2", "pet", "target" etc.)
 * showServerName : Boolean - True to append full server name to units from other servers; false to append a short indicator.

Returns

 * name : String - unit's name (and possibly server name), formatted per the specified arguments.

Details

 * If  is true, and the queried unit is from a different server, the returned value will include the unit's name, followed by a dash, and the full name of the server it stems from (e.g. "Bob-Emerald Dream")
 * If  is false,   (" (*)") will be appended to units from coalesced realms. Units from the player's own realm, or Connected Realms, get no additional suffix.