Thread Tools Display Modes
10-26-14, 09:00 AM   #1
SkiddyDave
A Defias Bandit
Join Date: Oct 2014
Posts: 2
GetSpellInfo Help

Hi, I seem to be getting some strange results out of GetSpellInfo, and wondering if I can get some help.

I'm working on an Enhancement Shaman module for clcInfo, and I'm trying to get the cast time for the Lightning Bolt spell. Eventually I need this to take into account Maelstrom Weapon stacks and Haste, but the numbers I'm getting out of GetSpellInfo don't really seem to make sense regardless of that.

I have the following code spitting values out the clcInfo debug window:

Lua Code:
  1. local name, _, _, cost, _, _, casttime = GetSpellInfo(403)
  2. debug:AddBoth("lb info", name .. " " .. cost .. " " .. casttime)

This results in: Lightning Bolt 2081 403

From the tooltip on Lightning Bolt on my bars, it actually costs 259 mana and takes 2.08 seconds to cast.

I only just noticed the value I'm getting for "casttime" suspiciously matches the spell id. Ooh, and 2081 would actually be about right for the cast time in ms...

Anyone know what's going on here? Has the template for GetSpellInfo changed and the websites haven't been updated to the new function?

Cheers for any help!

Dave
  Reply With Quote
10-26-14, 09:08 AM   #2
Wetxius
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 7
http://wowpedia.org/API_GetSpellInfo
Returns
6.0:

name, rank, icon, castTime, minRange, maxRange
  Reply With Quote
10-26-14, 09:10 AM   #3
SkiddyDave
A Defias Bandit
Join Date: Oct 2014
Posts: 2
Well that'll do it! Thanks for the reply, the other two websites I looked at didn't have the new version

Cheers!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » GetSpellInfo Help


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