@@ -130,9 +130,25 @@ function frameObject:new(unitTag, parent)
130130 fakeHealthGradientOverride = {grad ,grad },
131131 -- noHealingGradientOverride = { ZO_ColorDef:New(0,0,0,1), ZO_ColorDef:New(0,0,0,1) },
132132 }
133- frame .visualizer :AddModule (ZO_UnitVisualizer_PowerShieldModule :New (VISUALIZER_POWER_SHIELD_LAYOUT_DATA ))
133+
134+ frame .shieldVis = ZO_UnitVisualizer_PowerShieldModule :New (VISUALIZER_POWER_SHIELD_LAYOUT_DATA )
135+ frame .visualizer :AddModule (frame .shieldVis )
136+
137+ frame .shieldVis :InitializeBarValues ()
138+
139+
140+ -- THIS IS WEIRD, TODO: REPLACE LATER
141+
142+ --- aaaa = frame
143+ -- frame.health.barControls = {}
144+ -- a = frame
145+ -- aa = ZO_ShallowTableCopy(frame.shieldVis)
146+ -- aaa = ZO_ShallowTableCopy(frame.shieldVis.attributeInfo)
147+ -- aaaa = ZO_ShallowTableCopy(frame.shieldVis.attributeBarControls)
148+ frame .shieldVis :ShowOverlay (frame .shieldVis .attributeBarControls [ATTRIBUTE_HEALTH ], frame .shieldVis .attributeInfo [ATTRIBUTE_HEALTH ])
134149
135150 frame .healthEffects = {}
151+ frame :GetHealthEffects ()
136152
137153 frame .frame :SetHidden (true )
138154
143159
144160function frameObject :GetHealthEffects () -- might replace these conditionals with a func to get/check (or just always reassign)
145161 if self .healthEffects .shield == nil then
146- self .healthEffects .shield = self .frame :GetNamedChild (" PowerShieldLeftOverlay" )
162+ self .healthEffects .shield = self .health :GetNamedChild (" PowerShieldLeftOverlay" )
147163 end
148164 if self .healthEffects .shield ~= nil then
149165 if self .healthEffects .trauma == nil then
@@ -188,9 +204,9 @@ function frameObject:Update()
188204 self .displayName = GetUnitDisplayName (self .unitTag )
189205 local rgb = AD .vars .Group .colours .standardHealth
190206 self .health :SetColor (unpack (rgb ))
191- local healthEffects = self :GetHealthEffects ()
192- if healthEffects .fakeHealth ~= nil then
193- healthEffects .fakeHealth :SetColor (unpack (rgb ))
207+ -- local healthEffects = self:GetHealthEffects()
208+ if self . healthEffects .fakeHealth ~= nil then
209+ self . healthEffects .fakeHealth :SetColor (unpack (rgb ))
194210 end
195211
196212 self .hasUlt = false
@@ -272,9 +288,9 @@ function frameObject:SetMagStamHidden(value)
272288 self .health :SetHeight (self .originalHealthHeight - 8 )
273289 end
274290 self .health :SetHeight (newHeight )
275- local healthEffects = self :GetHealthEffects ()
276- for i ,v in pairs (healthEffects ) do
277- v :SetHealth (newHeight )
291+ -- local healthEffects = self:GetHealthEffects()
292+ for i ,v in pairs (self . healthEffects ) do
293+ v :SetHeight (newHeight )
278294 end
279295end
280296
@@ -414,12 +430,12 @@ function frameObject:setUlt(ultValue, ult1Cost, icon1, ult2Cost, icon2)
414430
415431 local rgb = AD .vars .Group .colours .standardHealth
416432 if maxedUlt then
417- local rgb = AD .vars .Group .colours .fullUlt
433+ rgb = AD .vars .Group .colours .fullUlt
418434 end
419435 self .health :SetColor (unpack (rgb ))
420- local healthEffects = self :GetHealthEffects ()
421- if healthEffects .fakeHealth ~= nil then
422- healthEffects .fakeHealth :SetColor (unpack (rgb ))
436+ -- local healthEffects = self:GetHealthEffects()
437+ if self . healthEffects .fakeHealth ~= nil then
438+ self . healthEffects .fakeHealth :SetColor (unpack (rgb ))
423439 end
424440 self .hasUlt = true
425441end
0 commit comments