Different Faction functions for Tillers ?

UI and Macro
As I had some free time today, i began exploring how to modify the "Factionizer" Add-on to have it better support the Tillers individual. Their reputation works on a different scale, with fixed intervals of 8400 rep points, and different labels for ranks.

I toyed around, was able to get some results, until I noticed something really strange: if I use the
name, description, standingID, barMin, barMax, barValue, atWarWith, canToggleAtWar, isHeader, isCollapsed, hasRep, isWatched, isChild = GetFactionInfo(index);

traditional function call for reputation, I get barMin and barMax set using the traditional rep scale (3000, 6000, 12000, 21000) instead of the Tillers specific one. Which leads me to a simple question : is Blizzard using only a conversion trick when displaying the Tillers rep info in the rep window, or is there a second set of functions and global variables in the API for version 5.xx.xx ?

Any hint will be appreciated.
Blizzard uses this in ReputationFrame.lua for the current live build:-- check if this is a friendship faction
local friendID, friendRep, friendMaxRep, friendText, friendTexture, friendTextLevel, friendThresh = GetFriendshipReputationByID(factionID);

if (friendID ~= nil) then
factionStandingtext = friendTextLevel;
barValue = friendRep - friendThresh;
barMax = min( friendMaxRep - friendThresh, 8400);
barMin = 0;
end


http://wow.go-hero.net/framexml/16016/ReputationFrame.lua#171

They use this code for the current PTR build:-- check if this is a friendship faction
local isCappedFriendship;
local friendID, friendRep, friendMaxRep, friendName, friendText, friendTexture, friendTextLevel, friendThreshold, nextFriendThreshold = GetFriendshipReputation(factionID);
if (friendID ~= nil) then
factionStandingtext = friendTextLevel;
if ( nextFriendThreshold ) then
barMin, barMax, barValue = friendThreshold, nextFriendThreshold, friendRep;
else
-- max rank, make it look like a full bar
barMin, barMax, barValue = 0, 1, 1;
isCappedFriendship = true;
end
colorIndex = 5; -- always color friendships green
factionRow.friendshipID = friendID; -- for doing friendship tooltip
else
factionStandingtext = GetText("FACTION_STANDING_LABEL"..standingID, gender);
factionRow.friendshipID = nil;
end


http://wow.go-hero.net/framexml/16173/ReputationFrame.lua#173
Thanks for the quick reply Choonster, will try toying with this to get some results.

Join the Conversation

Return to Forum