From 37eec855c5a03ccf4fa857a59cd28ec4fc7110d2 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Fri, 4 Mar 2016 23:25:43 +0200 Subject: [PATCH] Add MaNGOS required changes --- GlobalMethods.h | 4 ++++ GuildMethods.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/GlobalMethods.h b/GlobalMethods.h index d9e91d6..215cae1 100644 --- a/GlobalMethods.h +++ b/GlobalMethods.h @@ -153,8 +153,12 @@ namespace LuaGlobalFunctions { #ifdef TRINITY boost::shared_lock lock(*HashMapHolder::GetLock()); +#else +#ifdef MANGOS + ACE_READ_GUARD_RETURN(HashMapHolder::LockType, g, HashMapHolder::GetLock(), 0) #else HashMapHolder::ReadGuard g(HashMapHolder::GetLock()); +#endif #endif const HashMapHolder::MapType& m = eObjectAccessor()GetPlayers(); for (HashMapHolder::MapType::const_iterator it = m.begin(); it != m.end(); ++it) diff --git a/GuildMethods.h b/GuildMethods.h index 1bdbda6..61f775e 100644 --- a/GuildMethods.h +++ b/GuildMethods.h @@ -26,8 +26,12 @@ namespace LuaGuild { #ifdef TRINITY boost::shared_lock lock(*HashMapHolder::GetLock()); +#else +#ifdef MANGOS + ACE_READ_GUARD_RETURN(HashMapHolder::LockType, g, HashMapHolder::GetLock(), 0) #else HashMapHolder::ReadGuard g(HashMapHolder::GetLock()); +#endif #endif const HashMapHolder::MapType& m = eObjectAccessor()GetPlayers(); for (HashMapHolder::MapType::const_iterator it = m.begin(); it != m.end(); ++it)