Skip to content

Commit

Permalink
Fix Cataclysm build
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Oct 14, 2023
1 parent e8cb7dc commit 5a0bf9d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ElunaUtility.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__); \
Expand All @@ -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__);
Expand Down
8 changes: 7 additions & 1 deletion TrinityCore/PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -4001,7 +4007,7 @@ namespace LuaPlayer
#ifndef CATA
{ "CanCompleteRepeatableQuest", &LuaPlayer::CanCompleteRepeatableQuest },
{ "CanRewardQuest", &LuaPlayer::CanRewardQuest },
#elif
#else
{ "CanCompleteRepeatableQuest", nullptr },
{ "CanRewardQuest", nullptr },
#endif
Expand Down

0 comments on commit 5a0bf9d

Please sign in to comment.