v2.3.0: fixed damage negated by invuln still waking up sleeping mobs

This commit is contained in:
Evan Debenham
2023-11-16 17:06:59 -05:00
parent ec9da9b04e
commit cd2244f545

View File

@@ -743,11 +743,13 @@ public abstract class Mob extends Char {
@Override
public void damage( int dmg, Object src ) {
if (state == SLEEPING) {
state = WANDERING;
}
if (state != HUNTING && !(src instanceof Corruption)) {
alerted = true;
if (!isInvulnerable(src.getClass())) {
if (state == SLEEPING) {
state = WANDERING;
}
if (state != HUNTING && !(src instanceof Corruption)) {
alerted = true;
}
}
super.damage( dmg, src );