Fix setWeather Bug

This commit is contained in:
oc 2018-12-23 21:11:48 +08:00
parent 1d7caccb32
commit 07590c7aa6
2 changed files with 2 additions and 2 deletions

View File

@ -2154,7 +2154,7 @@ ActionParser.prototype.parseAction = function() {
break;
case "setWeather": // 更改天气
this.next = MotaActionBlocks['setWeather_s'].xmlText([
data.name||'无',data.level||1,this.next]);
data.name,data.level||1,this.next]);
break;
case "openDoor": // 开一个门, 包括暗墙
data.loc=data.loc||['','']

View File

@ -835,7 +835,7 @@ events.prototype.doAction = function() {
break;
case "setWeather": // 更改天气
core.setWeather(data.name, data.level);
if (core.isset(data.name))
if (data.name=='rain' || data.name=='snow' || data.name=='fog')
core.setFlag('__weather__', [data.name, data.level]);
else core.removeFlag('__weather__');
this.doAction();