mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Add MaNGOS required changes
This commit is contained in:
@@ -153,8 +153,12 @@ namespace LuaGlobalFunctions
|
|||||||
{
|
{
|
||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
boost::shared_lock<boost::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
|
boost::shared_lock<boost::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
|
||||||
|
#else
|
||||||
|
#ifdef MANGOS
|
||||||
|
ACE_READ_GUARD_RETURN(HashMapHolder<Player>::LockType, g, HashMapHolder<Player>::GetLock(), 0)
|
||||||
#else
|
#else
|
||||||
HashMapHolder<Player>::ReadGuard g(HashMapHolder<Player>::GetLock());
|
HashMapHolder<Player>::ReadGuard g(HashMapHolder<Player>::GetLock());
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
const HashMapHolder<Player>::MapType& m = eObjectAccessor()GetPlayers();
|
const HashMapHolder<Player>::MapType& m = eObjectAccessor()GetPlayers();
|
||||||
for (HashMapHolder<Player>::MapType::const_iterator it = m.begin(); it != m.end(); ++it)
|
for (HashMapHolder<Player>::MapType::const_iterator it = m.begin(); it != m.end(); ++it)
|
||||||
|
|||||||
@@ -26,8 +26,12 @@ namespace LuaGuild
|
|||||||
{
|
{
|
||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
boost::shared_lock<boost::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
|
boost::shared_lock<boost::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
|
||||||
|
#else
|
||||||
|
#ifdef MANGOS
|
||||||
|
ACE_READ_GUARD_RETURN(HashMapHolder<Player>::LockType, g, HashMapHolder<Player>::GetLock(), 0)
|
||||||
#else
|
#else
|
||||||
HashMapHolder<Player>::ReadGuard g(HashMapHolder<Player>::GetLock());
|
HashMapHolder<Player>::ReadGuard g(HashMapHolder<Player>::GetLock());
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
const HashMapHolder<Player>::MapType& m = eObjectAccessor()GetPlayers();
|
const HashMapHolder<Player>::MapType& m = eObjectAccessor()GetPlayers();
|
||||||
for (HashMapHolder<Player>::MapType::const_iterator it = m.begin(); it != m.end(); ++it)
|
for (HashMapHolder<Player>::MapType::const_iterator it = m.begin(); it != m.end(); ++it)
|
||||||
|
|||||||
Reference in New Issue
Block a user