Core/Spells: Regenerating POWER_HAPPINESS should not generate additional threat. (#7146)
Fixed #6190 Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
@@ -10719,9 +10719,12 @@ void Unit::EnergizeBySpell(Unit* victim, uint32 spellID, uint32 damage, Powers p
|
|||||||
// needs to be called after sending spell log
|
// needs to be called after sending spell log
|
||||||
victim->ModifyPower(powerType, damage);
|
victim->ModifyPower(powerType, damage);
|
||||||
|
|
||||||
|
if (powerType != POWER_HAPPINESS)
|
||||||
|
{
|
||||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellID);
|
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellID);
|
||||||
victim->getHostileRefManager().threatAssist(this, float(damage) * 0.5f, spellInfo);
|
victim->getHostileRefManager().threatAssist(this, float(damage) * 0.5f, spellInfo);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
float Unit::SpellPctDamageModsDone(Unit* victim, SpellInfo const* spellProto, DamageEffectType damagetype)
|
float Unit::SpellPctDamageModsDone(Unit* victim, SpellInfo const* spellProto, DamageEffectType damagetype)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user