Core/Spells: Partially implement SPELL_ATTR_EX_USE_RADIUS_AS_MAX_DISTANCE. Currently used for correctly setting destination, still needs handling for shared sight removal/controlled unit despawn when max distance is reached

--HG--
branch : trunk
This commit is contained in:
Shocker
2010-11-14 23:31:32 +02:00
parent e72106c5e9
commit a3ade4a49a
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -2145,7 +2145,10 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
float angle, dist;
float objSize = m_caster->GetObjectSize();
dist = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
if (m_spellInfo->AttributesEx & SPELL_ATTR_EX_USE_RADIUS_AS_MAX_DISTANCE)
dist = 0.0f;
else
dist = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, dist, this);
if (dist < objSize)
dist = objSize;