mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Guilds: Some stuff that didnt get staged...
Also fixed non-PCH build (I guess, not enough horsepower to check myself sadly)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user