All pastes #194158 Raw Edit

Stuff

public lua v1 · immutable
·published 2006-10-07 16:23 UTC
rendered paste body
aUFBanzai = AceLibrary("AceAddon-2.0"):new("AceHook-2.0")function aUFBanzai:OnEnable()	if not aUF then return end	aUF.classes.aUFunit.prototype.Banzai_UnitGainedAggro = function(self, unitId, unitTable)		if not unitId or not self.unit then return end		if UnitName(unitId) == UnitName(self.unit) then			--[[aUFBanzai:SafeHook(self, "StatusBarsColor")			aUFBanzai:SafeHook(self, "StatusBarsOnValueChanged")			aUFBanzai:SafeHook(self, "SmoothHealthBarOnValueChanged")]]			self.HealthBar:SetStatusBarColor(1, 0, 0)		end	end	aUF.classes.aUFunit.prototype.Banzai_UnitLostAggro = function(self, unitId)		if not unitId or not self.unit then return end		if UnitName(unitId) == UnitName(self.unit) then			--[[aUFBanzai:SafeUnhook(self, "StatusBarsColor")			aUFBanzai:SafeUnhook(self, "StatusBarsOnValueChanged")			aUFBanzai:SafeUnhook(self, "SmoothHealthBarOnValueChanged")]]			self:StatusBarsColor()		end	end	aUF.classes.aUFunit.prototype:RegisterEvent("Banzai_UnitGainedAggro")	aUF.classes.aUFunit.prototype:RegisterEvent("Banzai_UnitLostAggro")end--[[function aUFBanzai:RegisterEvents(allEvents, unregister)	obj:RegisterEvent("Banzai_UnitGainedAggro")	obj:RegisterEvent("Banzai_UnitLostAggro")	self.hooks["Banzai_UnitLostAggro"]()end]]--[[function aUFBanzai:StatusBarsColor() return nil endfunction aUFBanzai:StatusBarsOnValueChanged() return nil endfunction aUFBanzai:SmoothHealthBarOnValueChanged() return nil end]]