mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Move visibility update functions to more appropriate classes.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
4041121fd8
commit
63897d56d7
10 changed files with 47 additions and 44 deletions
|
|
@ -1852,7 +1852,7 @@ void WorldObject::SetPhaseMask(uint32 newPhaseMask, bool update)
|
|||
m_phaseMask = newPhaseMask;
|
||||
|
||||
if(update && IsInWorld())
|
||||
ObjectAccessor::UpdateObjectVisibility(this);
|
||||
UpdateObjectVisibility();
|
||||
}
|
||||
|
||||
void WorldObject::PlayDistanceSound( uint32 sound_id, Player* target /*= NULL*/ )
|
||||
|
|
@ -1875,3 +1875,12 @@ void WorldObject::PlayDirectSound( uint32 sound_id, Player* target /*= NULL*/ )
|
|||
else
|
||||
SendMessageToSet( &data, true );
|
||||
}
|
||||
|
||||
void WorldObject::UpdateObjectVisibility()
|
||||
{
|
||||
CellPair p = MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY());
|
||||
Cell cell(p);
|
||||
|
||||
GetMap()->UpdateObjectVisibility(this, cell, p);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue