mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
fix(Core/Entities): contested guards attacking after bg/recent pvp (#7518)
* fix(Core/Entities): contested guards attacking after bg/recent pvp * fix(Core/Entities): contested guards attacking after bg/recent pvp * Update Unit.cpp * fix(Core/Entities): contested guards attacking after bg/recent pvp * fix(Core/Entities): contested guards attacking after bg/recent pvp * Update Unit.cpp
This commit is contained in:
@@ -1114,6 +1114,30 @@ namespace Acore
|
||||
NearestHostileUnitInAttackDistanceCheck(NearestHostileUnitInAttackDistanceCheck const&);
|
||||
};
|
||||
|
||||
class NearestVisibleDetectableContestedGuardUnitCheck
|
||||
{
|
||||
public:
|
||||
explicit NearestVisibleDetectableContestedGuardUnitCheck(Unit const* unit) : me(unit) {}
|
||||
bool operator()(Unit* u)
|
||||
{
|
||||
if (!u->CanSeeOrDetect(me, true, true, false))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!u->IsContestedGuard())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
Unit const* me;
|
||||
NearestVisibleDetectableContestedGuardUnitCheck(NearestVisibleDetectableContestedGuardUnitCheck const&);
|
||||
};
|
||||
|
||||
class AnyAssistCreatureInRangeCheck
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user