Core/Auras: Renamed a bunch of unknown or changed spell aura types and implemented some of them
This commit is contained in:
@@ -2827,9 +2827,7 @@ float Unit::GetUnitCriticalChance(WeaponAttackType attackType, Unit const* victi
|
||||
|
||||
chance += victim->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER, [this](AuraEffect const* aurEff) -> bool
|
||||
{
|
||||
if (aurEff->GetCasterGUID() == GetGUID())
|
||||
return true;
|
||||
return false;
|
||||
return aurEff->GetCasterGUID() == GetGUID();
|
||||
});
|
||||
|
||||
chance += victim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE);
|
||||
@@ -7069,11 +7067,13 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
|
||||
// for this types the bonus was already added in GetUnitCriticalChance, do not add twice
|
||||
if (spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE && spellProto->DmgClass != SPELL_DAMAGE_CLASS_RANGED)
|
||||
{
|
||||
crit_chance += victim->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER, [this, spellProto](AuraEffect const* aurEff) -> bool
|
||||
crit_chance += victim->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER_WITH_ABILITIES, [this, spellProto](AuraEffect const* aurEff) -> bool
|
||||
{
|
||||
if (aurEff->GetCasterGUID() == GetGUID() && aurEff->IsAffectingSpell(spellProto))
|
||||
return true;
|
||||
return false;
|
||||
return aurEff->GetCasterGUID() == GetGUID() && aurEff->IsAffectingSpell(spellProto);
|
||||
});
|
||||
crit_chance += victim->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER, [this](AuraEffect const* aurEff) -> bool
|
||||
{
|
||||
return aurEff->GetCasterGUID() != GetGUID();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7209,7 +7209,7 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
|
||||
return uint32(std::max(heal, 0.0f));
|
||||
}
|
||||
|
||||
float Unit::SpellHealingPctDone(Unit* /*victim*/, SpellInfo const* spellProto) const
|
||||
float Unit::SpellHealingPctDone(Unit* victim, SpellInfo const* spellProto) const
|
||||
{
|
||||
// For totems pct done mods are calculated when its calculation is run on the player in SpellHealingBonusDone.
|
||||
if (GetTypeId() == TYPEID_UNIT && IsTotem())
|
||||
@@ -7231,6 +7231,14 @@ float Unit::SpellHealingPctDone(Unit* /*victim*/, SpellInfo const* spellProto) c
|
||||
|
||||
float DoneTotalMod = 1.0f;
|
||||
|
||||
// bonus against aurastate
|
||||
DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS_AURASTATE, [victim](AuraEffect const* aurEff) -> bool
|
||||
{
|
||||
if (victim->HasAuraState(static_cast<AuraStateType>(aurEff->GetMiscValue())))
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
|
||||
// Healing done percent
|
||||
DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user