Thread necro, cos I'm writing a correction to the bug for my Midnight addon and I'm not sure if DarkGod has got a fix in the svn.
Here is my fix code:
Code:
if self:attr("positive_at_rest") then
local v = self.positive_at_rest * self.max_positive / 100
if (self:getPositive() > v or self:attr("positive_at_rest_disable")) and self:attr("positive_rising") then
self.positive_regen = self.positive_regen - 2 * self.positive_regen_ref
self.positive_rising = false
elseif self:getPositive() < v and not self:attr("positive_rising") then
self.positive_regen = self.positive_regen + 2 * self.positive_regen_ref
self.positive_rising = true
end
end
if self:attr("negative_at_rest") then
local v = self.negative_at_rest * self.max_negative / 100
if (self:getNegative() > v or self:attr("negative_at_rest_disable")) and self:attr("negative_rising") then
self.negative_regen = self.negative_regen - 2 * self.negative_regen_ref
self.negative_rising = false
elseif self:getNegative() < v and not self:attr("negative_rising") then
self.negative_regen = self.negative_regen + 2 * self.negative_regen_ref
self.negative_rising = true
end
end
This requires positive_regen_ref and negative_regen_ref to be removed from the staff as well.