Quantcast Arcane Charges - WoWInterface
Thread Tools Display Modes
01-10-19, 05:27 AM   #1
doofus
A Cliff Giant
Join Date: Feb 2018
Posts: 75
Arcane Charges

I have been using
local arcaneCharges = UnitPower("player", 16);

to determine the number of Arcane Charges (0 .. 4) and I have observed that in plenty of cases I get one less charges than are actually available. It seems there is a delay between the Arcane Blast "landing" and the API registering the charge. The GUI however works properly and properly shows the charges.

Is there an other way to know the proper number of charges ?

To explain, it is hard to count the Arcane Charges manually since it registers when a spell is cast successfully or when it hits something (Arcane Explosion), or in case it misses, can spells miss? On the combat log it would appear that the count increases before the hit is registered but in the same block.

I could perhaps implement own count by reading the event UNIT_SPELLCAST_SUCCEEDED but it is hard work, when there is a perfectly good API available.

Any suggestions please?

Last edited by doofus : 01-10-19 at 06:56 AM.
  Reply With Quote
01-10-19, 09:18 AM   #2
jlam
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 23
Originally Posted by doofus View Post
I have been using
local arcaneCharges = UnitPower("player", 16);

to determine the number of Arcane Charges (0 .. 4) and I have observed that in plenty of cases I get one less charges than are actually available. It seems there is a delay between the Arcane Blast "landing" and the API registering the charge. The GUI however works properly and properly shows the charges.
The GUI just listens for UNIT_POWER_FREQUEST and calls UnitPower() from the handler (Interface/Addons/Blizzard_Nameplates), so it doesn't seem to be doing anything differently from what you are trying to do.
  Reply With Quote
01-10-19, 10:42 AM   #3
doofus
A Cliff Giant
Join Date: Feb 2018
Posts: 75
Thank you very much for the prompt reply.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Arcane Charges

Thread Tools
Display Modes

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