WeakAuras

WeakAuras

206M Downloads

Weapon enchant incorrectly resolves to PVP upgrade item level

aduth opened this issue · 1 comments

commented

Description

Weak Auras which use "Weapon Enchant / Fishing Lure" trigger may not trigger for PVP weapons whose item levels increase in PVP combat, due to how internal behavior of Weak Auras enchant name calculation will incorrectly use the item level tooltip line instead of the enchant name line.

The code appears to be looking for text which has the name of the enchant and the duration in parentheses (e.g. "Flametongue (20 min)"). However, this also incorrectly matches item level tooltip info ("Item Level 424 (386)").

if(text) then
local _, _, name, shortenedName = text:find("^((.-) ?+?[VI%d]*) ?%(%d+.+%)$");
if(name and name ~= "") then
return name, shortenedName;
end
_, _, name, shortenedName = text:find("^((.-) ?+?[VI%d]*)%(%d+.+%)$");
if(name and name ~= "") then
return name, shortenedName;
end

WeakAuras Version

5.3.3

World of Warcraft Flavor

Retail (Default)

Tested with only WeakAuras

  • Yes
  • No

Lua Error

No response

Reproduction Steps

Steps to reproduce:

  1. Equip a weapon which has its item level upgraded when in PVP combat (e.g. Crimson Gladiator's Gavel)
  2. Apply temporary enchant to weapon (e.g. Flametongue on Shaman)
  3. Go to a PVP zone (battleground, arena, world PVP area)
  4. Type /dump WeakAuras.GetMHTenchInfo() into chat

Expected: The temporary enchant in Step 2 is shown (e.g. "Flametongue")
Actual: Result shows item level (e.g. "Item Level 424")

Last Good Version

No response

Screenshots

No response

Export String

Examples from Wago.io:

- https://wago.io/738bUiou3
- https://wago.io/1XwxqHQh8
commented

This bug is also affecting Weapon Enchant triggers in Timewalking instances.