From b89e37a1e76c931d451d78097169e206c6b4f756 Mon Sep 17 00:00:00 2001 From: p3lim-52096 Date: Fri, 12 Dec 2008 19:27:41 +0000 Subject: [PATCH] Added some more options git-svn-id: svn://svn.wowinterface.com/oUF_Experience-227/trunk@20 f81be506-7a38-4956-9b9f-d707db2888a5 --- oUF_Experience/oUF_Experience.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/oUF_Experience/oUF_Experience.lua b/oUF_Experience/oUF_Experience.lua index cd9c28f..dae5a07 100644 --- a/oUF_Experience/oUF_Experience.lua +++ b/oUF_Experience/oUF_Experience.lua @@ -9,6 +9,8 @@ - colorExperience [table] - will use a green color if not set - Tooltip [boolean] - MouseOver [boolean] + - XPOnly [boolean] + - RepOnly [boolean] --]] local localized, english = UnitClass('player') @@ -43,7 +45,7 @@ function oUF:PLAYER_XP_UPDATE(event, unit) if(self.unit == 'player') then local bar = self.Experience - if(GetWatchedFactionInfo()) then + if(GetWatchedFactionInfo() and not self.Experience.XPOnly) then local name, id, min, max, value = GetWatchedFactionInfo() bar:SetMinMaxValues(min, max) bar:SetValue(value) @@ -68,7 +70,7 @@ function oUF:PLAYER_XP_UPDATE(event, unit) bar:SetScript('OnEnter', function() bar:SetAlpha(1) end) bar:SetScript('OnLeave', function() bar:SetAlpha(0) end) end - elseif(UnitLevel('player') ~= MAX_PLAYER_LEVEL) then + elseif(UnitLevel('player') ~= MAX_PLAYER_LEVEL and not self.Experience.RepOnly) then local min, max = UnitXP('player'), UnitXPMax('player') bar:SetMinMaxValues(0, max) bar:SetValue(min) @@ -102,7 +104,7 @@ end function oUF:UNIT_PET_EXPERIENCE(event, unit) if(self.unit == 'pet') then local bar = self.Experience - if(UnitLevel('pet') ~= UnitLevel('player') and english == 'HUNTER') then + if(UnitLevel('pet') ~= UnitLevel('player') and english == 'HUNTER' and not self.Experience.RepOnly) then local min, max = GetPetExperience() bar:SetMinMaxValues(0, max) bar:SetValue(min) -- 1.7.9.5