mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Fixed a null reference exception due to misuse of combat callbacks to update interfaces
This commit is contained in:
parent
e03187920b
commit
c2cb359bf7
2 changed files with 3 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue