mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
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:
@@ -1655,9 +1655,9 @@ void Guild::HandleMemberDepositMoney(WorldSession* session, uint32 amount)
|
||||
std::string aux = Acore::Impl::ByteArrayToHexStr(reinterpret_cast<uint8*>(&m_bankMoney), 8, true);
|
||||
_BroadcastEvent(GE_BANK_MONEY_SET, ObjectGuid::Empty, aux.c_str());
|
||||
|
||||
if (amount > 10 * GOLD)
|
||||
CharacterDatabase.PExecute("INSERT INTO log_money VALUES(%u, %u, \"%s\", \"%s\", %u, \"%s\", %u, \"<GB DEPOSIT> %s (guild id: %u, members: %u, new amount: %u, leader guid low: %u, char level: %u)\", NOW())",
|
||||
session->GetAccountId(), player->GetGUID().GetCounter(), player->GetName().c_str(), session->GetRemoteAddress().c_str(), 0, "", amount, GetName().c_str(), GetId(), GetMemberCount(), GetTotalBankMoney(), GetLeaderGUID().GetCounter(), player->getLevel());
|
||||
if (amount > 10 * GOLD) // receiver_acc = Guild id, receiver_name = Guild name
|
||||
CharacterDatabase.PExecute("INSERT INTO log_money VALUES(%u, %u, \"%s\", \"%s\", %u, \"%s\", %u, \"(guild members: %u, new amount: %u, leader guid low: %u, sender level: %u)\", NOW(), %u)",
|
||||
session->GetAccountId(), player->GetGUID().GetCounter(), player->GetName().c_str(), session->GetRemoteAddress().c_str(), GetId(), GetName().c_str(), amount, GetMemberCount(), GetTotalBankMoney(), GetLeaderGUID().GetCounter(), player->getLevel(), 3);
|
||||
}
|
||||
|
||||
bool Guild::HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool repair)
|
||||
@@ -1699,9 +1699,9 @@ bool Guild::HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool
|
||||
_LogBankEvent(trans, repair ? GUILD_BANK_LOG_REPAIR_MONEY : GUILD_BANK_LOG_WITHDRAW_MONEY, uint8(0), player->GetGUID(), amount);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
if (amount > 10 * GOLD)
|
||||
CharacterDatabase.PExecute("INSERT INTO log_money VALUES(%u, %u, \"%s\", \"%s\", %u, \"%s\", %u, \"<GB WITHDRAW> %s (guild id: %u, members: %u, new amount: %u, leader guid low: %u, char level: %u)\", NOW())",
|
||||
session->GetAccountId(), player->GetGUID().GetCounter(), player->GetName().c_str(), session->GetRemoteAddress().c_str(), 0, "", amount, GetName().c_str(), GetId(), GetMemberCount(), GetTotalBankMoney(), GetLeaderGUID().GetCounter(), player->getLevel());
|
||||
if (amount > 10 * GOLD) // sender_acc = 0 (guild has no account), sender_guid = Guild id, sender_name = Guild name
|
||||
CharacterDatabase.PExecute("INSERT INTO log_money VALUES(%u, %u, \"%s\", \"%s\", %u, \"%s\", %u, \"(guild, members: %u, new amount: %u, leader guid low: %u, withdrawer level: %u)\", NOW(), %u)",
|
||||
0, GetId(), GetName().c_str(), session->GetRemoteAddress().c_str(), session->GetAccountId(), player->GetName().c_str(), amount, GetMemberCount(), GetTotalBankMoney(), GetLeaderGUID().GetCounter(), player->getLevel(), 4);
|
||||
|
||||
std::string aux = Acore::Impl::ByteArrayToHexStr(reinterpret_cast<uint8*>(&m_bankMoney), 8, true);
|
||||
_BroadcastEvent(GE_BANK_MONEY_SET, ObjectGuid::Empty, aux.c_str());
|
||||
|
||||
Reference in New Issue
Block a user