[8163] Fixed typo and wrong check affecting threat calculation.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
SeT 2009-07-12 00:15:07 +04:00 committed by VladimirMangos
parent 0dc7ea6cc2
commit e6d40697a1
3 changed files with 19 additions and 28 deletions

View file

@ -32,11 +32,9 @@
// The pHatingUnit is not used yet
float ThreatCalcHelper::calcThreat(Unit* pHatedUnit, Unit* pHatingUnit, float pThreat, SpellSchoolMask schoolMask, SpellEntry const *pThreatSpell)
{
if(pThreatSpell)
{
if( Player* modOwner = pHatingUnit->GetSpellModOwner() )
if (pThreatSpell)
if (Player* modOwner = pHatedUnit->GetSpellModOwner())
modOwner->ApplySpellMod(pThreatSpell->Id, SPELLMOD_THREAT, pThreat);
}
float threat = pHatedUnit->ApplyTotalThreatModifier(pThreat, schoolMask);
return threat;