mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
feat(Map): Add open world LOS settings (#18816)
* chore. Add open world LOS settings * Name change and conditional deny * modify information in worldserver.conf.dist * Remove pvp from variables and constants
This commit is contained in:
@@ -1342,6 +1342,15 @@ vmap.petLOS = 1
|
|||||||
|
|
||||||
vmap.BlizzlikePvPLOS = 1
|
vmap.BlizzlikePvPLOS = 1
|
||||||
|
|
||||||
|
#
|
||||||
|
# vmap.BlizzlikeLOSInOpenWorld
|
||||||
|
# Description: Check line of sight to see game objects in the open world.
|
||||||
|
# Default: 1 (Enabled, Players will be able to cast spells through tree stumps and other objects in the open world).
|
||||||
|
# 0 (Disabled, Players will not be able to cast spells through tree stumps and other objects in the open world).
|
||||||
|
#
|
||||||
|
|
||||||
|
vmap.BlizzlikeLOSInOpenWorld = 1
|
||||||
|
|
||||||
#
|
#
|
||||||
# vmap.enableIndoorCheck
|
# vmap.enableIndoorCheck
|
||||||
# Description: VMap based indoor check to remove outdoor-only auras (mounts etc.).
|
# Description: VMap based indoor check to remove outdoor-only auras (mounts etc.).
|
||||||
|
|||||||
@@ -2445,6 +2445,14 @@ bool Map::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, floa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!sWorld->getBoolConfig(CONFIG_VMAP_BLIZZLIKE_LOS_OPEN_WORLD))
|
||||||
|
{
|
||||||
|
if (IsWorldMap())
|
||||||
|
{
|
||||||
|
ignoreFlags = VMAP::ModelIgnoreFlags::Nothing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((checks & LINEOFSIGHT_CHECK_VMAP) && !VMAP::VMapFactory::createOrGetVMapMgr()->isInLineOfSight(GetId(), x1, y1, z1, x2, y2, z2, ignoreFlags))
|
if ((checks & LINEOFSIGHT_CHECK_VMAP) && !VMAP::VMapFactory::createOrGetVMapMgr()->isInLineOfSight(GetId(), x1, y1, z1, x2, y2, z2, ignoreFlags))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -454,6 +454,7 @@ public:
|
|||||||
[[nodiscard]] bool IsBattleground() const { return i_mapEntry && i_mapEntry->IsBattleground(); }
|
[[nodiscard]] bool IsBattleground() const { return i_mapEntry && i_mapEntry->IsBattleground(); }
|
||||||
[[nodiscard]] bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); }
|
[[nodiscard]] bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); }
|
||||||
[[nodiscard]] bool IsBattlegroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattlegroundOrArena(); }
|
[[nodiscard]] bool IsBattlegroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattlegroundOrArena(); }
|
||||||
|
[[nodiscard]] bool IsWorldMap() const { return i_mapEntry && i_mapEntry->IsWorldMap(); }
|
||||||
|
|
||||||
bool GetEntrancePos(int32& mapid, float& x, float& y)
|
bool GetEntrancePos(int32& mapid, float& x, float& y)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ enum WorldBoolConfigs
|
|||||||
CONFIG_LEAVE_GROUP_ON_LOGOUT,
|
CONFIG_LEAVE_GROUP_ON_LOGOUT,
|
||||||
CONFIG_QUEST_POI_ENABLED,
|
CONFIG_QUEST_POI_ENABLED,
|
||||||
CONFIG_VMAP_BLIZZLIKE_PVP_LOS,
|
CONFIG_VMAP_BLIZZLIKE_PVP_LOS,
|
||||||
|
CONFIG_VMAP_BLIZZLIKE_LOS_OPEN_WORLD,
|
||||||
CONFIG_OBJECT_SPARKLES,
|
CONFIG_OBJECT_SPARKLES,
|
||||||
CONFIG_LOW_LEVEL_REGEN_BOOST,
|
CONFIG_LOW_LEVEL_REGEN_BOOST,
|
||||||
CONFIG_OBJECT_QUEST_MARKERS,
|
CONFIG_OBJECT_QUEST_MARKERS,
|
||||||
|
|||||||
@@ -1317,6 +1317,7 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
bool enableHeight = sConfigMgr->GetOption<bool>("vmap.enableHeight", true);
|
bool enableHeight = sConfigMgr->GetOption<bool>("vmap.enableHeight", true);
|
||||||
bool enablePetLOS = sConfigMgr->GetOption<bool>("vmap.petLOS", true);
|
bool enablePetLOS = sConfigMgr->GetOption<bool>("vmap.petLOS", true);
|
||||||
_bool_configs[CONFIG_VMAP_BLIZZLIKE_PVP_LOS] = sConfigMgr->GetOption<bool>("vmap.BlizzlikePvPLOS", true);
|
_bool_configs[CONFIG_VMAP_BLIZZLIKE_PVP_LOS] = sConfigMgr->GetOption<bool>("vmap.BlizzlikePvPLOS", true);
|
||||||
|
_bool_configs[CONFIG_VMAP_BLIZZLIKE_LOS_OPEN_WORLD] = sConfigMgr->GetOption<bool>("vmap.BlizzlikeLOSInOpenWorld", true);
|
||||||
|
|
||||||
if (!enableHeight)
|
if (!enableHeight)
|
||||||
LOG_ERROR("server.loading", "VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support.");
|
LOG_ERROR("server.loading", "VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support.");
|
||||||
|
|||||||
Reference in New Issue
Block a user