mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Guilds: Implement guild bank gold limit matching client
(cherry picked from commit 967f21a4b4)
This commit is contained in:
@@ -1968,6 +1968,13 @@ void Guild::HandleMemberDepositMoney(WorldSession* session, uint64 amount, bool
|
||||
// Call script after validation and before money transfer.
|
||||
sScriptMgr->OnGuildMemberDepositMoney(this, player, amount);
|
||||
|
||||
if (m_bankMoney > GUILD_BANK_MONEY_LIMIT - amount)
|
||||
{
|
||||
if (!cashFlow)
|
||||
SendCommandResult(session, GUILD_COMMAND_MOVE_ITEM, ERR_GUILD_TOO_MUCH_MONEY);
|
||||
return;
|
||||
}
|
||||
|
||||
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
_ModifyBankMoney(trans, amount, true);
|
||||
if (!cashFlow)
|
||||
|
||||
Reference in New Issue
Block a user