Core: Define helper functions to know if an account is Player, Moderator, GM, Admin or Console
This commit is contained in:
@@ -61,6 +61,7 @@
|
||||
#include "Vehicle.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "AccountMgr.h"
|
||||
|
||||
pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
||||
{
|
||||
@@ -3441,7 +3442,7 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex)
|
||||
if (!item_owner)
|
||||
return;
|
||||
|
||||
if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
if (item_owner != p_caster && !AccountMgr::IsPlayerAccount(p_caster->GetSession()->GetSecurity()) && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
{
|
||||
sLog->outCommand(p_caster->GetSession()->GetAccountId(), "GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)",
|
||||
p_caster->GetName(), p_caster->GetSession()->GetAccountId(),
|
||||
@@ -3502,7 +3503,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex)
|
||||
if (!item_owner)
|
||||
return;
|
||||
|
||||
if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
if (item_owner != p_caster && !AccountMgr::IsPlayerAccount(p_caster->GetSession()->GetSecurity()) && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
{
|
||||
sLog->outCommand(p_caster->GetSession()->GetAccountId(), "GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)",
|
||||
p_caster->GetName(), p_caster->GetSession()->GetAccountId(),
|
||||
@@ -3632,7 +3633,7 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
|
||||
if (!item_owner)
|
||||
return;
|
||||
|
||||
if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
if (item_owner != p_caster && !AccountMgr::IsPlayerAccount(p_caster->GetSession()->GetSecurity()) && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
{
|
||||
sLog->outCommand(p_caster->GetSession()->GetAccountId(), "GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)",
|
||||
p_caster->GetName(), p_caster->GetSession()->GetAccountId(),
|
||||
|
||||
Reference in New Issue
Block a user