RSA

RSA

3M Downloads

[Bug]: Messages are limited to indices matching the number of events for the spell.

ScavengerHyena opened this issue · 3 comments

commented

Description

Hello! I noticed in the announcements I have setup where I have a large number of announcements, I was repeating only 3, but I have a list of 35.

I noticed in BuildMessageCache() in Monitor.lua there's a code chunk:

local numEvents = 0
for _ in pairs(currentSpell.events) do
numEvents = numEvents + 1
end
for i = 1, numEvents do
if currentSpellData.messages[i] ~= '' then
validMessages[i] = currentSpellData.messages[i]
end
end

It worked once I updated it to:

local numEvents = 0
for _,v in pairs(currentSpell.events) do
--print("Key, value: ", _, ", ", v)
numEvents = numEvents + 1
end
for i = 1, #currentSpellData.messages do
if currentSpellData.messages[i] ~= '' then
--print("Current SPell Data message: ", currentSpellData.messages[i])
validMessages[i] = currentSpellData.messages[i]
end
end

But this is not the fix for what you intend, as this ignores numEvents, which I think the goal is to tie messages to each spell event? I just figured this info would help you diagnose the root cause.

RSA Version

RSA 5.9.1

World of Warcraft Flavor

Dragonflight

Lua Error

No response

Reproduction Steps

  1. Fill a spell with many different messages.
  2. Cast the spell repeatedly
  3. --> You will see the same 2-3 messages for that spell, depending on how many events are applicable to it.

Screenshots

No response

commented

Honestly, I have no idea why I did it like this, or what I was thinking. It looks like I started doing something there, got sidetracked and then completely forgot about it. Thanks for pointing out the source of this issue though - it's something I was going to look into soon so that's saved me some time!

commented
commented

This should be fixed in 5.9.2