Proper usage of 'self' variable for event listeners.

This commit is contained in:
Casper V. Kristensen 2020-10-21 04:41:42 +02:00
parent a39fc6c109
commit 508e31092d
Signed by: caspervk
GPG key ID: 289CA03790535054
2 changed files with 2 additions and 2 deletions

View file

@ -109,7 +109,7 @@ end
frame:SetScript("OnEvent", function(self, event, ...)
events[event](...)
events[event](self, ...)
end)
for k, v in pairs(events) do
frame:RegisterEvent(k) -- register all events for which handlers have been defined

View file

@ -63,7 +63,7 @@ function events:ENCOUNTER_START(encounterID, encounterName, difficultyID, groupS
})
end
function events:COMBAT_LOG_EVENT_UNFILTERED(self, ...)
function events:COMBAT_LOG_EVENT_UNFILTERED(...)
local _, event, _, _, name, _, _, _, _, _, _, _, spellName = CombatLogGetCurrentEventInfo()
if event ~= "SPELL_CAST_SUCCESS" then
return