I think I found a bug.
Before we go further, please have a look at the following video.
(Seems like I can't embed a video on post
)
https://youtu.be/nyx3-vpUidA
So what is happening here is that I have cast "Brutal Slash", an AOE skill of feral druid that deals a certain amount of damage to nearby enemies.
However, as you can see, the health bar is only updated for an enemy that is currently selected as a target.
My code currently doesn't do that much and pretty sure I didn't touch anything from nameplate element in oUF.
Lua Code:
function UM:CreateNameplate(frame)
local LSM = LibStub("LibSharedMedia-3.0");
local flatsmooth = LSM:Fetch("statusbar", "flatsmooth");
local fer28 = LSM:Fetch("statusbar", "fer28");
local MeatEdition = LSM:Fetch("font", "MeatEdition");
local fer8 = LSM:Fetch("border", "fer8");
frame:SetSize(128, 16);
frame:SetPoint("CENTER");
-- Health
local health = CreateFrame("StatusBar", "$parentHealth", frame);
health:SetStatusBarTexture(flatsmooth);
health:SetAllPoints();
health:SetBackground(0.15, 0.15, 0.15);
local border = CreateFrame("Frame", "$parentBorder", health);
border:SetPoint("CENTER");
border:SetSize(health:GetWidth() + 2, health:GetHeight() + 2);
border:SetBackdrop({
edgeFile = fer8,
edgeSize = 8,
});
local healthText = health:CreateFontString("$parentText", "OVERLAY");
healthText:SetFont(MeatEdition, 8, "OUTLINE");
healthText:SetPoint("RIGHT", -2, 0);
frame:Tag(healthText, "[perhp]%");
frame.Health = health;
frame.border = border;
frame.healthText = healthText;
-- NameText
local nameText = frame:CreateFontString("$parentNameText", "OVERLAY");
nameText:SetParent(frame.border);
nameText:SetFont(MeatEdition, 10, "OUTLINE");
nameText:SetPoint("BOTTOMLEFT", frame, "TOPLEFT", 0, 2);
frame:Tag(nameText, "[smartlevel] [raidcolor][name]|r");
frame.NameText = nameText;
end