mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[8678] Move objects updates store and proccessing for send to client in per map way.
This commit is contained in:
parent
abb77cfdbf
commit
8bf52f7c63
10 changed files with 80 additions and 61 deletions
|
|
@ -428,6 +428,16 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||
DynamicObject* GetDynamicObject(uint64 guid);
|
||||
|
||||
TypeUnorderedMapContainer<AllMapStoredObjectTypes>& GetObjectsStore() { return m_objectsStore; }
|
||||
|
||||
void AddUpdateObject(Object *obj)
|
||||
{
|
||||
i_objectsToClientUpdate.insert(obj);
|
||||
}
|
||||
|
||||
void RemoveUpdateObject(Object *obj)
|
||||
{
|
||||
i_objectsToClientUpdate.erase( obj );
|
||||
}
|
||||
private:
|
||||
void LoadMapAndVMap(int gx, int gy);
|
||||
void LoadVMap(int gx, int gy);
|
||||
|
|
@ -472,6 +482,8 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||
void setNGrid(NGridType* grid, uint32 x, uint32 y);
|
||||
void ScriptsProcess();
|
||||
|
||||
void SendObjectUpdates();
|
||||
std::set<Object *> i_objectsToClientUpdate;
|
||||
protected:
|
||||
void SetUnloadReferenceLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue