From c9b016da259c7e2c3e496e3c204918848df6d3a3 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Wed, 23 Dec 2009 02:19:05 +0100 Subject: [PATCH] IsSpellKnown is ready before PLAYER_LOGIN, so no need to wait --- Molinari.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Molinari.lua b/Molinari.lua index bfda3e1..83fd988 100644 --- a/Molinari.lua +++ b/Molinari.lua @@ -9,7 +9,6 @@ for _, spark in pairs(button.sparkles) do end button:SetFrameStrata('DIALOG') -button:RegisterEvent('PLAYER_LOGIN') button:RegisterEvent('MODIFIER_STATE_CHANGED') button:SetScript('OnEvent', function(self, event, ...) self[event](self, event, ...) end) button:SetScript('OnLeave', function(self) @@ -75,13 +74,15 @@ GameTooltip:HookScript('OnTooltipSetItem', function(self) end end) -function button:PLAYER_LOGIN() +do if(IsSpellKnown(51005)) then spells[ITEM_MILLABLE] = {GetSpellInfo(51005), 0.5, 1, 0.5} end + if(IsSpellKnown(31252)) then spells[ITEM_PROSPECTABLE] = {GetSpellInfo(31252), 1, 0.5, 0.5} end + if(not IsSpellKnown(13262)) then Disenchantable = function() end end -- 1.7.9.5