Skip to content

Commit

Permalink
fix(Core/Guild): Require repair rights in order to make use of guild …
Browse files Browse the repository at this point in the history
…repairs. (azerothcore#19836)

* Init.

* Ensure only repair requests are screened.

* Adjust parentheses.
  • Loading branch information
heyitsbench authored Sep 1, 2024
1 parent 5d31b9f commit 888aa00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/game/Guilds/Guild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 888aa00

Please sign in to comment.