cannonpalms / LibThreatClassic

A library for multi-target threat tracking in WoW Classic (1.13.2).
GNU Lesser General Public License v2.1
0 stars 1 forks source link

Druid Threat Being Calculated incorrectly #14

Open cannonpalms opened 4 years ago

cannonpalms commented 4 years ago

Migrated from https://github.com/EsreverWoW/LibThreatClassic/issues/12 Originally created by @blitzcrg on Sun, 03 Nov 2019 01:40:21 GMT


My guild's other tank and I have noticed issues where I'll routinely pull aggro as a feral druid tank even when well behind our prot warrior main tank on the meter. I suspect the issue is in https://github.com/EsreverWoW/LibThreatClassic/blob/master/ClassModules/Classic/Druid.lua:

function Druid:ScanTalents()
    if ThreatLib.Classic then
        self.feralinstinctMod = 0.03 * select(5, GetTalentInfo(2, 3))
        self.subtletyMod = 1 - 0.04 * select(5, GetTalentInfo(3, 8))
        self.tranqMod = 1 - 0.5 * select(5, GetTalentInfo(3, 13))
    else
        self.feralinstinctMod = 0 -- for when testing in retail
        self.subtletyMod = 1 -- for when testing in retail
        self.tranqMod = 1 -- for when testing in retail
    end
end

I believe Feral Instincts modifier is multiplicative, not additive; self.feralinstinctMod should be calculated as 1 + 0.03 * select(5, GetTalentInfo(2, 3)), and then used differently in

function Druid:GetStanceThreatMod()
    local form = GetShapeshiftForm()
    self.isTanking = false
    if form == 1 then
        self.passiveThreatModifiers = 1.3 + self.feralinstinctMod
        self.isTanking = true
    elseif form == 2 then
        self.passiveThreatModifiers = 0.71
    else
        self.passiveThreatModifiers = 1
    end
    self.totalThreatMods = nil -- Needed to recalc total mods
end

by multiplication, ie self.passiveThreatModifiers = 1.3 * self.feralinstinctMod

Additionally, Swipe threat doesn't appear to take into account the passive bear form modifier or the feral instinct modifier, both of which should apply. Of course this might be applied elsewhere in the code.

function Druid:Swipe(amount)
    return amount * 1.75
end
cannonpalms commented 4 years ago

Migrated from https://github.com/EsreverWoW/LibThreatClassic/issues/12#issuecomment-550655093 Originally created by @cannonpalms on Thu, 07 Nov 2019 03:42:08 GMT


To-do:

cannonpalms commented 4 years ago

Migrated from https://github.com/EsreverWoW/LibThreatClassic/issues/12#issuecomment-550654130 Originally created by @cannonpalms on Thu, 07 Nov 2019 03:41:26 GMT


No threat modifiers are additive after patch 1.12:

Threat Reduction Effects: This system has been redesigned to eliminate inconsistency in how the effects work. Previously, some were additive (for example: 30% reduction + 20% reduction = 50% reduction) while others were multiplicative (30% reduction and 20% reduction made 44% reduction, from 0.7*0.8). They are now all multiplicative. This also prevents unpredictable behavior when the total reduction percentage was equal to or greater than 100%. Please note that in almost all cases, when stacking multiple threat reduction effects you will experience less threat reduction than previously.

However, regarding swipe, you are misunderstanding the code. Have a look at the way AbilityHandler functions are used in the core class module. The current implementation of swipe is correct.

dfherr commented 4 years ago

According to https://classicwow.live/guides/19/threat-guide-and-reference-table Maul also uses a 1.75 threat multiplier.

However, the code assumes a 128 additional threat per use https://github.com/cannonpalms/LibThreatClassic/blob/master/ClassModules/Classic/Druid.lua#L50

and then multiplies that additional threat, but as far as I can see not the damage by 1.75

https://github.com/cannonpalms/LibThreatClassic/blob/master/ClassModules/Classic/Druid.lua#L160

This would explain the somewhat huge threat differences I've encountered.