diff --git a/src/fight.c b/src/fight.c index 5380b2c..1e71167 100644 --- a/src/fight.c +++ b/src/fight.c @@ -683,9 +683,10 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty } /* shopkeeper and MOB_NOKILL protection */ - if (!ok_damage_shopkeeper(ch, victim) || MOB_FLAGGED(victim, MOB_NOKILL)) + if (!ok_damage_shopkeeper(ch, victim) || MOB_FLAGGED(victim, MOB_NOKILL)) { send_to_char(ch, "This mob is protected.\r\n"); return (0); + } /* You can't damage an immortal! */ if (!IS_NPC(victim) && ((GET_LEVEL(victim) >= LVL_IMMORT) && PRF_FLAGGED(victim, PRF_NOHASSLE))) diff --git a/src/spell_parser.c b/src/spell_parser.c index b8b8dce..e2a2e14 100644 --- a/src/spell_parser.c +++ b/src/spell_parser.c @@ -212,7 +212,7 @@ int call_magic(struct char_data *caster, struct char_data *cvict, act("White light from no particular source suddenly fills the room, then vanishes.", FALSE, caster, 0, 0, TO_ROOM); return (0); } - if (MOB_FLAGGED(cvict, MOB_NOKILL)) { + if (cvict && MOB_FLAGGED(cvict, MOB_NOKILL)) { send_to_char(caster, "This mob is protected.\r\n"); return (0); }