mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
feat(Core/LOS): restruct LOS functions and add LineOfSight check (#1459)
This commit is contained in:
committed by
Francesco Borzì
parent
6908d333db
commit
cb81f3c17a
@@ -202,7 +202,7 @@ public:
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!activated && who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (me->GetExactDist2d(who) <= 25.0f && me->GetMap()->isInLineOfSight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+5.0f, who->GetPositionX(), who->GetPositionY(), who->GetPositionZ()+5.0f, 2))
|
||||
if (me->GetExactDist2d(who) <= 25.0f && me->GetMap()->isInLineOfSight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+5.0f, who->GetPositionX(), who->GetPositionY(), who->GetPositionZ()+5.0f, 2, LINEOFSIGHT_ALL_CHECKS))
|
||||
{
|
||||
activated = true;
|
||||
me->RemoveAura(64615);
|
||||
|
||||
Reference in New Issue
Block a user