aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorclick <none@none>2010-11-11 22:59:06 +0100
committerclick <none@none>2010-11-11 22:59:06 +0100
commit5f4b97fcf705688d2946cac9074289bc36689058 (patch)
tree737e467b819b748375e35cc1c496d9a0902d66d5 /src
parent090acddee341f389585db8146afcae8f529d77ff (diff)
Core/Guild: Fix guildbank withdrawal limit (non-guildmaster character will not be able to withdraw more than withdraw-limit) - thanks to Azz
Fixes issue 4720 --HG-- branch : trunk
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Guilds/Guild.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index 91c77543c92..7e5f83d7365 100755
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -1669,12 +1669,15 @@ bool Guild::HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool
if (!remainingMoney)
return false;
+ if (remainingMoney < amount)
+ return false;
+
// Call script after validation and before money transfer.
sScriptMgr.OnGuildMemberWitdrawMoney(this, player, amount, repair);
SQLTransaction trans = CharacterDatabase.BeginTransaction();
// Update remaining money amount
- if (remainingMoney >= amount && remainingMoney < GUILD_WITHDRAW_MONEY_UNLIMITED)
+ if (remainingMoney < GUILD_WITHDRAW_MONEY_UNLIMITED)
if (Member* pMember = GetMember(player->GetGUID()))
pMember->DecreaseBankRemainingValue(trans, GUILD_BANK_MAX_TABS, amount);
// Remove money from bank