From 888aa00cfb51bbce968674a806a6beb02bdfd184 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Sat, 31 Aug 2024 23:48:13 -0400 Subject: [PATCH] fix(Core/Guild): Require repair rights in order to make use of guild repairs. (#19836) * Init. * Ensure only repair requests are screened. * Adjust parentheses. --- src/server/game/Guilds/Guild.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index d42c1313d..648131080 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1705,6 +1705,9 @@ bool Guild::HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool if (uint32(_GetMemberRemainingMoney(*member)) < amount) // Check if we have enough slot/money today return false; + if (!(_GetRankRights(member->GetRankId()) & GR_RIGHT_WITHDRAW_REPAIR) && repair) + return false; + // Call script after validation and before money transfer. sScriptMgr->OnGuildMemberWitdrawMoney(this, player, amount, repair);