Previous Index Next
Plugins Table of Contents FAQ (Frequently Asked Questions)

API

This section describes the API which you can use to interface with ClickHeal. This allows you to make use of ClickHeal from your own Addons or by macros.

Developer API

Here you can find information of what you need to do to interface with ClickHeal from your own AddOn. The function you need to call is

function CH_UnitClicked( unitID, mouseButton );

unitID: A valid WoW unit id ('player','raid5','pettarget',...) or the string 'Panic' for PANIC behavior.
mouseButton: The mouse button which was pressed (released), as supplied by the XML trigger ('LeftButton','Button5')

Note that you should not call this method twice, at MouseDown and MouseUp. If you catch both events, make sure that you only calls above function once.

If you interface with ClickHeal, please drop me a note at the boards on ui.worldofwar.net or www.curse-geming.com. Or pm me (rmet0815) on one of these obards to let me know.

User API

Currently there is no (officially supported) User API to ClickHeal. The adventurous user may try to use

function CH_HealNeediest( preferedSpell, preferedTarget )

preferedSpell: The name of the (heal) spell you would like to cast or nil if you want ClickHeal to select the spell for you
preferedTarget: The target you want the spell to cast on or nil if you want ClickHeal to select the appropriate target (player, party, raid or pets, dependant on settings)

To use this in a macro, you have to go to the macro screen (/macro) and create a new macro. Select a picture, give it a name and in the code box enter the function above. Here some examples:

Please note that this method is developed to cast healing spells. While it might be "abused" to cast other spells too, there is no guarantee that they work as expected, if at all.

Plugins Table of Contents FAQ (Frequently Asked Questions)
Previous Index Next