aboutsummaryrefslogtreecommitdiff
path: root/src/game/LFGHandler.cpp
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2010-03-13 16:17:25 +0100
committerXTZGZoReX <none@none>2010-03-13 16:17:25 +0100
commitf8c5b9a4a7fcd73777713f9f518dbda71ada7bb4 (patch)
tree198c2a0879ac6a4becb7ef60176bf0334d7edd4c /src/game/LFGHandler.cpp
parent76afec204d7bbffd21c1a148cd7137c23c033573 (diff)
** 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
Diffstat (limited to 'src/game/LFGHandler.cpp')
-rw-r--r--src/game/LFGHandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/LFGHandler.cpp b/src/game/LFGHandler.cpp
index 63fc3ad2439..6fa0199d6ff 100644
--- a/src/game/LFGHandler.cpp
+++ b/src/game/LFGHandler.cpp
@@ -32,7 +32,7 @@ static void AttemptJoin(Player* _player)
if(!_player->m_lookingForGroup.canAutoJoin() || _player->GetGroup())
return;
- //TODO: Guard Player Map
+ ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock());
HashMapHolder<Player>::MapType const& players = ObjectAccessor::Instance().GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator iter = players.begin(); iter != players.end(); ++iter)
{
@@ -92,7 +92,7 @@ static void AttemptAddMore(Player* _player)
if(!_player->m_lookingForGroup.more.canAutoJoin())
return;
- //TODO: Guard Player map
+ ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock());
HashMapHolder<Player>::MapType const& players = ObjectAccessor::Instance().GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator iter = players.begin(); iter != players.end(); ++iter)
{