mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7576] Fixed spell range check for spells with minimal distances
This commit is contained in:
parent
e65dc5747f
commit
5dd3ce31bc
5 changed files with 15 additions and 12 deletions
|
|
@ -1587,10 +1587,7 @@ SpellEntry const *Creature::reachWithSpellAttack(Unit *pVictim)
|
|||
float range = GetSpellMaxRange(srange);
|
||||
float minrange = GetSpellMinRange(srange);
|
||||
|
||||
// DasMy: respect victims dimensions
|
||||
float dist = GetDistance(pVictim) - pVictim->GetFloatValue(UNIT_FIELD_COMBATREACH) - GetFloatValue(UNIT_FIELD_COMBATREACH);
|
||||
if (dist < 0.0f)
|
||||
dist = 0.0f;
|
||||
float dist = GetCombatDistance(pVictim);
|
||||
|
||||
//if(!isInFront( pVictim, range ) && spellInfo->AttributesEx )
|
||||
// continue;
|
||||
|
|
@ -1638,10 +1635,7 @@ SpellEntry const *Creature::reachWithSpellCure(Unit *pVictim)
|
|||
float range = GetSpellMaxRange(srange);
|
||||
float minrange = GetSpellMinRange(srange);
|
||||
|
||||
// DasMy: respect victims dimensions
|
||||
float dist = GetDistance(pVictim) - pVictim->GetFloatValue(UNIT_FIELD_COMBATREACH) - GetFloatValue(UNIT_FIELD_COMBATREACH);
|
||||
if (dist < 0.0f)
|
||||
dist = 0.0f;
|
||||
float dist = GetCombatDistance(pVictim);
|
||||
|
||||
//if(!isInFront( pVictim, range ) && spellInfo->AttributesEx )
|
||||
// continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue