mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[11430] Introduce GuildMgr
Move all guild-related functions from our overpowered ObjectMgr to GuildMgr. Thx leak for idea.
This commit is contained in:
parent
e47031b55c
commit
6498941ead
23 changed files with 313 additions and 206 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue