arkinventory
arkinventory copied to clipboard
[BUG] ItemRack outfit rule doesn't work for rune slots in Season of Discovery
What version number you are using? v31024 ItemRack v3.77
What game client are you playing? Retail, Wrath, Classic / Live, PTR, Beta Classic, Season of Discovery Live
What language is the game client set to? English
Describe the bug The ItemRack outfit rule provided by ArkInventoryRules (specifically ArkInventoryRules.lua:1000) doesn't work for armor items, which the player can equip with a Season of Discovery rune. The rule function always returns false for such armor items, even if they are assigned to an ItemRack set.
The root cause is that ItemRack (specifically ItemRack.lua:683) appends :runeid:####
to the item ID, so ArkInventoryRules.lua:1017 will compare something like "item:12345:0:0:0:0:0:0" == "item:12345:0:0:0:0:0:0:runeid:0"
, which always evaluates to false, even if the item should match.
My quick fix was to change ArkInventoryRules.lua:1015 to osd = ArkInventory.ObjectStringDecode( string.format( "item:%s", string.gsub(setitem, ":runeid:%d+", "" ) ) )
, which removes the runeid appended by ItemRack. This does mean that the rule function cannot distinguish copies of the same item with different runes. Another approach would be to append runeID to ArkInventory's h_rule the same way as ItemRack does, which would allow the rule function to distinguish items with different runes.
To Reproduce
- Log on a Season of Discovery character that is able to engrave gloves with a rune.
- Create a rule named "Outfit", whose formula is "outfit()".
- Enable the rule and assign it into an ArkInventory bar.
- Get any gloves and assign them in an ItemRack set.
- Refresh the ArkInventory bag view.
- Observe that the gloves of step 4 are still in the default bar, instead of the bar created in step 3.
Screenshots N/A
Additional context N/A
Issue still exists in v31100.Alpha.4
The suggested workaround also still works.
Issue still exists in v31101, workaround moved to ArkInventoryRules.lua:1016.
are runes on the slot, or on the item?
ie can you have different say rings with a different rune on each one and swap those around or is the rune slot specific and you can put any item in there to activate the rune?
as far as i can tell (and i could be wrong) the itemrack code doesnt appear to be checking the item for a rune, its checking the slot, so no matter which item you give it, its always going to return the same rune value (whatever is on the slot / or active at the time), so im not sure how that helps to differentiate between two identical items that are engraved differently.
They are on the item. You can quickly change runes by having 2 rings for example with different runes, and just swap rings. To change the rune on the ring invokes a cast time bar.
ok, if its not too costly could you grab any item that is in your bags (not wearing it), enable edit mode, click on the item, select debug, note down the cache id (rule)
value, disable edit mode
apply any rune to the item, repeat the steps above and note if the cache id (rule)
value changed in any way or not
apply a different rune to the item, repeat the steps above and note if the cache id (rule)
value changed in any way or not
I had to find a new item that I had never applied a rune to, once you apply one I don't know how to clear it completely. But anyway, it didn't change, from no rune, to applying a rune, to applying a different rune.
Cache ID (Rule): 1:3:5:3:1001:item: 13526:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
That's what it showed and it didn't change. I even closed my bags and reopened them to make sure everything updated in between.
adding runeid like that does horrible things to itemstring decoders.
i've changed the way the itemrack outfit rule function works and it should pickup runes now.
should be fixed in the next alpha release
try alpha 4 when it turns up and let me know if that works or not