[8163] Fixed typo and wrong check affecting threat calculation. Author: SeT
--HG-- branch : trunk
This commit is contained in:
+4
-11
@@ -4142,18 +4142,15 @@ void AuraEffect::HandleModThreat(bool apply, bool Real, bool changeAmount)
|
||||
multiplier = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (level_diff > 0)
|
||||
m_amount += multiplier * level_diff;
|
||||
|
||||
for(int8 x=0;x < MAX_SPELL_SCHOOL;x++)
|
||||
{
|
||||
if(GetMiscValue() & int32(1<<x))
|
||||
{
|
||||
if (m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
for(int8 x=0;x < MAX_SPELL_SCHOOL;x++)
|
||||
if (GetMiscValue() & int32(1<<x))
|
||||
ApplyPercentModFloatVar(m_target->m_threatModifier[x], m_amount, apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraModTotalThreat(bool apply, bool Real, bool changeAmount)
|
||||
{
|
||||
@@ -4169,11 +4166,7 @@ void AuraEffect::HandleAuraModTotalThreat(bool apply, bool Real, bool changeAmou
|
||||
if (!caster || !caster->isAlive())
|
||||
return;
|
||||
|
||||
float threatMod = 0.0f;
|
||||
if(apply)
|
||||
threatMod = float(m_amount);
|
||||
else
|
||||
threatMod = float(-m_amount);
|
||||
float threatMod = apply ? float(m_amount) : float(-m_amount);
|
||||
|
||||
m_target->getHostilRefManager().threatAssist(caster, threatMod);
|
||||
}
|
||||
|
||||
@@ -35,10 +35,8 @@
|
||||
float ThreatCalcHelper::calcThreat(Unit* pHatedUnit, Unit* pHatingUnit, float pThreat, SpellSchoolMask schoolMask, SpellEntry const *pThreatSpell)
|
||||
{
|
||||
if (pThreatSpell)
|
||||
{
|
||||
if (Player* modOwner = pHatedUnit->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(pThreatSpell->Id, SPELLMOD_THREAT, pThreat);
|
||||
}
|
||||
|
||||
float threat = pHatedUnit->ApplyTotalThreatModifier(pThreat, schoolMask);
|
||||
return threat;
|
||||
|
||||
Reference in New Issue
Block a user