mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
[svn] Fixed charmer or possessor not being entered in the threat lists of creatures who are being attacked by the charmed or possessed unit.
--HG-- branch : trunk
This commit is contained in:
@@ -103,7 +103,7 @@ void HostilReference::addThreat(float pMod)
|
||||
fireStatusChanged(ThreatRefStatusChangeEvent(UEV_THREAT_REF_THREAT_CHANGE, this, pMod));
|
||||
if(isValid() && pMod >= 0)
|
||||
{
|
||||
Unit* victim_owner = getTarget()->GetOwner();
|
||||
Unit* victim_owner = getTarget()->GetCharmerOrOwner();
|
||||
if(victim_owner && victim_owner->isAlive())
|
||||
getSource()->addThreat(victim_owner, 0.0f); // create a threat to the owner of a pet, if the pet attacks
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user