summaryrefslogtreecommitdiff
path: root/src/map/duel.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-08-26 20:53:05 +0200
committerGitHub <noreply@github.com>2018-08-26 20:53:05 +0200
commita7bee2cdb8b4d4a2a250d611be4babd27043b6db (patch)
tree0135aa01a07e4ca72ae035c3179da7c82a92b777 /src/map/duel.c
parenta1e841ccf13c63fefad02a1bfce0e50b92c649a0 (diff)
parent4118b1135eb79c211aafb6408a4ad8cf9ce09b02 (diff)
downloadhercules-a7bee2cdb8b4d4a2a250d611be4babd27043b6db.tar.gz
hercules-a7bee2cdb8b4d4a2a250d611be4babd27043b6db.tar.bz2
hercules-a7bee2cdb8b4d4a2a250d611be4babd27043b6db.tar.xz
hercules-a7bee2cdb8b4d4a2a250d611be4babd27043b6db.zip
Merge pull request #2164 from mekolat/addvariable
always set the type to C_NAME when adding variables through script->add_str
Diffstat (limited to 'src/map/duel.c')
-rw-r--r--src/map/duel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/duel.c b/src/map/duel.c
index 39e5b5253..c2c24e37b 100644
--- a/src/map/duel.c
+++ b/src/map/duel.c
@@ -47,7 +47,7 @@ static void duel_savetime(struct map_session_data *sd)
time(&clock);
t = localtime(&clock);
- pc_setglobalreg(sd, script->add_str("PC_LAST_DUEL_TIME"), t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min);
+ pc_setglobalreg(sd, script->add_variable("PC_LAST_DUEL_TIME"), t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min);
}
static int duel_checktime(struct map_session_data *sd)
@@ -59,7 +59,7 @@ static int duel_checktime(struct map_session_data *sd)
time(&clock);
t = localtime(&clock);
- diff = t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min - pc_readglobalreg(sd, script->add_str("PC_LAST_DUEL_TIME") );
+ diff = t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min - pc_readglobalreg(sd, script->add_variable("PC_LAST_DUEL_TIME") );
return !(diff >= 0 && diff < battle_config.duel_time_interval);
}