Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-26-10, 10:27 PM   #1
Nusos
Premium Member
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1
GetZonePVPInfo

Does anyone know if the string "pvpType" returned by GetZonePVPInfo is localized? Everything I can find on WoWWikki and wowprogramming.com mention nothing of localized return values.

If the return string is localized then I will need to work in code to compensate for such when I get that far, as it will cause problems in the following:

Code:
-- Return types from GetZonePVPInfo()
local zoneType = {
	arena     = "ZONE_ARENA",
	friendly  = "ZONE_FRIENDLY",
	contested = "ZONE_CONTESTED",
	hostile   = "ZONE_HOSTILE",
	sanctuary = "ZONE_SANCTUARY",
	combat    = "ZONE_PVP"
}

... cut, cut, snip, snip ...

	local _, type, difficulty, _, size = GetInstanceInfo()
	if (type == "party") then
		self.ZoneType = "ZONE_INSTANCE"
		self.InstanceDifficulty = difficulty
	elseif (type == "raid") then
          ... blah, blah, blah, yada, yada, yada ...
	else -- Not an instance, check for PvP status
		local pvpType = GetZonePVPInfo()
		if (pvpType ~= nil) then
			self.ZoneType = zoneType[pvpType] or "ZONE_CONTESTED"
		else
			self.ZoneType = "ZONE_CONTESTED"
		end
	end
Thanks,

Nusos
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » GetZonePVPInfo


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off