mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2025-02-05 13:40:18 +08:00
修复了领地扩张导致尺寸超限制问题
This commit is contained in:
parent
33b80884d9
commit
88e569b3aa
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>Dominion</artifactId>
|
||||
<version>1.11.5-beta</version>
|
||||
<version>1.11.6-beta</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Dominion</name>
|
||||
|
@ -199,6 +199,13 @@ public class DominionController {
|
||||
Notification.error(operator, "无效的方向");
|
||||
return null;
|
||||
}
|
||||
int x_length = x2 - x1;
|
||||
int y_length = y2 - y1;
|
||||
int z_length = z2 - z1;
|
||||
if (x_length > Dominion.config.getMaxX() || y_length > Dominion.config.getMaxY() || z_length > Dominion.config.getMaxZ()) {
|
||||
Notification.error(operator, "领地尺寸不能超过 " + Dominion.config.getMaxX() + " x " + Dominion.config.getMaxY() + " x " + Dominion.config.getMaxZ());
|
||||
return null;
|
||||
}
|
||||
// 校验是否超出父领地范围
|
||||
DominionDTO parent_dominion = DominionDTO.select(dominion.getParentDomId());
|
||||
if (parent_dominion == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user