mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
fix(Core/Units): charmed creatures do not need to check hostility to attacked creature (#7043)
Properly remove channelled charm auras on demand. - Closes #5447
This commit is contained in:
@@ -558,10 +558,11 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
|
||||
if (!owner->IsValidAttackTarget(TargetUnit))
|
||||
return;
|
||||
|
||||
// pussywizard:
|
||||
if (Creature* creaturePet = pet->ToCreature())
|
||||
if (!creaturePet->_CanDetectFeignDeathOf(TargetUnit) || !creaturePet->CanCreatureAttack(TargetUnit))
|
||||
return;
|
||||
// pussywizard (excluded charmed)
|
||||
if (!pet->IsCharmed())
|
||||
if (Creature* creaturePet = pet->ToCreature())
|
||||
if (!creaturePet->_CanDetectFeignDeathOf(TargetUnit) || !creaturePet->CanCreatureAttack(TargetUnit))
|
||||
return;
|
||||
|
||||
// Not let attack through obstructions
|
||||
bool checkLos = !DisableMgr::IsPathfindingEnabled(pet->GetMap()) ||
|
||||
|
||||
Reference in New Issue
Block a user