mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-01 14:39:13 -06:00
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:
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--),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue