AzerPUG / ToolTips

http://www.azerpug.com
Other
3 stars 1 forks source link

Search for how to calculate demishing stats #21

Open royb3 opened 2 years ago

royb3 commented 2 years ago

Tooltip can be overrridden using: image STAT_HASTE_BASE_TOOLTIP = STAT_HASTE_BASE_TOOLTIP .. "\nLiefuh Frientjuh!"

Arco-Dielhof commented 2 years ago

Stats are adjusted based on how much % they give. This should be a flat value for Haste, Crit and Vers. However, this might be different per spec for Mastery.

Below is the first bit of code we are going to need to get the total stats to be converted into the actual stats.

AZP.ToolTips.DiminishingStats =
{
    [1] = { 30, 1.0},  --  0%
    [2] = { 39, 0.9},  -- 10%
    [3] = { 47, 0.8},  -- 20%
    [4] = { 54, 0.7},  -- 30%
    [5] = { 66, 0.6},  -- 40%
    [6] = {126, 0.5},  -- 50%
}

local DStats = AZP.ToolTips.DiminishingStats
local curDStats = !! highestStatsIndex !!
local statValues = nil
local actualStats = 0
for i = curDStats, 1, -1 do
    statValues = !! stats between curDStats[1] and (curDStats[1] - 1) !!
    actualStats = actualStats * curDStats[2]
end