Quantcast

Add support for burning embers

Andrew Mordecai [07-15-16 - 06:19]
Add support for burning embers
Filename
Functions.lua
Layout.lua
diff --git a/Functions.lua b/Functions.lua
index 224e4f1..c28a09b 100644
--- a/Functions.lua
+++ b/Functions.lua
@@ -48,12 +48,13 @@ function Stardust.PostUpdateClassIcons(element, cur, max, maxChanged, event)
 end

 ---------------------------
--- Combo points
+-- CPoints
+-- BurningEmbers
 ---------------------------

 function Stardust.PostUpdateCPoints(element, cur)
 	-- The number of combo points isn't dynamic, so they only need to be resized once per frame.
-	element.PreUpdate = nil
+	element.PostUpdate = nil
 	Stardust.ResizeClassIcons(element)
 end

diff --git a/Layout.lua b/Layout.lua
index 8de2d1a..869fe4d 100644
--- a/Layout.lua
+++ b/Layout.lua
@@ -154,6 +154,13 @@ local function ApplyStyle(self, unit, isSingle)
 	-- Secondary resources
 	---------------------------

+	if class == "WARLOCK" then
+		local BurningEmbers = NewBarGroup(self.Health, 4, 30, config.powerHeight)
+		BurningEmbers[1]:SetPoint("TOPLEFT", self.Health, 3, -3)
+		BurningEmbers.PostUpdate = Stardust.PostUpdateCPoints
+		self.BurningEmbers = BurningEmbers
+	end
+
 	if class == "PALADIN" or class == "PRIEST" or class == "WARLOCK" then
 		local ClassIcons = NewBarGroup(self.Health, 6, 30, config.powerHeight)
 		ClassIcons[1]:SetPoint("TOPLEFT", self.Health, 3, -3)