[11430] Introduce GuildMgr

Move all guild-related functions from our overpowered ObjectMgr to GuildMgr.
Thx leak for idea.
This commit is contained in:
zergtmn 2011-05-06 19:27:36 +06:00
parent e47031b55c
commit 6498941ead
23 changed files with 313 additions and 206 deletions

View file

@ -28,6 +28,7 @@
#include "ChannelMgr.h"
#include "Group.h"
#include "Guild.h"
#include "GuildMgr.h"
#include "Player.h"
#include "SpellAuras.h"
#include "Language.h"
@ -278,7 +279,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
break;
if (GetPlayer()->GetGuildId())
if (Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId()))
if (Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId()))
guild->BroadcastToGuild(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
} break;
@ -300,7 +301,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
break;
if (GetPlayer()->GetGuildId())
if (Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId()))
if (Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId()))
guild->BroadcastToOfficers(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
} break;