diff options
Diffstat (limited to 'npc/commands/rate-management.txt')
-rw-r--r-- | npc/commands/rate-management.txt | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt index e19ba5ae3..a71201e68 100644 --- a/npc/commands/rate-management.txt +++ b/npc/commands/rate-management.txt @@ -123,11 +123,9 @@ OnPlayerCall: $@EXP_EVENT_TIME=limit(1, $@EXP_EVENT_TIME, 6); } - // If a GM rate-up was running, we will sum the time, too. - // It'll be rounded down. (so 1h + 30m = 1h) FIXME average is better - if (.hours || .max_hours) { - $@EXP_EVENT_TIME+=max(0, .max_hours-.hours-1); - } + // If another rate-up is active, we will sum the time, too. + if (.hours || .max_hours) + $@EXP_EVENT_TIME += max(0, .max_hours - .hours); // Default duration is one hour, or whatever $@EXP_EVENT_TIME is .hours = 0; @@ -137,7 +135,10 @@ OnPlayerCall: setbattleflag("job_exp_rate", expRecalc($@EXP_EVENT)); charcommand("@reloadmobdb"); SeasonReload(1); - initnpctimer; // start counting + + // <3600> 1 <3600> 2 <3600> 3 <STOP> + if (getnpctimer(0) == 0) + initnpctimer; // start counting .@msg$="Experience Rate was modified to "+$@EXP_EVENT+"% for "+$@EXP_EVENT_TIME+" hour(s)!"; @@ -326,11 +327,9 @@ OnPlayerCall: $@DROP_EVENT_TIME=limit(1, $@DROP_EVENT_TIME, 6); } - // If a GM rate-up was running, we will sum the time, too. - // It'll be rounded down. (so 1h + 30m = 1h) FIXME average is better - if (.hours || .max_hours) { - $@DROP_EVENT_TIME+=max(0, .max_hours-.hours-1); - } + // If another rate-up is active, we will sum the time, too. + if (.hours || .max_hours) + $@DROP_EVENT_TIME += max(0, .max_hours - .hours); // Default duration is one hour, or whatever $@EXP_EVENT_TIME is .hours = 0; @@ -349,7 +348,10 @@ OnPlayerCall: setbattleflag("item_rate_card_boss", dropRecalc(.@new_rate)); charcommand("@reloadmobdb"); SeasonReload(1); - initnpctimer; // start counting + + // <3600> 1 <3600> 2 <3600> 3 <STOP> + if (getnpctimer(0) == 0) + initnpctimer; // start counting .@msg$="Drop Rate was modified to "+$@DROP_EVENT+"% for "+$@DROP_EVENT_TIME+" hour(s)!"; |