From 001e05bb93f8f37d9d37450bea142f04a197bfa8 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Sat, 26 Nov 2016 14:35:47 +0200 Subject: [PATCH] Fix TC build --- GuildMethods.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/GuildMethods.h b/GuildMethods.h index 61f775e..665ae0a 100644 --- a/GuildMethods.h +++ b/GuildMethods.h @@ -60,7 +60,11 @@ namespace LuaGuild */ int GetMemberCount(Eluna* /*E*/, lua_State* L, Guild* guild) { +#ifdef TRINITY + Eluna::Push(L, guild->GetMemberCount()); +#else Eluna::Push(L, guild->GetMemberSize()); +#endif return 1; } @@ -233,7 +237,12 @@ namespace LuaGuild Player* player = Eluna::CHECKOBJ(L, 2); uint8 rankId = Eluna::CHECKVAL(L, 3, GUILD_RANK_NONE); +#ifdef TRINITY + SQLTransaction trans(nullptr); + guild->AddMember(trans, player->GET_GUID(), rankId); +#else guild->AddMember(player->GET_GUID(), rankId); +#endif return 0; } @@ -248,10 +257,11 @@ namespace LuaGuild Player* player = Eluna::CHECKOBJ(L, 2); bool isDisbanding = Eluna::CHECKVAL(L, 3, false); -#ifndef TRINITY - guild->DelMember(player->GET_GUID(), isDisbanding); +#ifdef TRINITY + SQLTransaction trans(nullptr); + guild->DeleteMember(trans, player->GET_GUID(), isDisbanding); #else - guild->DeleteMember(player->GET_GUID(), isDisbanding); + guild->DelMember(player->GET_GUID(), isDisbanding); #endif return 0; } @@ -267,7 +277,12 @@ namespace LuaGuild Player* player = Eluna::CHECKOBJ(L, 2); uint8 newRank = Eluna::CHECKVAL(L, 3); +#ifdef TRINITY + SQLTransaction trans(nullptr); + guild->ChangeMemberRank(trans, player->GET_GUID(), newRank); +#else guild->ChangeMemberRank(player->GET_GUID(), newRank); +#endif return 0; }