diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-07-02 22:23:51 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-07-02 22:23:51 -0300 |
commit | 9c43536f5dd3a70c5600437ec5bb862692ffbbe2 (patch) | |
tree | c73400155e682c34e1941a74dc0c317f4fefa200 /npc/functions | |
parent | a2739966bfa171f9afcf873df746f5d418df5a92 (diff) | |
download | serverdata-9c43536f5dd3a70c5600437ec5bb862692ffbbe2.tar.gz serverdata-9c43536f5dd3a70c5600437ec5bb862692ffbbe2.tar.bz2 serverdata-9c43536f5dd3a70c5600437ec5bb862692ffbbe2.tar.xz serverdata-9c43536f5dd3a70c5600437ec5bb862692ffbbe2.zip |
Fix weather :3
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/weather.txt | 21 |
1 files changed, 10 insertions, 11 deletions
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? |