[Bug Fix] Bard Caster Level Fixes (#3883)

Bards do not gain benefits from spells like Intellectual Superiority
This commit is contained in:
Fryguy 2024-01-07 12:13:44 -05:00 committed by GitHub
parent 0c3149a6e5
commit e52e4d5b3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6347,7 +6347,12 @@ bool Mob::UseBardSpellLogic(uint16 spell_id, int slot)
int Mob::GetCasterLevel(uint16 spell_id) {
int level = GetLevel();
if (GetClass() == Class::Bard) {
// Bards receive effective casting level increases to resists/effect. They don't receive benefit from spells like intellectual superiority, however.
level += itembonuses.effective_casting_level + aabonuses.effective_casting_level;
} else {
level += itembonuses.effective_casting_level + spellbonuses.effective_casting_level + aabonuses.effective_casting_level;
}
LogSpells("Determined effective casting level [{}]+[{}]+[{}]=[{}]", GetLevel(), spellbonuses.effective_casting_level, itembonuses.effective_casting_level, level);
return std::max(1, level);
}