Plastictiller
New Member
- Joined
- Mar 16, 2012
- Messages
- 59
- Reaction score
- 1
I'm trying to find another party members zone name/id. I've been looking through the wow api, but I haven't been able to find anything about retrieving zone text of "party1" or anything like that. Continent Id was always 0, so I'm not sure what to do.
The closest thing I could find was part of oRA:
Can someone give me a quick way of retrieving the zone name from a party member?
The closest thing I could find was part of oRA:
Code:
local function GetZone(unit)
if UnitIsVisible(unit) then
return nil
end
if not UnitIsConnected(unit) then
return nil
end
tip:SetUnit(unit)
local left_2 = tip.L[2]
local left_3 = tip.L[3]
if not left_2 or not left_3 then
return nil
end
local hasGuild = not left_2:find(LEVEL_start)
local factionText = not hasGuild and left_3 or tip.L[4]
if factionText == PVP then
factionText = nil
end
local hasFaction = factionText and not UnitPlayerControlled(unit) and not UnitIsPlayer(unit) and (UnitFactionGroup(unit) or factionList[factionText])
if hasGuild and hasFaction then
return tip.L[5]
elseif hasGuild or hasFaction then
return tip.L[4]
else
return left_3
end
end
for i = 1, MAX_PARTY_MEMBERS do
if GetPartyMember(i) then
local name = UnitName("party"..i)
local zone = GetZone("party"..i)
end
end
Can someone give me a quick way of retrieving the zone name from a party member?