GetRealmName

From Wowpedia
Jump to: navigation, search

GetRealmName() and GetNormalizedRealmName() return the name of the character's realm in different formats.

realmName = GetRealmName()
normalizedRealmName = GetNormalizedRealmName()

Returns

realmName 
String - The name of the realm, unmodified.
normalizedRealmName 
String - The name of the realm, but without spaces.

Notes

  • The normalized realm name is used for addressing whispers[1] and in-game mail.

Example

The following macro prints the name of your character's realm:

/run print("You are currently on realm: " .. GetRealmName())

Patch changes

This does not imply the function couldn't have existed sooner.

See also

  • UnitName - Returns a character name and the server (if different from the player's current server)

References

 
  1. ^ SDPhantom 2020-02-18. Re: Party members with server name?. WoWInterface.
  2. ^ 2016-10-25, UnitPopup.lua, version 7.1.0.22908, near line 1576, archived at Townlong-Yak
  3. ^ SpaceDuck, Mule 2014-10-30. GetCVar("realmName") gives nil. MMO-Champion.
  4. ^ Meatpuppet 2005-07-02. Difference between revisions of "World of Warcraft API". WoWWiki.