Dungeon Finder: Add config value to Enable/Disable Dungeon Finder

Note: Default value = Disable (while is WIP)

--HG--
branch : trunk
This commit is contained in:
Spp
2010-08-14 03:25:43 +02:00
parent f12b51c218
commit ff726c2792
5 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ LFGMgr::~LFGMgr()
void LFGMgr::Update(uint32 diff) void LFGMgr::Update(uint32 diff)
{ {
if (!m_update) if (!m_update || !sWorld.getConfig(CONFIG_DUNGEON_FINDER_ENABLE))
return; return;
m_update = false; m_update = false;
@@ -25,6 +25,11 @@
void WorldSession::HandleLfgJoinOpcode(WorldPacket &recv_data) void WorldSession::HandleLfgJoinOpcode(WorldPacket &recv_data)
{ {
sLog.outDebug("CMSG_LFG_JOIN"); sLog.outDebug("CMSG_LFG_JOIN");
if (!sWorld.getConfig(CONFIG_DUNGEON_FINDER_ENABLE))
{
recv_data.rpos(recv_data.wpos());
return;
}
uint8 numDungeons; uint8 numDungeons;
uint32 dungeon; uint32 dungeon;
+3
View File
@@ -1220,6 +1220,9 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_CHATLOG_ADDON] = sConfig.GetBoolDefault("ChatLogs.Addon", false); m_configs[CONFIG_CHATLOG_ADDON] = sConfig.GetBoolDefault("ChatLogs.Addon", false);
m_configs[CONFIG_CHATLOG_BGROUND] = sConfig.GetBoolDefault("ChatLogs.Battleground", false); m_configs[CONFIG_CHATLOG_BGROUND] = sConfig.GetBoolDefault("ChatLogs.Battleground", false);
// Dungeon finder
m_configs[CONFIG_DUNGEON_FINDER_ENABLE] = sConfig.GetBoolDefault("DungeonFinder.Enable", false);
sScriptMgr.OnConfigLoad(reload); sScriptMgr.OnConfigLoad(reload);
} }
+1
View File
@@ -285,6 +285,7 @@ enum WorldConfigs
CONFIG_CHARDELETE_METHOD, CONFIG_CHARDELETE_METHOD,
CONFIG_CHARDELETE_MIN_LEVEL, CONFIG_CHARDELETE_MIN_LEVEL,
CONFIG_CLEAN_CHARACTER_DB, CONFIG_CLEAN_CHARACTER_DB,
CONFIG_DUNGEON_FINDER_ENABLE,
CONFIG_VALUE_COUNT CONFIG_VALUE_COUNT
}; };
@@ -1974,6 +1974,10 @@ CharDelete.KeepDays = 30
# The required level of character to be able to send and receive mail # The required level of character to be able to send and receive mail
# Default: 1 (From level 1) # Default: 1 (From level 1)
# #
# DungeonFinder.Enable
# Enable Dungeon Finder system. Will enable dungeon finder and raid finder
# Default: 0 - off
# 1 - on
############################################################################### ###############################################################################
PlayerStart.AllReputation = 0 PlayerStart.AllReputation = 0
@@ -1996,3 +2000,4 @@ LevelReq.Trade = 1
LevelReq.Ticket = 1 LevelReq.Ticket = 1
LevelReq.Auction = 1 LevelReq.Auction = 1
LevelReq.Mail = 1 LevelReq.Mail = 1
DungeonFinder.Enable = 0