/* If this is a mob that has this affect set in its mob file, do not perform
* the affect. This prevents people from un-sancting mobs by sancting them
* and waiting for it to fade, for example. */
if (IS_NPC(victim) && !affected_by_spell(victim, spellnum))
for (i = 0; i < MAX_SPELL_AFFECTS; i++)
if (AFF_FLAGGED(victim, af[i].bitvector)) {
send_to_char(ch, "%s", CONFIG_NOEFFECT);
return;
}
For example, if you cast "armor" on a mob, you will get "Okay." But if you then cast "bless" on that mob, you will get the CONFIG_NOEFFECT message. This occurs because both BLESS and ARMOR do not set the af[0].bitvector for each spell effect, which therefore defaults to 0.
Fortunately, the fix is very easy:
if (IS_NPC(victim) && !affected_by_spell(victim, spellnum))
for (i = 0; i < MAX_SPELL_AFFECTS; i++)
- if (AFF_FLAGGED(victim, af[i].bitvector)) {
+ if (AFF_FLAGGED(victim, af[i].bitvector) && (af[i].bitvector > 0) {
send_to_char(ch, "%s", CONFIG_NOEFFECT);
return;
}

