Reply
Thread Tools Display Modes
Unread 10-30-10, 08:07 PM   #1
Virance
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 12
Identify current instance without req localization?

I was wondering if anyone knew of a way to get a unique identifier for which instance the player was currently in that did not require localization.

I have been using GetRealZoneText() to get the unique string associated with the instance for my new mod PugLax. However, I received a request to make the addon support localization and it seems like this is going to be a nightmare to localize.

Basically the addon automatically generates a list of CC available to your group, and then runs that through a priority list based on your current instance before spitting out CC assignments without requiring user intervention. (So in AN, it would treat Shackle as very important, and wouldn't assign polymorph at all for example).

An early working version is available here:
http://www.wowinterface.com/download...gLaxAlpha.html

Is there an alternative to GetRealZoneText() that returns the same value on all clients? Like we can get the "MAGE" "HUNTER" strings instead of the localized string for classes.

Thanks in advance for any tips/feedback!

Also, if anyone knows of a place online that has all of the GetRealZoneText() information for each instance I'd love them forever.
Virance is offline   Reply With Quote
Unread 10-30-10, 08:13 PM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,195
Only answering the last part for now
http://www.wowhead.com/zones=2
http://www.wowhead.com/zones=3

You have to follow each link to get the zone name (it is not the same as the link text)

You can also use the dropdown to get the equivalents for the 5 languages wowhead supports (can change it from the dropdown on the top right)
Dridzt is offline   Reply With Quote
Unread 10-30-10, 08:33 PM   #3
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 570
What about LibBabble-Zone?
__________________
Ketho is offline   Reply With Quote
Unread 10-30-10, 08:40 PM   #4
Virance
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 12
Awesome, thanks for the responses guys! Both were incredibly helpful.
Virance is offline   Reply With Quote
Unread 10-31-10, 03:07 AM   #5
Xinhuan
A Chromatic Dragonspawn
 
Xinhuan's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 172
All zones now have a localization-independant area ID. I forgot the exact function name.
__________________
Author of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, GatherMate2, Routes and Cartographer_Routes
Xinhuan is offline   Reply With Quote
Unread 10-31-10, 04:01 AM   #6
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 584
http://www.wowpedia.org/API_GetCurrentMapAreaID ?
__________________
The cataclysm broke the world ... and the pandas could not fix it!
Rilgamon is offline   Reply With Quote
Unread 10-31-10, 04:32 AM   #7
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 766
I guess what you really want is in some way knowing what dungeons is what independent of the dungeon name itself as it's different in various languages. How I see it you could create a tiny look-up function where you use data from the DBC (stored in a table, with a fallback value if not found preferably for the patches you haven't had time to update that yet).

But on the other hand using a library that is already being updated by someone else could do the trick -saves you a lot of work.
Vlad is offline   Reply With Quote
Unread 10-31-10, 08:26 AM   #8
Virance
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 12
GetCurrentMapAreaID seems to be getting where the users map is currently set to, not necessarily what zone they are currently in.

I ended up using LibBabble and it seems to work great, just need to wait and see if anyone on different client posts a bug report.

Thanks again everyone!
Virance is offline   Reply With Quote
Unread 10-31-10, 06:53 PM   #9
Xinhuan
A Chromatic Dragonspawn
 
Xinhuan's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 172
Originally Posted by Virance View Post
GetCurrentMapAreaID seems to be getting where the users map is currently set to, not necessarily what zone they are currently in.
That's why addons that use this always call SetMapToCurrentZone() first. And of course, not to do anything if the map is currently open and the map isn't set to the current zone.

You will find, for example, addons like Gatherer, Routes, GatherMate and many others that put icons on the minimap, will not work when the current map isn't the current zone.

When the map is closed, a hook then causes the map to always revert to the current zone (i.e call SetMapToCurrentZone())
__________________
Author of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, GatherMate2, Routes and Cartographer_Routes
Xinhuan is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » General Authoring Discussion » Identify current instance without req localization?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off