Issue with data reporting

Removed initial declaration of dtrack.regular and dtrack.hits, moved them into the alias command, and then set them to nil after reporting.
master
icecool 6 years ago
parent 56a4b29acf
commit 88f9ca404e

@ -45,8 +45,6 @@ function returnStringPosition( item, start, arg ) -- Designed to save on some va
end
end
dtrack = { channel="echo" }
dtrack.regular = { start=false, prepend="[dTrack Swings]: " }
dtrack.hits = { start=false, prepend="[dTrack Hits]: " }
dtrack_track = {
["Swings Per Round"]="swings",
["Hit Percentage"]="hitpercent",
@ -164,11 +162,13 @@ function reportSwings()
message = ("%s %s(%0.2f)"):format(message, dtrack.regular.sname, dtrack.regular.trackedavg)
end
SendNoEcho( message )
dtrack.regular = nil
end
function reportHits()
local command = ("%s %s %s(%d) %s(%d/%d [%0.2f%%]) %s(%d/%d [%0.2f%%]) %s(%d/%d [%0.2f%%]) %s(%d/%d [%0.2f%%]) %s(%d) %s(%d) %s(%d/%d [%0.2f%%]) %s(%d) | Total Hits(%d/%d [%0.2f%%])"):format( dtrack.channel,
dtrack.hits.prepend, "Primary Attack", dtrack.hits["Primary Attack"], "Second Attack", dtrack.hits["Second Attack"], dtrack.hits["inst_Second Attack"], returnPercent(dtrack.hits["inst_Second Attack"], dtrack.hits["Hits"] ), "Third Attack", dtrack.hits["Third Attack"], dtrack.hits["inst_Third Attack"], returnPercent(dtrack.hits["inst_Third Attack"], dtrack.hits["Hits"] ), "Fourth Attack", dtrack.hits["Fourth Attack"], dtrack.hits["inst_Fourth Attack"], returnPercent(dtrack.hits["inst_Fourth Attack"], dtrack.hits["Hits"] ), "Dual Wield", dtrack.hits["Dual Wield"], dtrack.hits["inst_Dual Wield"], returnPercent(dtrack.hits["inst_Dual Wield"], dtrack.hits["Hits"] ), "Second Dual", dtrack.hits["Second Dual"], "Third Dual", dtrack.hits["Third Dual"], "Haste Attacks", dtrack.hits["Haste Attacks"], dtrack.hits["inst_Haste Attacks"], returnPercent(dtrack.hits["inst_Haste Attacks"], dtrack.hits["Hits"] ), "Lightspeed", dtrack.hits["Lightspeed"], dtrack.hits["Hits"], returnTotalInstinctHits(), returnPercent(returnTotalInstinctHits(), dtrack.hits["Hits"]) )
SendNoEcho( command )
dtrack.hits = nil
end
--[[ ALIAS command ]]--
function ALIAS_report(name, line, args)
@ -185,9 +185,11 @@ function ALIAS_report(name, line, args)
end
if args.command:lower() == "swings" then
EnableTriggerGroup("dtrack_swings", true)
dtrack.regular = { start=false, prepend="[dTrack Swings]: " }
SendNoEcho( "dtrack" )
elseif args.command:lower() == "hits" then
EnableTriggerGroup("dtrack_hits", true)
dtrack.hits = { start=false, prepend="[dTrack Hits]: " }
SendNoEcho( "dtrack hits" )
else
DREPORT_Help()

Loading…
Cancel
Save