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) { fun homeTeleport(player: Player, dest: Location) {
player.walkingQueue.reset()
player.pulseManager.clear()
if (player.timers.getTimer("teleblock") != null) { if (player.timers.getTimer("teleblock") != null) {
sendMessage(player, "A magical force prevents you from teleporting.") sendMessage(player, "A magical force prevents you from teleporting.")
return return
@@ -296,11 +296,14 @@ class CombatPulse(
} }
setVictim(victim) setVictim(victim)
entity.onAttack(victim as Entity?) entity.onAttack(victim as Entity?)
if (isAttacking) {
victim.scripts.removeWeakScripts() victim.scripts.removeWeakScripts()
}
if (!isAttacking) if (!isAttacking) {
entity.pulseManager.run(this) entity.pulseManager.run(this)
} }
}
/** /**
* Sets the victim. * Sets the victim.
@@ -57,6 +57,7 @@ class Poison : PersistTimer (30, "poison", flags = arrayOf(TimerFlag.ClearOnDeat
} }
override fun run (entity: Entity) : Boolean { override fun run (entity: Entity) : Boolean {
entity.scripts.removeWeakScripts()
entity.impactHandler.manualHit ( entity.impactHandler.manualHit (
damageSource, damageSource,
getDamageFromSeverity (severity--), getDamageFromSeverity (severity--),