diff options
author | XTZGZoReX <none@none> | 2010-03-13 16:17:25 +0100 |
---|---|---|
committer | XTZGZoReX <none@none> | 2010-03-13 16:17:25 +0100 |
commit | f8c5b9a4a7fcd73777713f9f518dbda71ada7bb4 (patch) | |
tree | 198c2a0879ac6a4becb7ef60176bf0334d7edd4c /src/game/Level3.cpp | |
parent | 76afec204d7bbffd21c1a148cd7137c23c033573 (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/Level3.cpp')
-rw-r--r-- | src/game/Level3.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index c4dab15fa57..82350b1f2b9 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -5361,6 +5361,8 @@ bool ChatHandler::HandleResetAllCommand(const char * args) } CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE (at_login & '%u') = '0'",atLogin,atLogin); + + ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock()); HashMapHolder<Player>::MapType const& plist = ObjectAccessor::Instance().GetPlayers(); for (HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr) itr->second->SetAtLoginFlag(atLogin); |