WoW BlueTracker Home | RSS | News | Contact
Recent | Search | Archive | CS Posts
Poster: Glaumene at 3/12/2006 9:07:10 AM PST
Subject: CameraOrSelectOrMove* workaround - Comments?
   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
  http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=335196&p=#post335196
 
Poster: slouken at 3/12/2006 6:55:51 PM PST
Subject: Re: CameraOrSelectOrMove* workaround - Comments?
   No, this is fine. :)

Make sure that you hook appropriately so other addons can do the same thing, of course.

[ post edited by slouken ]

  http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=335196&p=#post335509

View all recent official Blue Posts

WoW Blue Tracker: Archiving World of Warcraft Blue Posts
since March 2005
Home | RSS | News | Contact
Recent | Search | Archive | CS Posts
 

Why Ads?