Jump to content

[fix][8721] allow guildbank money withdrawal from guild master without purchased tabs


Guest leak
 Share

Recommended Posts

What bug does the patch fix? What features does the patch add?

Guild masters are allowed to deposit money without purchasing tabs. This allows them to withdraw it too.

For which repository revision was the patch created?

b8423e7d 0.12 branch

(I guess it can be used for master branch too)

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

No.

Who has been writing this patch? Please include either forum user names or email addresses.

me

From cc4eb8d024ef3957a3020803b99514ec41377ba3 Mon Sep 17 00:00:00 2001
From: leak <[email protected]>
Date: Thu, 22 Oct 2009 20:07:56 +0200
Subject: [PATCH] allow guild bank money withdrawal from guild master without purchased tabs

---
src/game/Guild.cpp        |    2 ++
src/game/GuildHandler.cpp |    1 -
2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp
index 7520a5d..cb7b742 100644
--- a/src/game/Guild.cpp
+++ b/src/game/Guild.cpp
@@ -112,6 +112,8 @@ void Guild::CreateDefaultGuildRanks(int locale_idx)
    CreateRank(objmgr.GetMangosString(LANG_GUILD_VETERAN, locale_idx),  GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
    CreateRank(objmgr.GetMangosString(LANG_GUILD_MEMBER, locale_idx),   GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
    CreateRank(objmgr.GetMangosString(LANG_GUILD_INITIATE, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
+    
+    SetBankMoneyPerDay((uint32)GR_GUILDMASTER, WITHDRAW_MONEY_UNLIMITED);
}

bool Guild::AddMember(uint64 plGuid, uint32 plRank)
diff --git a/src/game/GuildHandler.cpp b/src/game/GuildHandler.cpp
index 2e65420..f4bc3ad 100644
--- a/src/game/GuildHandler.cpp
+++ b/src/game/GuildHandler.cpp
@@ -1185,7 +1185,6 @@ void WorldSession::HandleGuildBankBuyTab( WorldPacket & recv_data )
    // Go on with creating tab
    pGuild->CreateNewBankTab();
    GetPlayer()->ModifyMoney(-int(TabCost));
-    pGuild->SetBankMoneyPerDay(GetPlayer()->GetRank(), WITHDRAW_MONEY_UNLIMITED);
    pGuild->SetBankRightsAndSlots(GetPlayer()->GetRank(), TabId, GUILD_BANK_RIGHT_FULL, WITHDRAW_SLOT_UNLIMITED, true);
    pGuild->Roster();                                       // broadcast for tab rights update
    pGuild->DisplayGuildBankTabsInfo(this);
-- 
1.6.3.2.1299.gee46c

-------------------------------

OT:

I stumbled across this problem when i tried to figure out why guild masters had no money withdrawal rights after my last core rollup. If someone experiences this problem too, run

UPDATE guild_rank SET BankMoneyPerDay = 4294967295 WHERE rid = 0;

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use