fix(Core/Unit): Threat from energize effects should be proportional t… (#17352)
fix(Core/Unit): Threat from energize effects should be proportional to the amount of power gained
This commit is contained in:
parent
a7969472b4
commit
a8e514ea39
1 changed files with 3 additions and 3 deletions
|
|
@ -11255,12 +11255,12 @@ void Unit::SendEnergizeSpellLog(Unit* victim, uint32 spellID, uint32 damage, Pow
|
|||
|
||||
void Unit::EnergizeBySpell(Unit* victim, uint32 spellID, uint32 damage, Powers powerType)
|
||||
{
|
||||
victim->ModifyPower(powerType, damage, false);
|
||||
int32 gainedPower = victim->ModifyPower(powerType, damage, false);
|
||||
|
||||
if (powerType != POWER_HAPPINESS)
|
||||
if (powerType != POWER_HAPPINESS && gainedPower)
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellID);
|
||||
victim->getHostileRefMgr().threatAssist(this, float(damage) * 0.5f, spellInfo);
|
||||
victim->getHostileRefMgr().threatAssist(this, float(gainedPower) * 0.5f, spellInfo);
|
||||
}
|
||||
|
||||
SendEnergizeSpellLog(victim, spellID, damage, powerType);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue