Skip to content
Maintankadin

Healing with Eternal Flame

Adeya
Tue Sep 23, 2014 7:52 pm

Healing with Eternal Flame

To quote Wowhead ( http://www.wowhead.com/spell=114163 ) casting Eternal Flame " ... heals them for 5240 to 5837 (+ 49% of Spell power) and an additional 711 (+ 8.19% of Spell power) every 3 sec for 30 sec." (The amount of healing by Word of Glory is slightly less and does not have the HoT: http://www.wowhead.com/spell=136494)

The amount of healing is increased per charge of Holy Power used, up to a maximum of three charges.

Is the amount of healing the same for each HP that is used? If so, then we can just multiply the amount of healing by the charges of HP.

But if the amount changes for each charge of HP that is used, then that would be a different matter altogether.

TIA.

--- Adeya

EDIT: URL for Word of Glory :-(

nil carborundum illegitimi
theckhd
Tue Sep 23, 2014 11:37 pm

Re: Healing with Eternal Flame

It's the same amount for each charge used, and the base heal of Eternal Flame should be identical to the base heal of Word of Glory. The only change the talent makes is that it adds the HoT component, which also scales linearly with Holy Power used (until Warlords, anyway).
Adeya
Wed Sep 24, 2014 7:36 am

Re: Healing with Eternal Flame

theckhd wrote:It's the same amount for each charge used, and the base heal of Eternal Flame should be identical to the base heal of Word of Glory. The only change the talent makes is that it adds the HoT component, which also scales linearly with Holy Power used (until Warlords, anyway).


Thanks for your answer. :-)

The random portion of the healing for WoG is slightly less than for Eternal Flame, but the most healing is from 49% of Spell Power, which is the same for EF and WoG respectively. By the way, I had the URL for WoG the same as the URL for EF. Ooops!

--- Adeya

nil carborundum illegitimi
theckhd
Sat Sep 27, 2014 3:24 am

Re: Healing with Eternal Flame

The random value is actually identical. The tooltip has been wrong for the majority of the expansion, but the spell data tells the real story:

Image
Image

Both base values are 5239.27-5837.41 at level 100, with a 0.490 spell power coefficient.
Adeya
Sun Sep 28, 2014 1:04 am

Re: Healing with Eternal Flame

theckhd wrote:The random value is actually identical. The tooltip has been wrong for the majority of the expansion, but the spell data tells the real story:

< see original post for images >

Both base values are 5239.27-5837.41 at level 100, with a 0.490 spell power coefficient.


Gotcha. I will code it that way, then. I am using the average of the random range for that portion 5538 (rounded down), which is the same whether I use 5239.27 - 5837.41 or use 5240 - 5837.

I will appreciate it if you can review the code below to see whether the calculation is correct. From all that I have read here and elsewhere, it should be.

Code: Select all
local efRNGavg = floor((5240 + 5837) / 2)) --random heal amt for EF is 5240 to 5837 Health
   
  ....
   
local function GetEternalFlameHealing()   

-- returns the current amount of (1) the EF heal-at-once (HaO) and (2) the EF heal-over-time (HoT)
-- BoG bonus per unit is 10% plus the paladin's current Mastery percentage
-- the HoT is increased 50% when EF is cast on the paladin (self-cast is assumed)

    local efHaO, efHoT, c_mastery, hpUsed, bogBuff, palaHoT, efHaOamt, efHoTamt = 0, 0, 0, 0, 0, 0, 0, 0

    local base, posBuff, negBuff = UnitAttackPower("player")    -- negBuff is zero or a negative number
    if base and posBuff and negBuff then
        local SpellPower = ( base + posBuff + negBuff ) / 2
        efHaO = efRNGavg + ( 0.49 * SpellPower )         
        efHoT = 711 + ( 0.0819 * SpellPower)          
        c_mastery = GetMastery()        -- returns percentage (e.g., 28.1234567890) for current mastery
        if c_mastery then
            hpUsed = min(3, c_hp)                         -- c_hp = current number of HP charges
            bogBuff = (0.10 + c_mastery) * c_bas_s        -- c_bas_s = current number of BoG
            efHaOamt = (efHaO + (bogBuff * efHaO)) * hpUsed
            palaHoT = 1.5 * efHoT                         -- paladin HoT bonus
            efHoTamt = (palaHoT + (bogBuff * palaHoT)) * hpUsed
        else
            < error message here>
   end
  else
       < error message here>
  end
  return efHaOamt, efHoTamt
end


That is in a rough form for a start and I might combine the calculations on some lines to reach the same outcome.
theckhd
Wed Oct 01, 2014 7:39 pm

Re: Healing with Eternal Flame

Seems roughly correct to me. The only minor things I might point out are:
  • hpUsed should probably account for Divine Purpose and the T16 4-piece bonus (both of those allow you to cast it for free at 3-HP strength).
  • There ought to be a method to get SpellPower directly, similar to UnitAttackPower. You may want to use that instead so that in Warlords it works seamlessly (in WoD we get a 1:1 conversion on AP:SP, not 2:1).
Adeya
Thu Oct 02, 2014 6:23 am

Re: Healing with Eternal Flame

NOTE: testing has revealed that the current Mastery returned as a percentage must be divided by 100 for the calculations in the code that is included in the preceding post to be correct. (Don't I wish the EF Heal-at-Once was 1,404,959 for 2 HP, 2 BoG, and mastery 23.89% -- with my paladin's max health at 571,270! <sigh>)

theckhd wrote:Seems roughly correct to me. The only minor things I might point out are:
  • hpUsed should probably account for Divine Purpose and the T16 4-piece bonus (both of those allow you to cast it for free at 3-HP strength).


Yes, accounting for DP occurred to me while I was coding the call to the function in the addon source. The amount of HP available is now passed as an argument, the value of which is 3 HP if there is a DP proc active, else the amount calculated above as "hpUsed = min(3, c_hp)" is passed.

However, I haven't considered the Tier 16 4-piece bonus until now (although I've known about it for a while). I don't have the 4-piece set for testing, only the shoulders and gauntlets of the T16 2-piece set for protection. But it does have a spell ID (http://www.wowhead.com/spell=144566#used-by-itemset) and GetSpellInfo(144566) returns the string "Item - Paladin T16 Protection 4P Bonus".

So, I expect that
Code: Select all
name = UnitBuff("player","Item - Paladin T16 Protection 4P Bonus")
should simply return that name, without other data, while there are at least 3 BoG and the paladin is equipped with the T16 4-piece set. If the buff does not exist, UnitBuff() returns a nil. (Such is the case for Sanctified Wrath, which is displayed in the UI while AW is in effect.) If that proves to be the case, then I can simply set a flag when UnitBuff() reports it, and test the flag after the addon gets the status of all buffs. When the "Gear Bonus" flag is boolean true, then the available HP passed to the function would be three charges. (I am handling DP procs the same way, i.e., by using a flag set when the paladin has the DP buff.)

However, I cannot know for sure until I get the gear to test it, or someone tests that for me. :-)

theckhd wrote:
  • There ought to be a method to get SpellPower directly, similar to UnitAttackPower. You may want to use that instead so that in Warlords it works seamlessly (in WoD we get a 1:1 conversion on AP:SP, not 2:1).


  • Certainly, there ought to be one. But I have never found an API call that returns Spell Power. There is one for UnitRangedAttackPower()(http://wowpedia.org/API_UnitRangedAttackPower) which returns amounts respectively for the base, positive buffs, and negative buffs, as UnitAttackPower() does for melee. GetOverrideSpellPowerByAP() "returns how much spell power is returned by attack power" (at least for a Shaman)(http://wowprogramming.com/docs/api_categories). There are two more API function calls like that one which have the string "SpellPower" in their name, but they are undocumented by Wowpedia and by WoWProgramming respectively.

    Without a specific tool like the software used to generate the Global Functions list on Wowpedia (http://wowpedia.org/Global_functions) -- an extremely long list -- that I might be able to use for a narrow search, the only thing that I can do is search such lists for possible names.

    If indeed there is no "get Spell Power" API function, then I doubt that Blizzard will create that API call for WoD, or will publicize it if they do. Frankly, I will be stunned if they rectify the damage they have evidently done to PLAYER_TALENT_UPDATE, whether also to God-only-knows what else, during WoD development. They don't acknowledge bugs that I discovered in the game-client Lua intepreter, and endeavored to report without any meaningful support from Blizzard for doing that, and they have not rectified them.

    I don't know about you, but for the past four weeks the WoW software has been producing one or more new anomalies almost every time that I run it! Today, the first time that I chose to log-on to my paladin, the message "Character not found" was displayed, then I was returned to the character selection dialog. Fortunately, it worked on the second attempt. But who knows when, if ever, it will fail again?

    Which is to say, I doubt that I will be updating any addon for Warlords of Draenor anytime soon -- if ever. At this point, I don't have any enthusiasm for playing WoD itself. WoW just is not as much fun to play as it once was. The unimaginative hand-eye-coordination whack-a-mole "quests" created by Fargo "You Must Suffer To Be A Hero" are very much responsible for that. Often "winning" such a "quest" is essential to the success of the player, but some are glitched and evidently cannot be completed, and whether the player can complete yet others apparently depends upon the RNG. There are just too many glitches and hitches -- never mind the sheer inanities -- that, inevitably, leave me wondering why I should bother. WoW is not an actual fantasy RPG, it is a parody of one.

    Be that as it is, thank-you for your help. I appreciate it.

    --- Adeya

    nil carborundum illegitimi
    theckhd
    Sat Oct 04, 2014 5:19 am

    Re: Healing with Eternal Flame

    Adeya wrote:However, I haven't considered the Tier 16 4-piece bonus until now (although I've known about it for a while). I don't have the 4-piece set for testing, only the shoulders and gauntlets of the T16 2-piece set for protection. But it does have a spell ID (http://www.wowhead.com/spell=144566#used-by-itemset) and GetSpellInfo(144566) returns the string "Item - Paladin T16 Protection 4P Bonus".


    The spell you want is actually Bastion of Power, id 144569. 144566 is the trigger spell, 144569 is the buff it actually applies.

    You get 1 stack per SotR cast, so it'll always be the same number of stacks as Bastion of Glory.


    Adeya wrote:
    theckhd wrote:[*]There ought to be a method to get SpellPower directly, similar to UnitAttackPower. You may want to use that instead so that in Warlords it works seamlessly (in WoD we get a 1:1 conversion on AP:SP, not 2:1).[/list]


    Certainly, there ought to be one. But I have never found an API call that returns Spell Power.

    GetSpellBonusDamage(7) should give you the player's current spell power. Tricky to find since it's from a long forgotten age where you could have different spell power values for each school (e.g.frost, fire, nature, shadow, healing, etc.). Technically you still can, but only a few rare enchants and items have those special modifiers.
    Adeya
    Mon Oct 06, 2014 9:27 am

    Re: Healing with Eternal Flame

    theckhd wrote: .... The spell you want is actually Bastion of Power, id 144569. 144566 is the trigger spell, 144569 is the buff it actually applies.

    You get 1 stack per SotR cast, so it'll always be the same number of stacks as Bastion of Glory.


    Thank-you very much! Although I searched for such a buff spell, I couldn't find it and wondered why it did not, evidently, have a distinct name and spell ID, which the Retribution T16 4-piece set bonus has (Divine Crusader http://www.wowhead.com/spell=144595).

    It puzzles me that it "stacks" though, as if it supplants Bastion of Glory altogether when 4 pieces of the Tier 16 set are equipped. If it does that, then I wonder whether the data returned by GetBuff() for BoG will become a Lua nil (whereupon unfortunate consequences ensue). Perhaps I can use the "trigger spell" to determine whether the paladin is equipped with 4 pieces of the Tier 16 set, then switch to getting the data for the Bastion of Power buff (instead of the Bastion of Glory), if that is the case. Sheesh ....

    theckhd wrote: .... http://wowprogramming.com/docs/api/GetSpellBonusDamage should give you the player's current spell power. Tricky to find since it's from a long forgotten age where you could have different spell power values for each school (e.g.frost, fire, nature, shadow, healing, etc.). Technically you still can, but only a few rare enchants and items have those special modifiers.


    Okay, and I recall looking at this one, perhaps on WoWProgramming if not also on Wowpedia. The word "Bonus" in the name has given me pause to consider whether the function will return the same result as calculating Spell Power as one-half the total value of Attack Power. It is interesting that Blizzard explicitly states that paladin Spell Power is half of Attack Power, and declares that it is not derived from any other source. (If memory serves, the paladin's "base" Attack Power directly depends upon the paladin's Strength, with possible positive buffs and negative ones. Spell Power once depended upon Intellect, with healing affected by Spirit, and that is still so for some other classes.)

    Note: I deleted the original last paragraph in this post; the editor garbled the URL for GetSpellBonusDamage(). When I unraveled it in the quote, I removed the "(7)" which followed the second name of the API function. So I asked which "school" I would need to include as an argument for the function. But now I suppose that it will return the paladin's Spell Power if I use the argument (7) for Arcane. Is it the unmodified base amount, or is it the amount after positive and negative buffs?

    --- Adeya

    nil carborundum illegitimi
    theckhd
    Wed Oct 08, 2014 12:28 pm

    Re: Healing with Eternal Flame

    Adeya wrote:It puzzles me that it "stacks" though, as if it supplants Bastion of Glory altogether when 4 pieces of the Tier 16 set are equipped. If it does that, then I wonder whether the data returned by GetBuff() for BoG will become a Lua nil (whereupon unfortunate consequences ensue).


    Nope, it just stacks in tandem with BoG. So for example, after 3 SotR casts you'll have 3 stacks of BoG and 3 stacks of Bastion of Power. Completely redundant in some sense, since you'd think they would just base it off of Bastion of Glory stacks. But WoW spells aren't always built in the most logical ways for various reasons (for example, the original design may have been completely different, and it was less work to just keep using the redundant buff than try to modify existing Bastion of Glory code).


    Adeya wrote: But now I suppose that it will return the paladin's Spell Power if I use the argument (7) for Arcane. Is it the unmodified base amount, or is it the amount after positive and negative buffs?

    From what I've read, it should be the amount after all buffs. But I'm not 100% sure. Should be easy enough to test - just get someone to give you the spellpower raid buff and call the method before and after (i.e. "/script print(GetSpellBonusDamage(7))"). If it counts positive buffs, it probably also counts negative buffs.
    Adeya
    Fri Oct 10, 2014 5:20 am

    Re: Healing with Eternal Flame

    theckhd wrote: .... Nope, it (Bastion of Power) just stacks in tandem with BoG. So for example, after 3 SotR casts you'll have 3 stacks of BoG and 3 stacks of Bastion of Power. Completely redundant in some sense, since you'd think they would just base it off of Bastion of Glory stacks. But WoW spells aren't always built in the most logical ways for various reasons (for example, the original design may have been completely different, and it was less work to just keep using the redundant buff than try to modify existing Bastion of Glory code).


    That's interesting. The Bastion of Power (BoP) parallels the Bastion of Glory (BoG), but BoP probably does not exist unless and until the paladin has 4 of the 5 pieces in the armor Tier 16 set equipped. The API function UnitBuff("player", "Bastion of Power") returns the name of the buff if the buff is present on the player's PC, in this example. (It also returns the stack count and the buff's expiration time, among other things.) The function that I wrote to get buff status, etc., returns boolean true if the buff's name is returned by UnitBuff() (http://wowprogramming.com/docs/api/UnitBuff). So I could test whether it returns true for BoP to signify whether the paladin currently has 4 pieces of the Tier 16 set equipped.

    The question remains whether it will return true when there are less than 3 BoG stacked. From your remarks, I gather that it will. So I cannot set the flag for the free cast unless the current BoP stack is 3 or more (the current BoP stack count is also be returned by my function). Fan-tast-ic. Thank-you for the information! It spares a lot of time and effort to get it by trial-and-error experiments.

    theckhd wrote:
    Adeya wrote: But now I suppose that it will return the paladin's Spell Power if I use the argument (7) for Arcane. Is it the unmodified base amount, or is it the amount after positive and negative buffs?

    From what I've read, it should be the amount after all buffs. But I'm not 100% sure. Should be easy enough to test - just get someone to give you the spellpower raid buff and call the method before and after (i.e. "/script print(GetSpellBonusDamage(7))"). If it counts positive buffs, it probably also counts negative buffs.


    Okay, I will do that, if only out of curiousity. Speaking of which, maybe I should also use GetSpellBonusDamage(1) for Physical Damage and GetSpellBonusDamage(2) for Holy Damage, just to see whether the numbers are the same as GetSpellBonus(7) and for SpellPower calculated from UnitAttackPower("player"). It still seems odd that it would return the total SpellPower because the documentation characterizes the return value as a number for the variable "minModifier".

    That said, unless Blizzard is disconnecting paladin Spell Power from Attack Power for WoD, I think I will stay with the current calculation. You never know whether an API function like GetSpellBonusDamage() will be deprecated, or actually start to return different numbers. ....

    --- Adeya

    nil carborundum illegitimi
    theckhd
    Mon Oct 13, 2014 3:34 am

    Re: Healing with Eternal Flame

    While I was doing some other testing, I realized that I gave you an incorrect description of Bastion of Power. You only ever have one stack of it, not five. As soon as you get your third stack of Bastion of Glory, the Bastion of Power buff appears, and it's just refreshed every time Bastion of Glory is refreshed. Sorry about that.
    Adeya
    Tue Oct 14, 2014 5:07 am

    Re: Healing with Eternal Flame

    theckhd wrote:While I was doing some other testing, I realized that I gave you an incorrect description of Bastion of Power. You only ever have one stack of it, not five. As soon as you get your third stack of Bastion of Glory, the Bastion of Power buff appears, and it's just refreshed every time Bastion of Glory is refreshed. Sorry about that.


    Heh. So the Bastion of Power buff appears on the paladin when 3 BoG have accumulated, right? Does it actually have a count of the number of BoG that are available, too? It would be sufficient for UnitBuff() to return the name "Bastion of Power" when it finds the buff is present on the paladin. Then I would know that the free cast is officially available, i.e., as the BoG count reaches 3 while the paladin is equipped with 4 of the 5 pieces in the armor Tier 16 set.

    That is what happens with Sanctified Wrath, namely, the buff appears when the player casts Avenging Wrath (and Sanctified Wrath is the active Tier 5 Level 75 talent). UnitBuff() returns the name because it finds the buff, but its duration and expiration time are both zero, and the buff just subsequently disappears when Avenging Wrath expires.

    With Bastion of Power, my only concern has been that it might always appear on the paladin while the 4-piece Tier 16 set is equipped, whether it signifies anything else. If, however, BoP only appears when 3 BoG are stacked in that context, then that is no problem. Implementing this has been frustrating, because now I have the gauntlets, shoulders and legguards for the tier set, but I cannot loot a boss that has either of the other two until after the raids reset tonight (Tues. 14 October 2014).

    Thanks for letting me know. I have been preparing to upload an update to CLCProt for WoW Mists of Pandaria 5.4 that includes the effects of the Tier 16 4-piece set (as well as other additions and some changes). But I've put it off until I test it after the WoW 6 pre-patch is installed tonight.

    --- Adeya

    nil carborundum illegitimi
    theckhd
    Tue Oct 14, 2014 2:15 pm

    Re: Healing with Eternal Flame

    Right, it only appears once the 3 stacks have accumulated. It doesn't have any information about the count of BoG (apart from the fact that you can obviously infer you have >3 stacks if BoP is present at all). So you should be able to use UnitBuff() on BoP to determine whether the free cast is available or not.
    Adeya
    Wed Oct 15, 2014 1:41 am

    Re: Healing with Eternal Flame

    theckhd wrote:Right, it only appears once the 3 stacks have accumulated. It doesn't have any information about the count of BoG (apart from the fact that you can obviously infer you have >3 stacks if BoP is present at all). So you should be able to use UnitBuff() on BoP to determine whether the free cast is available or not.


    Yes.

    Well, the WoD 6.0.2 pre-patch is installed, and there are no errors reported (yet) for any of the code that I have written.

    Unfortunately, though, there is an error reported for some OOP code that I didn't write. It says that a "method" that is called has a "nil value". Why it is nil now when it was (probably) never nil for all the years before is a mystery. The Lua interpreter sometimes reports an error that wasn't an error before and doesn't look like one now, after you've done something that, if you undo what you did, will cause the error to disappear. But there is no evident relationship whatsoever between the two.

    I have zero expertise with OOP, although I know what it is and I am familiar with most of the principles and features that comprise it. But I've never written an OOP executable. Although I have debugged a few here and there, the errors were, essentially, in structured code, which is what you find in the rotation.lua files for CLCProt and CLCRet, respectively. So I do not know what I can do about the so-called error.

    The same error is reported in CLCRet. There's another error reported for CLCRet that is in one of the Ace library files that pertains to the "saved variables" files that we find in \WTF and I'm not sure whether the same error is reported for CLCProt. It is a bit strange to me that either of these errors are reported to exist now. If they actually exist, then they should have been reported previously by the Lua interpreter. Then again, the one that is shared by CLCRet and CLCProt could be the cause of a malfunction that occurs when the player changes from Retribution spec to Protection spec, which I have never been able to resolve.

    And they ask me why I didn't make a 40-year career doing this stuff.