From db843bc101eb73e77b9299e101f3b13d0a278ae0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 2 Aug 2018 10:15:11 -0300 Subject: SeasonReload() function --- npc/functions/seasons.txt | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'npc/functions/seasons.txt') diff --git a/npc/functions/seasons.txt b/npc/functions/seasons.txt index be49e80f7..a93cc78f9 100644 --- a/npc/functions/seasons.txt +++ b/npc/functions/seasons.txt @@ -49,6 +49,19 @@ function script SeasonControl { } while (@menu != 3); return; } +function script SeasonReload { + // Summer extra drops + if (season() == SUMMER && $@SEASON != SUMMER) { + donpcevent("#SeasonCore::OnSummerStart"); + } + // Summer end delete drops + if (season() == AUTUMN && $@SEASON == SUMMER) { + donpcevent("#SeasonCore::OnSummerEnd"); + } + + $@SEASON=season(); + return; +} 000-0,0,0,0 script #SeasonCore NPC_HIDDEN,{ end; @@ -117,17 +130,7 @@ OnSummerEnd: OnInit: OnHour00: if ($@SEASON != season()) { - - // Summer extra drops - if (season() == SUMMER && $@SEASON != SUMMER) { - donpcevent("#SeasonCore::OnSummerStart"); - } - // Summer end delete drops - if (season() == AUTUMN && $@SEASON == SUMMER) { - donpcevent("#SeasonCore::OnSummerEnd"); - } - - $@SEASON=season(); + SeasonReload(); } end; } -- cgit v1.2.3-60-g2f50