mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
feat(Core/Map): Allow disabling the blizzlike PvP line of sight checks (#11692)
This commit is contained in:
@@ -2440,6 +2440,14 @@ float Map::GetWaterLevel(float x, float y) const
|
||||
|
||||
bool Map::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, LineOfSightChecks checks, VMAP::ModelIgnoreFlags ignoreFlags) const
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_VMAP_BLIZZLIKE_PVP_LOS))
|
||||
{
|
||||
if (IsBattlegroundOrArena())
|
||||
{
|
||||
ignoreFlags = VMAP::ModelIgnoreFlags::Nothing;
|
||||
}
|
||||
}
|
||||
|
||||
if ((checks & LINEOFSIGHT_CHECK_VMAP) && !VMAP::VMapFactory::createOrGetVMapMgr()->isInLineOfSight(GetId(), x1, y1, z1, x2, y2, z2, ignoreFlags))
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -175,6 +175,7 @@ enum WorldBoolConfigs
|
||||
CONFIG_ALLOW_JOIN_BG_AND_LFG,
|
||||
CONFIG_MISS_CHANCE_MULTIPLIER_ONLY_FOR_PLAYERS,
|
||||
CONFIG_LEAVE_GROUP_ON_LOGOUT,
|
||||
CONFIG_VMAP_BLIZZLIKE_PVP_LOS,
|
||||
BOOL_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
||||
@@ -1297,6 +1297,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
bool enableLOS = sConfigMgr->GetOption<bool>("vmap.enableLOS", true);
|
||||
bool enableHeight = sConfigMgr->GetOption<bool>("vmap.enableHeight", true);
|
||||
bool enablePetLOS = sConfigMgr->GetOption<bool>("vmap.petLOS", true);
|
||||
m_bool_configs[CONFIG_VMAP_BLIZZLIKE_PVP_LOS] = sConfigMgr->GetOption<bool>("vmap.BlizzlikePvPLOS", true);
|
||||
|
||||
if (!enableHeight)
|
||||
LOG_ERROR("server.loading", "VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support.");
|
||||
|
||||
@@ -385,6 +385,13 @@ vmap.enableHeight = 1
|
||||
|
||||
vmap.petLOS = 1
|
||||
|
||||
# vmap.BlizzlikePvPLOS
|
||||
# Description: Check line of sight for battleground and arena gameobjects and other doodads (such as WSG treestumps).
|
||||
# Default: 1 - (Enabled, players will be able to fire spells through treestumps and other objects).
|
||||
# 0 - (Disabled, players will NOT be able to fire spells through treestumps and other objects).
|
||||
|
||||
vmap.BlizzlikePvPLOS = 1
|
||||
|
||||
#
|
||||
# vmap.enableIndoorCheck
|
||||
# Description: VMap based indoor check to remove outdoor-only auras (mounts etc.).
|
||||
|
||||
Reference in New Issue
Block a user