Fixed Chain Lightning overproccing with Lightning Overload, patch by DrTenma

Closes issue #1198.

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-07-02 14:24:05 +02:00
parent 3fd0fb8f97
commit 255e7e8b83
4 changed files with 22 additions and 15 deletions
+5
View File
@@ -36,8 +36,13 @@
float ThreatCalcHelper::calcThreat(Unit* pHatedUnit, Unit* /*pHatingUnit*/, float fThreat, SpellSchoolMask schoolMask, SpellEntry const *pThreatSpell)
{
if (pThreatSpell)
{
if (pThreatSpell->AttributesEx & SPELL_ATTR_EX_NO_THREAT)
return 0.0f;
if (Player* modOwner = pHatedUnit->GetSpellModOwner())
modOwner->ApplySpellMod(pThreatSpell->Id, SPELLMOD_THREAT, fThreat);
}
return pHatedUnit->ApplyTotalThreatModifier(fThreat, schoolMask);
}