Core/Threat: Some corrections to 5709929d2b

Fixes HandleChannelDeathItem (spells such as Drain Soul), which got broken by moving m_deathState = s, thanks Shauren
This commit is contained in:
kaelima
2012-05-13 17:47:27 +02:00
parent e5268ba0b5
commit a1ff27a1c6
3 changed files with 53 additions and 64 deletions
+1 -4
View File
@@ -535,10 +535,7 @@ void ThreatManager::processThreatEvent(ThreatRefStatusChangeEvent* threatRefStat
setCurrentVictim(NULL);
setDirty(true);
}
if (getOwner() && getOwner()->IsInWorld())
if (Unit* target = ObjectAccessor::GetUnit(*getOwner(), hostilRef->getUnitGuid()))
if (getOwner()->IsInMap(target))
getOwner()->SendRemoveFromThreatListOpcode(hostilRef);
iOwner->SendRemoveFromThreatListOpcode(hostilRef);
iThreatContainer.remove(hostilRef);
iThreatOfflineContainer.addReference(hostilRef);
}