X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/0c898538cf7e4480bd14b1b38d17a48ea2fbb5a0..3a032367d7bcc60257d941e014c5fb6223f0fde3:/OmaCD/Inspect.lua diff --git a/OmaCD/Inspect.lua b/OmaCD/Inspect.lua index 5c5fb5e..22ef5cb 100644 --- a/OmaCD/Inspect.lua +++ b/OmaCD/Inspect.lua @@ -94,8 +94,8 @@ function OmaInspect.Request(guid, id, callback, needItems, force) cached.cb = callback; cached.needItems = needItems; local elapsed = GetTime() - cached.time; - if force or (not needItems and (not cached.talent or elapsed > 60)) or - (needItems and (not cached.weapon or elapsed > 60)) then + if force or (not needItems and (cached.talent == nil or elapsed > 60)) or + (needItems and (cached.weapon == nil or elapsed > 60)) then if not pending[guid] or inspecting ~= guid then -- don't send multiple inspects inspect(id); end @@ -172,9 +172,7 @@ local function create() tick(); end -frame:RegisterEvent("PLAYER_LOGIN"); frame:SetScript("OnEvent", function(self, event) - if event == "PLAYER_LOGIN" then - return create(); - end + return create(); end); +frame:RegisterEvent("PLAYER_LOGIN");