visibility range check, fac4700 follow-up

(cherry picked from commit b7c0f1961c)
This commit is contained in:
Treeston
2018-07-24 10:46:14 +02:00
committed by Shauren
parent f7e5931b49
commit 48ce1965ba

View File

@@ -884,7 +884,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)