[8402] Optimalized guild_eventlog and guild_bank_eventlog loading from database.

Added config options to set count of eventlog records stored in DB.
    Attached SQL files will DROP existing and create new tables. Make sure you create backup (if you need old data).
    Renamed few variables in Guild class.
    Signed-off-by: Triply <triply@getmangos.com>

*Note: existing guild bank log will be removed.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-24 19:23:31 -05:00
parent ab8b1d8039
commit 6e8009446d
13 changed files with 458 additions and 367 deletions

View File

@@ -60,7 +60,7 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
return;
Guild *guild = new Guild;
if(!guild->create(GetPlayer(),gname))
if(!guild->Create(GetPlayer(),gname))
{
delete guild;
return;
@@ -825,7 +825,7 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
if(!pGuild)
return;
pGuild->DisplayGuildEventlog(this);
pGuild->DisplayGuildEventLog(this);
}
/****** GUILD BANK *******/
@@ -1546,7 +1546,7 @@ void WorldSession::HandleGuildBankBuyTab( WorldPacket & recv_data )
if (pGuild->GetPurchasedTabs() >= GUILD_BANK_MAX_TABS)
return;
if (TabId != pGuild->GetPurchasedTabs()) // purchased_tabs = 0 when buying Tab 0, that is why this check can be made
if (TabId != pGuild->GetPurchasedTabs()) // m_PurchasedTabs = 0 when buying Tab 0, that is why this check can be made
{
sLog.outError("Error: trying to buy a tab non contigous to owned ones");
return;