fix(battle): correct killer name in death handling logic

- Updated the killer name reference in the handle_death function to use the winner's name instead of the attacker's name, ensuring accurate death reason reporting in battle scenarios.
This commit is contained in:
bridge
2026-02-03 20:53:59 +08:00
parent d4cc50962c
commit a59f6837ca
2 changed files with 55 additions and 1 deletions

View File

@@ -304,5 +304,5 @@ async def handle_battle_finish(
# 处理死亡
if is_fatal:
handle_death(world, loser, DeathReason(DeathType.BATTLE, killer_name=attacker.name))
handle_death(world, loser, DeathReason(DeathType.BATTLE, killer_name=winner.name))
return [result_event, story_event]