mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 20:22:23 -04:00
Core/Unit: Pet shouldn't be notified for DOT damage on the owner (#17133)
- Fix by @MrSmite
- Closes #16894
(cherry picked from commit 4de1426d08)
This commit is contained in:
@@ -623,11 +623,14 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
|
||||
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && this != victim)
|
||||
{
|
||||
// Signal to pets that their owner was attacked
|
||||
Pet* pet = victim->ToPlayer()->GetPet();
|
||||
// Signal to pets that their owner was attacked - except when DOT.
|
||||
if (damagetype != DOT)
|
||||
{
|
||||
Pet* pet = victim->ToPlayer()->GetPet();
|
||||
|
||||
if (pet && pet->IsAlive())
|
||||
pet->AI()->OwnerAttackedBy(this);
|
||||
if (pet && pet->IsAlive())
|
||||
pet->AI()->OwnerAttackedBy(this);
|
||||
}
|
||||
|
||||
if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user