Skip to content

Commit

Permalink
Core/Log Fix logging traded money
Browse files Browse the repository at this point in the history
  • Loading branch information
Traesh committed Aug 19, 2018
1 parent f8eb73e commit c56d85d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
29 changes: 16 additions & 13 deletions src/server/game/Handlers/TradeHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,33 +493,36 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPackets::Trade::AcceptTrade& acc
moveItems(myItems, hisItems);

// logging money
if (HasPermission(rbac::RBAC_PERM_LOG_GM_TRADE))
if (my_trade->GetMoney() > 0)
{
if (my_trade->GetMoney() > 0)
if (HasPermission(rbac::RBAC_PERM_LOG_GM_TRADE))
{
sLog->outCommand(_player->GetSession()->GetAccountId(), "GM %s (Account: %u) give money (Amount: " UI64FMTD ") to player: %s (Account: %u)",
_player->GetName().c_str(), _player->GetSession()->GetAccountId(),
my_trade->GetMoney(),
trader->GetName().c_str(), trader->GetSession()->GetAccountId());

TC_LOG_INFO("metric", "%s (Account: %u) give money (Amount: " UI64FMTD ") to %s (Account: %u)",
_player->GetName().c_str(), _player->GetSession()->GetAccountId(),
my_trade->GetMoney(),
trader->GetName().c_str(), trader->GetSession()->GetAccountId());
}

if (his_trade->GetMoney() > 0)
TC_LOG_INFO("metric", "%s (Account: %u) give money (Amount: " UI64FMTD ") to %s (Account: %u)",
_player->GetName().c_str(), _player->GetSession()->GetAccountId(),
my_trade->GetMoney(),
trader->GetName().c_str(), trader->GetSession()->GetAccountId());
}

if (his_trade->GetMoney() > 0)
{
if (HasPermission(rbac::RBAC_PERM_LOG_GM_TRADE))
{
sLog->outCommand(trader->GetSession()->GetAccountId(), "GM %s (Account: %u) give money (Amount: " UI64FMTD ") to player: %s (Account: %u)",
trader->GetName().c_str(), trader->GetSession()->GetAccountId(),
his_trade->GetMoney(),
_player->GetName().c_str(), _player->GetSession()->GetAccountId());

TC_LOG_INFO("metric", "%s (Account: %u) give money (Amount: " UI64FMTD ") to %s (Account: %u)",
trader->GetName().c_str(), trader->GetSession()->GetAccountId(),
my_trade->GetMoney(),
_player->GetName().c_str(), _player->GetSession()->GetAccountId());
}

TC_LOG_INFO("metric", "%s (Account: %u) give money (Amount: " UI64FMTD ") to %s (Account: %u)",
trader->GetName().c_str(), trader->GetSession()->GetAccountId(),
my_trade->GetMoney(),
_player->GetName().c_str(), _player->GetSession()->GetAccountId());
}

// update money
Expand Down
7 changes: 1 addition & 6 deletions src/server/scripts/Spells/spell_mage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,7 @@ class spell_mage_conflagration : public AuraScript

bool CheckProc(ProcEventInfo& eventInfo)
{
bool _spellCanProc = (eventInfo.GetSpellInfo()->Id == SPELL_MAGE_FIREBALL);

if (_spellCanProc)
return true;

return false;
return eventInfo.GetSpellInfo()->Id == SPELL_MAGE_FIREBALL;
}

void Register() override
Expand Down

0 comments on commit c56d85d

Please sign in to comment.