mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Fixed ice spell casts allowing frozen victim movement for 1 tick
Fixed ice barrage animations Players who get successfully frozen by an ice spell now receive the message "You have been frozen!"
This commit is contained in:
parent
5533a2f78a
commit
1765f3a3b6
2 changed files with 210 additions and 209 deletions
|
|
@ -130,14 +130,12 @@ public final class IceSpells extends CombatSpell {
|
|||
if (state.getEstimatedHit() == -1) {
|
||||
return;
|
||||
}
|
||||
int ticks = (1 + (type.ordinal() - SpellType.RUSH.ordinal())) * 8;
|
||||
if (state.getEstimatedHit() > -1) {
|
||||
if (!hasTimerActive(victim, "frozen:immunity")) {
|
||||
registerTimer(victim, spawnTimer("frozen", ticks, true));
|
||||
} else if (type == SpellType.BARRAGE) {
|
||||
state.setFrozen(true);
|
||||
}
|
||||
}
|
||||
int ticks = (type.ordinal() - 4) * 8;
|
||||
if (hasTimerActive(victim, "frozen") || hasTimerActive(victim, "frozen:immunity")) {
|
||||
if (type == SpellType.BARRAGE) { state.setFrozen(true); }
|
||||
return;
|
||||
}
|
||||
registerTimer(victim, spawnTimer("frozen", ticks, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ class Frozen : PersistTimer (1, "frozen", flags = arrayOf(TimerFlag.ClearOnDeath
|
|||
removeTimer(entity, this)
|
||||
return
|
||||
}
|
||||
if (entity is Player) {
|
||||
sendMessage(entity as Player, "You have been frozen!")
|
||||
}
|
||||
}
|
||||
|
||||
override fun run (entity: Entity) : Boolean {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue