Fix CC and Invuln not showing immediately

This is the same fix as was applied to RollTheBones in commit 46883e355b but I failed to audit the rest of the mod for places where this was possible. This one was reported over on the Curse addon page comments.
This commit is contained in:
Parnic
2022-10-31 23:36:38 -05:00
parent acc400de6e
commit b467af21c0
4 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,9 @@
# Changelog
v1.14.2:
- Fix CC and Invuln modules not showing immediately when they should.
v1.14.1:
- Fix Hide Party feature on pre-10.0 clients.

View File

@ -375,11 +375,12 @@ end
function TargetCC.prototype:MyOnUpdate()
TargetCC.super.prototype.MyOnUpdate(self)
self:UpdateTargetDebuffs(nil, self.unit, true)
self:UpdateTargetDebuffs("internal", self.unit)
end
function TargetCC.prototype:UpdateTargetDebuffs(event, unit, isUpdate)
function TargetCC.prototype:UpdateTargetDebuffs(event, unit)
local name, duration, remaining
local isUpdate = event == "internal"
if not isUpdate or not self.lastUpdateTime then
self.debuffName, self.debuffDuration, self.debuffRemaining = self:GetMaxDebuffDuration(self.unit, self.debuffList)

View File

@ -191,11 +191,12 @@ end
function TargetInvuln.prototype:MyOnUpdate()
TargetInvuln.super.prototype.MyOnUpdate(self)
self:UpdateTargetBuffs(nil, self.unit, true)
self:UpdateTargetBuffs("internal", self.unit)
end
function TargetInvuln.prototype:UpdateTargetBuffs(event, unit, isUpdate)
function TargetInvuln.prototype:UpdateTargetBuffs(event, unit)
local name, duration, remaining
local isUpdate = event == "internal"
if not isUpdate or not self.lastUpdateTime then
self.buffName, self.buffDuration, self.buffRemaining = self:GetMaxbuffDuration(self.unit, self.buffList)

View File

@ -1,5 +1,9 @@
# Changelog
v1.14.2:
- Fix CC and Invuln modules not showing immediately when they should.
v1.14.1:
- Fix Hide Party feature on pre-10.0 clients.