WeaponSwingTimer

WeaponSwingTimer

2M Downloads

Issue w/ target offhand (Stalvan Mistmantle)

TanerH opened this issue ยท 3 comments

commented

WST had a hissy fit when I fought Stalvan (in Duskwood)... I'm not sure if there is something "wrong" with his offhand weapon or not, but there are two errors.

  1. This one occurred once, that I see:
Message: ...ce\AddOns\WeaponSwingTimer\WeaponSwingTimer_Core.lua:106: attempt to perform arithmetic on field 'off_weapon_speed' (a nil value)
Time: Wed May 29 23:33:07 2019
Count: 1
Stack: ...ce\AddOns\WeaponSwingTimer\WeaponSwingTimer_Core.lua:106: attempt to perform arithmetic on field 'off_weapon_speed' (a nil value)
...ce\AddOns\WeaponSwingTimer\WeaponSwingTimer_Core.lua:106: in function <...ce\AddOns\WeaponSwingTimer\WeaponSwingTimer_Core.lua:85>
...ce\AddOns\WeaponSwingTimer\WeaponSwingTimer_Core.lua:207: in function <...ce\AddOns\WeaponSwingTimer\WeaponSwingTimer_Core.lua:166>

Locals: unit = "target"
miss_type = "PARRY"
is_offhand = true
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to perform arithmetic on field 'off_weapon_speed' (a nil value)"
addon_data = <table> {
 core = <table> {
 }
 player = <table> {
 }
 target = <table> {
 }
 utils = <table> {
 }
 config = <table> {
 }
}

And then this one happened a TON of times (wow wanted to disable addons):

Message: ...\AddOns\WeaponSwingTimer\WeaponSwingTimer_Target.lua:91: attempt to compare number with nil
Time: Wed May 29 23:33:20 2019
Count: 1974
Stack: ...\AddOns\WeaponSwingTimer\WeaponSwingTimer_Target.lua:91: attempt to compare number with nil
...\AddOns\WeaponSwingTimer\WeaponSwingTimer_Target.lua:91: in function `UpdateSwingTimer'
...ce\AddOns\WeaponSwingTimer\WeaponSwingTimer_Core.lua:56: in function <...ce\AddOns\WeaponSwingTimer\WeaponSwingTimer_Core.lua:54>
...ce\AddOns\WeaponSwingTimer\WeaponSwingTimer_Core.lua:81: in function <...ce\AddOns\WeaponSwingTimer\WeaponSwingTimer_Core.lua:80>

Locals: elapsed = 0.015000
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to compare number with nil"
addon_data = <table> {
 core = <table> {
 }
 player = <table> {
 }
 target = <table> {
 }
 utils = <table> {
 }
 config = <table> {
 }
}

Could probably be easily avoided w/ a sanity check on offhand speed (to make sure we're not trying to do math against a nil) -- or to assign a sane value to offhand speed if it didn't figure one out in the first place?

commented

BTW, this is not just Stalvan... I've had this happen with a handful of different mobs (usually humanoid)

commented

Looks like it probably happens when a target has an offhand that is not a shield, like what a mage or warlock would have. They technically have an off-hand but it doesn't have a speed.

commented

I looked at the code and I'm thinking it was an old version. I added a check to see if the target had an offhand a while back so this shouldn't happen anymore.