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:
@@ -115,9 +115,14 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
||||
return;
|
||||
|
||||
// Not let attack through obstructions
|
||||
//if(!pet->IsWithinLOSInMap(TargetUnit))
|
||||
// return;
|
||||
if(sWorld.getConfig(CONFIG_PET_LOS))
|
||||
{
|
||||
|
||||
if(!pet->IsWithinLOSInMap(TargetUnit))
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
pet->clearUnitState(UNIT_STAT_FOLLOW);
|
||||
|
||||
if(pet->GetTypeId() != TYPEID_PLAYER && ((Creature*)pet)->IsAIEnabled)
|
||||
|
||||
+1
-1
@@ -1009,7 +1009,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
|
||||
|
||||
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_BG_START_MUSIC] = sConfig.GetBoolDefault("MusicInBattleground", false);
|
||||
m_configs[CONFIG_START_ALL_SPELLS] = sConfig.GetBoolDefault("PlayerStart.AllSpells", false);
|
||||
|
||||
+1
-1
@@ -207,7 +207,7 @@ enum WorldConfigs
|
||||
CONFIG_MIN_LOG_UPDATE,
|
||||
CONFIG_ENABLE_SINFO_LOGIN,
|
||||
CONFIG_PREMATURE_BG_REWARD,
|
||||
|
||||
CONFIG_PET_LOS,
|
||||
CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user