Skip to content

Commit

Permalink
BT2: Limit size of returned tooltip for options display
Browse files Browse the repository at this point in the history
Only display the first 10 spell names/spell ids instead of all

Fixes: #4463
  • Loading branch information
InfusOnWoW authored and Stanzilla committed May 23, 2023
1 parent 9b5353a commit 7709a10
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions WeakAuras/BuffTrigger2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3915,6 +3915,11 @@ function BuffTrigger.GetTriggerDescription(data, triggernum, namestable)
local trigger = data.triggers[triggernum].trigger
if trigger.useName and trigger.auranames then
for index, name in pairs(trigger.auranames) do
if index > 10 then
tinsert(namestable, {" ", "[...]"})
break
end

local left = " "
if(index == 1) then
if(#trigger.auranames > 0) then
Expand All @@ -3939,6 +3944,11 @@ function BuffTrigger.GetTriggerDescription(data, triggernum, namestable)

if trigger.useExactSpellId and trigger.auraspellids then
for index, spellId in pairs(trigger.auraspellids) do
if index > 10 then
tinsert(namestable, {" ", "[...]"})
break
end

local left = " "
if index == 1 then
if #trigger.auraspellids > 0 then
Expand Down

0 comments on commit 7709a10

Please sign in to comment.