Thread Tools Display Modes
12-14-10, 10:48 AM   #1
Nevoron
A Kobold Labourer
Join Date: Oct 2008
Posts: 1
SetAchievementComparisonUnit Issue

Hey,

I'm fairly new writing addons. What I'm working on is an addon that shows me the arena max. ratings of my target upon slash command by reading the statistics.

What I have written right now does that but there are several issues. First of all here is my code so far:

Code:
SLASH_BRODIE1 = "/brodie"
function SlashCmdList.BRODIE(msg, editbox)
   CanInspect("target")
   if (event == "INSPECT_ACHIEVEMENT_READY") then
	ClearAchievementComparisonUnit()
   end
   SetAchievementComparisonUnit("target")
   print(GetUnitName("target"), "has a 3s max-rating of", GetComparisonStatistic(595))
end
Issue 1: I need to do /brodie more than once for the value to update for a new target. (Guessing this is due to the new inspect-throttle)

Issue 2: Every time SetAchievementComparisonUnit is called there's a lag in-game wether it's via addon or via /run.

I looked at other addons that do similar things, found mostly tooltip addons, but they too use SetAchievementComparisonUnit so I don't think the function is the problem because I can't imagine they all create a lag when you mouseover someone.

Thanks for any help
Nevo

Last edited by Nevoron : 12-14-10 at 10:57 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » SetAchievementComparisonUnit Issue


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