Making a weakaura : I'm trying to track my astral power, and more importantly predict what it's going to be after my next cast. Lunar Strike gives 12 ap, 15 ap with Blessing of Elune (*1.25), 22.5 with BoE + Celestial Alignment (*1.25 *1.5).
So, even if my ap is in reality, say, 17.5, the game will only return me 17, and my prediction will be 39 (or 39.5) for my next BoE+CA buffed LS instead of 40. This is unwanted, since knowing whether I'll be at 39 or 40 is critical to predict if I'm going to be able to use Starsurge or not.
Right now, the only two choices I see to solve this are either entirely rewrite the AP calculation function to try and get an accurate float AP amount ... or count the number of times I've cast CA buffed LS and alternate between adding 22 and 23 ap to my current amount (and I'll also have to account for the fact that .5 ap can disappear if I cap out).
Obviously the second solution is the easiest (since there is only one source for gaining .5 ap - CA buffed LS - and one source for losing it - capping out -). But neither this one nor the first are entertaining to me.
Since I'm a complete novice at both programming and using WoW's API, I was hoping someone might have a magical solution for me that might save some hassle.