fix(Core/Guild): Require repair rights in order to make use of guild repairs. (#19836)

* Init.

* Ensure only repair requests are screened.

* Adjust parentheses.
This commit is contained in:
Benjamin Jackson
2024-08-31 23:48:13 -04:00
committed by GitHub
parent 5d31b9f98f
commit 888aa00cfb

View File

@@ -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 if (uint32(_GetMemberRemainingMoney(*member)) < amount) // Check if we have enough slot/money today
return false; return false;
if (!(_GetRankRights(member->GetRankId()) & GR_RIGHT_WITHDRAW_REPAIR) && repair)
return false;
// Call script after validation and before money transfer. // Call script after validation and before money transfer.
sScriptMgr->OnGuildMemberWitdrawMoney(this, player, amount, repair); sScriptMgr->OnGuildMemberWitdrawMoney(this, player, amount, repair);