[Bug]: Demonology profile does not load automatically
Vavalgia opened this issue ยท 9 comments
What version of HeroRotation are you using?
10.2.6.13
What version of HeroLib are you using?
10.2.6.02
What version of HeroDBC are you using?
10.2.6.01
What is the issue?
When playing on my demo warlock the addon does not load until i type /reload in the chat bar. this is the only character it does this on
Icon Behavior
None
Is there anything else I can share to help out with the bug. It works fine on my other characters.
I've figured out that it is the addon Better wardrobe that is causing this problem. however i have reset, reinstalled better wardrobe and the error still occurs. but again only on this character and no other.
Came to report a similar strange behavior, when I log in to my Affliction warlock, I get the following lua error:
Message: Interface/AddOns/HeroRotation_Warlock/Demonology.lua:67: attempt to compare two nil values
Time: Tue Apr 30 02:56:41 2024
Count: 1
Stack: Interface/AddOns/HeroRotation_Warlock/Demonology.lua:67: attempt to compare two nil values
[string "=[C]"]: ?
[string "@Interface/AddOns/HeroRotation_Warlock/Demonology.lua"]:67: in main chunk
[string "=[C]"]: ?
[string "=[C]"]: in function `LoadAddOn'
[string "@Interface/AddOns/HeroRotation/Main.lua"]:395: in function `PulseInit'
[string "@Interface/AddOns/HeroRotation/Main.lua"]:303: in function <Interface/AddOns/HeroRotation/Main.lua:300>
Locals: (*temporary) = <function> defined =[C]:-1
After seeing your issue was caused by BetterWardrobe, I disabled it and the issue disappeared. After relogging, the same lua error above appears when logging in, accompanied by the Hero Rotation message for not finding the spec. As mentioned, /reloadui also causes the spec to load properly.
I'm personally not terribly bothered by the issue and just wanted to bring it to developer attention. I don't know how BetterWardrobe could possibly be conflicting with Hero Rotation in such a weirdly specific way, but it does sound like it's either an issue with BetterWardrobe or an unresolvable (if minor) conflict between the two addons.
It's almost as if the addon is trying to pull your equipment list and is getting nothing in return (or you're not wearing any trinkets?). That error is actually when the item level of both trinkets is being compared. I'm still unable to replicate the issue, but I've added some failsafe code that will assume an item level of 0 when none is found. At worst, trinkets will be suggested in the "wrong" order when using two on-use trinkets. This should be an extremely minor loss of dps in the worst possible scenario.
The hopeful fix is included in commit 52a8cd2
I am currently wearing level boost trinkets, which notably have issues with ilvl comparison in Pawn, so that may be contributing?
Edit: you might be able to replicate the error using heirloom trinkets?
It might be a contributing factor. I don't understand why it would work after a /reload, though. In any case, the failsafe code should resolve that issue. Essentially, any time the addon can't determine the item level of a trinket, it just substitutes a zero. The value is only used in a comparison where the APL tries to determine which on-use trinket should be used first when wearing two on-use trinkets. Currently, this math is performed regardless of whether two on-use trinkets are in use. I'm going to add code to change that, though.
Tested commit 1b26a78 and I can confirm the lua error no longer appears for me, Demonology spec loads upon login without reloading, trinkets remain the same, BetterWardrobe is loaded.