Преглед изворни кода

fix(pkuxkx): 修复错误:在非节点输入 xy 镇江后,无反应,但在走到节点后立即执行 xy 镇江

dzp пре 1 година
родитељ
комит
2dafcd8488
1 измењених фајлова са 11 додато и 1 уклоњено
  1. 11 1
      mud/pkuxkx/plugins/basic/map/xiaoyao.tin

+ 11 - 1
mud/pkuxkx/plugins/basic/map/xiaoyao.tin

@@ -380,8 +380,18 @@ VAR {逍遥行正在赶路} {xiaoyao.under-way} {0};
         ||  &gMapRoom[area][] == 0
         || "@map.GetArea{}" == ""
     } {
-        #line sub {func;var} event.HandleOnce map/GotArea {xiaoyao/goto} {xiaoyao} {xiaoyao.goto {$target} {$hook} {@math.Eval{$retry + 1}}};
+        #nop 获取区域的过程中可能无法产生积极的结果,那么就以角色移动为失败标志,取消走路。;
+        #class xiaoyao.goto.locate open;
+        #line sub {func;var} event.ClassHandleOnce map/GotArea {xiaoyao/goto/locate} {xiaoyao} {
+            #class xiaoyao.goto.locate kill;
+            xiaoyao.goto {$target} {$hook} {@math.Eval{$retry + 1}};
+        };
+        #line sub {func;var} event.ClassHandleOnce GMCP.Move {xiaoyao/goto/locate} {xiaoyao} {
+            xiaoyao.goto.cancel {$hook};
+            #class xiaoyao.goto.locate kill;
+        };
         map.GetArea;
+        #class xiaoyao.goto.locate close;
         #return;
     };