WoWInterface - View Single Post - Destro Lock Soul Shard tracking in 7.2.5
View Single Post
08-05-17, 08:09 AM   #2
A Rage Talon Dragon Guard
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 328
To get number of fragments per shard, a.k.a. modifier, you need to use this:
Lua Code:
  1. local mod = UnitPowerDisplayMod(7)

Here's a quote of my post from another thread regarding UnitPower and its return.

Originally Posted by lightspark View Post
Use UnitPower's 3 arg to get unmodified values.

Lua Code:
  1. local mod = UnitPowerDisplayMod(8) -- returns 10
  2. local cur_mod = UnitPower("player", 8) -- let's say it returns 15
  3. local cur_unmod = UnitPower("player", 8, true) -- will return 150

You can divide unmodified value by modifier later, when you need to do so.
Just replace 8s w/ 7s or Enum.PowerType.SoulShards.

Everything else is simple maths.

Last edited by lightspark : 08-05-17 at 08:20 AM.
  Reply With Quote