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)