diff options
Diffstat (limited to 'npc/items/legacy_heal.txt')
-rw-r--r-- | npc/items/legacy_heal.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/npc/items/legacy_heal.txt b/npc/items/legacy_heal.txt index 57a3da2d8..7664c4be9 100644 --- a/npc/items/legacy_heal.txt +++ b/npc/items/legacy_heal.txt @@ -38,9 +38,13 @@ OnUse: .@d=getstatus(.@skill, 4) * 1000; // If there WAS an effect previously, get ponderate average + // Note: never use double-precision ponderate averages if (.@v > 0) { @val1=ponderate_avg(@val1, @delay, .@v, .@d); - @delay=ponderate_avg(@delay, @val1, .@d, .@v); + // Overflow and Underflow protection + if (@delay+.@d < @delay*5 && .@d > 0) + @delay=@delay+.@d; + //@delay=ponderate_avg(@delay, @val1, .@d, .@v); } // Apply the effect and finish |