Skip to content

Commit

Permalink
add some more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorovon committed Apr 2, 2022
1 parent 239c6b9 commit 58dd7c8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion HiddenAuraLogger/HiddenAuraLogger.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 90200
## Title: HiddenAuraLogger
## Author: Dorovon
## Version: 1.0.7
## Version: 1.1.0
## SavedVariables: HiddenAuraLoggerDB

spell_lists.lua
Expand Down
3 changes: 3 additions & 0 deletions HiddenAuraLogger/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ local function create_options()
label:SetText(name)
end

-- TODO: These edit boxes should be more user friendly when entering values.
-- Currently, you have to press enter to save the value, which is not intuitive.
local function add_edit_box(name, option, callback)
local function reset_value(f)
f:SetNumber(db.config[f.option])
Expand Down Expand Up @@ -292,6 +294,7 @@ function event_handlers.COMBAT_LOG_EVENT_UNFILTERED()
local _, event, _, _, _, _, _, dest_guid, _, _, _, spell_id = CombatLogGetCurrentEventInfo()

if dest_guid == player_guid and event:sub(1, 10) == "SPELL_AURA" and not scanner.cleu_auras[spell_id] then
-- If there was a combat log event for this aura, this addon will begin to ignore it.
scanner.cleu_auras[spell_id] = true
if addon_table.active_auras[spell_id] then
addon_table.active_auras[spell_id] = nil
Expand Down
9 changes: 9 additions & 0 deletions HiddenAuraLogger/spell_lists.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
local addon_name, addon_table = ...

-- These spells will be filtered out when ignoring player spells.
function addon_table:is_player_spell(spell_id)
return self.player_spells[spell_id] or self.player_spells_manual[spell_id]
end

-- These spells are determined to be possible hidden auras for an encounter and are checked more urgently than unknown spell IDs.
function addon_table:is_encounter_spell(encounter_id, spell_id)
return self.encounter_spells[encounter_id] and self.encounter_spells[encounter_id][spell_id]
end

-- TODO: This should probably be configurable from within the addon.
addon_table.player_spells_manual = {
[356511] = true, -- Endless Duty
[321382] = true, -- Shadowcore Oil
Expand All @@ -18,6 +21,9 @@ addon_table.player_spells_manual = {
}

-- Tables below this line are automatically generated and should not be manually edited.

-- An automatically generated list of spells that are could be encounter related.
-- To reduce space, this will only include recent raids.
addon_table.encounter_spells = {
-- Sepulcher of the First Ones
[2512] = { -- Vigilant Guardian
Expand Down Expand Up @@ -217,6 +223,9 @@ addon_table.encounter_spells = {
},
}

-- An automatically generated list of spells that are probably player related.
-- Specifically, this is all spells that are flagged such that they might be hidden auras that
-- also have either label 16 (class spells) or label 292 (commonly used by expansion systems).
addon_table.player_spells = {
[71] = true, -- Vanguard
[698] = true, -- Ritual of Summoning
Expand Down

0 comments on commit 58dd7c8

Please sign in to comment.