Quantcast WoWInterface - View Single Post - Spell cost
Thread: Spell cost
View Single Post
03-15-18, 01:05 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Code:
/dump GetSpellPowerCost(2061)
{
	{
		cost = 10,
		costPercent = 3,
		costPerSec = 0,
		hasRequiredAura = false,
		minCost = 10,
		name = "MANA",
		requiredAuraID = 0,
		type = 0,
	}
}
  • Yes, that's a table inside a table
  • I assume type is the power type index (0 is MANA; see PowerTypeColor)
  • costPercent appears to be rounded up to the nearest whole percent; the character on which the above example was returned has 355 mana, and 10 / 355 = 0.028 (2.8%)

I would log into Wowpedia and add documentation there, but since the Curse/Twitch merger it's an inception-level disaster of third-party cookies and iframes, and I'm unwilling to spend any time tweaking my adblock and browser security settings to deal with it.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!

Last edited by Phanx : 03-15-18 at 01:09 AM.
  Reply With Quote