Missing change
This commit is contained in:
1 parent
71e3339636
commit
c89bf30b4d
3 files changed
+32
-18
No files matched your search
@@ -7029,7 +7029,34 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
|
||||
crit_chance = 0.0f;
|
||||
// For other schools
|
||||
else if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
crit_chance = GetFloatValue(PLAYER_SPELL_CRIT_PERCENTAGE1 + GetFirstSchoolInMask(schoolMask));
|
||||
|
||||
// register aura mod, this is needed for Arcane Potency
|
||||
if (Spell* spell = ToPlayer()->m_spellModTakingSpell)
|
||||
{
|
||||
std::vector<Aura*> affectingAuras;
|
||||
(void)GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE, [&affectingAuras](AuraEffect const* aurEff) -> bool
|
||||
{
|
||||
affectingAuras.push_back(aurEff->GetBase());
|
||||
return true;
|
||||
});
|
||||
|
||||
(void)GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, [&affectingAuras, schoolMask](AuraEffect const* aurEff) -> bool
|
||||
{
|
||||
if ((aurEff->GetMiscValue() & schoolMask) != 0)
|
||||
{
|
||||
affectingAuras.push_back(aurEff->GetBase());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
for (Aura* aura : affectingAuras)
|
||||
spell->m_appliedMods.insert(aura);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
crit_chance = (float)m_baseSpellCritChance;
|
||||
|
||||
Reference in new issue
Block a user