summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-02-09 18:09:36 +0100
committerGitHub <noreply@github.com>2020-02-09 18:09:36 +0100
commitf6b34b065b1d90abc5ff4731ae3bed261ec0079a (patch)
treea0d41c65621c8cc38fd38fd0b2e68e74b203beea /src/map/atcommand.c
parent3687a79c5ab173abf6263a003d9473d9c2938309 (diff)
parentf58e97c04ebf0377c4cb599a24e59f3cf25ae610 (diff)
downloadhercules-f6b34b065b1d90abc5ff4731ae3bed261ec0079a.tar.gz
hercules-f6b34b065b1d90abc5ff4731ae3bed261ec0079a.tar.bz2
hercules-f6b34b065b1d90abc5ff4731ae3bed261ec0079a.tar.xz
hercules-f6b34b065b1d90abc5ff4731ae3bed261ec0079a.zip
Merge pull request #1495 from Emistry/dual_cooldown
Update Duel System Cooldown
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3cd26079d..5d95e2c14 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8048,10 +8048,11 @@ ACMD(duel)
return false;
}
- if (!duel->checktime(sd)) {
+ int64 diff = duel->difftime(sd);
+ if (diff > 0) {
char output[CHAT_SIZE_MAX];
- // "Duel: You can take part in duel only one time per %d minutes."
- sprintf(output, msg_fd(fd,356), battle_config.duel_time_interval);
+ // "Duel: You can take part in duel again after %d secconds."
+ sprintf(output, msg_fd(fd,356), (int)diff);
clif->message(fd, output);
return false;
}
@@ -8101,10 +8102,11 @@ ACMD(leave)
ACMD(accept)
{
- if (!duel->checktime(sd)) {
+ int64 diff = duel->difftime(sd);
+ if (diff > 0) {
char output[CHAT_SIZE_MAX];
- // "Duel: You can take part in duel only one time per %d minutes."
- sprintf(output, msg_fd(fd,356), battle_config.duel_time_interval);
+ // "Duel: You can take part in duel again after %d seconds."
+ sprintf(output, msg_fd(fd,356), (int)diff);
clif->message(fd, output);
return false;
}