fix(Scripts/TK): KT Mindcontrol should respect Line of Sight (#19398)

This commit is contained in:
avarishd
2024-07-14 11:41:10 +03:00
committed by GitHub
parent 758088c2eb
commit f109768665

View File

@@ -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*/)