Skip to content

Commit

Permalink
[Fix] Fix the logic error of King block
Browse files Browse the repository at this point in the history
  • Loading branch information
CornWorld committed Feb 7, 2024
1 parent 661d3a9 commit cbb0528
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/server/game/block/block_king.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit cbb0528

Please sign in to comment.