mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
fix(Core/Entities): mobs called for help should check if can see and detect the enemy (#7493)
- Updates #7125
This commit is contained in:
@@ -2233,6 +2233,12 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
|
||||
if (!IsHostileTo(enemy))
|
||||
return false;
|
||||
|
||||
// Check if can see the enemy
|
||||
if (!CanSeeOrDetect(enemy))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user