From 897b0f00aad03e852b079c5ef26844803752d045 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Wed, 20 Nov 2024 12:03:48 +0100 Subject: [PATCH] Make ore camper a little more modern --- FreshShit/OreCamper/event2.lua | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/FreshShit/OreCamper/event2.lua b/FreshShit/OreCamper/event2.lua index ce35fa8..7de1e88 100644 --- a/FreshShit/OreCamper/event2.lua +++ b/FreshShit/OreCamper/event2.lua @@ -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,