From 9c0b0a7ac6c183a3104904771950e90c0ee2e1e7 Mon Sep 17 00:00:00 2001 From: lewis <> Date: Sat, 4 Nov 2023 17:35:58 +0800 Subject: [PATCH] chore: change escape lock logic --- packages/contracts/src/systems/BattleSystem.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/contracts/src/systems/BattleSystem.sol b/packages/contracts/src/systems/BattleSystem.sol index 5bc09cae..a4f20891 100644 --- a/packages/contracts/src/systems/BattleSystem.sol +++ b/packages/contracts/src/systems/BattleSystem.sol @@ -117,7 +117,7 @@ contract BattleSystem is System { BattleList.setWinner(_battleId, battle.defender); BattleList.setIsEnd(_battleId, true); // escaper will lock a while - PlayerLocationLock.set(battle.attacker, block.timestamp); + PlayerLocationLock.set(battle.defender, block.timestamp); // console.log(" escape --- 2"); // emit BattleEnd(_battleId, BattleEndType.NormalEnd, battle.defender); @@ -140,7 +140,7 @@ contract BattleSystem is System { BattleList.setWinner(_battleId, battle.attacker); BattleList.setIsEnd(_battleId, true); // escaper will lock a while - PlayerLocationLock.set(battle.defender, block.timestamp); + PlayerLocationLock.set(battle.attacker, block.timestamp); // console.log(" attacker escape success");