fix(Core/Spells): Seed of Corruption detonation should obey LoS (#10916)
- Source: TrinityCore - Closes #4521
This commit is contained in:
@@ -660,8 +660,21 @@ class spell_warl_seed_of_corruption : public SpellScript
|
|||||||
|
|
||||||
void FilterTargets(std::list<WorldObject*>& targets)
|
void FilterTargets(std::list<WorldObject*>& targets)
|
||||||
{
|
{
|
||||||
if (GetExplTargetUnit())
|
targets.remove_if([&](WorldObject const* target)
|
||||||
targets.remove(GetExplTargetUnit());
|
{
|
||||||
|
if (Unit const* unitTarget = target->ToUnit())
|
||||||
|
{
|
||||||
|
if (WorldLocation const* dest = GetExplTargetDest())
|
||||||
|
{
|
||||||
|
if (!unitTarget->IsWithinLOS(dest->GetPositionX(), dest->GetPositionY(), dest->GetPositionZ()))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
|
|||||||
Reference in New Issue
Block a user