[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:
gvcoman
2008-11-08 17:46:34 -06:00
parent e94ec9fa71
commit 78647da51d

View File

@@ -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
}