Thread Tools Display Modes
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
06-27-10, 03:27 AM   #2
v6o
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 399
It is not localized
__________________
I stopped playing back World of Warcraft in 2010 and I have no plans on returning.
This is a dead account and if you want to continue any of my addons or make a fork then feel free to do so.
This is your permission slip.

If you need to contact me, do so on Twitter @v6ooo

Best regards, v6.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » GetZonePVPInfo

Thread Tools
Display Modes

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