View Single Post
09-04-16, 02:52 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
1. Copy and paste the entire function from Blizzard's code into your addon file.

2. Add a "local" keyword in front of the function definition so it only exists in your file, not everywhere. "function DoStuff(x)" --> "local function DoStuff(x)"

3. Change each instance of the function names I mentioned where they're called from inside the function.

4. Set a new OnEvent handler on the CombatText frame, passing it your modified function.

You can use this tool to generate an addon package for your code if you're not sure how to write a TOC file and set up your folder structure.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote