Fixed a null reference exception due to misuse of combat callbacks to update interfaces

This commit is contained in:
Ceikry 2023-03-03 12:54:45 +00:00 committed by Ryan
parent e03187920b
commit c2cb359bf7
2 changed files with 3 additions and 2 deletions

View file

@ -88,7 +88,7 @@ public final class PCPortalNPC extends AbstractNPC {
/**
* If the lifepoints should be updated.
*/
private boolean updateLifepoints = true;
public boolean updateLifepoints = true;
/**
* The pest control session.

View file

@ -1,5 +1,6 @@
package content.minigame.pestcontrol.monsters;
import content.minigame.pestcontrol.PCPortalNPC;
import content.minigame.pestcontrol.PestControlSession;
import core.game.interaction.MovementPulse;
import core.game.node.entity.Entity;
@ -90,7 +91,7 @@ public final class PCSpinnerNPC extends AbstractNPC {
faceTemporary(portal, 1);
visualize(new Animation(3911, Priority.HIGH), Graphics.create(658));
portal.getSkills().heal(portal.getSkills().getMaximumLifepoints() / 10);
portal.onImpact(this, null);
((PCPortalNPC) portal).updateLifepoints = true;
}
/**