What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Get Party Member Location Info

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:

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?
 
0 continent ID also means kalimdor or eastern kalimdor
 
But it's retrieving 0 when I'm in an instance. I'm looking for a surefire way to see a party members zone.
 
I've thought of that, but it's limited. You can only do it so many times, doesn't seem like a good way to see if a party member has left the instance.
 
You could try AddFriend("playerName") then GetFriendInfo() to find out where they are.
 
I tried the GetFriendInfo(), and from what I can tell the zone names don't match up to zone names that I can see. I saw "Stratholme - Service Entrance" on my friend, and me "Stratholme" (No where could I find any location for me with Service Entrance), so I'm thinking that's out. Any other suggestions?
 
The Service Entrance means he was at the entrance to Stratholme and it should of updated once he left the entrance and entered the main instance.

hmm, only other thing I can think of is maybe try adding RealID and do the RealID API Info request "BNGetToonInfo()"

or, maybe before you run GetFriendInfo() you ShowFriends() which will request and update from the server of all their info, so it should refresh it and then show if they changed areas?

That's pretty much all the API that would work with it I think.


EDIT So you know, the "Stratholme - Service Entrance" is considered a SubZone of the Zone "Stratholme".
 
Back
Top