Core/Spells: corrected implementation of SPELL_ATTR3_COMPLETELY_BLOCKED
* it's not a bug, it's a feature :)
This commit is contained in:
1 parent
5253b7e677
commit
3057924db2
2 files changed
+2
-4
No files matched your search
@@ -1086,8 +1086,6 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
|
||||
uint32 value = victim->GetBlockPercent();
|
||||
if (victim->IsBlockCritical())
|
||||
value *= 2; // double blocked percent
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR3_COMPLETELY_BLOCKED))
|
||||
value = 100;
|
||||
|
||||
damageInfo->blocked = CalculatePct(damage, value);
|
||||
if (damage <= int32(damageInfo->blocked))
|
||||
|
||||
@@ -2478,7 +2478,7 @@ void Spell::TargetInfo::PreprocessTarget(Spell* spell)
|
||||
|
||||
_spellHitTarget = nullptr;
|
||||
|
||||
if (MissCondition == SPELL_MISS_NONE || MissCondition == SPELL_MISS_BLOCK)
|
||||
if (MissCondition == SPELL_MISS_NONE || (MissCondition == SPELL_MISS_BLOCK && !spell->GetSpellInfo()->HasAttribute(SPELL_ATTR3_COMPLETELY_BLOCKED)))
|
||||
_spellHitTarget = unit;
|
||||
else if (MissCondition == SPELL_MISS_REFLECT && ReflectResult == SPELL_MISS_NONE)
|
||||
_spellHitTarget = spell->m_caster->ToUnit();
|
||||
@@ -7968,7 +7968,7 @@ void Spell::DoEffectOnLaunchTarget(TargetInfo& targetInfo, float multiplier, uin
|
||||
{
|
||||
Unit* unit = nullptr;
|
||||
// In case spell hit target, do all effect on that target
|
||||
if (targetInfo.MissCondition == SPELL_MISS_NONE || targetInfo.MissCondition == SPELL_MISS_BLOCK)
|
||||
if (targetInfo.MissCondition == SPELL_MISS_NONE || (targetInfo.MissCondition == SPELL_MISS_BLOCK && !m_spellInfo->HasAttribute(SPELL_ATTR3_COMPLETELY_BLOCKED)))
|
||||
unit = m_caster->GetGUID() == targetInfo.TargetGUID ? m_caster->ToUnit() : ObjectAccessor::GetUnit(*m_caster, targetInfo.TargetGUID);
|
||||
// In case spell reflect from target, do all effect on caster (if hit)
|
||||
else if (targetInfo.MissCondition == SPELL_MISS_REFLECT && targetInfo.ReflectResult == SPELL_MISS_NONE)
|
||||
|
||||
Reference in new issue
Block a user