[6848] Implement possibility creating gm log per account files using new option in mangosd.conf. Releated cleanups.

This commit is contained in:
VladimirMangos 2008-11-24 22:42:11 +03:00
parent d34899097f
commit 4ccfa1e71e
11 changed files with 145 additions and 80 deletions

View file

@ -3728,10 +3728,12 @@ void Spell::EffectEnchantItemPerm(uint32 i)
return;
if(item_owner!=p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
sLog.outCommand("GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)",
{
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(),
itemTarget->GetProto()->Name1,itemTarget->GetEntry(),
item_owner->GetName(),item_owner->GetSession()->GetAccountId());
}
// remove old enchanting before applying new if equipped
item_owner->ApplyEnchantment(itemTarget,PERM_ENCHANTMENT_SLOT,false);
@ -3857,10 +3859,12 @@ void Spell::EffectEnchantItemTmp(uint32 i)
return;
if(item_owner!=p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
sLog.outCommand("GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)",
{
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(),
itemTarget->GetProto()->Name1,itemTarget->GetEntry(),
item_owner->GetName(),item_owner->GetSession()->GetAccountId());
}
// remove old enchanting before applying new if equipped
item_owner->ApplyEnchantment(itemTarget,TEMP_ENCHANTMENT_SLOT,false);