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, ...)
local source, err = CLEUParser.GetSourceName(...)
if err then return end
if source ~= UnitName("player") then return end
local targetGUID, err = CLEUParser.GetDestGUID(...)
if err then return end
local targetName, err = CLEUParser.GetDestName(...)
if err then return end
--if target ~= "Valkor" then return end
local overkill, err = CLEUParser.GetOverkill(...)
if err then return end
if overkill <= 0 then return end
local source = arg4
if not source or source ~= UnitName("player") then return end
local targetGUID = arg6
if not targetGUID then return end
local targetName = arg7
if not targetName then return end
local overkill = arg13
if not overkill or overkill <= 0 then return end
local currentTime = GetTime()
if aura_env.lastEvent > 0 and currentTime - aura_env.lastEvent < aura_env.throttle then return end
aura_env.lastEvent = currentTime
local cooldown = aura_env.cooldown
local lastEventTime = aura_env.lastEventTimes[targetGUID] or currentTime
local timeSinceLastEvent = currentTime - lastEventTime
-- local lastEventTime = aura_env.lastEventTimes[targetGUID] or currentTime
-- 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 = {
changed = true,
show = true,