diff options
author | maximius <none@none> | 2009-09-14 13:34:23 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-09-14 13:34:23 -0700 |
commit | 32798803f88caf2c60992c336ae5aa935d4cb349 (patch) | |
tree | 3344fecfe1826e203d77b1b84d25ef73c410cfd2 /src/game/Guild.cpp | |
parent | 10d3d6817d4f1dda0a27e3350658463afb9c727b (diff) |
*[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
Diffstat (limited to 'src/game/Guild.cpp')
-rw-r--r-- | src/game/Guild.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index ddf94158275..92faebccad5 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -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 ) |