From 9c9d6ca9f0dc061135d8fb687ecb12d7985e56bc Mon Sep 17 00:00:00 2001 From: lewis <> Date: Thu, 2 Nov 2023 22:21:33 +0800 Subject: [PATCH] fix: user lock bug --- packages/contracts/src/systems/MoveSystem.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/contracts/src/systems/MoveSystem.sol b/packages/contracts/src/systems/MoveSystem.sol index 96c82496..bb980412 100644 --- a/packages/contracts/src/systems/MoveSystem.sol +++ b/packages/contracts/src/systems/MoveSystem.sol @@ -19,9 +19,9 @@ contract MoveSystem is System { // 用户自行解锁 require(PlayerLocationLock.get(_msgSender()) != 0, "You are not locked"); require( - PlayerLocationLock.get(_msgSender()) + BattleConfig.getMaxUserLocationLockTime(BATTLE_CONFIG_KEY) < + PlayerLocationLock.get(_msgSender()) + BattleConfig.getMaxUserLocationLockTime(BATTLE_CONFIG_KEY) > block.timestamp, - "You are not locked" + "You are locked" ); PlayerLocationLock.set(_msgSender(), 0); }