diff --git a/Source/Framework/Constants/GuildConst.cs b/Source/Framework/Constants/GuildConst.cs index 755c516d3..541fab2d3 100644 --- a/Source/Framework/Constants/GuildConst.cs +++ b/Source/Framework/Constants/GuildConst.cs @@ -25,6 +25,7 @@ namespace Framework.Constants public const int MaxBankSlots = 98; public const int BankMoneyLogsTab = 100; + public const ulong MoneyLimit = 100000000000; public const uint WithdrawMoneyUnlimited = 0xFFFFFFFF; public const int WithdrawSlotUnlimited = -1; public const uint EventLogGuidUndefined = 0xFFFFFFFF; diff --git a/Source/Game/Guilds/Guild.cs b/Source/Game/Guilds/Guild.cs index 4247d84c4..b5eba2331 100644 --- a/Source/Game/Guilds/Guild.cs +++ b/Source/Game/Guilds/Guild.cs @@ -824,6 +824,13 @@ namespace Game.Guilds // Call script after validation and before money transfer. Global.ScriptMgr.OnGuildMemberDepositMoney(this, player, amount); + if (m_bankMoney > GuildConst.MoneyLimit - amount) + { + if (!cashFlow) + SendCommandResult(session, GuildCommandType.MoveItem, GuildCommandError.TooMuchMoney); + return; + } + SQLTransaction trans = new(); _ModifyBankMoney(trans, amount, true); if (!cashFlow)