Skip to content

修复永生之海队员锁定阵容检查流程 - #1974

Merged
runhey merged 1 commit into
runhey:devfrom
weirj2016-ai:fix/eternity-sea-member-lock-dev
Oct 28, 2026
Merged

runhey merged 1 commit into
runhey:devfrom
weirj2016-ai:fix/eternity-sea-member-lock-dev

Conversation

@weirj2016-ai

@weirj2016-ai weirj2016-ai commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

问题

原来的代码在队员启用锁定阵容时,没有在等待邀请前检查永生之海的锁定状态,进入房间后经常出现队员不能有效锁定阵容的情况。

改动

  • 将进入永生之海、选择层数和检查锁定状态的流程提取到共享的 _prepare_eternity_sea()。
  • 队长和队员共用该流程;队员切换御魂后先检查锁定状态,再等待并接受邀请。
  • 删除队员遗留的旧 Orochi 锁定检查注释。

未运行测试。

Sourcery 总结

统一永生之海队长与队员的准备流程,确保队员在接受邀请前完成锁定阵容检查。

Bug 修复:

  • 修复启用锁定阵容时,永生之海队员未及时检查锁定状态的问题。

功能增强:

  • 提取并复用永生之海进入、层数选择和阵容锁定检查流程,统一队长与队员的准备流程。
Original summary in English

Summary by Sourcery

统一永生之海队长与队员的准备流程,确保队员在接受邀请前完成锁定阵容检查。

Bug Fixes:

  • 修复永生之海队员在启用锁定阵容时未及时检查锁定状态的问题。

Enhancements:

  • 提取并复用永生之海进入、层数选择和阵容锁定检查流程,统一队长与队员的准备流程。

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嘿——我发现了 1 个问题

给 AI 代理的提示
请处理本次代码审查中的评论:

## 单条评论

### 评论 1
<location path="tasks/EternitySea/script_task.py" line_range="183" />
<code_context>
-        layer = self._task_config.eternity_sea_config.layer
-        self.check_layer(layer)
-        self.check_lock(self._task_config.general_battle_config.lock_team_enable)
+        self._prepare_eternity_sea()
         # 创建队伍
         logger.info('Create team')
</code_context>
<issue_to_address>
**准备期间邀请会过期**

队长在队员准备期间发送邀请时(包括邀请弹窗遮挡锁定指示器的情况),`run_member()` 会等待 `_prepare_eternity_sea()` 返回后才调用 `check_then_accept()`;而当弹窗阻碍锁定状态检测时,`check_lock()` 可能会持续循环。结果是邀请过期,队长等待队员时最终超时。

请确保准备期间仍会接受邀请,并避免邀请弹窗导致锁定检查陷入无限循环。

另请检查 `tasks/EternitySea/script_task.py:44`。
</issue_to_address>

Sourcery 评估

等待批准。 请先处理 1 项发现。

阻断性问题:tasks/EternitySea/script_task.py:183


Sourcery 为开源项目免费提供服务——如果你喜欢我们的审查结果,欢迎分享 ✨
Original comment in English

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="tasks/EternitySea/script_task.py" line_range="183" />
<code_context>
-        layer = self._task_config.eternity_sea_config.layer
-        self.check_layer(layer)
-        self.check_lock(self._task_config.general_battle_config.lock_team_enable)
+        self._prepare_eternity_sea()
         # 创建队伍
         logger.info('Create team')
</code_context>
<issue_to_address>
**Invitations expire during preparation**

When the leader sends an invitation while the member is preparing, including while an invitation overlay hides the lock indicator, `run_member()` waits for `_prepare_eternity_sea()` to return before calling `check_then_accept()`, and `check_lock()` can keep looping when the overlay prevents lock detection; the invitation expires and the leader times out waiting for the member.

Keep invitation acceptance active during preparation and ensure invitation overlays cannot leave lock checking in an endless loop.

Also at `tasks/EternitySea/script_task.py:44`.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: tasks/EternitySea/script_task.py:183


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

# self.ui_goto(page_soul_zones)
# self.orochi_enter()
# self.check_lock(self.config.orochi.general_battle_config.lock_team_enable)
self._prepare_eternity_sea()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 中 · 准备期间邀请会过期

队长在队员准备期间发送邀请时(包括邀请弹窗遮挡锁定指示器的情况),run_member() 会等待 _prepare_eternity_sea() 返回后才调用 check_then_accept();而当弹窗阻碍锁定状态检测时,check_lock() 可能会持续循环。结果是邀请过期,队长等待队员时最终超时。

请确保准备期间仍会接受邀请,并避免邀请弹窗导致锁定检查陷入无限循环。

另请检查 tasks/EternitySea/script_task.py:44。

给 AI 代理的提示
在 `tasks/EternitySea/script_task.py` 第 183 行:

**准备期间邀请会过期**

队长在队员准备期间发送邀请时(包括邀请弹窗遮挡锁定指示器的情况),`run_member()` 会等待 `_prepare_eternity_sea()` 返回后才调用 `check_then_accept()`;而当弹窗阻碍锁定状态检测时,`check_lock()` 可能会持续循环。结果是邀请过期,队长等待队员时最终超时。

请确保准备期间仍会接受邀请,并避免邀请弹窗导致锁定检查陷入无限循环。

另请检查 `tasks/EternitySea/script_task.py:44`。
Original comment in English

🟡 Medium · Invitations expire during preparation

When the leader sends an invitation while the member is preparing, including while an invitation overlay hides the lock indicator, run_member() waits for _prepare_eternity_sea() to return before calling check_then_accept(), and check_lock() can keep looping when the overlay prevents lock detection; the invitation expires and the leader times out waiting for the member.

Keep invitation acceptance active during preparation and ensure invitation overlays cannot leave lock checking in an endless loop.

Also at tasks/EternitySea/script_task.py:44.

Prompt for AI agents
In `tasks/EternitySea/script_task.py` at line 183:

**Invitations expire during preparation**

When the leader sends an invitation while the member is preparing, including while an invitation overlay hides the lock indicator, `run_member()` waits for `_prepare_eternity_sea()` to return before calling `check_then_accept()`, and `check_lock()` can keep looping when the overlay prevents lock detection; the invitation expires and the leader times out waiting for the member.

Keep invitation acceptance active during preparation and ensure invitation overlays cannot leave lock checking in an endless loop.

Also at `tasks/EternitySea/script_task.py:44`.

@github-actions

Copy link
Copy Markdown
Contributor

Findings

  • 未发现未通过项

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Generated by PR Review Checklist for #1974 · codex · gpt56 · 9.15 AIC · ⌖ 2.77 AIC · ⊞ 12.1K · ◷

@runhey
runhey merged commit dd860e0 into runhey:dev Oct 28, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants