fix(Core/Spells): Remove range check on split damage auras (#24899)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -2495,13 +2495,6 @@ void Unit::CalcAbsorbResist(DamageInfo& dmgInfo, bool Splited)
|
|||||||
if (!caster || (caster == victim) || !caster->IsInWorld() || !caster->IsAlive())
|
if (!caster || (caster == victim) || !caster->IsInWorld() || !caster->IsAlive())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Limit effect range to spell's cast range. (Only for single target auras, AreaAuras don't need it)
|
|
||||||
// Ignore LOS attribute is only used for the cast portion of the spell
|
|
||||||
SpellInfo const* splitSpellInfo = (*itr)->GetSpellInfo();
|
|
||||||
if (!splitSpellInfo->Effects[(*itr)->GetEffIndex()].IsAreaAuraEffect())
|
|
||||||
if (!caster->IsWithinDist(victim, splitSpellInfo->GetMaxRange(splitSpellInfo->IsPositive(), caster)))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
int32 splitDamage = (*itr)->GetAmount();
|
int32 splitDamage = (*itr)->GetAmount();
|
||||||
|
|
||||||
// absorb must be smaller than the damage itself
|
// absorb must be smaller than the damage itself
|
||||||
@@ -2567,13 +2560,7 @@ void Unit::CalcAbsorbResist(DamageInfo& dmgInfo, bool Splited)
|
|||||||
if (!caster || (caster == victim) || !caster->IsInWorld() || !caster->IsAlive())
|
if (!caster || (caster == victim) || !caster->IsInWorld() || !caster->IsAlive())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Limit effect range to spell's cast range. (Only for single target auras, AreaAuras don't need it)
|
|
||||||
// Ignore LOS attribute is only used for the cast portion of the spell
|
|
||||||
SpellInfo const* splitSpellInfo = (*itr)->GetSpellInfo();
|
SpellInfo const* splitSpellInfo = (*itr)->GetSpellInfo();
|
||||||
if (!splitSpellInfo->Effects[(*itr)->GetEffIndex()].IsAreaAuraEffect())
|
|
||||||
if (!caster->IsWithinDist(victim, splitSpellInfo->GetMaxRange(splitSpellInfo->IsPositive(), caster)))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
uint32 splitDamage = CalculatePct(dmgInfo.GetDamage(), (*itr)->GetAmount());
|
uint32 splitDamage = CalculatePct(dmgInfo.GetDamage(), (*itr)->GetAmount());
|
||||||
SpellSchoolMask splitSchoolMask = schoolMask;
|
SpellSchoolMask splitSchoolMask = schoolMask;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user