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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user