From daa81ed7e83b8b21275150da0e95f00b954bb606 Mon Sep 17 00:00:00 2001 From: liuwei Date: Fri, 21 Nov 2025 17:59:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E9=97=A8=E5=8E=86=E7=BB=83=E9=99=90?= =?UTF-8?q?=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/xiuxian/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/xiuxian/main.py b/plugins/xiuxian/main.py index 6010e47..757bade 100644 --- a/plugins/xiuxian/main.py +++ b/plugins/xiuxian/main.py @@ -588,7 +588,7 @@ class XiuxianPlugin(MessagePluginInterface): until = None if until and until.tzinfo is None: until = until.replace(tzinfo=timezone.utc) - if status in ("Unstable_Qi", "Injured") and until and now >= until: + if status in ("Unstable_Qi", "Injured", "Expedition") and until and now >= until: player["status"] = "Idle" player["status_until"] = None self._save_player(player) @@ -1123,8 +1123,13 @@ class XiuxianPlugin(MessagePluginInterface): return False, "未注册" player = self._check_status_update(player) st = player.get("status", "Idle") - if st in ("Cultivating", "Injured"): + if st in ("Cultivating", "Injured", "Expedition"): return False, "状态不可历练" + now = datetime.now(timezone.utc) + player["status"] = "Expedition" + player["status_until"] = (now + timedelta(minutes=20)).isoformat() + self._save_player(player) + self._rate_set_global(sender, "出门历练") prefix, layer = self._parse_realm(player.get("realm", "炼气1层")) rs = self.realm_score_map.get(prefix, 0) realm_mult = 1.0 + (float(rs) / 100.0)