WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Cataclysm Beta (https://www.wowinterface.com/forums/forumdisplay.php?f=82)
-   -   Vengeance (Tanking Specialization) (https://www.wowinterface.com/forums/showthread.php?t=35064)

yj589794 09-20-10 06:44 AM

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

zork 09-20-10 06:46 AM

Maybe it's static and you can multiply the number of stacks with sth.

*errr* you don't.

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

Quote:

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.

yj589794 09-20-10 06:51 AM

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 :(

zork 09-20-10 06:52 AM

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.

yj589794 09-20-10 07:15 AM

Hmmm, quick google search brought this up:
Quote:

New in Cataclysm:
Code:

local spellAuraDesc = GetSpellAuraDescription(spellId)

which was swiftly followed by this:
Quote:

Quote:

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 09-20-10 03:39 PM

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.

Phanx 09-20-10 09:32 PM

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.

zork 09-21-10 12:44 AM

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

yj589794 09-22-10 01:19 PM

Quote:

Originally Posted by Phanx (Post 206803)
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 09-22-10 03:30 PM

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 :confused:)
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

Dridzt 09-22-10 04:01 PM

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.

yj589794 09-22-10 04:18 PM

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.


All times are GMT -6. The time now is 02:38 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI