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:
@@ -307,7 +307,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
|
||||
#define SPELL_ATTR_EX_NO_THREAT 0x00000400 // 10 no generates threat on cast 100% (old NO_INITIAL_AGGRO)
|
||||
#define SPELL_ATTR_EX_UNK11 0x00000800 // 11 aura
|
||||
#define SPELL_ATTR_EX_UNK12 0x00001000 // 12
|
||||
#define SPELL_ATTR_EX_UNK13 0x00002000 // 13
|
||||
#define SPELL_ATTR_EX_USE_RADIUS_AS_MAX_DISTANCE 0x00002000 // 13
|
||||
#define SPELL_ATTR_EX_STACK_FOR_DIFF_CASTERS 0x00004000 // 14
|
||||
#define SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY 0x00008000 // 15 remove auras on immunity
|
||||
#define SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE 0x00010000 // 16 on immuniy
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user