Skip to content

Commit a98689b

Browse files
committed
Now shields-overflow returns a zero value to avoid crashes in old profiles using this status on bars.
Now 38 yards range checks range using a rez spell (if available for the class) if the player is dead. Reduced countdown text colorization rate to increase performance.
1 parent 1307608 commit a98689b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

GridUtils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ do
527527
end
528528
if not next(cooldowns) then timer:Stop() end
529529
end
530-
timer = Grid2:CreateTimer(Update, 0.1, false)
530+
timer = Grid2:CreateTimer(Update, 0.2, false)
531531

532532
-- cooldown must have the fields: cooldown.durationObject, cooldown.colorCurveObject
533533
function Grid2.UpdateCooldownColorCurve(cooldown, durationObject)

modules/StatusRange.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
-- Created by Grid2 original authors, modified by Michael
2-
32
local Range = Grid2.statusPrototype:new("range")
43
local RangeAlt = Grid2.statusPrototype:new("rangealt")
54

@@ -92,6 +91,8 @@ local Ranges = {
9291
return true
9392
elseif UnitCanAttack('player', unit) then
9493
return spellHostile == nil or IsSpellInRange(spellHostile, unit) == 1
94+
elseif rezSpell and UnitIsDeadOrGhost(unit) then
95+
return IsSpellInRange(rezSpell, unit) == 1
9596
elseif spellFriendly then
9697
return IsSpellInRange(spellFriendly, unit) == 1
9798
else

modules/StatusShields.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ local Overflow = Grid2.statusPrototype:new("shields-overflow")
7070

7171
Overflow.GetColor = Grid2.statusLibrary.GetColor
7272

73+
function Overflow:GetPercent() -- to avoid crash on old profiles using overflow status linked to bars
74+
return 0
75+
end
76+
7377
function Overflow:OnEnable()
7478
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateUnit")
7579
self:RegisterEvent("UNIT_HEALTH", "UpdateUnit")

0 commit comments

Comments
 (0)