From 34037c40d28c9fe179d930949320090448b249e9 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 15 Nov 2015 00:54:33 +0100 Subject: Fixed too-generic constant names of gettime() types - Follow-up to 3bd77ffc0daca508352834add828766490075aee - The names were too generic (not namespaced), and were easily clashing with custom (and potential future official) constants or variables. - Constants are now prefixed with a 'GETTIME_' namespace: - GETTIME_SECOND - GETTIME_MINUTE - GETTIME_HOUR - GETTIME_WEEKDAY - GETTIME_DAYOFMONTH - GETTIME_MONTH - GETTIME_YEAR - GETTIME_DAYOFYEAR - Fixed some excessive (and some times incorrect) parentheses in various scripts using gettime(). - Updated documentation. Signed-off-by: Haru --- npc/quests/quests_lighthalzen.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'npc/quests/quests_lighthalzen.txt') diff --git a/npc/quests/quests_lighthalzen.txt b/npc/quests/quests_lighthalzen.txt index 2636b1f77..d7b184f6c 100644 --- a/npc/quests/quests_lighthalzen.txt +++ b/npc/quests/quests_lighthalzen.txt @@ -85,7 +85,7 @@ lighthalzen,267,200,3 script Guard#lhz01 4_M_LGTGUARD,{ $@Lhz_Gangster_Alert = 100; close; } - if (gettime(HOUR) >= 22 || gettime(HOUR) < 2) { + if (gettime(GETTIME_HOUR) >= 22 || gettime(GETTIME_HOUR) < 2) { mes "[Guard]"; mes "Zzzz... Zzz..."; mes "ZZZzzzzzzzzzz..."; @@ -152,7 +152,7 @@ lighthalzen,294,223,7 script Guard#lhz02 4_M_LGTGUARD,{ $@Lhz_Gangster_Alert = 100; close; } - if (gettime(HOUR) >= 22 || gettime(HOUR) < 2) { + if (gettime(GETTIME_HOUR) >= 22 || gettime(GETTIME_HOUR) < 2) { mes "[Guard]"; mes "Zzzz... Zzz..."; mes "ZZZzzzzzzzzzz..."; @@ -7378,8 +7378,8 @@ yuno_pre,69,20,4 script Secretary#1 4_F_LGTGIRL,{ mes "Membership Card.^000000"; close; } - if(((gettime(HOUR) > 10) && (gettime(HOUR) < 15)) || ((gettime(HOUR) > 19) && (gettime(HOUR) <= 23))) - { + if ((gettime(GETTIME_HOUR) > 10 && gettime(GETTIME_HOUR) < 15) + || (gettime(GETTIME_HOUR) > 19 && gettime(GETTIME_HOUR) <= 23)) { mes "^3355FFYou suavely flash"; mes "your ''Secret Wing''"; mes "Membership Card.^000000"; -- cgit v1.2.3-70-g09d2