Hello
See the code in the RDX addon.
Check the file RDX\Metadata\WeaponsBuffs.lua
Contains the list of all enchantbuff with the max durations.
Use spellid, so it works with US, FR, DE
Check the file RDX\RosterMgr\Core.lua
RDXDAL.registerBuffWeapon(spellid, duration, icon)
Line 201: This function is used to register an enchant duration
duration, icon = RDXDAL.getBuffWeaponInfo(name)
Line 214: This function is used to get an enchant duration base on the name
buffname, buffrank, bufftex, idslot = scanHand(hand)
Line 230: This function will scan your hand and return the name of the enchant, base on a tooltip scan. hand is "MainHandSlot", "SecondaryHandSlot", "RangedSlot"
RDXDAL.LoadWeaponsBuff()
Line 268 This function returns all informations
Returns:
hasMainHandEnchant, mainHandBuffName, mainHandBuffRank, mainHandCharges, mainHandBuffStart, mainHandBuffDur, mainHandTex, mainHandBuffTex, mainHandSlot,
hasOffHandEnchant, offHandBuffName, offHandBuffRank, offHandCharges, offHandBuffStart, offHandBuffDur, offHandTex, offHandBuffTex, offHandSlot,
hasThrownEnchant, thrownBuffName, thrownBuffRank, thrownCharges, thrownBuffStart, thrownBuffDur, thrownTex, thrownBuffTex, thrownSlot;
This code will also work with the coming rangeslot.
RDX code is opensource, free for use.
Best regards
Sigg
__________________
RDX manager
Sigg
|