mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix: revert unwanted Spell changes (#2222)
- Partially reverts 7954a2a07e
This commit is contained in:
@@ -1844,17 +1844,9 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
|||||||
for (; itr != targets.end(); ++itr)
|
for (; itr != targets.end(); ++itr)
|
||||||
{
|
{
|
||||||
if (Unit* unitTarget = (*itr)->ToUnit())
|
if (Unit* unitTarget = (*itr)->ToUnit())
|
||||||
{
|
|
||||||
if (m_caster == *itr || m_caster->IsOnVehicle(unitTarget) || (unitTarget)->GetVehicle())//(*itr)->IsOnVehicle(m_caster))
|
if (m_caster == *itr || m_caster->IsOnVehicle(unitTarget) || (unitTarget)->GetVehicle())//(*itr)->IsOnVehicle(m_caster))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (Creature * creatureTarget = unitTarget->ToCreature())
|
|
||||||
{
|
|
||||||
if (!(creatureTarget->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_CAN_COLLIDE_WITH_MISSILES))
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const float size = std::max((*itr)->GetObjectSize() * 0.7f, 1.0f); // 1/sqrt(3)
|
const float size = std::max((*itr)->GetObjectSize() * 0.7f, 1.0f); // 1/sqrt(3)
|
||||||
// TODO: all calculation should be based on src instead of m_caster
|
// TODO: all calculation should be based on src instead of m_caster
|
||||||
const float objDist2d = fabs(m_targets.GetSrcPos()->GetExactDist2d(*itr) * cos(m_targets.GetSrcPos()->GetRelativeAngle(*itr)));
|
const float objDist2d = fabs(m_targets.GetSrcPos()->GetExactDist2d(*itr) * cos(m_targets.GetSrcPos()->GetRelativeAngle(*itr)));
|
||||||
|
|||||||
Reference in New Issue
Block a user