+ Reply to Thread
Results 1 to 2 of 2

Thread: Did Inspect.Unit.Detail("player").chargeMax quit working?

  1. #1
    Soulwalker
    Join Date
    Jul 2010
    Posts
    23

    Default Did Inspect.Unit.Detail("player").chargeMax quit working?

    Inspect.Unit.Detail("player").chargeMax doesn't seem to be working anymore. Any ideas what it was changed to or why it quit working?

    Thanks

  2. #2
    Sword of Telara DoomSprout's Avatar
    Join Date
    Apr 2011
    Posts
    876

    Default

    Quote Originally Posted by Morbid_Death View Post
    Inspect.Unit.Detail("player").chargeMax doesn't seem to be working anymore. Any ideas what it was changed to or why it quit working?

    Thanks
    Just wondering, have you changed from a mage spec that gives you additional charge to one that doesn't?

    This is the code I use to calculate percentage charge:

    Code:
    return (unit.charge / (unit.chargeMax or 100)) * 100
    This is because chargeMax is (and always has been as far as I know) null if it's 100.

    I don't really like this tbh. It's the same with power, where there is no powerMax and no Event.Unit.Detail.PowerMax, because you can assume it's always 100. I'd prefer it if the API consistently presented this information in the same way. At some point, Trion may add a warrior talent that gives them +10 power, and we've all hard-coded 100 in our addons.
    Last edited by DoomSprout; 09-20-2012 at 02:17 AM.

    Gadgets: Unit Frames and Other Stuff for RIFT

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts