Ovale Spell Priority

Ovale Spell Priority

6M Downloads

Unstable Affliction

LunaEclipse73 opened this issue ยท 8 comments

commented

Hi I was trying to write a custom script, and I could not get Unstable Affliction to recommend. After numerous tests of my condition, I decided to try just using Spell(unstable_affliction) and even that didn't work. So for one last test I created 2 Icons with the following code:

AddIcon { if SpellKnown(unstable_affliction) 1 0 }
AddIcon { if Spell(unstable_affliction) 1 0 }

When I run the script, the first Icon contains the number 1, meaning the spell is known, but the second icon contains the number 0 meaning the spell is not usable, however I am out of combat, I have the necessary soul shards, and am within range, and can cast the spell if I press the action bar, however Ovale never detects it as castable.

I am at a loss as to why this happening, I thought it might be a declaration problem, but if it is I can't fix it. Any thoughts would be appreciated.

commented

Seems to me that the line SpellRequire(unstable_affliction unusable 1=soulshards,1) is what is causing the issue (can be found in scripts\ovale_warlock_spells.lua).
I am not completely sure. Can anyone confirm?

commented

I actually tried that, I tried changing the Define to see if I could fix the problem, as thats what I assumed was the problem, was that Ovale had requirements for the spell to be available that weren't really required, so I stripped the Define back to the barest possible, which is just requiring 1 soul shard and adding the debuff as follows, and it still doesn't work. Thats why I said I couldn't fix it if its a declaration problem.

Define(unstable_affliction 30108)
    SpellInfo(unstable_affliction soulshards=1)
    SpellAddTargetDebuff(unstable_affliction unstable_affliction_debuff=1)
commented

Okay the problem is definitely the Define, instead of just using my new definition in my package, I actually commented out the old one in Ovale, and now it works with my new definition.

Seems like even though I had a new definition, because I did not have the SpellRequire lines, it was using the SpellRequire lines from Ovale, once they were commented out, it worked.

commented

Can you post the entire script of what was working and what was not?

commented

Warlock is 5 files for my package, however the minimum required would be as follows:

Define(unstable_affliction 30108)
    SpellInfo(unstable_affliction soulshards=1)
    SpellAddTargetDebuff(unstable_affliction unstable_affliction_debuff=1)
Define(unstable_affliction_debuff 30108)
    SpellInfo(unstable_affliction_debuff duration=8 haste=spell)

AddIcon { Spell(unstable_affliction) }

This works, as long as its not loading ovale_warlock_spells.lua, however the following which uses the default Ovale description does not:

Define(unstable_affliction 30108)
    SpellInfo(unstable_affliction soulshards=1)
    SpellAddTargetDebuff(unstable_affliction unstable_affliction_debuff=1)
    SpellRequire(unstable_affliction soulshards 0=buff,shard_instability_buff)
    SpellRequire(unstable_affliction unusable 1=soulshards,1)
    SpellAddBuff(unstable_affliction shard_instability_buff=0)
Define(unstable_affliction_debuff 30108)
    SpellInfo(unstable_affliction_debuff duration=14 haste=spell tick=2)

AddIcon { Spell(unstable_affliction) }
commented

I have noticed all of the spell definition files, have a lot of junk left in them left over from previous expansions, definitions with glyphs and talents that no longer exist, I think this is what is causing a lot of script problems.

I believe the spell definition files need to be gone through and made sure that only the current spells are in them, and that they are defined for Legion not containing old data.

This could possibly solve a lot of other problems too.

commented

Feel free to contribute ;)

commented

The above code change seems to fix the problem for me locally. Is there some reason it hasn't been committed?