Core/Guilds: guild code was completely refactored and rewritten.

* OOP desing and implementation;
* all the queries are moved to prepared statements;
* guild loading is optimized;
* all the possible interaction with guild's data is done inside the guild class;
* added more hooks to GuildScript class;

WARNING: Make sure you backup your characters database before applying this change (just in case).

Known problems with guilds:
* when new member is added to the guild, MOTD is not displayed for him in guild tab of social window;
* if you add item with random property to guild bank visual representation of item below it becomes wrong (it displays wrong stack number);
* packets order differs from official: currently guild bank packet traffic is twice as more than on offy.

--HG--
branch : trunk
This commit is contained in:
azazel committed 2010-10-17 19:54:13 +06:00
1 parent f5911917b4
commit c0faed2251
27 files changed
+3892 -3538

No files matched your search

+2 -8
View File
@@ -410,14 +410,8 @@ void WorldSession::LogoutPlayer(bool Save)
HandleMoveWorldportAckOpcode();
///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members
Guild *guild = sObjectMgr.GetGuildById(_player->GetGuildId());
if (guild)
{
guild->SetMemberStats(_player->GetGUID());
guild->UpdateLogoutTime(_player->GetGUID());
guild->BroadcastEvent(GE_SIGNED_OFF, _player->GetGUID(), 1, _player->GetName(), "", "");
}
if (Guild *pGuild = sObjectMgr.GetGuildById(_player->GetGuildId()))
pGuild->HandleMemberLogout(this);
///- Remove pet
_player->RemovePet(NULL,PET_SAVE_AS_CURRENT, true);