*Config option to allow multiple Guild Masters by MrSmite

--HG--
branch : trunk
This commit is contained in:
maximius
2009-09-12 22:33:24 -07:00
parent 726cdb7b8f
commit c61bb37a0e
3 changed files with 15 additions and 9 deletions

View File

@@ -30,6 +30,7 @@
#include "Util.h"
#include "Language.h"
#include "World.h"
#include "Config/ConfigEnv.h"
Guild::Guild()
{
@@ -279,13 +280,11 @@ bool Guild::LoadGuildFromDB(uint32 GuildId)
else if (GM_rights != GR_GUILDMASTER)
SetLeader(m_LeaderGuid);
// Allow only 1 guildmaster
for (MemberList::const_iterator itr = members.begin(); itr != members.end(); ++itr)
{
if (itr->second.RankId == GR_GUILDMASTER && GUID_LOPART(m_LeaderGuid) != itr->first)
//set right of member to officer
ChangeRank(itr->first, GR_OFFICER);
}
// Check config if multiple guildmasters are allowed
if (sConfig.GetBoolDefault("Guild.AllowMultipleGuildMaster", 0) == 0)
for (MemberList::const_iterator itr = members.begin(); itr != members.end(); ++itr)
if (itr->second.RankId == GR_GUILDMASTER && GUID_LOPART(m_LeaderGuid) != itr->first) // Allow only 1 guildmaster
ChangeRank(itr->first, GR_OFFICER); // set right of member to officer
sLog.outDebug("Guild %u Creation time Loaded day: %u, month: %u, year: %u", GuildId, m_CreatedDay, m_CreatedMonth, m_CreatedYear);

View File

@@ -40,7 +40,7 @@
// Format is YYYYMMDDRR where RR is the change in the conf file
// for that day.
#ifndef _TRINITY_CORE_CONFVER
# define _TRINITY_CORE_CONFVER 2009091101
# define _TRINITY_CORE_CONFVER 2009091201
#endif //_TRINITY_CORE_CONFVER
#ifdef WIN32

View File

@@ -1,7 +1,7 @@
##########################################
# Trinity Core worldd configuration file #
##########################################
ConfVersion=2009091101
ConfVersion=2009091201
###################################################################################################################
# CONNECTIONS AND DIRECTORIES
@@ -1892,6 +1892,12 @@ Ra.Secure = 1
# NoResetTalentsCost
# Enable or disable no cost when reseting talents
#
# Guild.AllowMultipleGuildMaster
# Allow override of 1 Guild Master limit. Additional Guild Masters must
# be set using the ".guild rank" command, not through the UI
# Default: 0 = Only 1 Guild Master per guild
# 1 = Allow more than one Guild Master
#
# OutdoorPvP.Wintergrasp.StartTime = 30
# The start time of the first battle after server starts (default: 30 minutes)
#
@@ -1969,6 +1975,7 @@ PvPToken.Enable = 0
PvPToken.MapAllowType = 4
PvPToken.ItemID = 29434
PvPToken.ItemCount = 1
Guild.AllowMultipleGuildMaster = 0
OutdoorPvP.Wintergrasp.StartTime = 30
OutdoorPvP.Wintergrasp.BattleTime = 30
OutdoorPvP.Wintergrasp.Interval = 150