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);
|
||||
|
||||
// ... fast evaluate if the attacker is overriding ...
|
||||
MPlayer mplayer = MPlayer.get(eattacker);
|
||||
if (mplayer != null && mplayer.isOverriding()) return true;
|
||||
if (MUtil.isPlayer(eattacker))
|
||||
{
|
||||
MPlayer mplayer = MPlayer.get(eattacker);
|
||||
if (mplayer != null && mplayer.isOverriding()) return true;
|
||||
}
|
||||
|
||||
// ... PVP flag may cause a damage block ...
|
||||
if (defenderPsFaction.getFlag(MFlag.getFlagPvp()) == false)
|
||||
|
@ -43,7 +43,8 @@ public class MPlayer extends SenderEntity<MPlayer> implements FactionsParticipat
|
||||
// META
|
||||
// -------------------------------------------- //
|
||||
|
||||
public static MPlayer get(Object oid) {
|
||||
public static MPlayer get(Object oid)
|
||||
{
|
||||
return MPlayerColl.get().get(oid);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user