Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Posted by: Alexpoet on Jan 18 2006, 02:03 PM
I'm working on developing an AddOn that could benefit greatly from some of the information Auctioneer provides to game tooltips.
However, I'm having some trouble reading through the monstrously large Auctioneer AddOn to find out exactly what I need to call, and how.
I'd like to get Auctioneer's HSP value for a given auction item, or container item. Seems like this should be a pretty simple value to get, but I can't find the appropriate function within Auctioneer or, if I do, I can't find what value to hand it.
Seems like a pretty straightforward request, but I've looked through every post on the forum and saw nothing like it. Please forgive me if this has been asked and answered....
Posted by: MentalPower on Jan 18 2006, 02:57 PM
Auctioneer.Statistic.GetHSP(itemKey, realm) is the function you're looking for. However it won't quite work if you just supply a Blizzard hyperlink. It only accepts itemKey's in the Auctioneer format "ItemID:RandomProp:Enchant". An example use is in Auctioneer.Statistic.DoHSP() in the same file.
Posted by: Alexpoet on Jan 18 2006, 03:04 PM
Thank you so much! I've been trying to find those pieces for weeks, on and off!
Posted by: MentalPower on Jan 18 2006, 09:06 PM
NP, glad to help. If you have any more questions just ask .
Posted by: Guest on Jan 19 2006, 07:41 AM
Okay...I'm back begging again.
I took a shot at it, but I'm having trouble making the itemLink in the Auctioneer format (as you warned me about). I some crawling around in the Auctioneer code (as I said, I've been doing that for a while), and thought I had an idea how to do it, but I'm getting a value of 0 from GetHSP.
Here's my code:
itemlink = GetAuctionItemLink("list", auctionid) -- where auctionid is an index from 1-50
itemID, randomProp, enchant,_,_ = EnhTooltip.BreakLink(itemlink);
itemKey = itemID..":"..randomProp..":"..enchant;
hsp = Auctioneer_GetHSP(itemKey, GetCVar("realmName"));
I think perhaps the problem is that BreakLink is designed to take links from GetInventoryItemLink, not auction links, but I'm not certain of that. Should I even be using BreakLink at all? I do, of course, have EnhTooltip installed as well.
Any suggestions, or ideas of what I'm doing wrong?
itemlink = GetAuctionItemLink("list", auctionid) -- where auctionid is an index from 1-50
itemKey = Auctioneer.Util.GetItems(itemlink)
hsp = Auctioneer.Statistic.GetHSP(itemKey[1], Auctioneer.Util.GetHomeKey());
[/pre]Posted by: MentalPower on Jan 19 2006, 04:51 PM
Personally I would use Auctioneer.Util.GetItems() so instead your code would be like:
[pre][/pre]
itemlink = GetAuctionItemLink("list", auctionid) -- where auctionid is an index from 1-50
itemKey = Auctioneer.Util.GetItems(itemlink)
hsp = Auctioneer.Statistic.GetHSP(itemKey[1], Auctioneer.Util.GetHomeKey());
Two notes:
- You should upgrade to the latest version of Auctioneer, since we changed the function names quite a lot recently (from Auctioneer_GetHSP() to Auctioneer.Statistic.GetHSP() for example)
- The second argument to Auctioneer.Statistic.GetHSP() needs to be formatted as "RealmName-Faction" so "Alleria-Alliance" or "Alleria-Neutral" instead of simply "Alleria" as would be returned by GetCVar("realmName")
1 to 7 of 7