SecretsOTheP 2013-11-22 15:32:02 -05:00
parent 093af6af0b
commit 2f8cbb3a9d
2 changed files with 18 additions and 15 deletions

View File

@ -580,6 +580,7 @@ void Client::CalcAABonuses(StatBonuses* newbon) {
uint32 slots = 0;
uint32 aa_AA = 0;
uint32 aa_value = 0;
if(this->aa) {
for (i = 0; i < MAX_PP_AA_ARRAY; i++) { //iterate through all of the client's AAs
if (this->aa[i]) { // make sure aa exists or we'll crash zone
aa_AA = this->aa[i]->AA; //same as aaid from the aa_effects table
@ -592,6 +593,7 @@ void Client::CalcAABonuses(StatBonuses* newbon) {
}
}
}
}
}

View File

@ -494,13 +494,14 @@ 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)) {
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()) {
Message_StringID(13, CAST_OUTDOORS);