From ee9925400182a9f085bd05ee8f4a6c62562f62fa Mon Sep 17 00:00:00 2001 From: liuwei Date: Fri, 28 Nov 2025 09:36:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=AB=E6=8E=A0=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/xiuxian/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/xiuxian/main.py b/plugins/xiuxian/main.py index 3f905cc..a8d1c7e 100644 --- a/plugins/xiuxian/main.py +++ b/plugins/xiuxian/main.py @@ -85,6 +85,10 @@ class XiuxianRedisDB: new_key = f"{self.player_prefix}{group_id}:{user_id}" old_key = f"{self.player_prefix}{user_id}" + # 更新数据库 + if self.db_manager.mysql_pool: + self.xdb.update_player_fields(user_id, group_id, player) + # 保存到新格式 r.set(new_key, json.dumps(player, ensure_ascii=False)) # 删除旧格式(如果存在),确保数据一致性 @@ -558,7 +562,7 @@ class XiuxianPlugin(MessagePluginInterface): ok, msg = await self._cmd_rob(bot, sender, roomid, content, message) return ok, msg if cmd == "赠与": - ok, msg = await self._cmd_give_stone(bot, sender, roomid, content) + ok, msg = await self._cmd_give_stone(bot, sender, roomid, content,message) return ok, msg if cmd == "赠送": ok, msg = await self._cmd_give_item(bot, sender, roomid, content, message)