MangosTwo change fixes

This commit is contained in:
Rochet2
2015-02-14 00:31:08 +02:00
parent 849651d4c0
commit 1b9a2ae018
2 changed files with 12 additions and 4 deletions

View File

@@ -22,9 +22,13 @@ namespace LuaGuild
uint32 i = 0;
{
#ifdef TRINITY
boost::shared_lock<boost::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
#else
HashMapHolder<Player>::ReadGuard g(HashMapHolder<Player>::GetLock());
HashMapHolder<Player>::MapType& m = eObjectAccessor->GetPlayers();
for (HashMapHolder<Player>::MapType::iterator it = m.begin(); it != m.end(); ++it)
#endif
const HashMapHolder<Player>::MapType& m = eObjectAccessor->GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator it = m.begin(); it != m.end(); ++it)
{
if (Player* player = it->second)
{