Thread: Shield Strength
View Single Post
10/07/14, 12:55 PM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
By default is shield is displayed on unitframes, so what do you exactly want? Some number on the screen or some kind of progress bar?

There is a hack how to get numeric shiled value from the unitframes:
Lua Code:
  1. for k, module in pairs(PLAYER_ATTRIBUTE_BARS.attributeVisualizer.visualModules) do
  2.    if module.moduleId == 5 then
  3.       ZO_PreHook(module, "OnValueChanged", function(self, bar, info) d(info.value) end)
  4.       break
  5.    end
  6. end
If you run this code for example using the ZAM Notebook, it will print shield value every time when shield value is changed.
  Reply With Quote