Taking poison damage now stops home teleport

Home teleport now halts player movement
Fixed bug preventing teleport in some cases when being chased by NPC
This commit is contained in:
Player Name
2026-06-09 06:41:33 +00:00
committed by Ryan
parent acc02e00d3
commit c84539003f
3 changed files with 9 additions and 3 deletions
@@ -24,6 +24,8 @@ fun getAudio(count: Int): Int {
}
fun homeTeleport(player: Player, dest: Location) {
player.walkingQueue.reset()
player.pulseManager.clear()
if (player.timers.getTimer("teleblock") != null) {
sendMessage(player, "A magical force prevents you from teleporting.")
return
@@ -43,4 +45,4 @@ fun homeTeleport(player: Player, dest: Location) {
player.packetDispatch.sendAnimation(HOME_ANIMATIONS[stage])
return@queueScript delayScript(player, 1)
}
}
}
@@ -296,10 +296,13 @@ class CombatPulse(
}
setVictim(victim)
entity.onAttack(victim as Entity?)
victim.scripts.removeWeakScripts()
if (isAttacking) {
victim.scripts.removeWeakScripts()
}
if (!isAttacking)
if (!isAttacking) {
entity.pulseManager.run(this)
}
}
/**
@@ -57,6 +57,7 @@ class Poison : PersistTimer (30, "poison", flags = arrayOf(TimerFlag.ClearOnDeat
}
override fun run (entity: Entity) : Boolean {
entity.scripts.removeWeakScripts()
entity.impactHandler.manualHit (
damageSource,
getDamageFromSeverity (severity--),