mirror of
https://github.com/mangosfour/server.git
synced 2025-12-20 16:37:04 +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
|
|
@ -152,27 +152,10 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor,
|
|||
void RemoveObject(Player *pl)
|
||||
{
|
||||
HashMapHolder<Player>::Remove(pl);
|
||||
|
||||
Guard guard(i_updateGuard);
|
||||
i_objects.erase((Object *)pl);
|
||||
}
|
||||
|
||||
void SaveAllPlayers();
|
||||
|
||||
void AddUpdateObject(Object *obj)
|
||||
{
|
||||
Guard guard(i_updateGuard);
|
||||
i_objects.insert(obj);
|
||||
}
|
||||
|
||||
void RemoveUpdateObject(Object *obj)
|
||||
{
|
||||
Guard guard(i_updateGuard);
|
||||
i_objects.erase( obj );
|
||||
}
|
||||
|
||||
void Update(uint32 diff);
|
||||
|
||||
Corpse* GetCorpseForPlayerGUID(uint64 guid);
|
||||
void RemoveCorpse(Corpse *corpse);
|
||||
void AddCorpse(Corpse* corpse);
|
||||
|
|
@ -206,9 +189,7 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor,
|
|||
typedef ACE_Thread_Mutex LockType;
|
||||
typedef MaNGOS::GeneralLock<LockType > Guard;
|
||||
|
||||
std::set<Object *> i_objects;
|
||||
LockType i_playerGuard;
|
||||
LockType i_updateGuard;
|
||||
LockType i_corpseGuard;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue