Thread: Taint
View Single Post
01-31-13, 06:35 PM   #7
Aanson
A Flamescale Wyrmkin
Join Date: Aug 2009
Posts: 124
Originally Posted by Vlad View Post
Just an idea, why not hook the onclick script on the buttons in the auction UI instead the API itself?
On that subject, I also wrote this script a couple of days ago, but I've not got round to trying it out yet:

Lua Code:
  1. M.SecureHookFunc_ContainerFrameItemButton_OnModifiedClick = function()
  2.  
  3.     SetModifiedClick("AUCTIONITEM", "LALT-BUTTON2"); -- << not sure yet if I can do this (add my own entry to their t)
  4.  
  5.     local ContainerFrameItemButton_OnModifiedClick_Hook = function(self, button)
  6.  
  7.         if ( ( button == "RightButton" ) and IsModifiedClick("AUCTIONITEM") ) then
  8.  
  9.             if ( AuctionFrame:IsVisible() and ( not AuctionFrameAuctions:IsVisible() ) ) then
  10.                 AuctionFrameTab_OnClick(AuctionFrameTab3);
  11.             end
  12.  
  13.         end
  14.  
  15.     end
  16.  
  17.     hooksecurefunc("ContainerFrameItemButton_OnModifiedClick", ContainerFrameItemButton_OnModifiedClick_Hook);
  18.  
  19. end

I'll need to check the XML to ensure that the hooksecurefunc line is accurate.

I thought about hooking to a AuctionUI button, but as far as I can work out, there isn't one that would do the job.

The user puts an item up for auction by right clicking the item in their bag. They wouldn't be using the AuctionUI at all to put the item up for sale unless they picked the item up and dragged / dropped it in the sell item box (or whatever it's called!), by which point it's already up for sale and there's no point of the hook!

Sorry if I've misunderstood btw... kinda a common thing with me lol.
__________________
__________________

Last edited by Aanson : 01-31-13 at 06:39 PM.
  Reply With Quote