SecretsOTheP
2013-11-22 15:32:02 -05:00
parent 093af6af0b
commit 2f8cbb3a9d
2 changed files with 18 additions and 15 deletions
+7 -6
View File
@@ -494,12 +494,13 @@ bool Mob::DoCastingChecks()
uint16 spell_id = casting_spell_id;
Mob *spell_target = entity_list.GetMob(casting_spell_targetid);
if (RuleB(Spells, BuffLevelRestrictions) &&
!spell_target->CheckSpellLevelRestriction(spell_id)) {
mlog(SPELLS__BUFFS, "Spell %d failed: recipient did not meet the level restrictions", spell_id);
if (!IsBardSong(spell_id))
Message_StringID(MT_SpellFailure, SPELL_TOO_POWERFUL);
return false;
if (RuleB(Spells, BuffLevelRestrictions)) {
if(spell_target && !spell_target->CheckSpellLevelRestriction(spell_id)) {
mlog(SPELLS__BUFFS, "Spell %d failed: recipient did not meet the level restrictions", spell_id);
if (!IsBardSong(spell_id))
Message_StringID(MT_SpellFailure, SPELL_TOO_POWERFUL);
return false;
}
}
if (spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor()) {