Thread Tools Display Modes
10-19-11, 07:30 PM   #1
Safturento
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 13
Weapon Enchant Duration

It would be great if there was a way to determine the duration, and possibly the name of temporary weapon enchants. Currently, the only function that even has anything to do is GetWeaponEnchantInfo, and it only returns time until expiration, not duration. Whether it be added into an existing function (most likely GetWeaponEnchantInfo or UnitAura/UnitBuff), or added as a completely new function, it would make the lives of anyone who makes buff timers a whole lot easier.
  Reply With Quote
10-20-11, 02:13 AM   #2
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Unfortunately I do not find any other API either...

I guess you gotta at the buffing stage record how long it was, i.e. so later use it knows "ah this buff started at X seconds" and such.
  Reply With Quote
10-20-11, 04:22 AM   #3
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Vladinator View Post
Unfortunately I do not find any other API either...

I guess you gotta at the buffing stage record how long it was, i.e. so later use it knows "ah this buff started at X seconds" and such.
Can't do that if you log in or reload the UI with it already enchanted. 'tis a pain.
  Reply With Quote
10-20-11, 07:55 AM   #4
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
You can if you do this, use saved variables to check if the spell (id or name and rank) exists and if not the user has to reapply it in order to be added. Once done the addon cache contains info of the buff longlivety, and can now no mater if you relog or login check the savedvariable and find the timer it needs.
  Reply With Quote
10-20-11, 05:27 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
An API would be nice I guess, but it's not that difficult or time-consuming to just make a hardcoded list of which weapon enchant comes from which spell, or which enchant has which duration.
  Reply With Quote
10-20-11, 06:15 PM   #6
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Phanx View Post
An API would be nice I guess, but it's not that difficult or time-consuming to just make a hardcoded list of which weapon enchant comes from which spell, or which enchant has which duration.
True, but to get the enchant after loggin in with a weapon already enchanted requires summoning a tooltip with it's item set to the weapon in mind, filling out the tooltip, reading the tooltip for which enchant is on it, then referencing back to a list of known weapon enchants. Just a little bit convoluted for my tastes :P
  Reply With Quote

WoWInterface » Developer Discussions » Wish List » Weapon Enchant Duration


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off