In World of Warcraft, the damage or healing done by a spell varies with your level.
For example, Greater Healing Wave for a level 84 Shaman does 8778-10028
healing:
What i cannot figure out is where Wowhead is getting these numbers from.
There's a javascript slider, that you can adjust and see the base range for all the available levels:
Level Minimum Maximum
===== ======= =======
68 4085 4667
69 4357 4977
70 4639 5299
71 4931 5633
72 5233 5977
73 5546 6334
74 5869 6703
75 6202 7084
76 6546 7478
77 6902 7884
78 7269 8303
79 7647 8735
80 8037 9181
81 8219 9389
82 8404 9600
83 8590 9812
84 8778 10028
85 8969 10245
Where is Wowhead getting these numbers from?
The values defy logic, as you can see when they're plotted:
i'm trying to maintain the HealPoints addon; and i cannot find these values documented anywhere.
Edit: The values do not come from any API. e.g.:
GetSpellInfo("Greater Healing Wave")
- name:
Greater Healing Wave
- rank:
- icon:
Interface\Icons\Spell_Nature_HealingWaveLesser
- powerCost:
5201
- isFunnel:
false
- powerType:
0
- castingTime:
2500
- minRange:
0
- maxRange:
40
Update: Graph of Paladin's Holy Light base healed amounts, by level:
Perhaps the numbers are a function of base mana, which is non-linear? Or intelligence?
Best Answer
The numbers are likely based on tiered formulas (i.e. from level 1-60, one formula, from level 60-70, another, etc). Considering you are managing an addon, I'd recommend the approach that Wowhead takes. Wowhead doesn't calculate these values on the fly. They save the values on the server-side and reuse them.
Considering Wowhead is a reliable source for in-game data, I'd recommend simply scraping your values from Wowhead and using those.
UPDATED
To expand on the tables in the link, I dug into the Wowhead code just deep enough to determine how some of these values are used for Greater Healing Wave. Note that all of the data and functions used are visible in the
$WH
JavaScript object.The link has 2 JSON objects:
$WH.g_convertScalingSpell.SD
object lists scaling values for different distribution types. Each element is an array with 15 values.$WH.g_convertScalingSpell.SV
object lists scaling values for different levels. Each element is an array with 12 values.The function where the magic happens is the
$WH.g_convertScalingSpell
function. Basically, it accepts a level and a scaling type, then uses the tables to match up the two and calculate the final value. A quick glance at the$WH
object shows there are a couple moreg_convert
functions for different values.While I can't speak on behalf of what all of the values of the scaling tables represent, I can expose the formula used in the
$WH.g_convertScalingSpell
function.Then, using
c
, an object is built out with multiple min, max, and avg values. Only the first min and max values are visible in Greater Healing Wave's tooltip. The valuei
displayed below is evaluated at 0, 1, and 2. If you are only interested in the first object that is built, you can omit thei
entirely, as it's value is 0.And if you are curious, the
cast
value (casting time in milliseconds) comes from this formula, and is only rounded after calculations, prior to displaying the value to the user:When applying this, you have to know the desired distribution type. This is found in an HTML comment in the tooltip's markup, starting with a question mark. So, to show the example of Greater Healing Wave, the HTML comment is
<!--?77472:68:85:85:355:0:1000-->
. While I do not know what all of the values are, I know the first few arespellId
,minLevel
,maxLevel
,defaultLevel
, anddistScale
.Let's do the math:
And then the spell values:
Hope this helps!