Skip to content

Commit

Permalink
fixed an loadup issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tdymel committed Mar 15, 2017
1 parent 9c48101 commit 32e2322
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 2 additions & 0 deletions DPSMate/DPSMate_DataBuilder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,8 @@ DPSMate.DB.VARIABLES_LOADED = function()
DPSMate.Sync:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
DPSMate.Sync:SetScript("OnEvent", function() this[event](arg1,arg2,arg3,arg4) end)
DPSMate.Sync:SetScript("OnUpdate", function() this:OnUpdate() end)
DPSMate.Options:SetScript("OnEvent", function() this[event]() end)
DPSMate.Options:SetScript("OnUpdate", function() this:OnUpdate() end)

DPSMate:SendMessage("DPSMate build "..DPSMate.VERSION.." has been loaded!")
this.loaded = true
Expand Down
15 changes: 6 additions & 9 deletions DPSMate/DPSMate_Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -740,17 +740,17 @@ end
DPSMate.Options.PLAYER_ENTERING_WORLD = function()
if DPSMate.DB.loaded then
if DPSMateSettings["dataresetsworld"] == 3 then
if (GetTime()-LastPopUp) > TimeToNextPopUp and (DPSMate:TableLength(DPSMateUser) ~= 0 or DPSMate:TableLength(DPSMateUserCurrent) ~= 0) then
this:ShowResetPopUp()
if (GetTime()-LastPopUp) > TimeToNextPopUp then
DPSMate.Options:ShowResetPopUp()
LastPopUp = GetTime()
end
elseif DPSMateSettings["dataresetsworld"] == 1 and not this:IsInParty() then
elseif DPSMateSettings["dataresetsworld"] == 1 and not DPSMate.Options:IsInParty() then
this:PopUpAccept(true)
end
this:HideInPvP()
DPSMate.Options:HideInPvP()
if DPSMateSettings["hideonlogin"] then
for _, val in pairs(DPSMateSettings["windows"]) do
this:Hide(_G("DPSMate_"..val["name"]))
DPSMate.Options:Hide(_G("DPSMate_"..val["name"]))
end
end
end
Expand Down Expand Up @@ -2199,7 +2199,4 @@ function DPSMate.Options:OnUpdate()
reportuptime = 0
end
end
end

DPSMate.Options:SetScript("OnEvent", function() this[event]() end)
DPSMate.Options:SetScript("OnUpdate", this.OnUpdate)
end

0 comments on commit 32e2322

Please sign in to comment.