Originally Posted by Banknorris
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).
|
You can use this to detect if the battle is active or not:
http://wowprogramming.com/docs/api/GetWorldPVPAreaInfo