View Single Post
06-15-15, 06:15 AM   #3
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
I try to avoid to use SetMapToCurrentZone() as much as I can (so far I could totally avoid it) because it will interfere with the user watching another map. The alternative approach that works well is to use GetInstanceInfo()

Code:
local _,_,_,_,_,_,_,zone = GetInstanceInfo()
if zone==1191 then
	print("I am in Ashran")
elseif zone==732 then
	print("I am in Tol Barad")
end
This approach does NOT work in Wintergrasp though because when you are there you will get the 571 return which is the Northrend id both during Wintergrasp battle or between battles (when it is like any Northrend zone).
__________________
"In this world nothing can be said to be certain, except that fractional reserve banking is a Ponzi scheme and that you won't believe it." - Mandrill

Last edited by Banknorris : 06-15-15 at 06:20 AM.
  Reply With Quote