WoWInterface (
-   Classic - AddOn Help/Support (
-   -   Getting item weapon speed (

MinguasBeef 08-15-19 09:52 AM

Getting item weapon speed
Note: This is for Classic

Blizzard made a bunch of changes over the course of beta that slowly broke one of my addons.

I'm trying to fix an addon, but one issue i'm running into is I need to find a way to determine my current equipped range weapon's speed for a hunter.

I know I can get my weapon speed (with haste applied) by using UnitRangedDamage.

I need to find a way to get the base speed.

I tried by getting the item link and finding the item mod for weapon speed via the following:

bowlink = GetInventoryItemLink("player", 18)
stats = GetItemStats(bowlink)

However i'm getting back nil for the ITEM_MOD_SPEED_SHORT stat. I also tried the item mod
ITEM_MOD_CR_UNUSED_3_SHORT which I found on but it seems like that is not used or is nil as well.

Any ideas would be really appreciated.

Edit: Just an update...
I found I can print out the stats that the item has by using the following..

for stat, value in pairs(stats) do

It looks like there is not a weapon speed stat. :mad:

Any alternative routes to get my base ranged weapon speed would be amazing.

MinguasBeef 08-17-19 10:37 PM

My real issue is determining ranged haste for aimed shot.

The actual aimed shot cost time is 3.5 seconds and is effected by haste.

I was going to determine the ranged haste by looking at the ranged attack speed, the weapon speed, and calculating it based off that, but as I cannot get the weapon's speed this will not be possible.

Any ideas for alternatives for determining the ranged haste?

Rilgamon 08-18-19 02:47 AM

Cant remember but if its in the tooltip you could read it from there?

myrroddin 08-18-19 05:07 PM

You could do it in steps, unless there is a better way.
Get the percent that Haste gives you for ranged attacks:

local hastePercent = GetCombatRatingBonus(CR_HASTE_RANGED)
Then multiply the weapon's base attack speed by the above, and subtract that amount from the base.

GetRangedHaste() might also work, but the API isn't documented on Wowpedia; you'll have to check the API docs.

myrroddin 08-18-19 05:11 PM

Check out DejaClassicStats to see how Deja extracts the numbers from the API.

MinguasBeef 08-23-19 02:01 PM


Originally Posted by myrroddin (Post 333271)
Check out DejaClassicStats to see how Deja extracts the numbers from the API.

It looks like that addon is just using the ranged speed value from UnitRangedDamage which wont help me for this since what I really need to determine is the ranged haste.

I'm going to try the other methods suggested once classic goes live though and hopefully i'll have some type of success with those.

Thanks for the input!

MinguasBeef 08-26-19 05:26 PM

So just an update...

Neither of these work for getting the ranged weapon speed. Any other ideas on how to calculate either my ranged haste or my ranged weapon speed (unhasted) for a hunter?

All times are GMT -6. The time now is 11:43 PM.

vBulletin © 2021, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI