mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8163] Fixed typo and wrong check affecting threat calculation.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
0dc7ea6cc2
commit
e6d40697a1
3 changed files with 19 additions and 28 deletions
|
|
@ -3815,17 +3815,14 @@ void Aura::HandleModThreat(bool apply, bool Real)
|
|||
multiplier = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (level_diff > 0)
|
||||
m_modifier.m_amount += multiplier * level_diff;
|
||||
|
||||
for(int8 x=0;x < MAX_SPELL_SCHOOL;x++)
|
||||
{
|
||||
if(m_modifier.m_miscvalue & int32(1<<x))
|
||||
{
|
||||
if (m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
ApplyPercentModFloatVar(m_target->m_threatModifier[x], m_positive ? m_modifier.m_amount : -m_modifier.m_amount, apply);
|
||||
}
|
||||
}
|
||||
for(int8 x=0;x < MAX_SPELL_SCHOOL;x++)
|
||||
if (m_modifier.m_miscvalue & int32(1<<x))
|
||||
ApplyPercentModFloatVar(m_target->m_threatModifier[x], m_modifier.m_amount, apply);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraModTotalThreat(bool apply, bool Real)
|
||||
|
|
@ -3842,11 +3839,7 @@ void Aura::HandleAuraModTotalThreat(bool apply, bool Real)
|
|||
if (!caster || !caster->isAlive())
|
||||
return;
|
||||
|
||||
float threatMod = 0.0f;
|
||||
if(apply)
|
||||
threatMod = float(m_modifier.m_amount);
|
||||
else
|
||||
threatMod = float(-m_modifier.m_amount);
|
||||
float threatMod = apply ? float(m_modifier.m_amount) : float(-m_modifier.m_amount);
|
||||
|
||||
m_target->getHostilRefManager().threatAssist(caster, threatMod);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,10 +33,8 @@
|
|||
float ThreatCalcHelper::calcThreat(Unit* pHatedUnit, Unit* pHatingUnit, float pThreat, SpellSchoolMask schoolMask, SpellEntry const *pThreatSpell)
|
||||
{
|
||||
if (pThreatSpell)
|
||||
{
|
||||
if( Player* modOwner = pHatingUnit->GetSpellModOwner() )
|
||||
if (Player* modOwner = pHatedUnit->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(pThreatSpell->Id, SPELLMOD_THREAT, pThreat);
|
||||
}
|
||||
|
||||
float threat = pHatedUnit->ApplyTotalThreatModifier(pThreat, schoolMask);
|
||||
return threat;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8162"
|
||||
#define REVISION_NR "8163"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue