Temporary Enchantment handling still broken
xvwyh opened this issue ยท 0 comments
The handling of shortened temporary enchant names introduced in ebe61e7 is incorrect. WeakAuras is unable to detect the presence of variable-rank enchants by their rankless names. The bug is in the following lines:
mh_name, mh_shortenedName = mh_exp and getTenchName(mh) or "None", "None";
...
oh_name, oh_shortenedName = oh_exp and getTenchName(oh) or "None", "None";
The original author expected the expression to work like this:
mh_exp and getTenchName(mh) or ("None", "None");
(this isn't valid in Lua, btw)
But in reality it's being evaluated as
(mh_exp and getTenchName(mh) or "None"), "None";
Making the second variable (*_shortenedName
) always be set to "None"
.
It needs to be rewritten for enchants with ranks to work properly. Neither "None", "None"
, nor ("None", "None")
, nor unpack({"None", "None"})
will work as the author initially expected.
This is relevant at least for Classic.