Fix permision to withdraw money and chunk border/connected checking.
This commit is contained in:
@ -224,6 +224,8 @@ public class Board extends Entity<Board> implements BoardInterface
|
||||
@Override
|
||||
public boolean isBorderPs(PS ps)
|
||||
{
|
||||
ps = ps.getChunk(true);
|
||||
|
||||
PS nearby = null;
|
||||
Faction faction = this.getFactionAt(ps);
|
||||
|
||||
@ -246,6 +248,8 @@ public class Board extends Entity<Board> implements BoardInterface
|
||||
@Override
|
||||
public boolean isConnectedPs(PS ps, Faction faction)
|
||||
{
|
||||
ps = ps.getChunk(true);
|
||||
|
||||
PS nearby = null;
|
||||
|
||||
nearby = ps.withChunkX(ps.getChunkX() +1);
|
||||
|
@ -668,7 +668,7 @@ public class UPlayer extends SenderEntity<UPlayer> implements EconomyParticipato
|
||||
(
|
||||
uconf.claimsMustBeConnected
|
||||
&& newFaction.getLandCountInWorld(ps.getWorld()) > 0
|
||||
&& !BoardColls.get().isConnectedPs(ps, newFaction)
|
||||
&& !BoardColls.get().isConnectedPs(chunk, newFaction)
|
||||
&& (!uconf.claimsCanBeUnconnectedIfOwnedByOtherFaction || !oldFaction.isNormal())
|
||||
)
|
||||
{
|
||||
@ -706,7 +706,7 @@ public class UPlayer extends SenderEntity<UPlayer> implements EconomyParticipato
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! BoardColls.get().isBorderPs(ps))
|
||||
if ( ! BoardColls.get().isBorderPs(chunk))
|
||||
{
|
||||
msg("<b>You must start claiming land at the border of the territory.");
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user