*[8480] Provided real-time update for guidl ranks rights.

Specially for guild bank tab access rights (including currently open tab case!)
Send roster broadcast for all online guild memebers at any rank edit and guild
bank tab buy. Author: VladimirMangos
*Fix a pretty stupid mistake of mine with that Stoneclaw Totem fix, put the code block in the wrong function!
*Use comparison instead of std::min (for some reason std::min seems to expect 3 arguments on Windows!?)

--HG--
branch : trunk
This commit is contained in:
maximius committed 2009-09-14 13:34:23 -07:00
1 parent 10d3d6817d
commit 32798803f8
7 files changed
+46 -45

No files matched your search

+6 -4
View File
@@ -728,7 +728,7 @@ void Guild::Disband()
objmgr.RemoveGuild(m_Id);
}
void Guild::Roster(WorldSession *session)
void Guild::Roster(WorldSession *session /*= NULL*/)
{
// we can only guess size
WorldPacket data(SMSG_GUILD_ROSTER, (4+MOTD.length()+1+GINFO.length()+1+4+m_Ranks.size()*(4+4+GUILD_BANK_MAX_TABS*(4+4))+members.size()*50));
@@ -777,7 +777,10 @@ void Guild::Roster(WorldSession *session)
data << itr->second.OFFnote;
}
}
session->SendPacket(&data);;
if (session)
session->SendPacket(&data);
else
BroadcastPacket(&data);
sLog.outDebug( "WORLD: Sent (SMSG_GUILD_ROSTER)" );
}
@@ -1085,7 +1088,7 @@ void Guild::DisplayGuildBankTabsInfo(WorldSession *session)
//data << uint32(0xFFFFFFFF); // bit 9 must be set for this packet to work
data << uint32(0);
data << uint8(1); // Tell Client this is a TabInfo packet
data << uint8(m_PurchasedTabs); // here is the number of tabs
data << uint8(m_PurchasedTabs); // here is the number of tabs
for (uint8 i = 0; i < m_PurchasedTabs; ++i)
{
@@ -1975,7 +1978,6 @@ void Guild::SendGuildBankTabText(WorldSession *session, uint8 TabId)
session->SendPacket(&data);
else
BroadcastPacket(&data);
}
void Guild::SwapItems(Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 BankTabDst, uint8 BankTabSlotDst, uint32 SplitedAmount )