summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/commands/event.txt1
-rw-r--r--npc/functions/weather.txt21
2 files changed, 11 insertions, 11 deletions
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index 49bc9f897..e3ead9dbc 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -64,6 +64,7 @@ function script GlobalEventMenu {
// Add drops?
// Change maps?
+ addmapmask "009-1", MASK_CHRISTMAS;
// Enable event
set $EVENT$, "Christmas";
diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt
index bdf58b191..0dacd8874 100644
--- a/npc/functions/weather.txt
+++ b/npc/functions/weather.txt
@@ -68,16 +68,19 @@ OnMinute45:
.@hti = htiterator(.wcore);
for(.@key$ = htinextkey(.@hti); hticheck(.@hti); .@key$ = htinextkey(.@hti)) {
-
- // PvP Maps are immune to weather changes (eg. during sieges)
- // I could use getmapmask, but this is simpler.
- if (getmapflag(.@key$, mf_pvp))
- continue;
-
// Local variables: .@key$ .@type .@r
.@type$=htget(.wcore, .@key$);
.@r=rand(0,10000);
- .@mk=MASK_NONE;
+
+ // Clear weather map masks
+ .@mk=getmapmask(.@key$);
+
+ if (.@mk & MASK_RAIN)
+ .@mk=.@mk^MASK_RAIN;
+ if (.@mk & MASK_SANDSTORM)
+ .@mk=.@mk^MASK_SANDSTORM;
+ if (.@mk & MASK_SNOW)
+ .@mk=.@mk^MASK_SNOW;
// Remove all current masks, and add rain/snow/sand
if (.@type$ == "desert") {
@@ -107,10 +110,6 @@ OnMinute45:
if (!(.@mk & MASK_NONE))
.@mk=.@mk|MASK_NONE;
- // Christmas Decor should not be here
- if ($EVENT$ == "Christmas" && .@key$ == "009-1")
- .@mk=.@mk|MASK_CHRISTMAS;
-
setmapmask .@key$, .@mk;
// Is it night time?