Originally Posted by mazer665
ID 363 (ValleyofTrials) has a Parent of 6451 (ValleyofTrialsStart)
which in return
ID 6451 has a parent of 14 (Durotar) <- this is the value i am looking for
|
So you want to get the parent AreaID for a specific AreaID?
https://wow.tools/dbc/?dbc=areatable...;4]=exact%3A14
I don't think that's possible with the in-game API. There is only
C_Map.GetAreaInfo() and
C_MapExplorationInfo.GetExploredAreaIDsAtPosition()
Can you elaborate what you are trying to do?
In any case, you can map from UiMapIDs to AreaIDs and vice versa by parsing the CSVs for
AreaTable.db2 and
UiMapAssignment.db2 and converting it to a table.
Or just only a table that maps from AreaIDs to ParentAreaIDs:
Lua Code:
local AreaTable = {
-- ID = ParentID
[6451] = 14, -- "Valley of Trials"
[6453] = 14, -- "Echo Isles"
[6529] = 14, -- "Hellscream's Fist"
}
local function GetParentAreaID(id)
return AreaTable[id]
end
See this for reference
https://github.com/ketho-wow/UnexploredAreas