Core/ObjectMgr: Refactor guild related functions into dedicated class

This commit is contained in:
leak
2011-05-04 10:08:09 +02:00
parent 6d63f92bdb
commit ea06dcf418
15 changed files with 507 additions and 430 deletions
+6 -5
View File
@@ -23,6 +23,7 @@
#include "World.h"
#include "ObjectMgr.h"
#include "ArenaTeamMgr.h"
#include "GuildMgr.h"
#include "AuctionHouseMgr.h"
#include "AccountMgr.h"
#include "PlayerDump.h"
@@ -1690,7 +1691,7 @@ bool ChatHandler::HandleGuildCreateCommand(const char *args)
return false;
}
sObjectMgr->AddGuild (guild);
sGuildMgr->AddGuild(guild);
return true;
}
@@ -1713,7 +1714,7 @@ bool ChatHandler::HandleGuildInviteCommand(const char *args)
return false;
std::string glName = guildStr;
Guild* targetGuild = sObjectMgr->GetGuildByName (glName);
Guild* targetGuild = sGuildMgr->GetGuildByName (glName);
if (!targetGuild)
return false;
@@ -1733,7 +1734,7 @@ bool ChatHandler::HandleGuildUninviteCommand(const char *args)
if (!glId)
return false;
Guild* targetGuild = sObjectMgr->GetGuildById (glId);
Guild* targetGuild = sGuildMgr->GetGuildById (glId);
if (!targetGuild)
return false;
@@ -1759,7 +1760,7 @@ bool ChatHandler::HandleGuildRankCommand(const char *args)
if (!glId)
return false;
Guild* targetGuild = sObjectMgr->GetGuildById (glId);
Guild* targetGuild = sGuildMgr->GetGuildById (glId);
if (!targetGuild)
return false;
@@ -1778,7 +1779,7 @@ bool ChatHandler::HandleGuildDeleteCommand(const char *args)
std::string gld = guildStr;
Guild* targetGuild = sObjectMgr->GetGuildByName (gld);
Guild* targetGuild = sGuildMgr->GetGuildByName (gld);
if (!targetGuild)
return false;