Skip to content

Commit

Permalink
- aura tracking options for (other) npcs
Browse files Browse the repository at this point in the history
  • Loading branch information
cont1nuity committed Mar 1, 2025
1 parent 905f3cc commit 2efcb56
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 6 deletions.
25 changes: 21 additions & 4 deletions Plater_Auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ local DB_DEBUFF_BANNED
local DB_AURA_SHOW_IMPORTANT
local DB_AURA_SHOW_BYPLAYER
local DB_AURA_SHOW_BYOTHERPLAYERS
local DB_AURA_SHOW_BYOTHERNPCS
local DB_BUFF_BANNED
local DB_AURA_SHOW_DISPELLABLE
local DB_AURA_SHOW_ONLY_SHORT_DISPELLABLE_ON_PLAYERS
local DB_AURA_SHOW_ENRAGE
local DB_AURA_SHOW_MAGIC
local DB_AURA_SHOW_BYUNIT
local DB_AURA_SHOW_BUFFBYUNIT
local DB_AURA_SHOW_DEBUFFBYUNIT
local DB_AURA_ALPHA
local DB_AURA_ENABLED
local DB_AURA_GHOSTAURA_ENABLED
Expand Down Expand Up @@ -2231,8 +2233,16 @@ end

--> is casted by other players
elseif (DB_AURA_SHOW_BYOTHERPLAYERS and isFromPlayerOrPlayerPet and sourceUnit and not sourceIsPlayer) then
can_show_this_debuff = true
can_show_this_debuff = true

--> is casted by other npcs
elseif (DB_AURA_SHOW_BYOTHERNPCS and not isFromPlayerOrPlayerPet and sourceUnit and sourceUnit ~= unit) then
can_show_this_debuff = true

--> is casted by the unit it self
elseif (DB_AURA_SHOW_DEBUFFBYUNIT and sourceUnit and UnitIsUnit (sourceUnit, unit) and not isFromPlayerOrPlayerPet) then
can_show_this_debuff = true

--> user added this buff to track in the buff tracking tab
elseif (AUTO_TRACKING_EXTRA_DEBUFFS [name] or AUTO_TRACKING_EXTRA_DEBUFFS [spellId]) then
can_show_this_debuff = true
Expand Down Expand Up @@ -2342,9 +2352,14 @@ end
elseif (DB_AURA_SHOW_BYOTHERPLAYERS and isFromPlayerOrPlayerPet and sourceUnit and not sourceIsPlayer) then
local auraIconFrame, buffFrame = Plater.GetAuraIcon (self, true)
Plater.AddAura (buffFrame, auraIconFrame, id, name, icon, applications, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, true, nil, nil, nil, dispelName, timeMod)

--> is casted by other nopcs
elseif (DB_AURA_SHOW_BYOTHERNPCS and not isFromPlayerOrPlayerPet and sourceUnit and sourceUnit ~= unit) then
local auraIconFrame, buffFrame = Plater.GetAuraIcon (self, true)
Plater.AddAura (buffFrame, auraIconFrame, id, name, icon, applications, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, true, nil, nil, nil, dispelName, timeMod)

--> is casted by the unit it self
elseif (DB_AURA_SHOW_BYUNIT and sourceUnit and UnitIsUnit (sourceUnit, unit) and not isFromPlayerOrPlayerPet) then
elseif (DB_AURA_SHOW_BUFFBYUNIT and sourceUnit and UnitIsUnit (sourceUnit, unit) and not isFromPlayerOrPlayerPet) then
local auraIconFrame, buffFrame = Plater.GetAuraIcon (self, true)
Plater.AddAura (buffFrame, auraIconFrame, id, name, icon, applications, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, true, nil, nil, nil, dispelName, timeMod)

Expand Down Expand Up @@ -2801,7 +2816,9 @@ end
DB_AURA_SHOW_MAGIC = profile.aura_show_magic
DB_AURA_SHOW_BYPLAYER = profile.aura_show_aura_by_the_player
DB_AURA_SHOW_BYOTHERPLAYERS = profile.aura_show_aura_by_other_players
DB_AURA_SHOW_BYUNIT = profile.aura_show_buff_by_the_unit
DB_AURA_SHOW_BYOTHERNPCS = profile.aura_show_aura_by_other_npcs
DB_AURA_SHOW_BUFFBYUNIT = profile.aura_show_buff_by_the_unit
DB_AURA_SHOW_DEBUFF_BYUNIT = aura_show_debuff_by_the_unit
DB_AURA_PADDING = profile.aura_padding

DB_AURA_GROW_DIRECTION = profile.aura_grow_direction
Expand Down
2 changes: 2 additions & 0 deletions Plater_ChangeLog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ function Plater.GetChangelogTable()
if (not Plater.ChangeLogTable) then
Plater.ChangeLogTable = {

{1740861648, "New Feature", "Mar 1st, 2024", "Adding aura auto tracking options for 'debuffs by the npc' and 'auras from other NPCs'.", "cont1nuity"},

{1740518781, "Backend Change", "Feb 27th, 2024", "Fixing an issue with green texutures in the options (through DetailsFramework update).", "cont1nuity"},

{1740518781, "Backend Change", "Feb 25th, 2024", "Locale updates and preparation.", "cont1nuity"},
Expand Down
2 changes: 2 additions & 0 deletions Plater_DefaultSettings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,8 @@ PLATER_DEFAULT_SETTINGS = {
aura_show_aura_by_the_player = true,
aura_show_aura_by_other_players = false,
aura_show_buff_by_the_unit = true,
aura_show_debuff_by_the_unit = true,
aura_show_aura_by_other_npcs = true,
aura_border_colors_by_type = false,
aura_show_crowdcontrol = false,
aura_show_offensive_cd = false,
Expand Down
31 changes: 29 additions & 2 deletions Plater_OptionsPanel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2085,9 +2085,36 @@ local debuff_options = {
Plater.RefreshDBUpvalues()
Plater.UpdateAllPlates()
end,
name = "Show Buffs Casted by the Unit",
desc = "Show Buffs Casted by the Unit it self",
name = "Show Buffs Casted by the NPC",
desc = "Show Buffs Casted by the NPC itself",
},
{
type = "toggle",
boxfirst = true,
get = function() return Plater.db.profile.aura_show_debuff_by_the_unit end,
set = function (self, fixedparam, value)
Plater.db.profile.aura_show_debuff_by_the_unit = value
Plater.RefreshDBUpvalues()
Plater.UpdateAllPlates()
end,
name = "Show Debuffs Casted by the NPC",
desc = "Show Debuffs Casted by the NPC itself",
},
{
type = "toggle",
boxfirst = true,
get = function() return Plater.db.profile.aura_show_aura_by_other_npcs end,
set = function (self, fixedparam, value)
Plater.db.profile.aura_show_aura_by_other_npcs = value
Plater.RefreshDBUpvalues()
Plater.UpdateAllPlates()
end,
name = "Show Auras Casted by other NPCs",
desc = "Show Auras Casted not from players and not from the unit itself.\n\n|cFFFFFF00 Important |r: This may cause a lot of auras to show!",
},

{type = "blank"},

{
type = "toggle",
boxfirst = true,
Expand Down

0 comments on commit 2efcb56

Please sign in to comment.