Skip to content

Commit

Permalink
Core/Guilds: Restore guild bank contents hack
Browse files Browse the repository at this point in the history
  • Loading branch information
Shauren committed Mar 19, 2020
1 parent ca0c50b commit 1cf8163
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/server/game/Guilds/Guild.cpp
Expand Up @@ -1936,11 +1936,10 @@ void Guild::SendMoneyInfo(WorldSession* session) const

void Guild::SendLoginInfo(WorldSession* session)
{
WorldPacket data(SMSG_GUILD_EVENT, 1 + 1 + m_motd.size() + 1);
data << uint8(GE_MOTD);
data << uint8(1);
data << m_motd;
session->SendPacket(&data);
WorldPackets::Guild::GuildEvent motd;
motd.Type = GE_MOTD;
motd.Params[0] = m_motd.c_str();
session->SendPacket(motd.Write());

TC_LOG_DEBUG("guild", "SMSG_GUILD_EVENT [%s] MOTD", session->GetPlayerInfo().c_str());

Expand Down
7 changes: 5 additions & 2 deletions src/server/game/Handlers/GuildHandler.cpp
Expand Up @@ -171,7 +171,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPackets::Guild::GuildSetRankPermis

GuildBankRightsAndSlotsVec rightsAndSlots(GUILD_BANK_MAX_TABS);
for (uint8 tabId = 0; tabId < GUILD_BANK_MAX_TABS; ++tabId)
rightsAndSlots[tabId] = GuildBankRightsAndSlots(tabId, uint8(packet.TabFlags[tabId]), uint8(packet.TabWithdrawItemLimit[tabId]));
rightsAndSlots[tabId] = GuildBankRightsAndSlots(tabId, uint8(packet.TabFlags[tabId]), uint32(packet.TabWithdrawItemLimit[tabId]));

TC_LOG_DEBUG("guild", "CMSG_GUILD_RANK [%s]: Rank: %s (%u)", GetPlayerInfo().c_str(), packet.RankName.c_str(), packet.RankID);

Expand Down Expand Up @@ -275,7 +275,10 @@ void WorldSession::HandleGuildBankQueryTab(WorldPackets::Guild::GuildBankQueryTa

if (GetPlayer()->GetGameObjectIfCanInteractWith(packet.Banker, GAMEOBJECT_TYPE_GUILD_BANK))
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendBankTabData(this, packet.Tab, packet.FullUpdate);
guild->SendBankTabData(this, packet.Tab, true /*packet.FullUpdate*/);
// HACK: client doesn't query entire tab content if it had received SMSG_GUILD_BANK_LIST in this session
// but we broadcast bank updates to entire guild when *ANYONE* changes anything, incorrectly initializing clients
// tab content with only data for that change
}

void WorldSession::HandleGuildBankDepositMoney(WorldPackets::Guild::GuildBankDepositMoney& packet)
Expand Down

0 comments on commit 1cf8163

Please sign in to comment.