Make ore camper a little more modern

This commit is contained in:
2024-11-20 12:03:48 +01:00
parent ad7e3e2ebb
commit 897b0f00aa

View File

@@ -1,26 +1,24 @@
---COMBAT_LOG_EVENT_UNFILTERED --- CLEU:SPELL_DAMAGE
function(allstates, e, ...) function(allstates, e, ...)
local source, err = CLEUParser.GetSourceName(...) local source = arg4
if err then return end if not source or source ~= UnitName("player") then return end
if source ~= UnitName("player") then return end local targetGUID = arg6
local targetGUID, err = CLEUParser.GetDestGUID(...) if not targetGUID then return end
if err then return end local targetName = arg7
local targetName, err = CLEUParser.GetDestName(...) if not targetName then return end
if err then return end local overkill = arg13
--if target ~= "Valkor" then return end if not overkill or overkill <= 0 then return end
local overkill, err = CLEUParser.GetOverkill(...)
if err then return end
if overkill <= 0 then return end
local currentTime = GetTime() local currentTime = GetTime()
if aura_env.lastEvent > 0 and currentTime - aura_env.lastEvent < aura_env.throttle then return end if aura_env.lastEvent > 0 and currentTime - aura_env.lastEvent < aura_env.throttle then return end
aura_env.lastEvent = currentTime aura_env.lastEvent = currentTime
local cooldown = aura_env.cooldown
local lastEventTime = aura_env.lastEventTimes[targetGUID] or currentTime -- local lastEventTime = aura_env.lastEventTimes[targetGUID] or currentTime
local timeSinceLastEvent = currentTime - lastEventTime -- local timeSinceLastEvent = currentTime - lastEventTime
-- local cooldown = timeSinceLastEvent
-- if cooldown == 0 then cooldown = aura_env.cooldown end
local cooldown = timeSinceLastEvent
if cooldown == 0 then cooldown = aura_env.cooldown end
local state = { local state = {
changed = true, changed = true,
show = true, show = true,