From 8c5e402bb6932290bb8305579e84cfa489307680 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 5 Mar 2024 19:11:43 -0600 Subject: [PATCH] null fix --- src/engine/objects/PlayerCharacter.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 5e98a329..5f85f462 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -4813,11 +4813,14 @@ public class PlayerCharacter extends AbstractCharacter { updateBlessingMessage(); this.safeZone = this.isInSafeZone(); - boolean forbiddenRealm = false; - if(Realm.overridePlacement(getRealmAtLocation(this.getLoc()).getRealmName())) - forbiddenRealm = true; - if(forbiddenRealm && this.containsEffect(1672601862) == false) {//Deathshroud - PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false); + Realm currentRealm = getRealmAtLocation(this.getLoc()); + if(currentRealm != null) { + boolean forbiddenRealm = false; + if (Realm.overridePlacement(currentRealm.getRealmName())) + forbiddenRealm = true; + if (forbiddenRealm && this.containsEffect(1672601862) == false) {//Deathshroud + PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false); + } } //if(this.isBoxed && this.containsEffect(429611355) == false) {//pathfinding // PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 429611355, 40, false);