mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Fix mangos two build
This commit is contained in:
@@ -144,7 +144,7 @@ typedef Opcodes OpcodesList;
|
|||||||
#define MAX_TALENT_SPECS MAX_TALENT_SPEC_COUNT
|
#define MAX_TALENT_SPECS MAX_TALENT_SPEC_COUNT
|
||||||
#define TEAM_NEUTRAL TEAM_INDEX_NEUTRAL
|
#define TEAM_NEUTRAL TEAM_INDEX_NEUTRAL
|
||||||
|
|
||||||
#if defined(TBC) || (defined(WOTLK) && !defined(MANGOS)) || defined(CATA)
|
#if defined(TBC) || defined(WOTLK) || defined(CATA)
|
||||||
#define PLAYER_FIELD_LIFETIME_HONORABLE_KILLS PLAYER_FIELD_LIFETIME_HONORBALE_KILLS
|
#define PLAYER_FIELD_LIFETIME_HONORABLE_KILLS PLAYER_FIELD_LIFETIME_HONORBALE_KILLS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ typedef QueryNamedResult ElunaQuery;
|
|||||||
#define GetTemplate GetProto
|
#define GetTemplate GetProto
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TRINITY
|
#if defined(TRINITY) || defined(MANGOS)
|
||||||
#ifndef MAKE_NEW_GUID
|
#ifndef MAKE_NEW_GUID
|
||||||
#define MAKE_NEW_GUID(l, e, h) ObjectGuid(h, e, l)
|
#define MAKE_NEW_GUID(l, e, h) ObjectGuid(h, e, l)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ namespace LuaGlobalFunctions
|
|||||||
int tbl = lua_gettop(L);
|
int tbl = lua_gettop(L);
|
||||||
uint32 i = 0;
|
uint32 i = 0;
|
||||||
|
|
||||||
#ifdef MANGOS
|
#if defined(MANGOS) && defined(CLASSIC)
|
||||||
eObjectAccessor()DoForAllPlayers([&](Player* player){
|
eObjectAccessor()DoForAllPlayers([&](Player* player){
|
||||||
if(player->IsInWorld())
|
if(player->IsInWorld())
|
||||||
{
|
{
|
||||||
@@ -171,8 +171,10 @@ 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());
|
||||||
#elif AZEROTHCORE
|
#elif defined(AZEROTHCORE)
|
||||||
TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
||||||
|
#elif defined(MANGOS) && !defined(CLASSIC)
|
||||||
|
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
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace LuaGuild
|
|||||||
int tbl = lua_gettop(L);
|
int tbl = lua_gettop(L);
|
||||||
uint32 i = 0;
|
uint32 i = 0;
|
||||||
|
|
||||||
#ifdef MANGOS
|
#if defined(MANGOS) && defined(CLASSIC)
|
||||||
eObjectAccessor()DoForAllPlayers([&](Player* player)
|
eObjectAccessor()DoForAllPlayers([&](Player* player)
|
||||||
{
|
{
|
||||||
if (player->IsInWorld() && player->GetGuildId() == guild->GetId())
|
if (player->IsInWorld() && player->GetGuildId() == guild->GetId())
|
||||||
@@ -38,8 +38,10 @@ 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());
|
||||||
#elif AZEROTHCORE
|
#elif defined(AZEROTHCORE)
|
||||||
TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
||||||
|
#elif defined(MANGOS) && !defined(CLASSIC)
|
||||||
|
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
|
||||||
|
|||||||
@@ -519,10 +519,10 @@ void Eluna::RunScripts()
|
|||||||
void Eluna::InvalidateObjects()
|
void Eluna::InvalidateObjects()
|
||||||
{
|
{
|
||||||
++callstackid;
|
++callstackid;
|
||||||
#ifdef AZEROTHCORE
|
#ifdef TRINITY
|
||||||
ASSERT(callstackid && "Callstackid overflow");
|
|
||||||
#else
|
|
||||||
ASSERT(callstackid, "Callstackid overflow");
|
ASSERT(callstackid, "Callstackid overflow");
|
||||||
|
#else
|
||||||
|
ASSERT(callstackid && "Callstackid overflow");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#include "Group.h"
|
#include "Group.h"
|
||||||
#include "Item.h"
|
#include "Item.h"
|
||||||
#if defined(TRINITY) || AZEROTHCORE
|
#ifndef TRINITY
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#endif
|
#endif
|
||||||
#include "Weather.h"
|
#include "Weather.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user