diff options
Diffstat (limited to 'src/server/game/Spells')
| -rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index be4c522956c..fcfa441455e 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -499,9 +499,14 @@ float SpellEffectInfo::CalcRadius(Unit* caster, Spell* spell) const if (!HasRadius()) return 0.0f; - float radius = RadiusEntry->radiusMax; - if (Player* modOwner = (caster ? caster->GetSpellModOwner() : NULL)) - modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell); + float radius = RadiusEntry->RadiusMin; + if (caster) + { + radius += RadiusEntry->RadiusPerLevel * caster->getLevel(); + radius = std::min(radius, RadiusEntry->RadiusMax); + if (Player* modOwner = caster->GetSpellModOwner()) + modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell); + } return radius; } |
