Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-28-14, 12:02 AM   #1
Tactica
Not Amused
 
Tactica's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 96
Explorer Coords

Explorer Coords is an addon that checks areas to explore for achievements in wow. This addon hasn't been fully updated since Cataclysm. At first I thought parsing the Pandaria criteria and incorporating it into the code would work however there are still some issues. I have attempted to contact DarkStarX who is the author but can't get a response.

Just wondering if anyone could take a look at this. Full code file here

Note: this is a cross post!

Originally Posted by Woogs View Post
Quickly skimming through it looks like there are two tables in explorer_data.lua:

1) ExplorerCoordInit - The structure is: ExplorerCoordInit[achievementID][zoneID][assetID] = table with x and y coords for a minimap icon to use with Astrolabe library
Achievement ID and zone ID can easily be determined using wowhead. Asset ID is the 8th return value from GetAchievementCriteriaInfo(); you can cycle through the criteria on an achievement and print the name and asset IDs (the name will help you assign the right coords). As for the x and y coords, I have no idea how they were determined.

2) ExplorerCoordMapIt - The structure is: ExplorerCoordMapIt[achievementID][zoneID] = areaID
Achievement ID and zone ID can easily be determined using wowhead. The area ID can be determined in-game by going to each area and using GetCurrentMapAreaID() and printing the result.
- - - Updated - - -

http://wowpedia.org/MapID

Originally Posted by Woogs View Post
http://wowprogramming.com/docs/api/G...ntMapContinent
There are now 6 continents since the addon was last updated. As far as I know there isn't a function that returns the number of map continents, so you will have to hardcode the number of continents.
Added the code:
Originally Posted by Woogs View Post
Code:
function ExplorerCoords_OnLoad()
	--if not (ExplorerCoord) then
		--ExplorerCoords_Init();
	 --end
    ExplorerCoordsFrame:RegisterEvent("ADDON_LOADED");
	Exp_ZoneNames[1] = { GetMapZones(1) } ;
	Exp_ZoneNames[2] = { GetMapZones(2) } ;
	Exp_ZoneNames[3] = { GetMapZones(3) } ;
	Exp_ZoneNames[4] = { GetMapZones(4) } ;
	Exp_ZoneNames[5] = { GetMapZones(5) } ;
        Exp_ZoneNames[6] = { GetMapZones(6) } ;
Code:
local function GetZoneInfo(zonename)
	for i=1,#Exp_ZoneNames do
		for index,value in pairs(Exp_ZoneNames[i]) do
			if (value == zonename) then
				return i,index;
			end
		end
	end

end
Upon opening the world map this error returns, which occurred before a "workaround" a few years back (see ticket) or comment:
1x ExplorerCoords\ExplorerCoords-v1.36.5.lua:183: attempt to index field "?" (a nil value)
ExplorerCoords\ExplorerCoords-v1.36.5.lua:183: in function "ExplorerCoords_UpdateMap"
ExplorerCoords\ExplorerCoords-v1.36.5.lua:135: in function "ExplorerCoords_OnEvent"
<string>:"*:OnEvent":1: in function <string>:"*:OnEvent":1
I compared the two core.lua's before said "workaround" and the only difference was GetCurrentMapContinent() was added:
Code:
function ExplorerCoords_UpdateMap(whichmap)
	ExplorerCoords_ClearNotes(whichmap);
		
	if(whichmap=="world" and GetCurrentMapZone()<1 or GetCurrentMapContinent()==6) then
	  return;
	end
Any suggestions? Still parsing all the PandaLand data here...and ~1000 lines to comment on

Last edited by Tactica : 04-28-14 at 12:04 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Explorer Coords


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