Adds a function (SCDF) and slash command (/scdf) for use in macros for canceling druid forms. It will not cancel a form if the GCD is in effect, you would be incapable of casting/using an ability immediately, or if you do not have enough mana to recast the form you are leaving.
The function has two optional parameters. The first is a number denoting a form to NOT cancel if you're already in it (default is 0 for caster form). The second parameter indicates to skip the check of available mana. Values other than nil, false, or 0 will stop the mana check (default is nil).
The slash command basically works the same as the function with the added benefit of taking macro conditionals:
/scdf -- Cancel form unconditionally, same as /scdf 0 0 or /run SCDF()
/scdf 0 1 -- Cancel form ingnoring mana, same as /run SCDF(0, 1)
/scdf 1 -- Equivalent to /scdf [noform:1] or /run SCDF(1)
/scdf [noflying] -- Cancel form only if not flying
The function/slash command work independant of the autoUnshift and autoDismountFlying CVar settings (most similar addons/scripts don't work properly when these are changed).
Drop form to heal self while being hit
/castsequence [noform,target=player] reset=combat/12 Barkskin, Regrowth, Rejuvenation, Lifebloom, Lifebloom, Lifebloom
/scdf [noflying] 1
/cast [mod:alt,form:1] Challenging Roar; [form:1] Growl; Dire Bear Form
Use a healthstone while tanking
/use Master Healthstone
/cast Dire Bear Form
WARNING: Addons that automatically swap weapons on a form change will trigger the GCD so make sure that part is disabled when using macros similar to the one above or you will likely die using it while tanking.
Version 1.2 (06/03/2008)
Now works without regard to autoUnshift and autoDismountFlying CVar settings.
Version 1.1 (06/03/2008)
Fixed an issue with not being able to cancel flight form while in combat.