mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 05:43:12 +01:00
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)
|
||||
|
||||
Reference in New Issue
Block a user