*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
+6 -7
View File
@@ -30,6 +30,7 @@
#include "Util.h" #include "Util.h"
#include "Language.h" #include "Language.h"
#include "World.h" #include "World.h"
#include "Config/ConfigEnv.h"
Guild::Guild() Guild::Guild()
{ {
@@ -279,13 +280,11 @@ bool Guild::LoadGuildFromDB(uint32 GuildId)
else if (GM_rights != GR_GUILDMASTER) else if (GM_rights != GR_GUILDMASTER)
SetLeader(m_LeaderGuid); SetLeader(m_LeaderGuid);
// Allow only 1 guildmaster // Check config if multiple guildmasters are allowed
for (MemberList::const_iterator itr = members.begin(); itr != members.end(); ++itr) 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) if (itr->second.RankId == GR_GUILDMASTER && GUID_LOPART(m_LeaderGuid) != itr->first) // Allow only 1 guildmaster
//set right of member to officer ChangeRank(itr->first, GR_OFFICER); // set right of member to officer
ChangeRank(itr->first, GR_OFFICER);
}
sLog.outDebug("Guild %u Creation time Loaded day: %u, month: %u, year: %u", GuildId, m_CreatedDay, m_CreatedMonth, m_CreatedYear); sLog.outDebug("Guild %u Creation time Loaded day: %u, month: %u, year: %u", GuildId, m_CreatedDay, m_CreatedMonth, m_CreatedYear);
+1 -1
View File
@@ -40,7 +40,7 @@
// Format is YYYYMMDDRR where RR is the change in the conf file // Format is YYYYMMDDRR where RR is the change in the conf file
// for that day. // for that day.
#ifndef _TRINITY_CORE_CONFVER #ifndef _TRINITY_CORE_CONFVER
# define _TRINITY_CORE_CONFVER 2009091101 # define _TRINITY_CORE_CONFVER 2009091201
#endif //_TRINITY_CORE_CONFVER #endif //_TRINITY_CORE_CONFVER
#ifdef WIN32 #ifdef WIN32
+8 -1
View File
@@ -1,7 +1,7 @@
########################################## ##########################################
# Trinity Core worldd configuration file # # Trinity Core worldd configuration file #
########################################## ##########################################
ConfVersion=2009091101 ConfVersion=2009091201
################################################################################################################### ###################################################################################################################
# CONNECTIONS AND DIRECTORIES # CONNECTIONS AND DIRECTORIES
@@ -1892,6 +1892,12 @@ Ra.Secure = 1
# NoResetTalentsCost # NoResetTalentsCost
# Enable or disable no cost when reseting talents # 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 # OutdoorPvP.Wintergrasp.StartTime = 30
# The start time of the first battle after server starts (default: 30 minutes) # The start time of the first battle after server starts (default: 30 minutes)
# #
@@ -1969,6 +1975,7 @@ PvPToken.Enable = 0
PvPToken.MapAllowType = 4 PvPToken.MapAllowType = 4
PvPToken.ItemID = 29434 PvPToken.ItemID = 29434
PvPToken.ItemCount = 1 PvPToken.ItemCount = 1
Guild.AllowMultipleGuildMaster = 0
OutdoorPvP.Wintergrasp.StartTime = 30 OutdoorPvP.Wintergrasp.StartTime = 30
OutdoorPvP.Wintergrasp.BattleTime = 30 OutdoorPvP.Wintergrasp.BattleTime = 30
OutdoorPvP.Wintergrasp.Interval = 150 OutdoorPvP.Wintergrasp.Interval = 150