Core: Define helper functions to know if an account is Player, Moderator, GM, Admin or Console
This commit is contained in:
1 parent
d5cbc97373
commit
327fe7c247
23 files changed
+174
-90
No files matched your search
@@ -24,6 +24,7 @@
|
||||
#include "Config.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "Log.h"
|
||||
#include "AccountMgr.h"
|
||||
|
||||
#define MAX_GUILD_BANK_TAB_TEXT_LEN 500
|
||||
#define EMBLEM_PRICE 10 * GOLD
|
||||
@@ -937,7 +938,7 @@ void Guild::BankMoveItemData::LogBankEvent(SQLTransaction& trans, MoveItemData*
|
||||
void Guild::BankMoveItemData::LogAction(MoveItemData* pFrom) const
|
||||
{
|
||||
MoveItemData::LogAction(pFrom);
|
||||
if (!pFrom->IsBank() && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE) && m_pPlayer->GetSession()->GetSecurity() > SEC_PLAYER) // TODO: move to scripts
|
||||
if (!pFrom->IsBank() && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE) && !AccountMgr::IsPlayerAccount(m_pPlayer->GetSession()->GetSecurity())) // TODO: move to scripts
|
||||
sLog->outCommand(m_pPlayer->GetSession()->GetAccountId(),
|
||||
"GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u)",
|
||||
m_pPlayer->GetName(), m_pPlayer->GetSession()->GetAccountId(),
|
||||
@@ -1630,7 +1631,7 @@ void Guild::HandleMemberDepositMoney(WorldSession* session, uint32 amount)
|
||||
player->ModifyMoney(-int32(amount));
|
||||
player->SaveGoldToDB(trans);
|
||||
// Log GM action (TODO: move to scripts)
|
||||
if (player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
if (!AccountMgr::IsPlayerAccount(player->GetSession()->GetSecurity()) && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
{
|
||||
sLog->outCommand(player->GetSession()->GetAccountId(),
|
||||
"GM %s (Account: %u) deposit money (Amount: %u) to pGuild bank (Guild ID %u)",
|
||||
|
||||
Reference in new issue
Block a user