diff --git a/ElunaUtility.h b/ElunaUtility.h index cd95786095..ba5aaee04d 100644 --- a/ElunaUtility.h +++ b/ElunaUtility.h @@ -50,6 +50,7 @@ typedef QueryResult ElunaQuery; #endif #ifdef TRINITY +#ifdef WOTLK #define ELUNA_LOG_TC_FMT(TC_LOG_MACRO, ...) \ try { \ std::string message = fmt::sprintf(__VA_ARGS__); \ @@ -60,6 +61,11 @@ typedef QueryResult ElunaQuery; #define ELUNA_LOG_INFO(...) ELUNA_LOG_TC_FMT(TC_LOG_INFO, __VA_ARGS__); #define ELUNA_LOG_ERROR(...) ELUNA_LOG_TC_FMT(TC_LOG_ERROR, __VA_ARGS__); #define ELUNA_LOG_DEBUG(...) ELUNA_LOG_TC_FMT(TC_LOG_DEBUG, __VA_ARGS__); +#else +#define ELUNA_LOG_INFO(...) TC_LOG_INFO("eluna", __VA_ARGS__); +#define ELUNA_LOG_ERROR(...) TC_LOG_ERROR("eluna", __VA_ARGS__); +#define ELUNA_LOG_DEBUG(...) TC_LOG_DEBUG("eluna", __VA_ARGS__); +#endif #elif defined(AZEROTHCORE) #define ELUNA_LOG_INFO(...) LOG_INFO("eluna", __VA_ARGS__); #define ELUNA_LOG_ERROR(...) LOG_ERROR("eluna", __VA_ARGS__); diff --git a/TrinityCore/PlayerMethods.h b/TrinityCore/PlayerMethods.h index 3f2cef1c84..b1d1f8e866 100644 --- a/TrinityCore/PlayerMethods.h +++ b/TrinityCore/PlayerMethods.h @@ -2096,7 +2096,13 @@ namespace LuaPlayer time_t muteTime = time(NULL) + muteseconds; player->GetSession()->m_muteTime = muteTime; +#ifdef WOTLK LoginDatabase.PExecute("UPDATE account SET mutetime = {} WHERE id = {}", muteTime, player->GetSession()->GetAccountId()); +#else + std::ostringstream oss; + oss << "UPDATE account SET mutetime = " << muteTime << " WHERE id = " << player->GetSession()->GetAccountId(); + LoginDatabase.PExecute("%s", oss.str().c_str()); +#endif return 0; } @@ -4001,7 +4007,7 @@ namespace LuaPlayer #ifndef CATA { "CanCompleteRepeatableQuest", &LuaPlayer::CanCompleteRepeatableQuest }, { "CanRewardQuest", &LuaPlayer::CanRewardQuest }, -#elif +#else { "CanCompleteRepeatableQuest", nullptr }, { "CanRewardQuest", nullptr }, #endif