Quantcast

UPDATE_FACTION is unitless

Adrian L Lange [10-27-14 - 14:08]
UPDATE_FACTION is unitless
Filename
oUF_Reputation.lua
diff --git a/oUF_Reputation.lua b/oUF_Reputation.lua
index 1ae8fe0..535d8f9 100644
--- a/oUF_Reputation.lua
+++ b/oUF_Reputation.lua
@@ -41,6 +41,8 @@ end
 oUF.Tags.SharedEvents.UPDATE_FACTION = true

 local function Update(self, event, unit)
+	if(self.unit ~= unit) then return end
+
 	local element = self.Reputation

 	local name, standingID, _, _, _, id = GetWatchedFactionInfo()
@@ -78,7 +80,7 @@ local function Enable(self, unit)
 		element.__owner = self
 		element.ForceUpdate = ForceUpdate

-		self:RegisterEvent('UPDATE_FACTION', Path)
+		self:RegisterEvent('UPDATE_FACTION', Path, true)

 		if(not element:GetStatusBarTexture()) then
 			element:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]])