fix(Core/Logs): improve log money (#10297)

* Fixed wrong decription of error

The Logger was pointing to the wrong table. Text is missing not in `broadcast_text_locale`, but in `broadcast_text`.

* fix(DB/Logger): fix logs topics and types

Correction of texts in the topic and the type of logged action. Getting rid of `<>` tags, which can cause certain difficulties when processing logs by the administrator. Now we can sort entries by the type of logged actions

* fix log_money

* fix log_money

* fix log_money

* fix log_money

* Update ObjectMgr.cpp

* Update rev_1642821969869259834.sql

* reduce memory usage

* Update AuctionHouseMgr.cpp

* Update Guild.cpp

* Update MailHandler.cpp

* Update TradeHandler.cpp

* fix typo

* Update data/sql/updates/pending_db_characters/rev_1642821969869259834.sql
This commit is contained in:
Bogir[rus]
2022-01-26 01:58:08 +05:00
committed by GitHub
parent f8f2d56bf6
commit 18c2b07609
5 changed files with 20 additions and 16 deletions

View File

@@ -313,8 +313,8 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
if( money >= 10 * GOLD )
{
CleanStringForMysqlQuery(subject);
CharacterDatabase.PExecute("INSERT INTO log_money VALUES(%u, %u, \"%s\", \"%s\", %u, \"%s\", %u, \"<MAIL> %s\", NOW())",
GetAccountId(), player->GetGUID().GetCounter(), player->GetName().c_str(), player->GetSession()->GetRemoteAddress().c_str(), rc_account, receiver.c_str(), money, subject.c_str());
CharacterDatabase.PExecute("INSERT INTO log_money VALUES(%u, %u, \"%s\", \"%s\", %u, \"%s\", %u, \"%s\", NOW(), %u)",
GetAccountId(), player->GetGUID().GetCounter(), player->GetName().c_str(), player->GetSession()->GetRemoteAddress().c_str(), rc_account, receiver.c_str(), money, subject.c_str(), 5);
}
}
@@ -532,8 +532,8 @@ void WorldSession::HandleMailTakeItem(WorldPacket& recvData)
}
std::string subj = m->subject;
CleanStringForMysqlQuery(subj);
CharacterDatabase.PExecute("INSERT INTO log_money VALUES(%u, %u, \"%s\", \"%s\", %u, \"%s\", %u, \"<COD> %s\", NOW())",
GetAccountId(), player->GetGUID().GetCounter(), player->GetName().c_str(), player->GetSession()->GetRemoteAddress().c_str(), sender_accId, senderName.c_str(), m->COD, subj.c_str());
CharacterDatabase.PExecute("INSERT INTO log_money VALUES(%u, %u, \"%s\", \"%s\", %u, \"%s\", %u, \"%s\", NOW(), %u)",
GetAccountId(), player->GetGUID().GetCounter(), player->GetName().c_str(), player->GetSession()->GetRemoteAddress().c_str(), sender_accId, senderName.c_str(), m->COD, subj.c_str(), 1);
}
}