diff options
| -rw-r--r-- | src/server/game/Guilds/Guild.cpp | 17 | ||||
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 1 | 
2 files changed, 12 insertions, 6 deletions
| diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index db524cb8804..a7caf654449 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1717,14 +1717,19 @@ void Guild::HandleBuyBankTab(WorldSession* session, uint8 tabId)      if (tabId != _GetPurchasedTabsSize())          return; -    uint32 tabCost = _GetGuildBankTabPrice(tabId) * GOLD; -    if (!tabCost) -        return; +    // Do not get money for bank tabs that the GM bought, we had to buy them already. +    // This is just a speedup check, GetGuildBankTabPrice will return 0. +    if (tabId < GUILD_BANK_MAX_TABS - 2) // 7th tab is actually the 6th +    { +        uint32 tabCost = _GetGuildBankTabPrice(tabId) * GOLD; +        if (!tabCost) +            return; -    if (!player->HasEnoughMoney(uint64(tabCost)))                   // Should not happen, this is checked by client -        return; +        if (!player->HasEnoughMoney(uint64(tabCost)))                   // Should not happen, this is checked by client +            return; -    player->ModifyMoney(-int64(tabCost)); +        player->ModifyMoney(-int64(tabCost)); +    }      _CreateNewBankTab();      _BroadcastEvent(GE_BANK_TAB_PURCHASED, 0); diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 9a433f057e8..e74b74ffdd0 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -34,6 +34,7 @@  #include "Totem.h"  #include "Spell.h"  #include "DynamicObject.h" +#include "Guild.h"  #include "Group.h"  #include "UpdateData.h"  #include "MapManager.h" | 
