Core/Guilds: Implement guild bank gold limit matching client
Port From (https://github.com/TrinityCore/TrinityCore/commit/def97385ccb3e81ae8e5661479118d12cf0372de)
This commit is contained in:
@@ -25,6 +25,7 @@ namespace Framework.Constants
|
|||||||
public const int MaxBankSlots = 98;
|
public const int MaxBankSlots = 98;
|
||||||
public const int BankMoneyLogsTab = 100;
|
public const int BankMoneyLogsTab = 100;
|
||||||
|
|
||||||
|
public const ulong MoneyLimit = 100000000000;
|
||||||
public const uint WithdrawMoneyUnlimited = 0xFFFFFFFF;
|
public const uint WithdrawMoneyUnlimited = 0xFFFFFFFF;
|
||||||
public const int WithdrawSlotUnlimited = -1;
|
public const int WithdrawSlotUnlimited = -1;
|
||||||
public const uint EventLogGuidUndefined = 0xFFFFFFFF;
|
public const uint EventLogGuidUndefined = 0xFFFFFFFF;
|
||||||
|
|||||||
@@ -824,6 +824,13 @@ namespace Game.Guilds
|
|||||||
// Call script after validation and before money transfer.
|
// Call script after validation and before money transfer.
|
||||||
Global.ScriptMgr.OnGuildMemberDepositMoney(this, player, amount);
|
Global.ScriptMgr.OnGuildMemberDepositMoney(this, player, amount);
|
||||||
|
|
||||||
|
if (m_bankMoney > GuildConst.MoneyLimit - amount)
|
||||||
|
{
|
||||||
|
if (!cashFlow)
|
||||||
|
SendCommandResult(session, GuildCommandType.MoveItem, GuildCommandError.TooMuchMoney);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SQLTransaction trans = new();
|
SQLTransaction trans = new();
|
||||||
_ModifyBankMoney(trans, amount, true);
|
_ModifyBankMoney(trans, amount, true);
|
||||||
if (!cashFlow)
|
if (!cashFlow)
|
||||||
|
|||||||
Reference in New Issue
Block a user