DevTools:
This Addon is a collection of tools that I find useful for Addon Development
Commands
/dt help
/dt reload
- Reloads the UI
Features
DevTools:add(command)
- Add a new command (command must be an instance of DTCommand
DevTools:remove(command_name)
- Removes the command
error_log(msg):
- function that prints ERROR: msg in all red to the General Tab
printf(format_string, ...):
- A format function that prints the text to the General Tab
cprintf(hex_color, format_string, ...):
- A format function that prints the text to the General Tab
sprintf( format_string, ...):
- A format function that returns the formated string
include(file):
- Lets you include a lua file
unpack2(...):
- returns a table of the varargs and the number of args
unpack_args(args):
- expands a tables into varargs
Code to work with xml files
- untested
Timers
Code to work with timers
Timers:registerDelayed(name, delay, func, ...)
- will register func to be called once after delay (in ms)
Timers:registerTimer(name, delay, func, ...)
- will register func to be called repeatedly after delay (in ms)
Timers:cancelTimer(name)
- will cancel the named timer
Timers:isRegistered(name)
- will tell you if it was registered or not
SkillTools
Tool for Working with skills
GetSkillUsableByName(skill_name)
- Returns true or false if the Skill is Usable or not
GetSkillCooldownByName(skill_name)
- Returns cooldown, remaining for the named skill
CastSpellIfUsable(spell_name)
- will cast the spell if it is usable, returns true or false if it cast the spell or not
PlayerHasBuff(buff_name)
- returns true/false if the player has the specified Buff
TargetHasBuff(buff_name)
- returns true/false if the target has the specified Buff
UnitHasBuff(unit, name)
- returns true/false if the unit [player, target, party1-5, focus1-12, mouseover, mouseovertarget, targettarget] has the specified Buff
PlayerHasDebuff(buff_name)
- returns true/false if the player has the specified Debuff
TargetHasDebuff(buff_name)
- returns true/false if the target has the specified Debuff
UnitHasDebuff(unit, name)
- returns true/false if the unit [player, target, party1-5, focus1-12, mouseover, mouseovertarget, targettarget] has the specified Debuff
ItemTools
Tool for working with Items
GetItemUsableByName(item_name)
- Returns true or false if the Item is Usable or not
GetItemCooldownByName(item_name)
- Returns cooldown, remaining for the named Item
UseItemIfUsable(item_name)
- will use the Item if it is usable, returns true or false if it used the Item or not
UnitTools
Tools for working with Units
UnitIsValid(unit_id)
- Checks if the Unit exists, has a name, is not dead and if the unit_id is a party1-5 it makes sure the unit is in range and is online
GetUnitId(name)
- Checks the party, raid or focus for the specified name and returns where they are
Facts
- Date created
- 10 Mar 2009
- Categories
- Last update
- 01 Oct 2009
- Development stage
- Release
- Language
- enUS
- License
- BSD License
- Curse link
- DevTools
- Reverse relationships
- 5
- Recent files
- A: r0 for 2.0.11.1872 on 01 Oct 2009
- R: DevTools 1.4 for 2.0.11.1872 on 01 Oct 2009
- R: DevTools 1.3 for 1825 on 18 Apr 2009
- R: DevTools 1.2 for 1825 on 31 Mar 2009
- B: DevTools 1.1 for 1810 on 21 Mar 2009
Authors
Relationships
- Required dependency
- CommandManager