View Single Post
09-12-12, 01:34 AM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,931
rofl, just realised I was getting confused with the mage portal addon itself. Not sure if they added or removed profession stuff.

Anyways,

you might want to try changing this block of code in that file:
Lua Code:
  1. local function UpdateCooldown(self)
  2.         local TimeNow = GetTime();
  3.         local CooldownStart, CooldownDuration, CooldownEnabled = GetSpellCooldown(SpellName);
  4.         if ( not CooldownEnabled ) then return; end
  5.         if ( CooldownDuration == 0 ) then return; end  
  6.         local DiffTime = TimeNow - CooldownStart;
  7.         local CooldownCounter = CooldownDuration - DiffTime;
  8.         CooldownCounter = math.floor(CooldownCounter);
  9.         if ( CooldownCounter > 0 ) then
  10.             self.Text:SetText(CooldownCounter);
  11.         else
  12.             self.Text:SetText(""); 
  13.         end
  14.     end

to

Lua Code:
  1. local function UpdateCooldown(self)
  2.                            >>>> if not Available then return end  <<<<<
  3.         local TimeNow = GetTime();
  4.         local CooldownStart, CooldownDuration, CooldownEnabled = GetSpellCooldown(SpellName);
  5.         if ( not CooldownEnabled ) then return; end
  6.         if ( CooldownDuration == 0 ) then return; end  
  7.         local DiffTime = TimeNow - CooldownStart;
  8.         local CooldownCounter = CooldownDuration - DiffTime;
  9.         CooldownCounter = math.floor(CooldownCounter);
  10.         if ( CooldownCounter > 0 ) then
  11.             self.Text:SetText(CooldownCounter);
  12.         else
  13.             self.Text:SetText(""); 
  14.         end
  15.     end

This way it should only try updating the cooldown if the ability is known to the player.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818