Added new config option: vmap.petLOS

Enabling it makes pets do LOS check before attacking its target.

--HG--
branch : trunk
This commit is contained in:
raczman
2009-05-21 23:17:52 +02:00
parent 2f27bde026
commit b0a48f60c9
4 changed files with 16 additions and 5 deletions
+7 -2
View File
@@ -115,8 +115,13 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
return; return;
// Not let attack through obstructions // Not let attack through obstructions
//if(!pet->IsWithinLOSInMap(TargetUnit)) if(sWorld.getConfig(CONFIG_PET_LOS))
// return; {
if(!pet->IsWithinLOSInMap(TargetUnit))
return;
}
pet->clearUnitState(UNIT_STAT_FOLLOW); pet->clearUnitState(UNIT_STAT_FOLLOW);
+1 -1
View File
@@ -1009,7 +1009,7 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_MAX_WHO] = sConfig.GetIntDefault("MaxWhoListReturns", 49); m_configs[CONFIG_MAX_WHO] = sConfig.GetIntDefault("MaxWhoListReturns", 49);
m_configs[CONFIG_PET_LOS] = sConfig.GetBoolDefault("vmap.petLOS", false);
m_configs[CONFIG_PREMATURE_BG_REWARD] = sConfig.GetBoolDefault("Battleground.PrematureReward", true); m_configs[CONFIG_PREMATURE_BG_REWARD] = sConfig.GetBoolDefault("Battleground.PrematureReward", true);
m_configs[CONFIG_BG_START_MUSIC] = sConfig.GetBoolDefault("MusicInBattleground", false); m_configs[CONFIG_BG_START_MUSIC] = sConfig.GetBoolDefault("MusicInBattleground", false);
m_configs[CONFIG_START_ALL_SPELLS] = sConfig.GetBoolDefault("PlayerStart.AllSpells", false); m_configs[CONFIG_START_ALL_SPELLS] = sConfig.GetBoolDefault("PlayerStart.AllSpells", false);
+1 -1
View File
@@ -207,7 +207,7 @@ enum WorldConfigs
CONFIG_MIN_LOG_UPDATE, CONFIG_MIN_LOG_UPDATE,
CONFIG_ENABLE_SINFO_LOGIN, CONFIG_ENABLE_SINFO_LOGIN,
CONFIG_PREMATURE_BG_REWARD, CONFIG_PREMATURE_BG_REWARD,
CONFIG_PET_LOS,
CONFIG_VALUE_COUNT CONFIG_VALUE_COUNT
}; };
+6
View File
@@ -147,6 +147,11 @@ EAIErrorLevel = 2
# These spells are ignored for LoS calculation # These spells are ignored for LoS calculation
# List of ids with delimiter ',' # List of ids with delimiter ','
# #
# vmap.petLOS
# Check LOS for pets, to avoid them going through walls etc.
# Default: 0 (disable, less CPU usage)
# 1 (enable, each pet attack command will check for LOS)
#
# DetectPosCollision # DetectPosCollision
# Check final move position, summon position, etc for visible collision with other objects or # Check final move position, summon position, etc for visible collision with other objects or
# wall (wall only if vmaps are enabled) # wall (wall only if vmaps are enabled)
@@ -193,6 +198,7 @@ vmap.enableLOS = 0
vmap.enableHeight = 0 vmap.enableHeight = 0
vmap.ignoreMapIds = "369" vmap.ignoreMapIds = "369"
vmap.ignoreSpellIds = "7720" vmap.ignoreSpellIds = "7720"
vmap.petLOS = 0
DetectPosCollision = 1 DetectPosCollision = 1
TargetPosRecalculateRange = 1.5 TargetPosRecalculateRange = 1.5
UpdateUptimeInterval = 10 UpdateUptimeInterval = 10