View Single Post
07-26-14, 03:42 PM   #29
TOM_RUS
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 95
Originally Posted by Phanx View Post
BNGetToonInfo and BNGetFriendToonInfo both provide a realmID, though as I only have access to a trial account at the moment, I can't actually check whether it's different for the US and EU realms of the same name. If it is, then you could set up a hardcoded table mapping each realmID to its region, and then check the player's Battle.net friends (assuming they have any) to find out which region they were playing on.

If the realmID proves useful, it might also be worth asking Blizzard to add it to non-Battle.net functions that currently return a realm name, eg. UnitName, UnitFullName, GetRealmName, though I'm not sure how much they really listen to that kind of suggestion...
Looks like realm id's are unique:
EU realms
US realms
TW realms
CN realms

You can even get your own realm id like this:
Code:
local presenceID, battleTag, toonID, broadcastText, bnetAFK, bnetDND, isRIDEnabled = BNGetInfo();
local hasFocus, toonName, client, realmName, realmID, faction, race, class, guild, zoneName, level, gameText, broadcastText, broadcastTime, canSoR, toonID = BNGetToonInfo(presenceID or toonID);

Last edited by TOM_RUS : 07-29-14 at 05:35 AM.
  Reply With Quote