Quantcast
WoWInterface - View Single Post - Get Map ID after loading
View Single Post
07-25-16, 12:21 AM   #1
maqjav
A Wyrmkin Dreamwalker
Join Date: Feb 2012
Posts: 52
Get Map ID after loading

Hello.

I'm trying to find out how to get the correct map ID after a loading screen (after using the hearthstone).

Right now I'm trying with the next code:

Code:
addon:RegisterEvent("PLAYER_ENTERING_WORLD")

addon:SetScript("OnEvent", function(self, event)

	if event == "PLAYER_ENTERING_WORLD" then
		SetMapToCurrentZone()
		local zone_id, boolean = GetCurrentMapAreaID()
		print("ZONE_ID "..zone_id)
	else
end)
ZONE_ID will get the ID of the map where I was when I used the hearthstone.
I cannot find which is the event that fires once the game is fully loaded (so GetCurrentMapAreaID returns the current map ID and not the previous)

Thanks.
  Reply With Quote