From f980dd9ac6c1679caac7a41d806d65c90a02939f Mon Sep 17 00:00:00 2001 From: maximius Date: Sun, 27 Sep 2009 02:24:25 -0700 Subject: *Merge [8524] New cell search algorithm implemented. You can now choose different visibility distances on continents, in BG/Arenas and instances. Author: Ambal *Some warning cleanup --HG-- branch : trunk --- src/game/DynamicObject.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/game/DynamicObject.cpp') diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index e616dc2f809..30147732b08 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -126,6 +126,27 @@ void DynamicObject::Update(uint32 p_time) else deleteThis = true; + /* + // have radius and work as persistent effect + 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 world_object_notifier(notifier); + TypeContainerVisitor grid_object_notifier(notifier); + + CellLock cell_lock(cell, p); + cell_lock->Visit(cell_lock, world_object_notifier, *GetMap(), *this, m_radius); + cell_lock->Visit(cell_lock, grid_object_notifier, *GetMap(), *this, m_radius); + } + */ + if (m_effMask) { if (m_updateTimer < p_time) -- cgit v1.2.3