mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
guild_base.cpp & .h include header cleanup
This commit is contained in:
parent
0c21f56ff3
commit
20200fd028
@ -16,7 +16,6 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "debug.h"
|
||||
#include "guild_base.h"
|
||||
#include "database.h"
|
||||
#include "logsys.h"
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
|
||||
#include "guilds.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Database;
|
||||
|
||||
class CharGuildInfo {
|
||||
public:
|
||||
class CharGuildInfo
|
||||
{
|
||||
public:
|
||||
//fields from `characer_`
|
||||
uint32 char_id;
|
||||
std::string char_name;
|
||||
@ -30,13 +30,17 @@ public:
|
||||
};
|
||||
|
||||
//this object holds guild functionality shared between world and zone.
|
||||
class BaseGuildManager {
|
||||
public:
|
||||
class BaseGuildManager
|
||||
{
|
||||
public:
|
||||
BaseGuildManager();
|
||||
virtual ~BaseGuildManager();
|
||||
|
||||
//this must be called before doing anything else with this object
|
||||
void SetDatabase(Database *db) { m_db = db; }
|
||||
void SetDatabase(Database *db)
|
||||
{
|
||||
m_db = db;
|
||||
}
|
||||
|
||||
bool LoadGuilds();
|
||||
bool RefreshGuild(uint32 guild_id);
|
||||
@ -89,7 +93,7 @@ public:
|
||||
static const char *const GuildActionNames[_MaxGuildAction];
|
||||
uint32 DoesAccountContainAGuildLeader(uint32 AccountID);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
//the methods which must be defined by base classes.
|
||||
virtual void SendGuildRefresh(uint32 guild_id, bool name, bool motd, bool rank, bool relation) = 0;
|
||||
virtual void SendCharRefresh(uint32 old_guild_id, uint32 guild_id, uint32 charid) = 0;
|
||||
@ -114,13 +118,15 @@ protected:
|
||||
|
||||
bool LocalDeleteGuild(uint32 guild_id);
|
||||
|
||||
class RankInfo {
|
||||
class RankInfo
|
||||
{
|
||||
public:
|
||||
RankInfo();
|
||||
std::string name;
|
||||
bool permissions[_MaxGuildAction];
|
||||
};
|
||||
class GuildInfo {
|
||||
class GuildInfo
|
||||
{
|
||||
public:
|
||||
GuildInfo();
|
||||
std::string name;
|
||||
@ -132,7 +138,7 @@ protected:
|
||||
uint32 leader_char_id;
|
||||
uint8 minstatus;
|
||||
//tribute is not in here on purpose, since it is only valid in world!
|
||||
RankInfo ranks[GUILD_MAX_RANK+1];
|
||||
RankInfo ranks[GUILD_MAX_RANK + 1];
|
||||
};
|
||||
|
||||
std::map<uint32, GuildInfo *> m_guilds; //we own the pointers in this map
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user