From 32ede84e3df74165206f1f07bf929290685effba Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 19 Dec 2024 14:47:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor(NpcTeleport):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=BD=AC=E7=94=9F=E6=A3=80=E6=9F=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将原有的转生检查逻辑从条件判断改为条件赋值,简化了代码结构 - 这个改动提高了代码的可读性和执行效率,因为在所有情况下都会进行赋值操作 --- LogicServer/data/functions/NpcEvent/NpcTeleport.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LogicServer/data/functions/NpcEvent/NpcTeleport.txt b/LogicServer/data/functions/NpcEvent/NpcTeleport.txt index d222109..8cdca2d 100755 --- a/LogicServer/data/functions/NpcEvent/NpcTeleport.txt +++ b/LogicServer/data/functions/NpcEvent/NpcTeleport.txt @@ -123,7 +123,7 @@ if NetmsgDispatcher then end -- 检查转生 - local zs = config.zsLevel and Actor.checkActorLevel(actor, 0, config.zsLevel) + local zs = config.zsLevel or Actor.checkActorLevel(actor, 0, config.zsLevel) --local tips = string.format(Lang.TisMsg.xxx, config.nLevel) --Actor.sendTipmsg(actor, "等级不足!", ttFlyTip) if editionConf.suit == System.getServerId() and config.suit then