mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Add proper sound effect for running out of prayer, and clear the overhead icon when that happens.
This commit is contained in:
parent
9b72e609a5
commit
0c6cb0099c
1 changed files with 13 additions and 3 deletions
|
|
@ -8,11 +8,13 @@ import core.game.node.entity.combat.ImpactHandler.HitsplatType;
|
|||
import core.game.node.entity.impl.Projectile;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
import core.game.world.update.flag.context.Graphics;
|
||||
import core.tools.RandomFunction;
|
||||
import rs09.game.node.entity.skill.skillcapeperks.SkillcapePerks;
|
||||
import rs09.game.world.GameWorld;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -62,8 +64,15 @@ public final class Prayer {
|
|||
player.getConfigManager().set(type.getConfig(), 0);
|
||||
}
|
||||
getActive().clear();
|
||||
player.getAppearance().setHeadIcon(-1);
|
||||
player.getAppearance().sync();
|
||||
// Clear the overhead prayer icon a tick later
|
||||
GameWorld.getPulser().submit(new Pulse(1) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
player.getAppearance().setHeadIcon(-1);
|
||||
player.getAppearance().sync();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -119,6 +128,7 @@ public final class Prayer {
|
|||
|
||||
if(prayerActiveTicks > 0 && prayerActiveTicks % 2 == 0){
|
||||
if(getPlayer().getSkills().getPrayerPoints() == 0){
|
||||
getPlayer().getAudioManager().send(2672);
|
||||
reset();
|
||||
return;
|
||||
}
|
||||
|
|
@ -190,4 +200,4 @@ public final class Prayer {
|
|||
return active;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue