BreakBB / ExtendedCharacterStats

Extended Character Stats: A WoW Classic addon
MIT License
7 stars 18 forks source link

wrath ptr error #243

Closed Raulfin closed 12 months ago

Raulfin commented 1 year ago

Bug description

10x ...dOns/ExtendedCharacterStats/Modules/Data/Defense.lua:74: Division by zero
[string "@ExtendedCharacterStats/Modules/Data/Defense.lua"]:74: in function <...dOns/ExtendedCharacterStats/Modules/Data/Defense.lua:66>
[string "=(tail call)"]: ?
[string "=(tail call)"]: ?
[string "@ExtendedCharacterStats/Modules/Stats.lua"]:171: in function <...faceExtendedCharacterStats/Modules/Stats.lua:169>
[string "@ExtendedCharacterStats/Modules/Stats.lua"]:163: in function <...faceExtendedCharacterStats/Modules/Stats.lua:152>
[string "@ExtendedCharacterStats/Modules/Stats.lua"]:218: in function <...faceExtendedCharacterStats/Modules/Stats.lua:184>
[string "@ExtendedCharacterStats/Modules/Stats.lua"]:104: in function `CreateWindow'
[string "@ExtendedCharacterStats/Modules/Init.lua"]:31: in function `OnPlayerLogin'
[string "@ExtendedCharacterStats/ECS.lua"]:22: in function <ExtendedCharacterStats/ECS.lua:15>

Locals:
self = <table> {
 HUNTER = 3
 WARRIOR = 1
 ROGUE = 4
 MeleeHitRating = <function> defined @ExtendedCharacterStats/Modules/Data/Melee.lua:38
 GetSpellHasteBonus = <function> defined @ExtendedCharacterStats/Modules/Data/SpellDamage.lua:49
 GetMeleeHasteRating = <function> defined @ExtendedCharacterStats/Modules/Data/Melee.lua:217
 MeleeHitBonus = <function> defined @ExtendedCharacterStats/Modules/Data/Melee.lua:33
 GetMeleeHasteBonus = <function> defined @ExtendedCharacterStats/Modules/Data/Melee.lua:223
 RangeHitRating = <function> defined @ExtendedCharacterStats/Modules/Data/Ranged.lua:51
 GetParryChance = <function> defined @ExtendedCharacterStats/Modules/Data/Defense.lua:103
 GetMP5FromBuffs = <function> defined @ExtendedCharacterStats/Modules/Data/MP5.lua:184
 GetExpertise = <function> defined @ExtendedCharacterStats/Modules/Data/Melee.lua:185
 MeleeHitMissChanceSameLevel = <function> defined @ExtendedCharacterStats/Modules/Data/Melee.lua:123
 SHADOW_SCHOOL = 6
 GetBlockChance = <function> defined @ExtendedCharacterStats/Modules/Data/Defense.lua:108
 NATURE_SCHOOL = 4
 GetArmorPenetration = <function> defined @ExtendedCharacterStats/Modules/Data/Melee.lua:197
 DEATHKNIGHT = 6
 GetDodgeChance = <function> defined @ExtendedCharacterStats/Modules/Data/Defense.lua:98
 FROST_SCHOOL = 5
 HasSetBonusModifierBlockValue = <function> defined @ExtendedCharacterStats/Modules/Data/ItemSets.lua:107
 RangeMissChanceSameLevel = <function> defined @ExtendedCharacterStats/Modules/Data/Ranged.lua:98
 PRIEST = 5
 GetDefenseValue = <function> defined @ExtendedCharacterStats/Modules/Data/Defense.lua:91
 GetMP5FromItems = <function> defined @ExtendedCharacterStats/Modules/Data/MP5.lua:12
 HasSetBonusModifierMP5 = <function> defined @ExtendedCharacterStats/Modules/Data/ItemSets.lua:82
 GetArmorValue = <function> defined @ExtendedCharacterStats/Modules/Data/Defense.lua:18
 GetSetBonusValueMP5 = <function> defined @ExtendedCharacterStats/Modules/Data/ItemSets.lua:90
 enchantIds = <table> {
 }
 PHYSICAL_SCHOOL = 1
 GetStatInfo = <function> defined @ExtendedCharacterStats/Modules/Data/Data.lua:8
 HOLY_SCHOOL = 2
 PALADIN = 2
 MAGE = 8
 GetMP5WhileCasting = <function> defined @ExtendedCharacterStats/Modules/Data/MP5.lua:98
 GetRangedAttackSpeed = <function> defined @ExtendedCharacterStats/Modules/Data/Ranged.lua:40
 SpellHitBonus = <function> defined @ExtendedCharacterStats/Modules/Data/SpellHit.lua:145
 DRUID = 11
 GetMP5FromSpirit = <function> defined @ExtendedCharacterStats/Modules/Data/MP5.lua:90
 RangedCrit = <function> defined @ExtendedCharacterStats/Modules/Data/Ranged.lua:46
 GetCritImmunity = <function> defined @ExtendedCharacterStats/Modules/Data/Defense.lua:49
 GetArmorPenetrationRating = <function> defined @ExtendedCharacterStats/Modules/Data/Melee.lua:211
 GetMeleeAttackSpeedOffHand = <function> defined @ExtendedCharacterStats/Modules/Data/Melee.lua:22
 SpellHitRating = <function> defined @ExtendedCharacterStats/Modules/Data/SpellHit.lua:156
 SpellMissChanceBossLevel = <function> defined @ExtendedCharacterStats/Modules/Data/SpellHit.lua:28
 GetRangeAttackPower = <function> defined @ExtendedCharacterStats/Modules/Data/Ranged.lua:13
 HasNatureCritBonusModifier = <function> defined @ExtendedCharacterStats/Modules/Data/ItemSets.lua:100
 SpellMissChanceSameLevel = <function> defined @ExtendedCharacterStats/Modules/Data/SpellHit.lua:8
 GetSpellPenetration = <function> defined @ExtendedCharacterStats/Modules/Data/SpellCrit.lua:184
 GetResilienceRating = <f

Screenshots

Version

3.1.2

BreakBB commented 1 year ago

Hey @Raulfin thanks for reporting this. Looks like APIs do change with the next patch. Can you do me a favor and report the outcome of this command:

/dump GetCombatRatingBonus(CR_DEFENSE_SKILL)

Raulfin commented 1 year ago

image

toon is Rshammy with 400 def skill and 0 rating.

Raulfin commented 1 year ago

equiping a cape with 45 def rating gives this. image

And the games def stat tool-tip shows image

BreakBB commented 1 year ago

Ouh, yes that is a change indeed! The API didn't return 0 before. Therefore it is now breaking.

I guess after equipping the Def cloak it's working correctly or are there other errors popping up?

Raulfin commented 1 year ago

put on some hit gear and it's also displaying 0 rating in the gui, but haste displays correctly.

Raulfin commented 1 year ago

the values in the gui sidebar don't update when changing gear, tried hit, def, and haste. reloading when def is not=0 it all works fine, can open config, values all update as expected, but only if def is not 0 when loading/reloading, removing all def gear throws errors, but it still works as expected.

BreakBB commented 1 year ago

Yeah, the addons simply crashes because of that def = 0 and therefore half of the functionality is simply broken 😓

I'll try to push out a workaround for this very soon ™️