Core/Spell:
* Fix SPELL_DAMAGE_CLASS_NONE calculation for SpellHealingBonusTaken * Fix some codestyles
This commit is contained in:
@@ -10814,11 +10814,11 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
|
||||
int32 TakenTotal = 0;
|
||||
float TakenTotalMod = 1.0f;
|
||||
|
||||
//from positive and negative SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
|
||||
//multiplicative bonus, for example Dispersion + Shadowform (0.10*0.85=0.085)
|
||||
// from positive and negative SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
|
||||
// multiplicative bonus, for example Dispersion + Shadowform (0.10*0.85=0.085)
|
||||
TakenTotalMod *= GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, spellProto->GetSchoolMask());
|
||||
|
||||
//.. taken pct: dummy auras
|
||||
//.. taken pct: dummy auras
|
||||
AuraEffectList const& mDummyAuras = GetAuraEffectsByType(SPELL_AURA_DUMMY);
|
||||
for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
|
||||
{
|
||||
@@ -11411,7 +11411,10 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
|
||||
{
|
||||
// No bonus healing for SPELL_DAMAGE_CLASS_NONE class spells by default
|
||||
if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE)
|
||||
{
|
||||
healamount = int32(healamount * TakenTotalMod);
|
||||
return healamount < 0 ? 0 : healamount;
|
||||
}
|
||||
}
|
||||
|
||||
// Default calculation
|
||||
@@ -11820,7 +11823,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType
|
||||
return uint32(std::max(tmpDamage, 0.0f));
|
||||
}
|
||||
|
||||
uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackType attType, SpellInfo const *spellProto)
|
||||
uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackType attType, SpellInfo const* spellProto)
|
||||
{
|
||||
if (pdamage == 0)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user