Don't go below 1 for caster level

This is also wrong as fuck.
This commit is contained in:
Michael Cook (mackal) 2017-03-30 23:29:07 -04:00
parent b5fe975aac
commit 4666c0c050

View File

@ -5399,7 +5399,7 @@ int Mob::GetCasterLevel(uint16 spell_id) {
int level = GetLevel();
level += itembonuses.effective_casting_level + spellbonuses.effective_casting_level + aabonuses.effective_casting_level;
Log.Out(Logs::Detail, Logs::Spells, "Determined effective casting level %d+%d+%d=%d", GetLevel(), spellbonuses.effective_casting_level, itembonuses.effective_casting_level, level);
return(level);
return std::max(1, level);
}
//this method does NOT tell the client to stop singing the song.