Thread Tools Display Modes
10-16-14, 11:49 PM   #1
Aclii
A Defias Bandit
Join Date: Oct 2014
Posts: 2
Actual buff information ?

Hi! I'm trying to get actual buff amount (for example "Intellect increased by 2000" and then parse it) of player buffs. Since buff amount is scaled (player level, item ilvl, etc) UnitBuff->GetSpellDescription gives me wrong results. Is there any way to get this information using API or scanning tooltips text is the only way ?

Further I would like to sort buffs by type (intellect, crit, haste) and get theirs durations and power to show notification icons for prefered spell to cast if condition met (for example Chaos Bolt for destruction warlock).

My previous version uses hardcoded spellIDs for actual tier trinket procs and works fine, but I want to make something more flexible.
  Reply With Quote
10-17-14, 01:43 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
This is what I do in rFilter3.
https://code.google.com/p/rothui/sou...e/core.lua#222

Lua Code:
  1. --use the spellid of the aura you want to track (aura != spell that casts the aura)
  2. local searchSpellId = 12345
  3. local spellName, spellRank, spellIcon = GetSpellInfo(searchSpellId )
  4. local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellId, canApplyAura, isBossDebuff, value1, value2, value3 = UnitAura("player", spellName, spellRank, "HELPFUL")
  5. print(name,value1,value2,value3)
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
10-19-14, 11:33 PM   #3
Aclii
A Defias Bandit
Join Date: Oct 2014
Posts: 2
I've tested your solution looking at other players at training dummies, but unfortunately half of the buffs has empty (zeros) value1, value2, value3, so it won't work for me.

Now I'm going to use Simcrafts sc_spell_data.inc (describes spells and spelleffects), because parsing tooltips is the bad way IMO, anyway thank you for help )
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Actual buff information ?


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