(cherry picked from commit 9299e9bde0)
This commit is contained in:
Shauren
2017-05-13 19:37:33 +02:00
committed by ariel-
parent 7874bee7bf
commit d6201e5dbb
57 changed files with 236 additions and 404 deletions

View File

@@ -2777,28 +2777,6 @@ char const* Map::GetMapName() const
return i_mapEntry ? i_mapEntry->name[sWorld->GetDefaultDbcLocale()] : "UNNAMEDMAP\x0";
}
void Map::UpdateObjectVisibility(WorldObject* obj, Cell cell, CellCoord cellpair)
{
cell.SetNoCreate();
Trinity::VisibleChangesNotifier notifier(*obj);
TypeContainerVisitor<Trinity::VisibleChangesNotifier, WorldTypeMapContainer > player_notifier(notifier);
cell.Visit(cellpair, player_notifier, *this, *obj, obj->GetVisibilityRange());
}
void Map::UpdateObjectsVisibilityFor(Player* player, Cell cell, CellCoord cellpair)
{
Trinity::VisibleNotifier notifier(*player);
cell.SetNoCreate();
TypeContainerVisitor<Trinity::VisibleNotifier, WorldTypeMapContainer > world_notifier(notifier);
TypeContainerVisitor<Trinity::VisibleNotifier, GridTypeMapContainer > grid_notifier(notifier);
cell.Visit(cellpair, world_notifier, *this, *player->m_seer, player->GetSightRange());
cell.Visit(cellpair, grid_notifier, *this, *player->m_seer, player->GetSightRange());
// send data
notifier.SendToSelf();
}
void Map::SendInitSelf(Player* player)
{
TC_LOG_DEBUG("maps", "Creating player data for himself %u", player->GetGUID().GetCounter());