Thread Tools Display Modes
Old 08-06-12, 02:53 AM   #201
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,172
Darkmoon Faire is up, and all of the games use the [overridebar] state.
p3lim is online now  
Old 08-06-12, 01:27 PM   #202
Allara
A Kobold Labourer
 
Allara's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 1
Originally Posted by Vladinator View Post
Can't blame me for trying, sometimes devs create functions that have one purpose but can fulfill another, in this case they made sure you can't use this for anything else, but it was worth at least trying out. :P
It wouldn't surprise me if units were stored as a bitmask or some other representation (not a string) at the C level, which is why this isn't working as you'd expect. It'd also be much faster than a string comparison, which is why this new function is very helpful.
Allara is offline  
Old 08-06-12, 04:47 PM   #203
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,172
Anyone on the US forums able to do a request for me?
It's the following:

Allow us to be able to retrieve information about a player's standing with an NPC without currently talking to them.

This could be implemented by using the id of the said NPC as the first argument in GetFriendshipReputation(), like this: GetFriendshipReputation(id).
Would open up for add-ons to track an player's standing with each NPC at any time, without beeing in a conversation with them.
Also, for ease-of-access if you consider this, add the NPC's name as a return from that function.

The way I'd do it right now is to get a database of each and every NPC that has reputation available, then update it whenever the player talks to them. This is not a good way of countering this "issue".

Last edited by p3lim : 08-06-12 at 07:24 PM.
p3lim is online now  
Old 08-06-12, 07:17 PM   #204
Talyrius
A Frostmaul Preserver
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 282
@p3lim
[API Request] GetFriendshipReputation(id)
Talyrius is offline  
Old 08-06-12, 07:23 PM   #205
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,172
Thanks Talyrius
p3lim is online now  
Old 08-06-12, 07:33 PM   #206
Farmbuyer
A Cyclonian
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 43
Originally Posted by Allara View Post
It wouldn't surprise me if units were stored as a bitmask or some other representation (not a string) at the C level, which is why this isn't working as you'd expect. It'd also be much faster than a string comparison, which is why this new function is very helpful.
Lua string comparisons are O(1); in fact, inside the scripting engine, they are a simple pointer comparison, as equal string values are guaranteed to be at the same place in the string pool.

That said, I agree they're likely doing something special with unit IDs, and wouldn't expect this function to work on random strings (although my armchair guess is that, given the way string "interning" works, it wouldn't be Too Difficult to make it work...).
Farmbuyer is offline  
Old 08-06-12, 10:01 PM   #207
Talyrius
A Frostmaul Preserver
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 282
[Bug] SecureAuraHeader
There is a bug (present since patch 4.3) within the SecureAuraHeader. When using the 'consolidateTo' or 'includeWeapons' attributes, buffs aren't correctly hiding after the timer is dead or cancelled by the player if there are any temporary weapon enchants or consolidated buffs active.

Related thread:
http://eu.battle.net/wow/en/forum/topic/2868633701
An example:
http://www.wowinterface.com/forums/s...ad.php?t=43833

HOW TO FIX
Build 15952 - SecureGroupHeaders.lua, line 812:
Code:
	local deadIndex = display + 1;
	local button = self:GetAttribute("child"..deadIndex);
	while ( button ) do
		button:Hide();
		deadIndex = deadIndex + 1;
		button = self:GetAttribute("child"..deadIndex)
	end
Make a copy of the above code block and move it back to line 736. That's where it resided the last time it worked properly (patch 4.2). You'll have to redefine 'deadIndex' as being: #buttons + 1.

Your original modifications regarding the placement of this code block were made at the suggestion of Dargen (link below). However, he forgot to account for the use of the 'consolidateTo' and 'includeWeapons' attributes.
http://us.battle.net/wow/en/forum/topic/1920720200

IN ADDITION
http://us.battle.net/wow/en/forum/to...45961?page=1#3
A second change that is still needed is to hide all of the items in the "buttons" table which are not being explicitly shown. Other buttons may have been shown during a previous call to this function, and the addon may have since reduced the values in the "wrapAfter" and/or "maxWraps" attributes.

In SecureGroupHeaders.lua, in the configureAuras function, after the loop that shows buttons from the "buttons" table, line 820 which currently reads:

Code:
	if ( display >= 1 ) then
should be changed to:

Code:
	for hideIndex = display + 1, #buttons do
		buttons[hideIndex]:Hide();
	end
	if ( display >= 1 ) then

Last edited by Talyrius : 08-08-12 at 11:15 PM.
Talyrius is offline  
Old 08-11-12, 07:58 PM   #208
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,172
UnitClass() has a 3rd return, classID.

Code:
1 = Warrior
2 = Paladin
3 = Hunter
4 = Rogue
5 = Priest
6 = Death Knight
7 = Shaman
8 = Mage
9 = Warlock
10 = Monk
11 = Druid

Last edited by p3lim : 08-11-12 at 09:22 PM.
p3lim is online now  
Old 08-11-12, 08:10 PM   #209
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,172
Decided to get the info from what specs have what IDs from GetSpecializationInfoByID()

Here is the list:
Code:
["HUNTER"] = {
	[255] = "Survival",
	[254] = "Marksmanship",
	[253] = "Beast Mastery",
},
["WARRIOR"] = {
	[73] = "Protection",
	[71] = "Arms",
	[72] = "Fury",
},
["PALADIN"] = {
	[70] = "Retribution",
	[65] = "Holy",
	[66] = "Protection",
},
["MAGE"] = {
	[64] = "Frost",
	[63] = "Fire",
	[62] = "Arcane",
},
["PRIEST"] = {
	[257] = "Holy",
	[258] = "Shadow",
	[256] = "Discipline",
},
["WARLOCK"] = {
	[266] = "Demonology",
	[267] = "Destruction",
	[265] = "Affliction",
},
["DEATHKNIGHT"] = {
	[252] = "Unholy",
	[251] = "Frost",
	[250] = "Blood",
},
["SHAMAN"] = {
	[263] = "Enhancement",
	[264] = "Restoration",
	[262] = "Elemental",
},
["DRUID"] = {
	[103] = "Feral",
	[104] = "Guardian",
	[102] = "Balance",
	[105] = "Restoration",
},
["MONK"] = {
	[269] = "Windwalker",
	[270] = "Mistweaver",
	[268] = "Brewmaster",
},
["ROGUE"] = {
	[260] = "Combat",
	[261] = "Subtlety",
	[259] = "Assassination",
},
p3lim is online now  
Old 08-12-12, 12:26 AM   #210
AcidWeb
A Wyrmkin Dreamwalker
 
AcidWeb's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 56
Originally Posted by p3lim View Post
Decided to get the info from what specs have what IDs from GetSpecializationInfoByID()
<snip>
Thank you for this one. Less work for me :P
__________________
Livarax - Karazhan
Vox Rootis, Vox Dei!
AcidWeb is offline  
Old 08-12-12, 07:29 AM   #211
Meorawr
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 193
UnitAura seems to have changed but I couldn't find this mentioned anywhere. More importantly it's behaving in a really horrible way.

On live there's 13 return values (name through to isBossDebuff) plus an additional 3 return values for tooltip information.

In the latest build there's a minimum of 14 return values, the last one being a boolean. You'd expect the 3 tooltip values to then be values 15-17, however here's how it works for the following two buffs:

Legacy of the White Tiger:

14 return values, last one is a boolean. Values 15-17 aren't returned (so they're nil, effectively).

Life Cocoon:

17 return values, however 14-16 are the tooltip values, whereas this mystery boolean is #17.

Basically it's a major pain now because whereas we could (hopefully) have assumed #14-16 to be nil/number values, we now have to check if #17 is not nil in order to determine whether or not tooltip values exist.

Of course I could be completely missing something here so do correct me if I'm wrong

/dump's of the returns:
Code:
Dump: value=UnitAura("player", 1, "HELPFUL")
[1]="Legacy of the White Tiger",
[2]="",
[3]="Interface\\Icons\\ability_monk_prideofthetiger",
[4]=0,
[5]="Magic",
[6]=3600,
[7]=7377.351,
[8]="player",
[10]=1,
[11]=116781,
[12]=true,
[14]=true -- Mystery boolean, ooOOooOOoooOO!

Dump: value=UnitAura("player", 1, "HELPFUL")
[1]="Life Cocoon",
[2]="",
[3]="Interface\\Icons\\ability_monk_chicocoon",
[4]=0,
[5]="Magic",
[6]=12,
[7]=3926.258,
[8]="player",
[11]=116849,
[12]=true,
[14]=36848, -- Tooltip value #1 (absorb damage)
[15]=50, -- Tooltip value #2 (periodic healing bonus %)
[16]=0, -- Unused value #3
[17]=true, -- Mystery boolean, ooOOooOOoooOO!
In short the stack needs 0's or nil's at 14-16 for the first case

Last edited by Meorawr : 08-12-12 at 08:02 AM.
Meorawr is offline  
Old 08-12-12, 07:36 AM   #212
Jarod24
A Cyclonian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 45
Originally Posted by Talyrius 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?
Jarod24 is offline  
Old 08-12-12, 12:19 PM   #213
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,172
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

As for the ID used for this function, you can gather them into a table by using this:
Code:
for index = 1100, 1500 do
    if(GetFriendshipReputationByID(index)) then
        table[index] = true
    end
end
p3lim is online now  
Old 08-12-12, 04:03 PM   #214
Farmbuyer
A Cyclonian
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 43
Originally Posted by p3lim View Post
UnitClass() has a 3rd return, classID.

Code:
1 = Warrior
2 = Paladin
3 = Hunter
4 = Rogue
5 = Priest
6 = Death Knight
7 = Shaman
8 = Mage
9 = Warlock
10 = Monk
11 = Druid
If any of you are wondering, like me, what the point of these values are when the 2nd return value is already locale-independent, the answer seems to be: the numeric form is fed to talent-related functions. So far I see it passed to GameTooltip:SetTalent() and to GetTalentLink().

AFAICT there are no named constants for these values yet.
Farmbuyer is offline  
Old 08-13-12, 12:58 PM   #215
Lombra
A Chromatic Dragonspawn
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 174
I only just got the beta, so this is probably "old", but I noticed a new event BAG_UPDATE_DELAYED firing, which I haven't seen any mention of so far. Not sure of the exact details, but basically seems to fire once per batch of BAG_UPDATE, presumably letting us no longer worry about throttling bag update event spam. Passes no arguments.
__________________
Grab your sword and fight the Horde!
Lombra is online now  
Old 08-13-12, 01:08 PM   #216
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,172
Originally Posted by Farmbuyer View Post
If any of you are wondering, like me, what the point of these values are when the 2nd return value is already locale-independent, the answer seems to be: the numeric form is fed to talent-related functions. So far I see it passed to GameTooltip:SetTalent() and to GetTalentLink().

AFAICT there are no named constants for these values yet.
Look at the class order for the updated version of Interface\MINIMAP\POIICONS.BLP:
p3lim is online now  
Old 08-13-12, 08:05 PM   #217
Farmbuyer
A Cyclonian
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 43
Originally Posted by p3lim View Post
Look at the class order for the updated version of Interface\MINIMAP\POIICONS.BLP:
Cute. I wonder if we'll start seeing function wrappers to do modulo math and return the texcoords, rather than a series of hardcoded texcoords like CLASS_ICON_TCOORDS.
Farmbuyer is offline  
Old 08-13-12, 08:47 PM   #218
Lombra
A Chromatic Dragonspawn
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 174
Calling GetTransmogrifySlotInfo during PLAYER_LOGIN on a 64-bit client crashes the client. (still, so might not be wholly relevant to this thread) Could anyone perhaps file a US report on this? I mentioned it in the 64 bit feedback thread when they launched that, but didn't seem to help.
__________________
Grab your sword and fight the Horde!

Last edited by Lombra : 08-14-12 at 10:09 AM.
Lombra is online now  
Old 08-14-12, 11:15 AM   #219
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,172
5.0.4 on Live servers the 28th of August.
p3lim is online now  
Old 08-16-12, 03:09 PM   #220
Jarod24
A Cyclonian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 45
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.
Jarod24 is offline  
 

Go BackWoWInterface » WoD Beta » MoP archived threads » Beta API discussion

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off