Core/Spells: More properly fix SPELL_AURA_DAMAGE_SHIELD
This commit is contained in:
@@ -1456,12 +1456,8 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
|
|||||||
|
|
||||||
uint32 damage = (*dmgShieldItr)->GetAmount();
|
uint32 damage = (*dmgShieldItr)->GetAmount();
|
||||||
|
|
||||||
int32 bonus = 0;
|
if (Unit* caster = (*dmgShieldItr)->GetCaster())
|
||||||
bonus += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, GetSpellSchoolMask(i_spellProto));
|
damage = caster->SpellDamageBonus(this, i_spellProto, damage, SPELL_DIRECT_DAMAGE);
|
||||||
if (Unit * caster = (*dmgShieldItr)->GetCaster())
|
|
||||||
bonus += caster->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS, GetCreatureTypeMask());
|
|
||||||
if (bonus)
|
|
||||||
AddPctN(damage, bonus);
|
|
||||||
|
|
||||||
// No Unit::CalcAbsorbResist here - opcode doesn't send that data - this damage is probably not affected by that
|
// No Unit::CalcAbsorbResist here - opcode doesn't send that data - this damage is probably not affected by that
|
||||||
pVictim->DealDamageMods(this, damage, NULL);
|
pVictim->DealDamageMods(this, damage, NULL);
|
||||||
@@ -10451,6 +10447,15 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||||||
AddPctU(DoneTotalMod, 10 * stacks);
|
AddPctU(DoneTotalMod, 10 * stacks);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case SPELLFAMILY_DRUID:
|
||||||
|
// Thorns
|
||||||
|
if (spellProto->SpellFamilyFlags[0] & 0x100)
|
||||||
|
{
|
||||||
|
// Brambles
|
||||||
|
if (AuraEffect* aurEff = GetAuraEffectOfRankedSpell(16836, 0))
|
||||||
|
AddPctN(DoneTotalMod, aurEff->GetAmount());
|
||||||
|
}
|
||||||
|
break;
|
||||||
case SPELLFAMILY_WARLOCK:
|
case SPELLFAMILY_WARLOCK:
|
||||||
//Fire and Brimstone
|
//Fire and Brimstone
|
||||||
if (spellProto->SpellFamilyFlags[1] & 0x00020040)
|
if (spellProto->SpellFamilyFlags[1] & 0x00020040)
|
||||||
|
|||||||
@@ -594,24 +594,6 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
|
|||||||
if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && m_spellProto->SpellFamilyFlags[1] & 0x400)
|
if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && m_spellProto->SpellFamilyFlags[1] & 0x400)
|
||||||
amount = caster->SpellHealingBonus(GetBase()->GetUnitOwner(), GetSpellProto(), amount, SPELL_DIRECT_DAMAGE);
|
amount = caster->SpellHealingBonus(GetBase()->GetUnitOwner(), GetSpellProto(), amount, SPELL_DIRECT_DAMAGE);
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_DAMAGE_SHIELD:
|
|
||||||
if (!caster)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (caster->GetTypeId() == TYPEID_PLAYER)
|
|
||||||
{
|
|
||||||
DoneActualBenefit += caster->SpellDamageBonus(GetBase()->GetUnitOwner(), GetSpellProto(), 0, SPELL_DIRECT_DAMAGE);
|
|
||||||
DoneActualBenefit *= caster->CalculateLevelPenalty(GetSpellProto());
|
|
||||||
amount += (int32)DoneActualBenefit;
|
|
||||||
|
|
||||||
// Thorns
|
|
||||||
if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags[0] & 0x100)
|
|
||||||
if (AuraEffect * aurEff = caster->GetAuraEffectOfRankedSpell(16836, 0))
|
|
||||||
AddPctN(amount, aurEff->GetAmount());
|
|
||||||
|
|
||||||
return amount;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case SPELL_AURA_PERIODIC_DAMAGE:
|
case SPELL_AURA_PERIODIC_DAMAGE:
|
||||||
if (!caster)
|
if (!caster)
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user