mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[9736] Added more usable interface for grid visits
(based on SilverIce's repo commit f20f01e) Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
9a0de445b8
commit
e3f3f3410a
19 changed files with 88 additions and 406 deletions
|
|
@ -114,18 +114,8 @@ void DynamicObject::Update(uint32 p_time)
|
|||
if(m_radius)
|
||||
{
|
||||
// TODO: make a timer and update this in larger intervals
|
||||
CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::DynamicObjectUpdater notifier(*this, caster);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::DynamicObjectUpdater, WorldTypeMapContainer > world_object_notifier(notifier);
|
||||
TypeContainerVisitor<MaNGOS::DynamicObjectUpdater, GridTypeMapContainer > grid_object_notifier(notifier);
|
||||
|
||||
cell.Visit(p, world_object_notifier, *GetMap(), *this, m_radius);
|
||||
cell.Visit(p, grid_object_notifier, *GetMap(), *this, m_radius);
|
||||
Cell::VisitAllObjects(this, notifier, m_radius);
|
||||
}
|
||||
|
||||
if(deleteThis)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue