Ovale Spell Priority

Ovale Spell Priority

6M Downloads

Sub Rouge elvui

jolive1993 opened this issue ยท 1 comments

commented

Ovale seems to not be able to tell when I am in stealth, it constantly recommends I use stealth when I am already in it. What does this rely on? I believe it is because I am using elvui and I turned off the stupid auto paging of the action bar.

commented

I've investigated why this happens. The bug comes from the following two lines:

ovale_rogue_spells.lua:	SpellRequire(stealth unusable 1=stealthed,1)
ovale_rogue_spells.lua:	SpellRequire(stealth unusable 1=combat,1)

The second handler overwrites the first one because they both declare a handler on the "unusable" attribute for the same "1" value. I've looked through all of the spell files for each class and found these additional lines that will cause the same problem:

ovale_monk_spells.lua:SpellRequire(whirling_dragon_punch unusable 0=oncooldown,rising_sun_kick)
ovale_monk_spells.lua:SpellRequire(whirling_dragon_punch unusable 0=oncooldown,fists_of_fury)

As before, the second declared handler will overwrite the first one.

We can fix this by modifying the "require" table in Spells.lua so that handlers are stored in an array per key, e.g.,

require = {
  unusable = {
    ["1"] = {
      [1] = {
        [1] = "steathed",
        [2] = 1
      },
      [2] = {
        [1] = "combat",
        [2] = 1
    }
  }
}

Then we can modify the places where requirements are checked to iterate through the array and return true if any of the handlers return true.