Core/Spells: Spell radius calculation update

This commit is contained in:
Rat
2015-03-23 07:42:50 +01:00
parent 594a0a0a81
commit 930b74d0ca
2 changed files with 7 additions and 2 deletions

View File

@@ -1564,8 +1564,8 @@ struct SpellRadiusEntry
{
uint32 ID; // 0
//float Radius; // 1
float RadiusMin; // 2
float RadiusPerLevel; // 3
float RadiusPerLevel; // 2
float RadiusMin; // 3
float RadiusMax; // 4
};

View File

@@ -642,6 +642,11 @@ float SpellEffectInfo::CalcRadius(Unit* caster, Spell* spell) const
return 0.0f;
float radius = entry->RadiusMin;
// Client uses max if min is 0
if (radius == 0.0f)
radius = entry->RadiusMax;
if (caster)
{
radius += entry->RadiusPerLevel * caster->getLevel();