mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 15:16:24 +00:00
fix(Core/Spells): Fixed LoS problems with hunter traps. (#12348)
* fix(Core/Spells): Fixed LoS problems with hunter traps. Fixes #12332 * missing
This commit is contained in:
@@ -925,7 +925,19 @@ namespace Acore
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!i_obj->IsWithinDistInMap(u, i_range) || !i_owner->IsValidAttackTarget(u) || !i_obj->IsWithinLOSInMap(u))
|
||||
uint32 losChecks = LINEOFSIGHT_ALL_CHECKS;
|
||||
Optional<float> collisionHeight = { };
|
||||
if (i_obj->GetTypeId() == TYPEID_GAMEOBJECT)
|
||||
{
|
||||
losChecks &= ~LINEOFSIGHT_CHECK_GOBJECT_M2;
|
||||
if (i_owner->IsPlayer())
|
||||
{
|
||||
collisionHeight = i_owner->GetCollisionHeight();
|
||||
}
|
||||
}
|
||||
|
||||
if (!i_obj->IsWithinDistInMap(u, i_range) || !i_owner->IsValidAttackTarget(u) ||
|
||||
!i_obj->IsWithinLOSInMap(u, VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks(losChecks), collisionHeight))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user