Fix a bug where you could not claim a startingpoint for your base in another world

This commit is contained in:
Olof Larsson 2013-05-29 14:31:09 +02:00
parent 34d2dcb97b
commit 66991fba02
3 changed files with 8 additions and 5 deletions

View File

@ -817,7 +817,7 @@ public class Faction extends Entity<Faction> implements EconomyParticipator
} }
public int getLandCountInWorld(String worldName) public int getLandCountInWorld(String worldName)
{ {
return BoardColls.get().get(worldName).getCount(this); return Board.get(worldName).getCount(this);
} }
public boolean hasLandInflation() public boolean hasLandInflation()

View File

@ -110,7 +110,7 @@ public class UConf extends Entity<UConf>
public boolean claimsMustBeConnected = true; public boolean claimsMustBeConnected = true;
public boolean claimingFromOthersAllowed = true; public boolean claimingFromOthersAllowed = true;
public boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true; public boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = false;
public int claimsRequireMinFactionMembers = 1; public int claimsRequireMinFactionMembers = 1;
public int claimedLandsMax = 0; public int claimedLandsMax = 0;

View File

@ -667,9 +667,12 @@ public class UPlayer extends SenderEntity<UPlayer> implements EconomyParticipato
if if
( (
uconf.claimsMustBeConnected uconf.claimsMustBeConnected
&& newFaction.getLandCountInWorld(ps.getWorld()) > 0 &&
&& !BoardColls.get().isConnectedPs(chunk, newFaction) newFaction.getLandCountInWorld(ps.getWorld()) > 0
&& (!uconf.claimsCanBeUnconnectedIfOwnedByOtherFaction || !oldFaction.isNormal()) &&
!BoardColls.get().isConnectedPs(chunk, newFaction)
&&
(!uconf.claimsCanBeUnconnectedIfOwnedByOtherFaction || oldFaction.isNone())
) )
{ {
if (uconf.claimsCanBeUnconnectedIfOwnedByOtherFaction) if (uconf.claimsCanBeUnconnectedIfOwnedByOtherFaction)