Download
(23Kb)
Download
Updated: 01-20-21 08:51 PM
Compatibility:
Shadowlands patch (9.0.2)
Updated:01-20-21 08:51 PM
Created:07-27-14 08:55 PM
Downloads:8,323
Favorites:2
MD5:

LibRealmInfo  Popular! (More than 5000 hits)

Version: 17
by: Phanx, 4iamking

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 the player is currently on, you can use GetCurrentRegion, but you should be aware that this function is not always reliable.

Use GitHub for issues and patches.

Usage

Available API methods:

  • :GetCurrentRegion()
    Get the two-letter abbrevation for the region the player is currently connected to; one of "US", "EU", "KR", "CN" or "TW". Returns nil on PTR and Beta realms.
  • :GetRealmInfo(name[, region])
    Get information about a realm by name; if no region is provided, the player's current region will be assumed.
  • :GetRealmInfoByID(id)
    Get information about a realm by ID.
  • :GetRealmInfoByGUID(guid)
    Get information about the realm the given player GUID belongs to.
  • :GetRealmInfoByUnit(unit)
    Get information about the realm the given player unit belongs to.
All of the above methods return the following values:
  1. id - the numeric unique ID of the realm
  2. name - the name of the realm
  3. api_name - the name of the realm without spaces, as seen in chat etc.
  4. rules - one of "PVP", "PVE", "RP" or "RPPVP"
  5. locale - the official language of the realm
  6. battlegroup - the name of the realm's battlegroup
  7. region - one of "US", "EU", "KR", "CN" or "TW"
  8. timezone - for realms in the US region, a string describing the realm's time zone, eg. "PST" or "AEST"
  9. connections - for connected realms, a table listing the IDs of connected realms
  10. latin_name - for Russian-language realms, the English name of the realm
  11. latin_api_name - for Russian-language realms, the English name of the realm without spaces
Note that the realm IDs contained in the GUIDs of player characters on connected realms indicate the realm hosting the connected realm group, which may not be the realm that character actually belongs to. Use GetPlayerInfoByGUID to get the real realm name, or use the :GetRealmInfoByGUID or :GetRealmInfoByUnit methods provided by LibRealmInfo.

Lib: Realm Info
17 (2021-01-21)
Full Changelog Previous releases
  • China Realm information added.
  • 2020 Connections added and server properties updated where applicable.
  • Added Classic Realm data
  • Typo fixes for 2 realm names
Post A Reply Comment Options
Unread 01-22-19, 08:44 PM  
GreyFox777
A Cliff Giant

Forum posts: 75
File comments: 1
Uploads: 0
Retrieve data from target?

Is there any way to do that!? Seems like it working only for player...
Report comment to moderator  
Reply With Quote
Unread 07-27-14, 09:35 PM  
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5617
File comments: 2321
Uploads: 54
Please use GitHub for bug reports, feature requests, and patches.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Donít message me about addon bugs or programming questions.
Last edited by Phanx : 08-02-14 at 11:32 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: