diff options
author | Haru <haru@dotalux.com> | 2015-11-15 00:54:33 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-11-15 00:57:00 +0100 |
commit | 34037c40d28c9fe179d930949320090448b249e9 (patch) | |
tree | 3fe4d79c6185df4f165beae47cc3e7a286ce5af8 /npc/re | |
parent | 8ee5eafc741d581579efd696765fb0646b72a553 (diff) | |
download | hercules-34037c40d28c9fe179d930949320090448b249e9.tar.gz hercules-34037c40d28c9fe179d930949320090448b249e9.tar.bz2 hercules-34037c40d28c9fe179d930949320090448b249e9.tar.xz hercules-34037c40d28c9fe179d930949320090448b249e9.zip |
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 <haru@dotalux.com>
Diffstat (limited to 'npc/re')
-rw-r--r-- | npc/re/quests/quests_mora.txt | 2 | ||||
-rw-r--r-- | npc/re/woe-fe/invest_main.txt | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/npc/re/quests/quests_mora.txt b/npc/re/quests/quests_mora.txt index 6bfb908d1..53b63e881 100644 --- a/npc/re/quests/quests_mora.txt +++ b/npc/re/quests/quests_mora.txt @@ -2519,7 +2519,7 @@ mora,31,138,6 script Raffle Researcher#ep14 4_M_RAFLE_OR,{ close; } // NPC disabled from 12am ~ 5am. - if (gettime(HOUR) >= 0 && gettime(HOUR) < 5) { + if (gettime(GETTIME_HOUR) >= 0 && gettime(GETTIME_HOUR) < 5) { if (ep14_1_muk > 0) { mes "[Raffle Researcher]"; mes "Don't humans sleep?"; diff --git a/npc/re/woe-fe/invest_main.txt b/npc/re/woe-fe/invest_main.txt index 88e88d385..b0f594f7f 100644 --- a/npc/re/woe-fe/invest_main.txt +++ b/npc/re/woe-fe/invest_main.txt @@ -62,31 +62,31 @@ $@vfund_*_extra - script #invest_timer -1,{ OnClock0000: // Open investments on Wed (1 hour after WoE) - if (gettime(WEEKDAY) == WEDNESDAY && !agitcheck()) { + if (gettime(GETTIME_WEEKDAY) == WEDNESDAY && !agitcheck()) { $2011_agit_invest = 1; donpcevent "#fund_master::OnInvest_start"; } end; OnClock1200: // Close investments on Fri (60 hours after investments open) - if (gettime(WEEKDAY) == FRIDAY && !agitcheck()) { + if (gettime(GETTIME_WEEKDAY) == FRIDAY && !agitcheck()) { $2011_agit_invest = 2; donpcevent "#fund_master::OnInvest_stop"; } end; OnClock1235: // Open dungeons on Fri (at least 31 minutes after investments close) - if (gettime(WEEKDAY) == FRIDAY && !agitcheck()) + if (gettime(GETTIME_WEEKDAY) == FRIDAY && !agitcheck()) donpcevent "#fund_master::OnResult"; end; OnClock2000: // Close dungeons on Tues (1 hour before WoE) - if (gettime(WEEKDAY) == TUESDAY) + if (gettime(GETTIME_WEEKDAY) == TUESDAY) donpcevent "#fund_master::OnReset"; end; } function script F_Invest_Status { - .@day = gettime(WEEKDAY); - .@hour = gettime(HOUR); - .@minute = gettime(MINUTE); + .@day = gettime(GETTIME_WEEKDAY); + .@hour = gettime(GETTIME_HOUR); + .@minute = gettime(GETTIME_MINUTE); // Inactive. if (agitcheck()) |