From cbb0528ee819912149b95b6855eb26056dc9fc83 Mon Sep 17 00:00:00 2001 From: CornWorld Date: Wed, 7 Feb 2024 18:57:33 +0800 Subject: [PATCH] [Fix] Fix the logic error of King block --- packages/server/game/block/block_king.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/server/game/block/block_king.go b/packages/server/game/block/block_king.go index 3136808..9f137a1 100644 --- a/packages/server/game/block/block_king.go +++ b/packages/server/game/block/block_king.go @@ -31,10 +31,9 @@ func (*King) Meta() Meta { } func (block *King) MoveTo(info Val) Block { - if block.originalOwnerId == block.ownerId { - block.BaseBuilding.MoveTo(info) - return nil - } else { + block.BaseBuilding.MoveTo(info) + if block.originalOwnerId != block.ownerId { return toBlockCastle(block) } + return nil }