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:
1 parent
2f27bde026
commit
b0a48f60c9
4 files changed
+16
-5
No files matched your search
@@ -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