summaryrefslogtreecommitdiff
path: root/src/map/duel.c
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-07-30 11:55:45 -0400
committergumi <git@gumi.ca>2018-07-30 13:01:16 -0400
commit87eb2f98518a63a3f640b97ad62c8b18a5d6b946 (patch)
treeb56d31a13d363d1d706caf1d30cb3381b61f057f /src/map/duel.c
parenta28504fce050c8967b092759f1374d22c7a7ec0e (diff)
downloadhercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.tar.gz
hercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.tar.bz2
hercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.tar.xz
hercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.zip
always set the type when doing 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);
}