Quantcast WoWInterface - View Single Post - 4.3 Secure handler trouble
View Single Post
12-10-11, 11:16 AM   #2
A Chromatic Dragonspawn
Saiket's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 154
I think I've figured out exactly what changed, and a fix for it. In 4.3, if a spell is already "targeting" and you try to cast that same spell with or without an explicit target, the second cast won't go off. Here's the macro I used to confirm:
/cast [@none]Holy Light
/cast [@player]Holy Light
The first cast begins targeting the spell, and the second one gets ignored because it's the same spell.

Thankfully, there's a SecureActionButtonTemplate type "stop" that only clears the targeting spell and doesn't affect casting. Just click a button with that type before all click cast spells.

Here's the same test macro from above, but this time it clears the targeting spell first (and works):
lua Code:
  1. local Button = CreateFrame( "Button", "SpellStopTargetingButton", nil, "SecureActionButtonTemplate" );
  2. Button:SetAttribute( "type", "stop" ); -- Calls SpellStopTargeting
/cast [@none]Holy Light
/click SpellStopTargetingButton
/cast [@player]Holy Light
You'd probably need some sort of proxy button to weave the extra click into all spell-related click-cast binds, but it should restore pre-4.3 behavior.
  Reply With Quote