mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9725] removed PlayerNotifier and related Map::UpdatePlayerVisibility function, used UpdateObjectVisibility instead
(based on SilverIce's repo commit e226019) Signed-off-by: VladimirMangos <vladimir@getmangos.com> Note: this changes not affect in any good/bad way recent problem with player guids.
This commit is contained in:
parent
20162b6db4
commit
53eeebf2fe
6 changed files with 6 additions and 58 deletions
|
|
@ -444,7 +444,7 @@ bool Map::Add(Player *player)
|
|||
SendInitSelf(player);
|
||||
SendInitTransports(player);
|
||||
|
||||
UpdatePlayerVisibility(player,cell,p);
|
||||
UpdateObjectVisibility(player,cell,p);
|
||||
UpdateObjectsVisibilityFor(player,cell,p);
|
||||
|
||||
AddNotifier(player,cell,p);
|
||||
|
|
@ -758,6 +758,7 @@ void Map::Remove(Player *player, bool remove)
|
|||
RemoveFromGrid(player,grid,cell);
|
||||
|
||||
SendRemoveTransports(player);
|
||||
UpdateObjectVisibility(player,cell,p);
|
||||
UpdateObjectsVisibilityFor(player,cell,p);
|
||||
|
||||
player->ResetMap();
|
||||
|
|
@ -838,9 +839,10 @@ Map::PlayerRelocation(Player *player, float x, float y, float z, float orientati
|
|||
}
|
||||
|
||||
// if move then update what player see and who seen
|
||||
UpdatePlayerVisibility(player,new_cell,new_val);
|
||||
UpdateObjectsVisibilityFor(player,new_cell,new_val);
|
||||
UpdateObjectVisibility(player, new_cell, new_val);
|
||||
PlayerRelocationNotify(player,new_cell,new_val);
|
||||
|
||||
NGridType* newGrid = getNGrid(new_cell.GridX(), new_cell.GridY());
|
||||
if( !same_cell && newGrid->GetGridState()!= GRID_STATE_ACTIVE )
|
||||
{
|
||||
|
|
@ -2023,16 +2025,6 @@ void Map::UpdateObjectVisibility( WorldObject* obj, Cell cell, CellPair cellpair
|
|||
cell.Visit(cellpair, player_notifier, *this, *obj, GetVisibilityDistance());
|
||||
}
|
||||
|
||||
void Map::UpdatePlayerVisibility( Player* player, Cell cell, CellPair cellpair )
|
||||
{
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
MaNGOS::PlayerNotifier pl_notifier(*player);
|
||||
TypeContainerVisitor<MaNGOS::PlayerNotifier, WorldTypeMapContainer > player_notifier(pl_notifier);
|
||||
|
||||
cell.Visit(cellpair, player_notifier, *this, *player, GetVisibilityDistance());
|
||||
}
|
||||
|
||||
void Map::UpdateObjectsVisibilityFor( Player* player, Cell cell, CellPair cellpair )
|
||||
{
|
||||
MaNGOS::VisibleNotifier notifier(*player);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue