Update spell_effects.cpp (#1877)

updated
This commit is contained in:
KayenEQ 2021-12-12 13:22:43 -05:00 committed by GitHub
parent 8de410ebb7
commit 91c958ae63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1622,6 +1622,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Model Size: %d%%", effect_value);
#endif
if (effect_value && effect_value != 100) {
// Only allow 2 size changes from Base Size
float modifyAmount = (static_cast<float>(effect_value) / 100.0f);
float maxModAmount = GetBaseSize() * modifyAmount * modifyAmount;
@ -1632,6 +1633,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
{
ChangeSize(GetSize() * modifyAmount);
}
}
//Only applies to SPA 89, max value also likely does something, but unknown.
else if (effect == SE_ModelSize && spells[spell_id].limit_value[i]) {
ChangeSize(spells[spell_id].limit_value[i]);
}
break;
}