mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 10:37:02 +00:00
[6848] Implement possibility creating gm log per account files using new option in mangosd.conf. Releated cleanups.
This commit is contained in:
parent
d34899097f
commit
4ccfa1e71e
11 changed files with 145 additions and 80 deletions
|
|
@ -193,10 +193,12 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
|
|||
// logging
|
||||
sLog.outDebug("partner storing: %u",myItems[i]->GetGUIDLow());
|
||||
if( _player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
|
||||
sLog.outCommand("GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
|
||||
{
|
||||
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
|
||||
_player->GetName(),_player->GetSession()->GetAccountId(),
|
||||
myItems[i]->GetProto()->Name1,myItems[i]->GetEntry(),myItems[i]->GetCount(),
|
||||
_player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId());
|
||||
}
|
||||
|
||||
// store
|
||||
_player->pTrader->MoveItemToInventory( traderDst, myItems[i], true, true);
|
||||
|
|
@ -206,10 +208,12 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
|
|||
// logging
|
||||
sLog.outDebug("player storing: %u",hisItems[i]->GetGUIDLow());
|
||||
if( _player->pTrader->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
|
||||
sLog.outCommand("GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
|
||||
{
|
||||
sLog.outCommand(_player->pTrader->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
|
||||
_player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId(),
|
||||
hisItems[i]->GetProto()->Name1,hisItems[i]->GetEntry(),hisItems[i]->GetCount(),
|
||||
_player->GetName(),_player->GetSession()->GetAccountId());
|
||||
}
|
||||
|
||||
// store
|
||||
_player->MoveItemToInventory( playerDst, hisItems[i], true, true);
|
||||
|
|
@ -376,15 +380,19 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
|||
if(sWorld.getConfig(CONFIG_GM_LOG_TRADE))
|
||||
{
|
||||
if( _player->GetSession()->GetSecurity() > SEC_PLAYER && _player->tradeGold > 0)
|
||||
sLog.outCommand("GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
|
||||
{
|
||||
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
|
||||
_player->GetName(),_player->GetSession()->GetAccountId(),
|
||||
_player->tradeGold,
|
||||
_player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId());
|
||||
}
|
||||
if( _player->pTrader->GetSession()->GetSecurity() > SEC_PLAYER && _player->pTrader->tradeGold > 0)
|
||||
sLog.outCommand("GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
|
||||
{
|
||||
sLog.outCommand(_player->pTrader->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
|
||||
_player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId(),
|
||||
_player->pTrader->tradeGold,
|
||||
_player->GetName(),_player->GetSession()->GetAccountId());
|
||||
}
|
||||
}
|
||||
|
||||
// update money
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue