From 9630c2ceaa0186258ea52d40b3316da344eea61a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 11 Feb 2020 13:55:09 -0300 Subject: [skip ci] ALCReset: Cast it when having a new drink. So newer drinks are not affected by old drinks if timer expired. --- npc/items/alcohol.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'npc/items') diff --git a/npc/items/alcohol.txt b/npc/items/alcohol.txt index 6188f8102..25f93c744 100644 --- a/npc/items/alcohol.txt +++ b/npc/items/alcohol.txt @@ -17,6 +17,12 @@ // Max HP Reductor: SC_INCMHPRATE // EXP Increaser: SC_CASH_PLUSEXP (not reset upon death), SC_OVERLAPEXPUP (reset upon death) +function script ALCReset { + if (ALC_DELAYTIME < gettimetick(2)) + ALC_THRESHOLD=0; + return; +} + - script alcohol_sc -1,{ // Stack remaning bonuses if the last one hasn't finished @@ -40,6 +46,9 @@ OnUse: Exception("Invalid alcoholic item, deleting without any effect."); end; } + // Just to be sure + ALCReset(); + // Do you have enough vitality to hold your beer? // Skip this check on the first drink if (ALC_THRESHOLD) { @@ -104,9 +113,3 @@ OnUse: close; } -function script ALCReset { - if (ALC_DELAYTIME < gettimetick(2)) - ALC_THRESHOLD=0; - return; -} - -- cgit v1.2.3-60-g2f50