mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
fix(Core/Guild): Guild bank handling issues (#10724)
* fix(Core/Guild): Guild bank right issues * and slots too
This commit is contained in:
@@ -279,9 +279,9 @@ public:
|
||||
void SetSlots(uint32 _slots) { slots = _slots; }
|
||||
void SetRights(uint8 _rights) { rights = _rights; }
|
||||
|
||||
int8 GetTabId() const { return tabId; }
|
||||
int32 GetSlots() const { return slots; }
|
||||
int8 GetRights() const { return rights; }
|
||||
uint8 GetTabId() const { return tabId; }
|
||||
uint32 GetSlots() const { return slots; }
|
||||
uint8 GetRights() const { return rights; }
|
||||
|
||||
private:
|
||||
uint8 tabId;
|
||||
|
||||
@@ -180,11 +180,23 @@ void WorldSession::HandleGuildRankOpcode(WorldPackets::Guild::GuildSetRankPermis
|
||||
|
||||
for (uint8 tabId = 0; tabId < GUILD_BANK_MAX_TABS; ++tabId)
|
||||
{
|
||||
// For some reason the client is sending - 1 for guildmaster tab withdraw item limit, that's ilegal for us because we expect unsigned int.
|
||||
// Probably core handling for this should be changed.
|
||||
if (packet.TabWithdrawItemLimit[tabId] <= 0)
|
||||
{
|
||||
packet.TabWithdrawItemLimit[tabId] = uint32(GUILD_WITHDRAW_SLOT_UNLIMITED);
|
||||
}
|
||||
rightsAndSlots[tabId] = GuildBankRightsAndSlots(tabId, uint8(packet.TabFlags[tabId]), packet.TabWithdrawItemLimit[tabId]);
|
||||
}
|
||||
|
||||
LOG_DEBUG("guild", "CMSG_GUILD_RANK [{}]: Rank: {} ({})", GetPlayerInfo(), packet.RankName, packet.RankID);
|
||||
|
||||
// Same as the issue above but this time with rights.
|
||||
if (packet.Flags <= 0)
|
||||
{
|
||||
packet.Flags = GUILD_BANK_RIGHT_FULL;
|
||||
}
|
||||
|
||||
guild->HandleSetRankInfo(this, packet.RankID, packet.RankName, packet.Flags, packet.WithdrawGoldLimit, rightsAndSlots);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user