[Bug Fix] Bard Invisible causing display issues. (#2067)

* [Bug Fix] Bard Invisible causing display issues.

Error occurring due to bard modifiers being applied to invisible spell effect value.

* [Bug Fix] Bard Invisible causing display issues.
This commit is contained in:
KayenEQ 2022-04-01 18:01:38 -04:00 committed by GitHub
parent 5dc76e595b
commit bbe2db7c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -1465,6 +1465,15 @@ bool IsInstrumentModAppliedToSpellEffect(int32 spell_id, int effect)
case SE_BardSongRange: case SE_BardSongRange:
case SE_TemporaryPets: case SE_TemporaryPets:
case SE_SpellOnDeath: case SE_SpellOnDeath:
case SE_Invisibility:
case SE_Invisibility2:
case SE_InvisVsUndead:
case SE_InvisVsUndead2:
case SE_InvisVsAnimals:
case SE_ImprovedInvisAnimals:
case SE_SeeInvis:
case SE_Levitate:
case SE_WaterBreathing:
return false; return false;
default: default:
return true; return true;

View File

@ -3847,6 +3847,7 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
break; break;
case SE_InvisVsAnimals: case SE_InvisVsAnimals:
case SE_ImprovedInvisAnimals:
effect_value = std::min({ effect_value, MAX_INVISIBILTY_LEVEL }); effect_value = std::min({ effect_value, MAX_INVISIBILTY_LEVEL });
if (new_bonus->invisibility_verse_animal < effect_value) if (new_bonus->invisibility_verse_animal < effect_value)
new_bonus->invisibility_verse_animal = effect_value; new_bonus->invisibility_verse_animal = effect_value;