Avoid NPE
This commit is contained in:
parent
c0a6e0481c
commit
b5cade3793
@ -110,8 +110,11 @@ public class EngineCanCombatHappen extends Engine
|
|||||||
Faction defenderPsFaction = BoardColl.get().getFactionAt(defenderPs);
|
Faction defenderPsFaction = BoardColl.get().getFactionAt(defenderPs);
|
||||||
|
|
||||||
// ... fast evaluate if the attacker is overriding ...
|
// ... fast evaluate if the attacker is overriding ...
|
||||||
|
if (MUtil.isPlayer(eattacker))
|
||||||
|
{
|
||||||
MPlayer mplayer = MPlayer.get(eattacker);
|
MPlayer mplayer = MPlayer.get(eattacker);
|
||||||
if (mplayer != null && mplayer.isOverriding()) return true;
|
if (mplayer != null && mplayer.isOverriding()) return true;
|
||||||
|
}
|
||||||
|
|
||||||
// ... PVP flag may cause a damage block ...
|
// ... PVP flag may cause a damage block ...
|
||||||
if (defenderPsFaction.getFlag(MFlag.getFlagPvp()) == false)
|
if (defenderPsFaction.getFlag(MFlag.getFlagPvp()) == false)
|
||||||
|
@ -43,7 +43,8 @@ public class MPlayer extends SenderEntity<MPlayer> implements FactionsParticipat
|
|||||||
// META
|
// META
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static MPlayer get(Object oid) {
|
public static MPlayer get(Object oid)
|
||||||
|
{
|
||||||
return MPlayerColl.get().get(oid);
|
return MPlayerColl.get().get(oid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user