WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   "Texture" UnitGetTotalHealAbsorbs (https://www.wowinterface.com/forums/showthread.php?t=58835)

rulezyx 07-11-21 11:52 AM

"Texture" UnitGetTotalHealAbsorbs
 
Hello,

does someone know how the "totalHealAbsorb" Texture works.

It looks like a blurred shadow which appears on all healthbars similar to the dmg-absorb texture but I couldn't find anything related to its appearance.

Example

Blizzard-Code

Wiki

Basically I want to know how it(shadow) is created/get its texture from and if it is possible to change the appearance of it.

I appreciate any help :)

Fizzlemizz 07-11-21 04:20 PM

Bliz. unit frames are configured using the UnitFrame_Initialize function. If the unit has a myHealPredictionBar, it gets passed to this function as one of it's parameters which is assigned to:
Code:

self.myHealPredictionBar = myHealPredictionBar
When called, the UnitFrameHealPredictionBars_Update function checks if the frame has a .myHealPredictionBar and if so, updates it.

rulezyx 07-11-21 07:27 PM

Ok ty, but I dont get how the shadow overlay is generated/where the texture comes from.

If it is the same as healprediction it has to be color based and called somewhere within the code?

Fizzlemizz 07-11-21 08:43 PM

Code:

<Texture name="MyHealPredictionBarTemplate" virtual="true" file="Interface\TargetingFrame\UI-StatusBar">
                <Color r="0.0" g="0.827" b="0.765"/>
</Texture>

in UnitFrameUtil_UpdateFillBarBase it does the juggling of setting various bar positions depending on the bars/textures passed.

Something like:
Lua Code:
  1. local f = CreateFrame("StatusBar")
  2. f:SetSize(100, 40)
  3. f:SetPoint("LEFT", 20, 0)
  4. f:SetStatusBarTexture("Interface\\TargetingFrame\\UI-StatusBar")
  5. f:SetStatusBarColor(1, 0.5, 0.5)
  6. f.t1 = f:CreateTexture(nil, "ARTWORK", 1)
  7. f.t1:SetTexture("Interface\\TargetingFrame\\UI-StatusBar")
  8. f.t1:SetVertexColor(0, 0, 0, 0.5)
  9. f.t1:SetPoint("TOPLEFT", f, "TOP")
  10. f.t1:SetPoint("BOTTOMRIGHT")

rulezyx 07-12-21 02:16 AM

Thats exactly what I was looking for.

I wasn't sure if it will take the statusbar texture or just draws some gradient like the healprediction overlay.

Since I use texture replacements for pretty much everything in the UI I wasn't sure about the appearance.

There are a few abilitys that will apply the shadow but mostly dk(unholy) related and since I am not a healer or dk player I can't rly force these events.

Thank you!


All times are GMT -6. The time now is 05:28 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI