Fix aggro radius checks to do a line of sight check
This commit is contained in:
parent
c2068993ea
commit
d0b125c913
1 changed files with 2 additions and 2 deletions
|
@ -948,7 +948,7 @@ bool ZoneServer::CheckEnemyList(NPC* npc) {
|
|||
for (spawn_itr = spawns->begin(); spawn_itr != spawns->end(); spawn_itr++) {
|
||||
Spawn* spawn = GetSpawnByID(*spawn_itr);
|
||||
if (spawn) {
|
||||
if ((distance = spawn->GetDistance(npc)) <= npc->GetAggroRadius())
|
||||
if ((distance = spawn->GetDistance(npc)) <= npc->GetAggroRadius() && npc->CheckLoS(spawn))
|
||||
attack_spawns[distance] = spawn;
|
||||
}
|
||||
}
|
||||
|
@ -971,7 +971,7 @@ bool ZoneServer::CheckEnemyList(NPC* npc) {
|
|||
for (spawn_itr = spawns->begin(); spawn_itr != spawns->end(); spawn_itr++) {
|
||||
Spawn* spawn = GetSpawnByID(*spawn_itr);
|
||||
if (spawn) {
|
||||
if ((distance = spawn->GetDistance(npc)) <= npc->GetAggroRadius())
|
||||
if ((distance = spawn->GetDistance(npc)) <= npc->GetAggroRadius() && npc->CheckLoS(spawn))
|
||||
reverse_attack_spawns[distance] = spawn;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue