mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
feat(Core/Chat): Add config option to allow use LFG anywhere not only in city (#1586)
This commit is contained in:
@@ -5615,7 +5615,11 @@ void Player::RepopAtGraveyard()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone)
|
bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone)
|
||||||
{
|
{
|
||||||
|
// Player can join LFG anywhere
|
||||||
|
if (channel->flags & CHANNEL_DBC_FLAG_LFG && sWorld->getBoolConfig(CONFIG_LFG_LOCATION_ALL))
|
||||||
|
return true;
|
||||||
|
|
||||||
if (channel->flags & CHANNEL_DBC_FLAG_ZONE_DEP && zone->flags & AREA_FLAG_ARENA_INSTANCE)
|
if (channel->flags & CHANNEL_DBC_FLAG_ZONE_DEP && zone->flags & AREA_FLAG_ARENA_INSTANCE)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -1315,6 +1315,9 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
m_bool_configs[CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA] = sConfigMgr->GetBoolDefault("Calculate.Creature.Zone.Area.Data", false);
|
m_bool_configs[CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA] = sConfigMgr->GetBoolDefault("Calculate.Creature.Zone.Area.Data", false);
|
||||||
m_bool_configs[CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA] = sConfigMgr->GetBoolDefault("Calculate.Gameoject.Zone.Area.Data", false);
|
m_bool_configs[CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA] = sConfigMgr->GetBoolDefault("Calculate.Gameoject.Zone.Area.Data", false);
|
||||||
|
|
||||||
|
// Player can join LFG anywhere
|
||||||
|
m_bool_configs[CONFIG_LFG_LOCATION_ALL] = sConfigMgr->GetBoolDefault("LFG.Location.All", false);
|
||||||
|
|
||||||
// call ScriptMgr if we're reloading the configuration
|
// call ScriptMgr if we're reloading the configuration
|
||||||
sScriptMgr->OnAfterConfigLoad(reload);
|
sScriptMgr->OnAfterConfigLoad(reload);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ enum WorldBoolConfigs
|
|||||||
CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA,
|
CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA,
|
||||||
CONFIG_CHECK_GOBJECT_LOS,
|
CONFIG_CHECK_GOBJECT_LOS,
|
||||||
CONFIG_CLOSE_IDLE_CONNECTIONS,
|
CONFIG_CLOSE_IDLE_CONNECTIONS,
|
||||||
|
CONFIG_LFG_LOCATION_ALL, // Player can join LFG anywhere
|
||||||
BOOL_CONFIG_VALUE_COUNT
|
BOOL_CONFIG_VALUE_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3214,5 +3214,13 @@ Calculate.Creature.Zone.Area.Data = 0
|
|||||||
|
|
||||||
Calculate.Gameoject.Zone.Area.Data = 0
|
Calculate.Gameoject.Zone.Area.Data = 0
|
||||||
|
|
||||||
|
# LFG SETTINGS
|
||||||
|
#
|
||||||
|
# Includes satellite to search for work elsewhere LFG
|
||||||
|
# Default: 0 - Disable
|
||||||
|
# 1 - Enable
|
||||||
|
|
||||||
|
LFG.Location.All = 0
|
||||||
|
|
||||||
#
|
#
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user