*Make range check dependent from target.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-02-14 15:56:04 +01:00
parent f506fde01e
commit 14d85a183e
15 changed files with 198 additions and 131 deletions
+4 -4
View File
@@ -1776,8 +1776,8 @@ SpellEntry const *Creature::reachWithSpellAttack(Unit *pVictim)
if(spellInfo->manaCost > GetPower(POWER_MANA))
continue;
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
float range = GetSpellMaxRange(srange);
float minrange = GetSpellMinRange(srange);
float range = GetSpellMaxRangeForHostile(srange);
float minrange = GetSpellMinRangeForHostile(srange);
float dist = GetDistance(pVictim);
//if(!isInFront( pVictim, range ) && spellInfo->AttributesEx )
// continue;
@@ -1822,8 +1822,8 @@ SpellEntry const *Creature::reachWithSpellCure(Unit *pVictim)
if(spellInfo->manaCost > GetPower(POWER_MANA))
continue;
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
float range = GetSpellMaxRange(srange);
float minrange = GetSpellMinRange(srange);
float range = GetSpellMaxRangeForFriend(srange);
float minrange = GetSpellMinRangeForFriend( srange);
float dist = GetDistance(pVictim);
//if(!isInFront( pVictim, range ) && spellInfo->AttributesEx )
// continue;