API GetFriendshipReputationRanks

From Wowpedia
Jump to: navigation, search

Returns friendship rank indices. [1]

currentRank, maxRank = GetFriendshipReputationRanks([factionID])

Arguments

factionID 
Number - provided by GetFactionInfo (14th return); defaults to the currently interacting NPC if omitted

Returns

currentRank 
Number
maxRank 
Number - can range from 6 to 8, depending on the friendship faction


Example

for i = 1, GetNumFactions() do
	local factionID = select(14, GetFactionInfo(i))
	local friendID, _, _, name = GetFriendshipReputation(factionID)
	local currentRank, maxRank = GetFriendshipReputationRanks(factionID)
	if friendID then
		-- factionID is also a friendID
		print(friendID, name, currentRank, maxRank)
	end
end
/dump GetFriendshipReputationRanks(1273) => 1, 6 (Jogu the Drunk)
/dump GetFriendshipReputationRanks(1374) => 1, 8 (Brawl'gar Arena)

Details

index name
1
Stranger
2
Acquaintance
3
Buddy
4
Friend
5
Good Friend
6
Best Friend

See also

Patch history

Mists of Pandaria Patch 5.1.0 (2012-11-27): Added (PTR 5.1.0.16139)