Thread Tools Display Modes
Unread 09-20-10, 06:44 AM   #1
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Vengeance (Tanking Specialization)

Hiya everyone,

I've been looking at writing a small mod to be able to handle the stacking Attack Power buff that tanks get when receiving damage.


Has anyone seen any API calls that could give the current Attack Power increase from this buff?

Scanning the aura tooltip is an option, but I would prefer not to do this.


Thanks
yj589794 is offline  
Unread 09-20-10, 06:46 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,367
Maybe it's static and you can multiply the number of stacks with sth.

*errr* you don't.

http://cata.wowhead.com/spell=84839

Each time you take damage, you gain 5% of the damage taken as attack power, up to a maximum of 10% of your health.
Maybe UnitAura has a new value as result. You could print all the UnitAura values and see if there is anything valuable in there.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 09-20-10 at 06:50 AM.
zork is offline  
Unread 09-20-10, 06:51 AM   #3
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Unfortunately it does not appear to stack in the normal way.

As each 'stack' is based off the amount of damage taken, then the buff value is extremely dynamic.

My guess is that there is a server side calculation, and the client gets told of the new AP value.

Tooltip scanning is a nasty cludge, and I'd prefer to have a nice API call. Unfortunately I believe it will not be that easy
yj589794 is offline  
Unread 09-20-10, 06:52 AM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,367
If Blizzard has to do it aswell: maybe some hint can be found in FrameXML/BuffFrame.lua, who knows.

Oh...hmm
http://www.wowwiki.com/API_GameTooltip_SetUnitAura
http://wowprogramming.com/docs/widge...ip/SetUnitAura

So the tooltip is actually done server side.

But maybe there is a new value in http://wowprogramming.com/docs/api/UnitAura that has the numbers.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 09-20-10 at 07:01 AM.
zork is offline  
Unread 09-20-10, 07:15 AM   #5
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Hmmm, quick google search brought this up:
New in Cataclysm:
Code:
local spellAuraDesc = GetSpellAuraDescription(spellId)
which was swiftly followed by this:
Originally Posted by Adirelle
Wait, what ? Is that a way to get information without tooltip scanning ?
Indeed. Sadly, the last beta removed the single use of this function in the default UI, so this new API might never make it to release, but it allows to get the description text of the Aura related to a given spell. It was used in the Talent UI to get the different Mastery descriptions.

So close to something useful, will have to check if it does still exist.
yj589794 is offline  
Unread 09-20-10, 03:39 PM   #6
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
I've done some testing tonight, and UNIT_AURA does fire on a change of the Attack Power value from the Vengeance buff.

It's fairly simple to read the value by scanning the tooltip, but I would still prefer to have a direct API call to retrieve the value.
I'll carry out some further testing when I have more time.
yj589794 is offline  
Unread 09-20-10, 09:32 PM   #7
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,400
I'd guess that the differerent "strengths" of the Vengeance buff are actually different spells, in which case you'd be able to distinguish between them using the spellID value returned by UnitAura, without needing to scan the tooltip.
Phanx is offline  
Unread 09-21-10, 12:44 AM   #8
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,367
Hmm well there is only one value that is for sure, that is the maximum value. The rest can be any value from 0 to max depending on damage taken. Well that is kind of hard to calclulate.

But maybe some info is hidden in the combat text. Try checking that for some info on your vengeance stack maybe there is a value that can be tracked.

Code:
func COMBAT_LOG_EVENT_UNFILTERED(event, timestamp, eventType, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, ...)
    if eventType == "SPELL_AURA_APPLIED" and hasFlag(destFlags, COMBATLOG_OBJECT_AFFILIATION_MINE) then
        local spellID, spellName = ...
        
        if spellName == "Vengeance" then
        
        end
end
Just an idea.

http://www.wowwiki.com/API_COMBAT_LOG_EVENT
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline  
Unread 09-22-10, 01:19 PM   #9
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Originally Posted by Phanx View Post
I'd guess that the differerent "strengths" of the Vengeance buff are actually different spells, in which case you'd be able to distinguish between them using the spellID value returned by UnitAura, without needing to scan the tooltip.
Unfortunately not. Every application is the same buff, but the Attack Power value changes.
yj589794 is offline  
Unread 09-22-10, 03:30 PM   #10
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
OK, I've done some more testing and here are the results:

A) GetSpellAuraDescription(spellID) does not exist
B) The combat log does not provide any useful information (Vengeance does not appear to be added to the combat log )
C) UnitAura does not provide any more information about the Vengeance buff, the returned parameters are:
  1. Vengeance (name)
  2. "" (rank)
  3. Interface\Icons\Spell_Shadow_Charm (icon)
  4. 0 (count)
  5. "" (dispelType)
  6. 0 (duration)
  7. 0 (expires)
  8. player (caster)
  9. <nil> (isStealable)
  10. <nil> (shouldConsolidate)
  11. 76691 (spellID)
  12. <nil>
  13. <nil>
  14. <nil>
  15. <nil>

===========================

So, it looks like tooltip scanning is the only way to get the AP buff value from Vengeance.

I've created an oUF element as proof-of-concept : http://github.com/Evilpaul/oUF_VengeanceBar

layout code : http://gist.github.com/592615


I'm not sure how much use this will be, but somebody might want to try it out
yj589794 is offline  
Unread 09-22-10, 04:01 PM   #11
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,191
I don't see it as something you can plan skill usage around,
so I don't see much point in tracking it, other than curiosity.

Tanks will have this scaling AP buff in any long fight.
Lots of damage incoming, faster stack to the MaxHP/10 limit, less damage longer ramp up.

All in all it's something you can expect to have...
I don't see what it offers to know what % you got at any given point.
Dridzt is offline  
Unread 09-22-10, 04:18 PM   #12
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Hence why I said proof-of-concept.

The only thing I can see monitoring Vengance to be useful for is a mechanism to know when DPS can start attacking.
Tank threat is going to be an issue again, so instead of "wait for 5 sunders" you can now wait until x% Vengeance buff.
yj589794 is offline  
 

Go BackWoWInterface » AddOns, Compilations, Macros » Cataclysm Beta » Vengeance (Tanking Specialization)

Thread Tools
Display Modes

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