| |
Alot of mod authors are using CaleraOrSelectOrMoveStart/Stop() and TurnOrActionStart/Stop() to help detect instant cast spells, checking for spell casts on released dead players etc. But with the 1.10, this is no longer possible, since those methods are now unhookable (since we can't call the original function)
But a possible workaround for this is available:
WorldFrame:SetScript("OnMouseDown", myMouseDown)
WorldFrame:SetScript("OnMouseUp", myMouseUp)
function myMouseDown()
if arg1 == "LeftButton" then
-- Do as it it was *before* CameraOrSelectOrMoveStart
-- meaning, "mouseover" unit is available
elseif arg1 == "RightButton" then
-- Do as if it was *before* TurnOrActionStart
end
end
function myMouseUp()
if arg1 == "LeftButton" then
-- Do as it it was CameraOrSelectOrMoveStop
-- "mouseover" unit is NOT available
elseif arg1 == "RightButton" then
-- Do as if it was TurnOrActionStop
end
end
This works on the current version on test server. OnMouseDown/OnMouseUp doesn't quality as a hardware event, so can't be used for auto-buff/cleanse/whatever addons etc. It still allows for the same checks that the CameraOr* functions do.
Is this an acceptable workaround, or will this be removed before 1.10 goes live?[ post edited by Glaumene ]
Maldivia, Sargeras
|