GetRealmName
(Redirected from API GetNormalizedRealmName)
Jump to navigation
Jump to search
GetRealmName |
+ 1.5.0 / 1.13.2 | ||
GetNormalizedRealmName |
+ 7.1.0 / 1.13.2 |
Returns the realm name.
realm = GetRealmName() normalizedRealm = GetNormalizedRealmName()
Returns
- realm
- string - The name of the realm.
- normalizedRealm
- string? - The name of the realm without spaces or
-
hyphens.
Details
Related API | GetRealmID |
- The normalized realm name is used for addressing whispers[1] and in-game mail.
- When logging in,
GetNormalizedRealmName()
only returns information starting from as early as the PLAYER_LOGIN event.
-- GetTime(), event, GetRealmName(), GetNormalizedRealmName() 11647.589 VARIABLES_LOADED: "Defias Brotherhood", nil 11647.655 PLAYER_LOGIN: "Defias Brotherhood", "DefiasBrotherhood" 11647.655 PLAYER_ENTERING_WORLD: "Defias Brotherhood", "DefiasBrotherhood"
- When transitioning through a loading screen,
GetNormalizedRealmName()
may return nil between the LOADING_SCREEN_ENABLED and LOADING_SCREEN_DISABLED events.
Example
A small list of realm IDs and names.
-- /dump GetRealmID(), GetRealmName(), GetNormalizedRealmName()
503, "Azjol-Nerub", "AzjolNerub"
513, "Twilight's Hammer", "Twilight'sHammer"
635, "Defias Brotherhood", "DefiasBrotherhood"
1049, "憤怒使者", "憤怒使者"
1093, "Ahn'Qiraj", "Ahn'Qiraj"
1413, "Aggra (Português)", "Aggra(Português)"
1925, "Вечная Песня", "ВечнаяПесня"
Patch changes
Patch 5.4.1 (2013-10-29): CVar realmName was removed[2].
Patch 1.5.0 (2005-06-07): Added.
See also
- UnitName() - Returns a character name and the server (if different from the player's current server)
References
- ^ SDPhantom 2020-02-18. Re: Party members with server name?. WoWInterface.
- ^ SpaceDuck, Mule 2014-10-30. GetCVar("realmName") gives nil. MMO-Champion.