fix(Scripts/TK): KT Mindcontrol should respect Line of Sight (#19398)
This commit is contained in:
parent
758088c2eb
commit
f109768665
1 changed files with 8 additions and 1 deletions
|
|
@ -1140,7 +1140,14 @@ class spell_kaelthas_mind_control : public SpellScript
|
|||
{
|
||||
targets.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
}
|
||||
targets.remove_if(Acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
|
||||
|
||||
targets.remove_if([&](WorldObject const* target) -> bool
|
||||
{
|
||||
if (!target->ToPlayer())
|
||||
return true;
|
||||
|
||||
return (!GetCaster()->IsWithinLOSInMap(target));
|
||||
});
|
||||
}
|
||||
|
||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue