Allow poofClear to cope with regions not being loaded, preventing the anim from being queued until somebody enters the region

This commit is contained in:
Player Name 2026-06-28 17:58:58 +02:00
parent 868845eaa9
commit f76ac0efcf
2 changed files with 7 additions and 2 deletions

View file

@ -372,7 +372,9 @@ class RevenantController : TickListener, Commands {
if (routeIdx == -1) {
GameWorld.Pulser.submit(object : Pulse() {
override fun pulse(): Boolean {
Graphics.send(Graphics(86), revenantNPC.location)
if (revenantNPC.location.region.isActive) {
Graphics.send(Graphics(86), revenantNPC.location)
}
return true
}
})

View file

@ -541,7 +541,10 @@ fun poofClear(npc: NPC) {
override fun pulse(): Boolean {
when (counter++) {
2 -> {
npc.isInvisible = true; Graphics.send(Graphics(86), npc.location)
npc.isInvisible = true;
if (npc.location.region.isActive) {
Graphics.send(Graphics(86), npc.location)
}
}
3 -> npc.clear().also { return true }
}