fearstun update (#1889)

This commit is contained in:
KayenEQ 2021-12-15 13:17:15 -05:00 committed by GitHub
parent feed584a41
commit 3414d3a1ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2883,8 +2883,15 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
caster->MessageString(Chat::SpellFailure, IMMUNE_FEAR);
break;
}
int max_level = 0;
if (spells[spell_id].max_value[i] >= 1000) {
max_level = spells[spell_id].max_value[i] - 1000;
}
else {
max_level = caster->GetLevel() + spells[spell_id].max_value[i];
}
if (spells[spell_id].max_value[i] == 0 || GetLevel() <= spells[spell_id].max_value[i]) {
if (spells[spell_id].max_value[i] == 0 || GetLevel() <= max_level) {
if (IsClient() && spells[spell_id].limit_value[i])
Stun(spells[spell_id].limit_value[i]);
else