From 27848e03ae9d1435b168bc49a484bfed33c6c0bf Mon Sep 17 00:00:00 2001 From: Horyoshi <42314202+Cinecom@users.noreply.github.com> Date: Mon, 6 Apr 2026 18:56:42 +0200 Subject: [PATCH] Fix critical double EP award bug The _lastRaidAwardReceived timer was only set when receiving addon messages from OTHER officers. The awarding officer's own client never set this timer (addonComms rejects self-messages at line 1111), meaning the same officer could click Award EP twice with zero protection. This caused the entire guild to receive +175 phantom EP during Karazhan on April 2. Fix: set the timer IMMEDIATELY in award_raid_ep and award_reserve_ep, before the award loop runs. Now any call within 120 seconds of the previous one is blocked, regardless of who triggered it. Co-Authored-By: Claude Opus 4.6 (1M context) --- shootyepgp.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shootyepgp.lua b/shootyepgp.lua index d6a55c1..f3ba590 100644 --- a/shootyepgp.lua +++ b/shootyepgp.lua @@ -1495,10 +1495,11 @@ function sepgp:award_raid_ep(ep) -- awards ep to raid members in zone if GetNumRaidMembers()>0 then -- Safety: prevent double-award if another officer already awarded EP to this raid recently if self._lastRaidAwardReceived and (GetTime() - self._lastRaidAwardReceived) < 120 then - self:defaultPrint(string.format("|cffff0000Warning: Another officer already awarded EP to a raid in the last 2 minutes. Award blocked to prevent double EP.|r")) + self:defaultPrint(string.format("|cffff0000Warning: EP was already awarded in the last 2 minutes. Award blocked to prevent double EP.|r")) self:defaultPrint(string.format("|cffff0000If this was intentional, wait 2 minutes or /reload first.|r")) return end + self._lastRaidAwardReceived = GetTime() -- Block any re-award within 120 seconds (self + other officers) for i = 1, GetNumRaidMembers(true) do local name = GetRaidRosterInfo(i) if name then @@ -1517,10 +1518,11 @@ function sepgp:award_reserve_ep(ep) -- awards ep to reserve list if table.getn(sepgp.reserves) > 0 then -- Safety: prevent double-award if another officer already awarded EP to reserves recently if self._lastReserveAwardReceived and (GetTime() - self._lastReserveAwardReceived) < 120 then - self:defaultPrint(string.format("|cffff0000Warning: Another officer already awarded EP to reserves in the last 2 minutes. Award blocked to prevent double EP.|r")) + self:defaultPrint(string.format("|cffff0000Warning: EP was already awarded to reserves in the last 2 minutes. Award blocked to prevent double EP.|r")) self:defaultPrint(string.format("|cffff0000If this was intentional, wait 2 minutes or /reload first.|r")) return end + self._lastReserveAwardReceived = GetTime() -- Block any re-award within 120 seconds (self + other officers) for i, reserve in ipairs(sepgp.reserves) do local name, class, rank, alt = unpack(reserve) self:givename_ep(name,ep,true)