** Cleanup in ObjectAccessor/HashMapHolder:

* Correctly lock the HashMapHolder on access.
* Use ObjectAccessor wrappers (GetPlayers, GetCreatures, GetGameObjects) instead of raw HashMapHolder<Type>::GetContainer.
* General code style cleanup.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX committed 2010-03-13 16:17:25 +01:00
1 parent 76afec204d
commit f8c5b9a4a7
6 files changed
+154 -179

No files matched your search

+1 -1
View File
@@ -220,7 +220,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
data << clientcount; // clientcount place holder
data << clientcount; // clientcount place holder
//TODO: Guard Player map
ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock());
HashMapHolder<Player>::MapType& m = ObjectAccessor::Instance().GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{