Originally Posted by Vlad
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:
M.SecureHookFunc_ContainerFrameItemButton_OnModifiedClick = function()
SetModifiedClick("AUCTIONITEM", "LALT-BUTTON2"); -- << not sure yet if I can do this (add my own entry to their t)
local ContainerFrameItemButton_OnModifiedClick_Hook = function(self, button)
if ( ( button == "RightButton" ) and IsModifiedClick("AUCTIONITEM") ) then
if ( AuctionFrame:IsVisible() and ( not AuctionFrameAuctions:IsVisible() ) ) then
AuctionFrameTab_OnClick(AuctionFrameTab3);
end
end
end
hooksecurefunc("ContainerFrameItemButton_OnModifiedClick", ContainerFrameItemButton_OnModifiedClick_Hook);
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.