visibility range check, fac4700 follow-up

This commit is contained in:
Treeston authored and Aokromes committed 2018-07-29 19:04:21 +02:00
1 parent 6cb585aa96
commit 64780d7b31
1 file changed
+1 -1
+1 -1
View File
@@ -859,7 +859,7 @@ void Map::Update(uint32 t_diff)
for (std::pair<uint32, AuraApplication*> pair : player->GetAppliedAuras())
{
if (Unit* caster = pair.second->GetBase()->GetCaster())
if (caster->GetTypeId() != TYPEID_PLAYER)
if (caster->GetTypeId() != TYPEID_PLAYER && !caster->IsWithinDistInMap(player, GetVisibilityRange(), false))
toVisit.insert(caster);
}
for (Unit* unit : toVisit)