LiteButtonAuras

LiteButtonAuras

20k Downloads

feature request: weapon imbues

stamicvs opened this issue ยท 5 comments

commented

Would it be possible to also track weapon imbues for Shamans like Flametongue Weapon?
Unfortunately its not a buff on the player, its on the weapon so even if I add it to the list it wouldn't highlight the icon border of the spell Flametongue Weapon or Windfury Weapon.

commented

I not sure this is possible. I'd like to do it but I can't obviously see a way.

The Blizzard API for this is really old, I don't think it's ever been updated since vanilla. It has to check every frame if there's any "Temp Enchants" and then what I think returns is the the itemID of the item the enchant is on. At least that's definitely what BuffFrame uses for the icon.

I'll have a poke at it if I get a chance, but I can't promise anything.

commented

Yeah the return from GetWeaponEnchantInfo seems to give the "enchant id". For example this is with flametongue weapon:

Dump: value={ GetWeaponEnchantInfo() }
[1]={
  [1]=true,
  [2]=3582321,
  [3]=0,
  [4]=5400,
  [5]=false
}

where 5400 is the "enchant ID" for Flametongue Weapon. I can't immediately see any way to turn 5400 into the name of the spell ("Flametongue Weapon") though which is what's required for LBA to match it to the button.

I'm not even really sure if the 5400 is consistent, I think it might change as you level up. I can't really maintain a mapping of dozens and dozens of numbers to the spell that causes them, it will just get out of date and cause me a lot of stress.

commented

No worries, this is absolutely not an issue.
If its helps, I've found a helper function in AdiButtonAuras where the weapon enchants are handled:

local function BuildWeaponEnchantHandler(enchantId)
return function(_, model)
local hasMainHandEnchant, mainHandExpiration, _, mainBuffId,
hasOffHandEnchant, offHandExpiration, _, offBuffId = GetWeaponEnchantInfo()

	if hasMainHandEnchant and mainBuffId == enchantId then
		model.highlight = 'good'
		model.expiration = GetTime() + mainHandExpiration / 1000
	elseif hasOffHandEnchant and offBuffId == enchantId then
		model.highlight = 'good'
		model.expiration = GetTime() + offHandExpiration / 1000
	end
end

end

But I am pretty sure that it is exactly what you decribed in regards to the frame checking.

Thank you very much for checking

commented

I searched extensively but there's no way in-game to turn the temporary enchant ID into a name or spell or anything else useful, and even pulling it out of the tooltip is impossible since the location and format is not consistent.

This https://wow.tools/dbc/?dbc=spellitemenchantment&build=10.0.5.47660 has a list of all the temp enchantments in the game currently, more than 4500. Way too many for me to maintain my own table of them and keep it up-to-date.

AdiButtonAuras had a fixed set of just two, Flametongue Weapon and Windfury Weapon, but even then I don't feel like I can keep track of Shaman spell updates well enough for a special case. I think it's probably just better handled by a weakaura or something for people who need it.

As much as I would like Buzzing Rune to show (though that has it's own problem since you can put it on two weapons), I'm going to have to close this as "not possible". Sorry.

commented

After being annoyed at this myself I added this as a special case for Windfury Weapon and Flametongue Weapon. I hope I don't regret it.