Fixed probable Player getPlayerSide NPE.
This commit is contained in:
@@ -13584,11 +13584,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13587,11 +13587,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13590,11 +13590,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13562,11 +13562,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13588,11 +13588,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13591,11 +13591,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13597,11 +13597,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13633,11 +13633,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13749,11 +13749,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+15
-2
@@ -13787,11 +13787,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13849,11 +13849,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13849,11 +13849,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+15
-2
@@ -13401,11 +13401,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13401,11 +13401,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+15
-2
@@ -13387,11 +13387,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+15
-2
@@ -13435,11 +13435,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+15
-2
@@ -13435,11 +13435,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+15
-2
@@ -13445,11 +13445,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13397,11 +13397,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+15
-2
@@ -13716,11 +13716,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+15
-2
@@ -13794,11 +13794,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+15
-2
@@ -13916,11 +13916,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+15
-2
@@ -13916,11 +13916,24 @@ public class Player extends Playable
|
|||||||
*/
|
*/
|
||||||
public CastleSide getPlayerSide()
|
public CastleSide getPlayerSide()
|
||||||
{
|
{
|
||||||
if ((_clan == null) || (_clan.getCastleId() == 0))
|
if (_clan == null)
|
||||||
{
|
{
|
||||||
return CastleSide.NEUTRAL;
|
return CastleSide.NEUTRAL;
|
||||||
}
|
}
|
||||||
return CastleManager.getInstance().getCastleById(getClan().getCastleId()).getSide();
|
|
||||||
|
final int castleId = _clan.getCastleId();
|
||||||
|
if (castleId == 0)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||||
|
if (castle == null)
|
||||||
|
{
|
||||||
|
return CastleSide.NEUTRAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return castle.getSide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user