diff --git a/WeakAuras/Types.lua b/WeakAuras/Types.lua index 5897423..4aea514 100644 --- a/WeakAuras/Types.lua +++ b/WeakAuras/Types.lua @@ -456,6 +456,9 @@ Private.format_types = { local precision = get(symbol .. "_money_precision", 3) return function(value) + if type(value) ~= "number" then + return "" + end local gold = floor(value / 1e4) local silver = floor(value / 100 % 100) local copper = value % 100 diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index 92141ab..9e6c843 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -1155,9 +1155,10 @@ loadedFrame:RegisterEvent("ADDON_LOADED"); loadedFrame:RegisterEvent("PLAYER_LOGIN"); loadedFrame:RegisterEvent("PLAYER_LOGOUT") loadedFrame:RegisterEvent("PLAYER_ENTERING_WORLD"); -loadedFrame:SetScript("OnEvent", function(self, event, addon) +local isInitialLogin +loadedFrame:SetScript("OnEvent", function(self, event, ...) if(event == "ADDON_LOADED") then - if(addon == ADDON_NAME) then + if(... == ADDON_NAME) then WeakAurasSaved = WeakAurasSaved or {}; db = WeakAurasSaved; Private.db = db @@ -1226,7 +1227,10 @@ loadedFrame:SetScript("OnEvent", function(self, event, addon) timer:ScheduleTimer(function() squelch_actions = false; end, remainingSquelch); -- No sounds while loading end end - Private.PostAddCompanion() + if not isInitialLogin then + isInitialLogin = true + Private.PostAddCompanion() + end elseif(event == "PLAYER_REGEN_ENABLED") then callback = function() if (queueshowooc) then