diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 777a7c702..317449c67 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2664,22 +2664,23 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& pTarget = m_caster->getVictim(); else if (m_caster->GetTypeId() == TYPEID_PLAYER) pTarget = ObjectAccessor::GetUnit(*m_caster, ((Player*)m_caster)->GetSelectionGuid()); + else if (m_targets.getUnitTarget()) + pTarget = m_caster; if (pTarget) { float angle = 0.0f; - float dist = (radius && targetMode != TARGET_BEHIND_VICTIM) ? radius : CONTACT_DISTANCE; switch (targetMode) { - case TARGET_INFRONT_OF_VICTIM: break; + case TARGET_INFRONT_OF_VICTIM: break; case TARGET_BEHIND_VICTIM: angle = M_PI_F; break; case TARGET_RIGHT_FROM_VICTIM: angle = -M_PI_F / 2; break; case TARGET_LEFT_FROM_VICTIM: angle = M_PI_F / 2; break; } float _target_x, _target_y, _target_z; - pTarget->GetClosePoint(_target_x, _target_y, _target_z, pTarget->GetObjectBoundingRadius(), dist, angle); + pTarget->GetClosePoint(_target_x, _target_y, _target_z, pTarget->GetObjectBoundingRadius(), radius, angle); if (pTarget->IsWithinLOS(_target_x, _target_y, _target_z)) { targetUnitMap.push_back(m_caster); @@ -8144,6 +8145,16 @@ void Spell::GetSpellRangeAndRadius(SpellEffectEntry const* spellEffect, float& r } break; } + case SPELLFAMILY_DRUID: + { + switch (m_spellInfo->Id) + { + case 49376: // Feral Charge - Cat + // No default radius for this spell, so we need to use the contact distance + radius = CONTACT_DISTANCE; + break; + } + } default: break; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 6a3693b42..b993ce892 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12572" + #define REVISION_NR "12573" #endif // __REVISION_NR_H__