Core/Units: removed now unused attacker argument from Unit::GetUnitCriticalChanceTaken
This commit is contained in:
1 parent
fd815dfe33
commit
a5caf1af95
2 files changed
+5
-5
No files matched your search
@@ -2852,7 +2852,7 @@ float Unit::GetUnitCriticalChanceDone(WeaponAttackType attackType) const
|
||||
return chance;
|
||||
}
|
||||
|
||||
float Unit::GetUnitCriticalChanceTaken(Unit const* attacker, WeaponAttackType attackType, float critDone) const
|
||||
float Unit::GetUnitCriticalChanceTaken(WeaponAttackType attackType, float critDone) const
|
||||
{
|
||||
float chance = critDone;
|
||||
|
||||
@@ -2871,7 +2871,7 @@ float Unit::GetUnitCriticalChanceTaken(Unit const* attacker, WeaponAttackType at
|
||||
float Unit::GetUnitCriticalChanceAgainst(WeaponAttackType attackType, Unit const* victim) const
|
||||
{
|
||||
float chance = GetUnitCriticalChanceDone(attackType);
|
||||
return victim->GetUnitCriticalChanceTaken(this, attackType, chance);
|
||||
return victim->GetUnitCriticalChanceTaken(attackType, chance);
|
||||
}
|
||||
|
||||
void Unit::_DeleteRemovedAuras()
|
||||
@@ -7282,7 +7282,7 @@ float Unit::SpellCritChanceTaken(Unit const* caster, SpellInfo const* spellInfo,
|
||||
break;
|
||||
}
|
||||
}
|
||||
crit_chance = GetUnitCriticalChanceTaken(caster, attackType, crit_chance);
|
||||
crit_chance = GetUnitCriticalChanceTaken(attackType, crit_chance);
|
||||
}
|
||||
break;
|
||||
case SPELL_DAMAGE_CLASS_NONE:
|
||||
@@ -7291,7 +7291,7 @@ float Unit::SpellCritChanceTaken(Unit const* caster, SpellInfo const* spellInfo,
|
||||
}
|
||||
|
||||
// for this types the bonus was already added in GetUnitCriticalChance, do not add twice
|
||||
if (caster && spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE && spellInfo->DmgClass != SPELL_DAMAGE_CLASS_RANGED)
|
||||
if (caster)
|
||||
{
|
||||
crit_chance += GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER, [caster, spellInfo](AuraEffect const* aurEff) -> bool
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user