Ovale Spell Priority

263 - Function to return upgrade state or ilvl of a trinket

What version of Ovale are you using?

Please provide any additional information below.
This would allow me to account for all possible ilvls of a trinket (where as now I can only differentiate between ones with different item IDs and have to make assumptions about the upgrade level).

User When Change
jlam Oct 14, 2013 at 05:41 UTC Changed status from Replied to Fixed
ShmooDude Sep 02, 2013 at 20:54 UTC Changed status from Waiting to Replied
jlam Aug 30, 2013 at 21:40 UTC Changed status from Started to Waiting
jlam Aug 16, 2013 at 06:39 UTC Changed status from Accepted to Started
jlam Jul 15, 2013 at 06:58 UTC Changed status from New to Accepted
jlam Jul 15, 2013 at 06:58 UTC Changed assigned to from Sidoine to jlam
ShmooDude Jul 14, 2013 at 22:20 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of jlam jlam Oct 14, 2013 at 05:41 UTC - 0 likes

    This feature is in the next release of Ovale.

  • Avatar of ShmooDude ShmooDude Sep 29, 2013 at 08:38 UTC - 0 likes

    Haven't seen anything on this in a while and not sure where/how you did your backend (I can't find it, might not be in the public version of ovale yet I guess) but I was browsing around and found a library that might be of use

  • Avatar of ShmooDude ShmooDude Sep 02, 2013 at 20:53 UTC - 0 likes

    I can think of a several ways (I would think HasTrinket would be an alias for HasEquippedItem in all these cases) it could be done.


    if HasEquippedItem(ror_trinket ilvl=522)

    Which would be true only if the ilvl 522 version of the trinket is equipped.


    if HasEquippedItem(ror_trinket upgrade=0)

    Would return true if any of the unupgraaded trinkets are equipped (upgrade could be 0, 1 or 2). The function would internally compare the ilvl to the base item's ilvl + 0, 4 or 8 depending on the upgrade level and rarity. This method would really work best explicitly calling each trinket instead of the whole item list of trinkets (as you'd need another test to know which version of the trinket it is anyhow...).

    3rd (which is most similar to how my script code looks):

    if ItemLevel(ror_trinket) == 522

    ItemLevel would return the ilvl value of the equipped item or 0 if the item isn't equipped.

    4th (:

    if {HasEquippedItem(ror_trinket slot=Trinket0Slot)
        and ItemLevel(Trinket0Slot) == 522}
    or {HasEquippedItem(ror_trinket slot=Trinket1Slot)
        and ItemLevel(Trinket1Slot) == 522}

    Which is pretty much yours only I check both trinket slots and actually check for a specific ItemLevel which I assume is what you meant.

    1st and 3rd are pretty much the same thing just one does the comparison internally and one externally. The 3rd is about what I was expecting but any of them will work.

    The thing with all my suggestions (barring 4th which again is pretty much what you have) is they have to search through all slots. I'm assuming this is probably a bad idea for efficiency. Any of the first 3 could probably additionally take a slot=XX parameter as well to solve that problem (and could be optional so if you don't give it a slot, it'll do the full search).

    For reference, this is what I use currently (with assumed 2/2 upgrades)

    AddFunction SoulCharmAttackPower 
        if HasTrinket(96741) 3430 # Heroic TF 2/2 upgrade
        if HasTrinket(96369) 3244 # Heroic 2/2 upgrade
        if HasTrinket(95997) 3038 # Normal TF 2/2 upgrade
        if HasTrinket(94512) 2874 # Normal 2/2 upgrade
        if HasTrinket(95625) 2384 # LFR 2/2 upgrade
    AddFunction BadJujuAttackPower 
        if HasTrinket(96781) 18864 # Heroic TF 2/2 upgrade
        if HasTrinket(96409) 17840 # Heroic 2/2 upgrade
        if HasTrinket(96037) 16712 # Normal TF 2/2 upgrade
        if HasTrinket(94523) 15806 # Normal 2/2 upgrade
        if HasTrinket(95665) 13118 # LFR 2/2 upgrade

    EDIT: If slot is going to be an optional prameter, have both the specific slot (trinket0slot and trinket1slot), as well as just "trinket", "finger" ("ring" as an alias) and "weapon" that checks both of the appropriate slots for those 3.

    Last edited Sep 03, 2013 by ShmooDude
  • Avatar of jlam jlam Aug 23, 2013 at 22:03 UTC - 0 likes

    I have the backend code working at this time, but I'm not sure on the right way to expose it as a script condition. Currently, I'm leaning toward:

    if HasEquippedItem(ror_trinket slot=Trinket0Slot)
        and ItemLevel(Trinket0Slot)

    It seems somewhat clunky though. I'm trying to figure out an elegant way to express it so that scripts are simpler to write.



Last updated
Oct 14, 2013
Jul 14, 2013
Fixed - Developer made requested changes. QA should verify.
Enhancement - A change which is intended to better the project in some way
Medium - Normal priority.

Reported by

Possible assignees