View Single Post
08-16-12, 03:09 PM   #220
Jarod24
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 66
Originally Posted by Jarod24 View Post
Been looking through globalstrings.lua and so far i have not been able to find the strings for the friendship levels. I hoped that there would be something similar to FACTION_BAR_COLORS and FACTION_STANDING_LABEL in there.

I did some digging and according to Nat Pagle (ref: http://www.elsanglin.com/nat_pagle.html) there are 6 ranks called: "Stranger", "Pal", "Buddy", "Friend", "Good Friend", and "Best Friend" in English.

I can't post on the US-forums, so im kindly asking Talyrius if he can do another post.
Is this a oversight by the devs or is there some other method to get this info?
Originally Posted by p3lim View Post
The 6th return from GetFriendshipReputationByID(id) gives you the standing name of an NPC.
Also, the colors for bars are green all the way, since you can't go neutral or below with them.

To see how it could be implemented, here is a link to framexml and my addon, oUF_Friendship:
https://github.com/p3lim/wow-ui-sour...Frame.lua#L171
https://github.com/p3lim/oUF_Friends...ndship.lua#L80

Cool, all thats missing then are localized strings for the titles (stranger, pal, buddy etc).

There is nothing in _G about this at the moment so the only thing you can get is the current value from the function itself.

In other words: You can't get the next/previous level of friendship titles like you can with faction rep and FACTION_STANDING_LABEL1, FACTION_STANDING_LABEL2, etc

(some pseudocode to show what im trying to do).
Code:
local ... standingString = GetFriendshipReputationByID(666);
local standingID = <math to make standingID between 1 to 6>;
local nextString = _G["THIS_IS_MISSING"..tostring(standingID+1)];

Print("You are currently "..standingString..". You got X points until you reach "..nextString");

Last edited by Jarod24 : 08-16-12 at 03:18 PM.