mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
fix(Core/Spells): Added SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST… (#9764)
… to Chaos Bolt Passive
This commit is contained in:
@@ -1841,7 +1841,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit const* attacker, Unit const* victim, co
|
||||
return (newdamage > 1) ? newdamage : 1;
|
||||
}
|
||||
|
||||
float Unit::GetEffectiveResistChance(Unit const* owner, SpellSchoolMask schoolMask, Unit const* victim, SpellInfo const* spellInfo)
|
||||
float Unit::GetEffectiveResistChance(Unit const* owner, SpellSchoolMask schoolMask, Unit const* victim)
|
||||
{
|
||||
float victimResistance = float(victim->GetResistance(schoolMask));
|
||||
if (owner)
|
||||
@@ -1858,10 +1858,6 @@ float Unit::GetEffectiveResistChance(Unit const* owner, SpellSchoolMask schoolMa
|
||||
victimResistance += float(owner->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, schoolMask));
|
||||
}
|
||||
|
||||
// Chaos Bolt exception, ignore all target resistances (unknown attribute?)
|
||||
if (spellInfo && spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && spellInfo->SpellIconID == 3178)
|
||||
victimResistance = 0;
|
||||
|
||||
victimResistance = std::max(victimResistance, 0.0f);
|
||||
if (owner)
|
||||
victimResistance += std::max((float(victim->getLevel()) - float(owner->getLevel())) * 5.0f, 0.0f);
|
||||
@@ -1895,7 +1891,7 @@ void Unit::CalcAbsorbResist(DamageInfo& dmgInfo, bool Splited)
|
||||
// Xinef: holy resistance exists for npcs
|
||||
if (!(schoolMask & SPELL_SCHOOL_MASK_NORMAL) && (!(schoolMask & SPELL_SCHOOL_MASK_HOLY) || victim->GetTypeId() == TYPEID_UNIT) && (!spellInfo || (!spellInfo->HasAttribute(SPELL_ATTR0_CU_BINARY_SPELL) && !spellInfo->HasAttribute(SPELL_ATTR4_NO_CAST_LOG))))
|
||||
{
|
||||
float averageResist = Unit::GetEffectiveResistChance(attacker, schoolMask, victim, spellInfo);
|
||||
float averageResist = Unit::GetEffectiveResistChance(attacker, schoolMask, victim);
|
||||
|
||||
float discreteResistProbability[11];
|
||||
for (uint32 i = 0; i < 11; ++i)
|
||||
@@ -3091,7 +3087,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spellInfo
|
||||
|
||||
// Players resistance for binary spells
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_CU_BINARY_SPELL) && (spellInfo->GetSchoolMask() & (SPELL_SCHOOL_MASK_NORMAL | SPELL_SCHOOL_MASK_HOLY)) == 0)
|
||||
tmp += int32(Unit::GetEffectiveResistChance(this, spellInfo->GetSchoolMask(), victim, spellInfo) * 10000.0f); // 100 for spell calculations, and 100 for return value percentage
|
||||
tmp += int32(Unit::GetEffectiveResistChance(this, spellInfo->GetSchoolMask(), victim) * 10000.0f); // 100 for spell calculations, and 100 for return value percentage
|
||||
}
|
||||
|
||||
// Roll chance
|
||||
|
||||
Reference in New Issue
Block a user