Thread Tools Display Modes
02-11-16, 08:39 AM   #1
Denyzn
A Defias Bandit
Join Date: Feb 2016
Posts: 3
Need help fixing an addon

From the wiki :

"WoD Patch 6.0.2 (2014-10-14): Combo Points for rogues are now shared across all targets and they are no longer lost when switching targets.
GetComboPoints will return 0 if target is friendly or not found. Use UnitPower(unitId, 4) to get combo points without an enemy targeted."

I am using an addon that still references "GetComboPoints" and it is causing issues because the information being queried fades when I deselect a target.

I have no clue how to program, all I have is my intuition and the ability to google. I tried replacing every instance of "GetComboPoints" with "UnitPower("player", 4)" in the addon's .lua files but it causes the addon to not even load.

Was hoping someone could tell me a possible culprit and the super duper easy change I need to make to fix it :P

(I'm being facetious, if this is an issue that only the author of the addon or someone else with some semblance of programming knowledge can fix just let me know)
  Reply With Quote
02-11-16, 10:22 AM   #2
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
Maybe you should think about getting another addon for combo points.
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!
  Reply With Quote
02-11-16, 11:43 AM   #3
Kapulani
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Oct 2012
Posts: 3
You should post the actual addon, and/or the errors that are thrown when the addon tries to load and fails. GetComboPoints('player', unit) should be replaced easily enough with UnitPower('player', 4) as you note without causing any new errors.

I suppose it would be a problem if the addon is written such that it interprets having combo points to also mean you actually have an active target, so it looks for other information related to the 'target' unit that it can't find.

Without code and/or errors, it's not really possible to know.
  Reply With Quote
02-11-16, 01:03 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Originally Posted by Kapulani View Post
I suppose it would be a problem if the addon is written such that it interprets having combo points to also mean you actually have an active target, so it looks for other information related to the 'target' unit that it can't find.
This really doesn't have any effect. You either have combo points or you don't. The difference is that the game doesn't wipe them when you change target.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
02-11-16, 10:45 PM   #5
Kapulani
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Oct 2012
Posts: 3
Originally Posted by Fizzlemizz View Post
This really doesn't have any effect. You either have combo points or you don't. The difference is that the game doesn't wipe them when you change target.
It can cause a problem if Denyzyn replaced GetComboPoints('player', 'target') with UnitPower('player', 4) and other addon code anticipates that a non-zero return implies that you actually have a target.

GetComboPoints('player', 'target') will return 0 if you don't have a target, no matter how many combo points you actually have.

UnitPower('player', 4) will return an accurate report of combo points, regardless of whether you have an active target.

It would be quite easy to make a design decision based on GetComboPoints' behavior that does not hold true for UnitPower, ultimately leading to a Lua error that would cause the addon itself to fail.
  Reply With Quote
02-11-16, 11:22 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,324
It's a really stupid way to check if you don't have a target since it will in most cases give you false positives. Regardless of how it's used, we can't fix anything without knowing what to fix.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
02-12-16, 06:12 AM   #7
Denyzn
A Defias Bandit
Join Date: Feb 2016
Posts: 3
@jeffry162 while I appreciate you taking the time to make your tremendous contribution to my problem, I already have the addon integrated as part of my UI on several characters and would prefer to use it's funtionality for combo points because, aside from the aformentioned issue, it's configuration options are great.

@Kapulani thanks for the response. The addon page is here. I didn't really expect anyone to download the addon and look into it themselves, but if you or anyone else wants to there it is I'll try replacing only GetComboPoints('player', unit) with the unitpower line as before I was replacing all instances of "GetComboPoints"(in each .lua file there was some sort of master list/guide or something). I'll post errors if it isn't successful.
  Reply With Quote
02-12-16, 06:22 AM   #8
Denyzn
A Defias Bandit
Join Date: Feb 2016
Posts: 3
so there was only one instance of "GetComboPoints('player', target')" in all of the files. Replacing that with "UnitPower('player', 4)" did indeed solve the problem. Thank you for the help guys!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Need help fixing an addon


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