[Cleanup] Move unreachable code in ApplySpellsBonuses() (#3229)

# Notes
- This code was unreachable since it was inside the switch and should have been checked on its own in the condition where we verify we are using AISpellEffects.
This commit is contained in:
Alex King 2023-04-05 11:14:28 -04:00 committed by GitHub
parent 1f29a40e6d
commit 025ef5e1d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2115,10 +2115,17 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
//Use AISpellEffects
else {
spell_effect_id = effect_id;
effect_value = se_base;
limit_value = se_limit;
max_value = se_max;
i = (EFFECT_COUNT - 1); // AISpellEffects do a single pass
effect_value = se_base;
limit_value = se_limit;
max_value = se_max;
//Special custom cases for loading effects on to NPC from 'npc_spels_effects' table
//Non-Focused Effect to modify incoming spell damage by resist type.
if (spell_effect_id == SE_FcSpellVulnerability) {
ModVulnerability(limit_value, effect_value);
}
break;
}
switch (spell_effect_id)
@ -4068,15 +4075,6 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
case SE_TrapCircumvention:
new_bonus->TrapCircumvention += effect_value;
break;
//Special custom cases for loading effects on to NPC from 'npc_spels_effects' table
if (IsAISpellEffect) {
//Non-Focused Effect to modify incoming spell damage by resist type.
case SE_FcSpellVulnerability:
ModVulnerability(limit_value, effect_value);
break;
}
}
}
}