Thread Tools Display Modes
11-23-14, 05:50 AM   #1
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Two returns for GetCurrentMapAreaID()

I was testing out some /dump commands, one of which was GetCurrentMapAreaID(). It had two return values, the mapID and a Boolean. Does anyone know what the Boolean is supposed to tell us? Neither Wowpedia or Wowprogramming have this in their docs, and the 6.x changes on Wowpedia don't mention changes to this API.
Code:
-- at my Garrison
/dump GetCurrentMapAreaID()
>> 971, false
  Reply With Quote
11-23-14, 06:07 AM   #2
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Yep

Lua Code:
  1. local mapID, isContinent = GetCurrentMapAreaID();
__________________
  Reply With Quote
11-23-14, 09:39 AM   #3
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 267
A great place to find out what the API is doing is to dump the BlizzardInterfaceCode from WoW itself. In this case you see examples in QuestMapFrame.lua and WorldMapFrame.lua for this call with both return values.
  Reply With Quote
11-23-14, 01:08 PM   #4
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Originally Posted by Nimhfree View Post
A great place to find out what the API is doing is to dump the BlizzardInterfaceCode from WoW itself. In this case you see examples in QuestMapFrame.lua and WorldMapFrame.lua for this call with both return values.
I have a fork of Tekkub's wowuisource, I just search through that for functions/vars etc Sometimes I get lucky, sometimes I really don't :P
__________________
  Reply With Quote
11-23-14, 09:17 PM   #5
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Code:
local mapID, isContinent = GetCurrentMapAreaID();
Okay, good. I found it in WorldMapFrame.lua and QuestMapFrame.lua.

Best I can tell is that isContinent is false for non-Cosmic and non-Azeroth maps, possibly non-Maelstrom. Based on Blizzard's undocumented code, I am having a hard time figuring out why they have the second return.

Last edited by myrroddin : 11-23-14 at 09:19 PM.
  Reply With Quote
11-23-14, 11:32 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
According to QuestMapFrame.lua, for example, they are using that return to determine if quest objectives should be shown or not.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
11-24-14, 04:56 AM   #7
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Thank you Seerah. I need to test, but I'm beginning to suspect that isContinent will be true if the currently viewed map has quest objectives. Unless you had zero quests in your log, or zero for a different zone, it will always be true for the greater map view.

For example, those of us leveling in Warlords would return true for Draenor, but what I was seeing at the time was that I had no quest objectives in my Garrison. However, I do have some now, and I certainly have some in various Draenor zones, so I'll test those.

Zoom out to the cosmic map, and it will be true, because Draenor as a whole fits into the cosmic map.

I think you've put me on the right path.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Two returns for GetCurrentMapAreaID()

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