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

--HG--
branch : trunk
This commit is contained in:
megamage
2009-07-12 18:06:19 +08:00
parent 721782b259
commit 8fedc832e8
2 changed files with 15 additions and 24 deletions
+2 -4
View File
@@ -34,11 +34,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 = pHatedUnit->GetSpellModOwner() )
if (pThreatSpell)
if (Player* modOwner = pHatedUnit->GetSpellModOwner())
modOwner->ApplySpellMod(pThreatSpell->Id, SPELLMOD_THREAT, pThreat);
}
float threat = pHatedUnit->ApplyTotalThreatModifier(pThreat, schoolMask);
return threat;