mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16: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
|
|
@ -4750,9 +4750,7 @@ SpellCastResult Spell::CheckRange(bool strict)
|
|||
if(target && target != m_caster)
|
||||
{
|
||||
// distance from target in checks
|
||||
float dist = m_caster->GetDistance(target->GetPositionX(),target->GetPositionY(),target->GetPositionZ()) - target->GetFloatValue(UNIT_FIELD_COMBATREACH) - m_caster->GetFloatValue(UNIT_FIELD_COMBATREACH); // DasMy: respect victims dimension
|
||||
if (dist < 0.0f)
|
||||
dist = 0.0f;
|
||||
float dist = m_caster->GetCombatDistance(target);
|
||||
|
||||
if(dist > max_range)
|
||||
return SPELL_FAILED_OUT_OF_RANGE; //0x5A;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue