WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Tutorials & Other Helpful Info. (https://www.wowinterface.com/forums/forumdisplay.php?f=12)
-   -   Looking for a lua command to get spell damage (https://www.wowinterface.com/forums/showthread.php?t=58813)

Wojakpink 06-28-21 10:52 AM

Looking for a lua command to get spell damage
 
Hi everyone,

I'm new to developping AddOns and just got into the lua language recently. I want to extract the amount of damage that a spell deals with a lua command. I've been scrolling through
"https://wowwiki-archive.fandom.com/wiki/World_of_Warcraft_API#Unit"
but I didin't find such a command (I can only get infos like casttime, ID, name etc. but not the range of damage that a spell deals !)
I want this for tbc classic.
Any suggestion on how I could get the range of damage for each spell ?

(for example, as a mage, my scorch deals "265 to 312" raw damage. All i want is creating 2 variables :
ScorchDmg1 = 265
ScorchDmg2 = 312)

I appreciate any kind of help !

PS : i've tried to extract those numbers from the description of the spell with GetSpellDescription, then find and sub the chain with patterns etc. to extract the numbers but it is SO complicated and not flexible.

Wojakpink

Kanegasi 06-28-21 11:00 AM

Quote:

Originally Posted by Wojakpink (Post 339480)
PS : i've tried to extract those numbers from the description of the spell with GetSpellDescription, then find and sub the chain with patterns etc. to extract the numbers but it is SO complicated and not flexible.

Unfortunately, that is one of only two ways to get those values. The other is creating a scan tooltip and extracting the values from that.


All times are GMT -6. The time now is 11:34 AM.

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