hypernormalisation / swedgetimer Goto Github PK
View Code? Open in Web Editor NEWSwing Timer addon for WotLK Classic
License: GNU General Public License v3.0
Swing Timer addon for WotLK Classic
License: GNU General Public License v3.0
While very helpful for fury DPS, I find the swing timer rather distracting when I'm tanking. At the moment I'm manually enabling/disabling the swing timers when I change specs, but it would be nice if there was an option to enable/disable based on which spec is active.
I got the following message on my druid after taking a portal to Moonglade:
Message: ...\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:153: attempt to index field 'mainTimer' (a nil value)
Time: Fri Oct 21 09:34:57 2022
Count: 2
Stack: ...\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:153: attempt to index field 'mainTimer' (a nil value)
[string "@Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua"]:153: in function `SwingEnd'
[string "@Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua"]:97: in function <...\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:96>
[string "@Interface\SharedXML\C_TimerAugment.lua"]:16: in function <Interface\SharedXML\C_TimerAugment.lua:14>
Locals: self = <table> {
PLAYER_ENTER_COMBAT = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:467
PLAYER_ENTERING_WORLD = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:34
offSpeed = 0
lastMainSwing = 227750.298000
skipNextAttackCount = 0
skipNextAttackSpeedUpdateCount = 0
preventSwingReset = false
lastOffSwing = 227750.298000
UNIT_SPELLCAST_SUCCEEDED = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:343
firstMainSwing = false
RegisterCallback = <function> defined @Interface\AddOns\LibSharedMedia-3.0\CallbackHandler-1.0\CallbackHandler-1.0.lua:90
UNIT_ATTACK_SPEED = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:259
UnregisterCallback = <function> defined @Interface\AddOns\LibSharedMedia-3.0\CallbackHandler-1.0\CallbackHandler-1.0.lua:153
SwingEnd = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:151
CalculateDelta = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:76
Fire = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:30
lastRangedSwing = 227750.298000
callbacks = <table> {
}
UNIT_SPELLCAST_START = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:411
isAttacking = false
class = "DRUID"
auraPreventSwingReset = false
unitGUID = "Player-4440-029EB0A1"
UNIT_SPELLCAST_INTERRUPTED_OR_FAILED = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:308
PLAYER_LEAVE_COMBAT = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:478
mainSpeed = 3.000000
UnregisterAllCallbacks = <function> defined @Interface\AddOns\LibSharedMedia-3.0\CallbackHandler-1.0\CallbackHandler-1.0.lua:174
PLAYER_EQUIPMENT_CHANGED = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:456
SwingTimerInfo = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:176
UNIT_SPELLCAST_CHANNEL_START = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:435
COMBAT_LOG_EVENT_UNFILTERED = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:186
rangedSpeed = 0
rangedExpirationTime = 227750.298000
UNIT_SPELLCAST_INTERRUPTED = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:336
offExpirationTime = 227753.298000
channeling = false
SwingStart = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:82
firstOffSwing = false
mainExpirationTime = 227753.298000
casting = false
UNIT_SPELLCAST_CHANNEL_STOP = <function> defined @Interface\AddOns\SwedgeTimer\Libs\LibClassicSwingTimerAPI\LibClassicSwingTimerAPI.lua:441
UNIT_SPELLCAST_FAILED = <function> defined @Interface\AddOns\SwedgeTimer\Lib
Long-standing issue with warrior shields lagging the UnitAttackSpeed API calls.
I could never replicate this in testing, turns out it's almost certainly something to do with ElvUI altering the UnitAttackSpeed calls?
At any rate, the following fix to the check_weapons
func should fix:
function ST:check_weapons()
-- Detect what weapon types are equipped.
for hand in self:iter_hands() do
local speed = SwingTimerInfo(hand)
local speedMH, speedOH = UnitAttackSpeed("player")
speedOH = speedOH or 0
if hand == "mainhand" then
speed = speedMH
end
if hand == "offhand" then
speed = speedOH
end
if speed == 0 then
self[hand].has_weapon = false
else
self[hand].has_weapon = true
end
-- self:Print(string.format("For hand %s, has_weapon = ", hand) .. tostring(self[hand].has_weapon))
end
end
Let's isolate this and the glow bug and maybe do some improvements.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.