Quantcast Taint - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-31-13, 04:02 PM   #1
A Flamescale Wyrmkin
Join Date: Aug 2009
Posts: 124

Evening folks

I've said a few times before on these forums that I want to be absolutely certain that I'm not degrading the performance of the game because of a lack of knowledge on my part. I'm hooking the func 'UseContainerItem' so that I can add the optional ability for the user to right-click an item in their inventory (while the Auction House is open, regardless of which tab is being used) and that item will be put up for sale.

As it stands, if you're in the 'Bid' or 'Browse' tab, an unmodified right click will attempt to use or equip the item in question.

Here's the code which I have written to perform this:

Lua Code:
  1. M.HookFunc_UseContainerItem = function()
  3.     local origUseContainerItem = UseContainerItem;
  5.     UseContainerItem = function(...)
  7.         if ( AuctionFrame:IsVisible() and ( not AuctionFrameAuctions:IsVisible() ) ) then
  8.             AuctionFrameTab_OnClick(AuctionFrameTab3);
  9.         end
  11.         securecall(origUseContainerItem, ...);
  13.     end
  15. end

Although it works fine, my primary concern is that my hooking UseContainerItem will cause Blizz code to treat it as unsecure. After the user has sold whatever they're selling, they head out into combat and the problems start.

Although UseContainerItem works fine for me during combat, it appears that it may be tainting ArkInventory. I've not yet tested using ArkInventory, while in combat, without the function loaded though, to be honest.

I've played around with the idea of hooksecurefunc, but I'm not sure that that func can produce the desired result; by the time my post-hook is called, it's already going to be trying to equip the item.

If anyone could offer some advice on this, it would be very much appreciated.

Thanks in advance,

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Taint

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