mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +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
|
|
@ -44,6 +44,7 @@
|
|||
#include "Formulas.h"
|
||||
#include "Group.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "Util.h"
|
||||
#include "Transports.h"
|
||||
|
|
@ -4178,7 +4179,7 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe
|
|||
|
||||
// remove from guild
|
||||
if (uint32 guildId = GetGuildIdFromDB(playerguid))
|
||||
if (Guild* guild = sObjectMgr.GetGuildById(guildId))
|
||||
if (Guild* guild = sGuildMgr.GetGuildById(guildId))
|
||||
guild->DelMember(playerguid);
|
||||
|
||||
// remove from arena teams
|
||||
|
|
@ -4827,7 +4828,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
|
|||
return TotalCost;
|
||||
}
|
||||
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GetGuildId());
|
||||
Guild* pGuild = sGuildMgr.GetGuildById(GetGuildId());
|
||||
if (!pGuild)
|
||||
return TotalCost;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue