Thread Tools Display Modes
01-10-14, 11:54 PM   #81
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Add:
Code:
local _, cfg = ... --import config
local addon, ns = ... --get addon namespace
local hasBeautycase = IsAddOnLoaded("!Beautycase")
local _, playerClass = UnitClass("player")
Then change all other instances of:
Code:
        if IsAddOnLoaded("!Beautycase") then
...to:
Code:
        if hasBeautycase then
It won't make a huge difference, it's just a matter of logical principle -- for example, what you're doing now is the same as if instead of creating that "playerClass" variable at the top of your file, you looked up the player's class again every time you wanted to class-color something. If the return value from a function will never change, there's no reason to keep calling it over and over.
__________________
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
01-11-14, 12:06 AM   #82
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Originally Posted by Phanx View Post
It won't make a huge difference, it's just a matter of logical principle -- for example, what you're doing now is the same as if instead of creating that "playerClass" variable at the top of your file, you looked up the player's class again every time you wanted to class-color something. If the return value from a function will never change, there's no reason to keep calling it over and over.
Ah I get it now.
__________________
Tweets YouTube Website
  Reply With Quote
01-12-14, 01:47 AM   #83
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Ok so probably the last thing I got left to so is setup auras for the raid frames. Probably have something a bit like indicators like grid has so I gotta figure out how the filters work.

EDIT:
Looks like ym best bet would be to go with oUF_Aurawatch, tried working some things out but not sure how to set everything I need in my layout for it to work...
__________________
Tweets YouTube Website

Last edited by 10leej : 01-13-14 at 03:53 PM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Trying my hand at ouf


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off