WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Detect Current Region (https://www.wowinterface.com/forums/showthread.php?t=48877)

Phanx 11-02-14 09:43 PM

Thanks. I'd already added those but listed them as "hidden" realms like the "internal record" ones. I've now switched those realms over to use those IDs, and listed the old ID as "hidden" just in case. Hidden realms are included for region detection, but won't return any information if you look them up by ID.

I've gone ahead and tagged a new release, which is not backwards-compatible.
  • GetRealmInfo now takes a name (and optionally a region) rather than an ID, since this is the primary lookup you should be using with data collected from game APIs.
  • GetRealmInfoByName has been removed.
  • A new GetRealmInfoByID method has been added, but you should only use it on IDs previously obtained from GetRealmInfo, or on IDs from your addon's internal data, since the IDs provided by game APIs are often incorrect.
  • All realm info methods now return the same list of values for consistency; see GitHub for updated documentation.
  • Russian realms can now be queried with either the Cyrillic-alphabet or Latin-alphabet version of their names, instead of only with the Cyrillic version.

I think we can almost remove the "beta" label at this point, and I don't plan to make any more changes that break compatibility unless some major flaw in the design comes up.

Resike 07-22-15 08:29 AM

I'm kinda confused now about all the mentioned methods. I basically just want to differentiate the same character-realm profile keys for each regions. So can i safely use the
Lua Code:
  1. local guid = UnitGUID("player")
  2. local realmid = string.match(guid, "^Player%-(%d+)")
method, and store the keys in character-realm-realmid format?


All times are GMT -6. The time now is 04:21 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI