WoWInterface - View Single Post - Detecting World PvP Zones
View Single Post
06-15-15, 11:02 AM   #6
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Banknorris View Post
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()

local _,_,_,_,_,_,_,zone = GetInstanceInfo()
if zone==1191 then
	print("I am in Ashran")
elseif zone==732 then
	print("I am in Tol Barad")
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:

  Reply With Quote