Quantcast

Add more events to update the pet health, and use SharedEvents to make sure they work on the incorrect units

Adrian L Lange [11-01-14 - 14:54]
Add more events to update the pet health, and use SharedEvents to make sure they work on the incorrect units

- This is really bad, and I would like to see a better way of handling this in oUF
Filename
elements/tags.lua
diff --git a/elements/tags.lua b/elements/tags.lua
index c6c12ef..6330866 100644
--- a/elements/tags.lua
+++ b/elements/tags.lua
@@ -43,7 +43,7 @@ local events = {
 	defhp = 'UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH',
 	maxhp = 'UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH',
 	perhp = 'UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH',
-	pethp = 'UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH',
+	pethp = 'UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_PET',
 	targethp = 'UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH',
 	curpp = 'UNIT_POWER_FREQUENT UNIT_MAXPOWER',
 	altpp = 'UNIT_POWER_FREQUENT UNIT_MAXPOWER UNIT_DISPLAYPOWER',
@@ -168,3 +168,7 @@ for tag, func in next, {
 	tags.Methods['p3lim:' .. tag] = func
 	tags.Events['p3lim:' .. tag] = events[tag]
 end
+
+-- This is really bad haste
+tags.SharedEvents.UNIT_HEALTH_FREQUENT = true
+tags.SharedEvents.UNIT_MAXHEALTH = true