mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
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)
|
||||
{
|
||||
if (GetExplTargetUnit())
|
||||
targets.remove(GetExplTargetUnit());
|
||||
targets.remove_if([&](WorldObject const* target)
|
||||
{
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user