Core/Guilds: Implement guild bank gold limit matching client

(cherry picked from commit 967f21a4b4)
This commit is contained in:
Shauren
2020-03-18 00:02:21 +01:00
parent 6c2408494f
commit def97385cc
2 changed files with 9 additions and 0 deletions

View File

@@ -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)