WeaponSwingTimer SixxFix

WeaponSwingTimer SixxFix

2M Downloads

SoD phase 4 patch breaks the addon

Mazhug opened this issue · 1 comments

commented

After updating the classic era client for SoD phase 4, the addon no longer works. There are two errors being reported when I run /console scriptErrors 1

There's this initial error, which I think is the root cause
Message: .../AddOns/WeaponSwingTimer/WeaponSwingTimer_Player.lua:480: bad argument #1 to 'SetJustifyV' (Usage: self:SetJustifyV(justifyV))
Time: Thu Jul 11 11:31:10 2024
Count: 1
Stack: .../AddOns/WeaponSwingTimer/WeaponSwingTimer_Player.lua:480: bad argument #1 to 'SetJustifyV' (Usage: self:SetJustifyV(justifyV))
[string "@Interface/AddOns/WeaponSwingTimer/WeaponSwingTimer_Core.lua"]:697: in function <...ce/AddOns/WeaponSwingTimer/WeaponSwingTimer_Core.lua:681>
[string "@Interface/AddOns/WeaponSwingTimer/WeaponSwingTimer_Core.lua"]:711: in function <...ce/AddOns/WeaponSwingTimer/WeaponSwingTimer_Core.lua:707>

Locals: self = nil
addon_data = <table> {
 utils = <table> {
 }
 castbar = <table> {
 }
 localization_table = <table> {
 }
 core = <table> {
 }
 player = <table> {
 }
 GetRangedBaseSpeed = <function> defined @Interface/AddOns/WeaponSwingTimer/WeaponSwingTimer_ranged_base_speed.lua:12
 target = <table> {
 }
 hunter = <table> {
 }
 config = <table> {
 }
}
CoreFrame_OnUpdate = <function> defined @Interface/AddOns/WeaponSwingTimer/WeaponSwingTimer_Core.lua:578
LoadAllSettings = <function> defined @Interface/AddOns/WeaponSwingTimer/WeaponSwingTimer_Core.lua:527
InitializeAllVisuals = <function> defined @Interface/AddOns/WeaponSwingTimer/WeaponSwingTimer_Core.lua:543
load_message = "Thank you for installing WeaponSwingTimer Version 7.2.5 by WatchYourSixx! Use /wst for more options."

And this following error on every frame
Message: .../AddOns/WeaponSwingTimer/WeaponSwingTimer_Player.lua:256: attempt to index field 'pala_blood_marker' (a nil value)
Time: Thu Jul 11 11:42:34 2024
Count: 6827
Stack: .../AddOns/WeaponSwingTimer/WeaponSwingTimer_Player.lua:256: attempt to index field 'pala_blood_marker' (a nil value)

Locals: 

The first errors occurs in WeaponSwingTimer_Player.lua's InitializeVisuals function, which causes the pala_blood_marker object to never be initialised correctly.

I have never attempted to write addon code, but I'll attempt to raise a PR to fix this.

Hope this helps!

Edit: SOLVED The fix was very easy. I found this reddit post about api changes to the SetJustifyV function, the argument "CENTER" is no longer valid and requires "MIDDLE" instead (for real blizz -_- Couldn't make that backwards-compatible??)

Simple find and replace all across the project fixed the issue. I won't raise a PR due to how minimal this change is, I don't have my github setup and I'm lazy. If a maintainer is still active, could you implement this in mainstream please ❤️

commented

Fixed in 57d56a0