From 2c850ca9e7195ca46674f5c63b48792c837c5b3a Mon Sep 17 00:00:00 2001 From: celest Date: Sun, 20 Mar 2005 15:44:46 +0000 Subject: * Don't register the day/night timers if any one is set to 0 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1258 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-SVN.txt | 1 + src/map/pc.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt index c05c01b98..908e35f6c 100644 --- a/Changelog-SVN.txt +++ b/Changelog-SVN.txt @@ -1,6 +1,7 @@ Date Added 03/20 + * Don't register the day/night timers if any one is set to 0 [celest] * Fixed @storage / @gstorage ATcommands thanks2 Yor/Freya [Lupus] * Added 4 new card effects from 3/15's patch -- check item_bonus.txt [celest] * Added 'enable_ip_rules' to packet_athena.conf [celest] diff --git a/src/map/pc.c b/src/map/pc.c index c681f8ec5..9e607f560 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7262,12 +7262,13 @@ int do_init_pc(void) { pc_read_gm_account(0); #endif /* not TXT_ONLY */ - // add night/day timer (by [yor]) - add_timer_func_list(map_day_timer, "map_day_timer"); // by [yor] - add_timer_func_list(map_night_timer, "map_night_timer"); // by [yor] - { + if (battle_config.day_duration > 0 && battle_config.night_duration > 0) { int day_duration = battle_config.day_duration; int night_duration = battle_config.night_duration; + // add night/day timer (by [yor]) + add_timer_func_list(map_day_timer, "map_day_timer"); // by [yor] + add_timer_func_list(map_night_timer, "map_night_timer"); // by [yor] + if (battle_config.night_at_start == 0) { night_flag = 0; // 0=day, 1=night [Yor] day_timer_tid = add_timer_interval(gettick() + day_duration + night_duration, map_day_timer, 0, 0, day_duration + night_duration); -- cgit v1.2.3-70-g09d2