mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Guilds: Fixed gold in bank not being updated clientside after withdrawing/depositing into a bank that has no tabs purchased
Closes #5787
This commit is contained in:
@@ -72,8 +72,8 @@ std::string _GetGuildEventString(GuildEvents event)
|
||||
return "Bank tab updated";
|
||||
case GE_BANK_MONEY_SET:
|
||||
return "Bank money set";
|
||||
case GE_BANK_MONEY_CHANGED:
|
||||
return "Bank money changed";
|
||||
case GE_BANK_TAB_AND_MONEY_UPDATED:
|
||||
return "Bank and money updated";
|
||||
case GE_BANK_TEXT_CHANGED:
|
||||
return "Bank tab text changed";
|
||||
default:
|
||||
@@ -1750,8 +1750,8 @@ void Guild::HandleMemberDepositMoney(WorldSession* session, uint32 amount)
|
||||
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
std::string aux = ByteArrayToHexStr(reinterpret_cast<uint8*>(&amount), 8, true);
|
||||
_BroadcastEvent(GE_BANK_MONEY_CHANGED, 0, aux.c_str());
|
||||
std::string aux = ByteArrayToHexStr(reinterpret_cast<uint8*>(&m_bankMoney), 8, true);
|
||||
_BroadcastEvent(GE_BANK_MONEY_SET, 0, aux.c_str());
|
||||
|
||||
if (player->GetSession()->HasPermission(rbac::RBAC_PERM_LOG_GM_TRADE))
|
||||
{
|
||||
@@ -1800,8 +1800,8 @@ bool Guild::HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool
|
||||
_LogBankEvent(trans, repair ? GUILD_BANK_LOG_REPAIR_MONEY : GUILD_BANK_LOG_WITHDRAW_MONEY, uint8(0), player->GetGUIDLow(), amount);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
std::string aux = ByteArrayToHexStr(reinterpret_cast<uint8*>(&amount), 8, true);
|
||||
_BroadcastEvent(GE_BANK_MONEY_CHANGED, 0, aux.c_str());
|
||||
std::string aux = ByteArrayToHexStr(reinterpret_cast<uint8*>(&m_bankMoney), 8, true);
|
||||
_BroadcastEvent(GE_BANK_MONEY_SET, 0, aux.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2926,6 +2926,5 @@ void Guild::ResetTimes()
|
||||
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
itr->second->ResetValues();
|
||||
|
||||
// Hack... way to force client to ask for money/slots
|
||||
_BroadcastEvent(GE_RANK_UPDATED, 0, "0", GetRankInfo(0)->GetName().c_str());
|
||||
_BroadcastEvent(GE_BANK_TAB_AND_MONEY_UPDATED, 0);
|
||||
}
|
||||
|
||||
@@ -146,11 +146,11 @@ enum GuildEvents
|
||||
GE_RANK_DELETED = 11,
|
||||
GE_SIGNED_ON = 12,
|
||||
GE_SIGNED_OFF = 13,
|
||||
GE_GUILDBANKBAGSLOTS_CHANGED = 14,
|
||||
GE_GUILDBANKBAGSLOTS_CHANGED = 14, /// TODO: Sent when items are moved in gbank - all players with bank open will send tab query
|
||||
GE_BANK_TAB_PURCHASED = 15,
|
||||
GE_BANK_TAB_UPDATED = 16,
|
||||
GE_BANK_MONEY_SET = 17,
|
||||
GE_BANK_MONEY_CHANGED = 18,
|
||||
GE_BANK_TAB_AND_MONEY_UPDATED = 18,
|
||||
GE_BANK_TEXT_CHANGED = 19,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user