diff --git a/UnitXP_SP3_Addon.lua b/UnitXP_SP3_Addon.lua index d363481..713c79e 100755 --- a/UnitXP_SP3_Addon.lua +++ b/UnitXP_SP3_Addon.lua @@ -1014,37 +1014,10 @@ function UnitXP_SP3_OnEvent(event) return; elseif event == "PLAYER_ENTERING_WORLD" then - local test = pcall(UnitXP, "FPScap", UnitXP_SP3_Addon["FPScap"]); - local test2 = pcall(UnitXP, "backgroundFPScap", UnitXP_SP3_Addon["backgroundFPScap"]); - - if not test then - UnitXP_SP3_Print( - "UnitXP_SP3.dll failed to execute \"FPScap\". You might need to update UnitXP_SP3.dll to support this method."); - end - if not test2 then - UnitXP_SP3_Print( - "UnitXP_SP3.dll failed to execute \"backgroundFPScap\". You might need to update UnitXP_SP3.dll to support this method."); - end + pcall(UnitXP, "onEvent", event); return; elseif event == "PLAYER_LEAVING_WORLD" then - -- Some user report a faster loading time when FPS cap turns off - local test = pcall(UnitXP, "FPScap", 0); - local test2 = pcall(UnitXP, "backgroundFPScap", 0); - - if not test then - if not skipUpdateMessage then - skipUpdateMessage = true; - UnitXP_SP3_Print( - "UnitXP_SP3.dll failed to execute \"FPScap\". You might need to update UnitXP_SP3.dll to support this method."); - end - end - if not test2 then - if not skipUpdateMessage then - skipUpdateMessage = true; - UnitXP_SP3_Print( - "UnitXP_SP3.dll failed to execute \"backgroundFPScap\". You might need to update UnitXP_SP3.dll to support this method."); - end - end + pcall(UnitXP, "onEvent", event); return; end