... | ... | @@ -2,11 +2,17 @@ Custom flags are bouquet validators which accept a user defined anonymous functi |
|
|
|
|
|
The function can access the *VUHDO_unitInfo* variable which is a table containing the relevant cached unit information.
|
|
|
|
|
|
The example below returns true if the unit is named 'Ivaria':
|
|
|
The simple example below returns true if the unit is named 'Ivaria':
|
|
|
```lua
|
|
|
return ("Ivaria" == VUHDO_unitInfo["name"])
|
|
|
```
|
|
|
|
|
|
The follow is a more complicated example which returns true only if the Priest spell 'Prayer of Mending' is off cooldown and the unit is below 90% health:
|
|
|
|
|
|
```lua
|
|
|
return ((select(2,GetSpellCooldown("Prayer of Mending")) == 0) and ((VUHDO_unitInfo["health"] / VUHDO_unitInfo["healthmax"]) < 0.9)) and true or false;
|
|
|
```
|
|
|
|
|
|
Unit information (*VUHDO_unitInfo* table):
|
|
|
* afk - boolean - true if unit is AFK
|
|
|
* aggro - boolean - true if unit has aggro
|
... | ... | |