Skip to content

Update SP_SwingTimer.lua#18

Open
Aggromemnon wants to merge 1 commit intoEinBaum:masterfrom
Aggromemnon:master
Open

Update SP_SwingTimer.lua#18
Aggromemnon wants to merge 1 commit intoEinBaum:masterfrom
Aggromemnon:master

Conversation

@Aggromemnon
Copy link

ShouldResetTimer(true) was being called before isDualWield() check,
causing GetWeaponSpeed(true) to return nil for players without an
off-hand weapon. This resulted in "attempt to perform arithmetic on
a nil value" at line 260.

Reordered conditions to check isDualWield() first, leveraging Lua's
short-circuit evaluation to skip ShouldResetTimer(true) when no
off-hand is equipped.

Great addon btw :D

ShouldResetTimer(true) was being called before isDualWield() check,
  causing GetWeaponSpeed(true) to return nil for players without an
  off-hand weapon. This resulted in "attempt to perform arithmetic on
  a nil value" at line 260.

  Reordered conditions to check isDualWield() first, leveraging Lua's
  short-circuit evaluation to skip ShouldResetTimer(true) when no
  off-hand is equipped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant