From 94850e53dd1b3382a402296b0534bb836a465b76 Mon Sep 17 00:00:00 2001 From: Parnic Date: Sat, 25 Mar 2017 14:03:47 -0500 Subject: [PATCH] Fixed error in 7.2 where a cvar has been removed --- modules/CastBar.lua | 5 ++++- modules/GlobalCoolDown.lua | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/CastBar.lua b/modules/CastBar.lua index ed0deb1..690dd74 100644 --- a/modules/CastBar.lua +++ b/modules/CastBar.lua @@ -358,7 +358,10 @@ end function CastBar.prototype:CVarUpdate(...) self.useFixedLatency = self.moduleSettings.respectLagTolerance and GetCVar("reducedLagTolerance") == "1" - self.fixedLatency = tonumber(GetCVar("maxSpellStartRecoveryoffset")) / 1000 + local recoveryOffset = GetCVar("maxSpellStartRecoveryoffset") + if recoveryOffset ~= nil then + self.fixedLatency = tonumber(recoveryOffset) / 1000 + end end function CastBar.prototype:Disable(core) diff --git a/modules/GlobalCoolDown.lua b/modules/GlobalCoolDown.lua index a5dcc48..8300362 100644 --- a/modules/GlobalCoolDown.lua +++ b/modules/GlobalCoolDown.lua @@ -45,7 +45,10 @@ end function GlobalCoolDown.prototype:CVarUpdate() self.useFixedLatency = self.moduleSettings.respectLagTolerance and GetCVar("reducedLagTolerance") == "1" - self.fixedLatency = tonumber(GetCVar("maxSpellStartRecoveryoffset")) / 1000.0 + local recoveryOffset = GetCVar("maxSpellStartRecoveryoffset") + if recoveryOffset ~= nil then + self.fixedLatency = tonumber(recoveryOffset) / 1000.0 + end end -- OVERRIDE