IMPORTANT: LibRealmInfo is now maintained here: https://github.com/janekjl/LibRealmInfo. This original repository is now archived, and the original author (Phanx) is no longer involved in the library's development or maintenance.
World of Warcraft addon library to provide information about realms.
If you only need to know the names of realms connected to the player's current realm, you should just use GetAutoCompleteRealms instead of this library.
If you only need to know which region (US, Europe, etc.) the player is currently in, you can try GetCurrentRegion, but you should be aware that this function may return incorrect values for players whose game clients have connected to multiple regions.
The realm IDs encoded in the GUIDs of player characters on connected realms identify the server currently hosting the connected realm group, which may not be the realm that character actually belongs to. Pass the GUID to GetPlayerInfoByGUID to get the character's real realm name, or use the GetRealmInfoByGUID
or GetRealmInfoByUnit
methods provided by LibRealmInfo.
Realm info is obtained from the Blizzard Developer API for accuracy, but getting info about Chinese realms would require a separate Chinese Battle.net account, which I do not have. The info for Chinese realms in LibRealmInfo is therefore the old manually compiled data, which may be inaccurate or outdated, and info about connected realms is missing entirely. If you have a Chinese Battle.net account and are willing to help, please open a ticket or email me.