mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Entities: implement SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER, fixes talent Point of no Escape
(cherry picked from commit 2feb53ecb6)
# Conflicts:
# src/server/game/Entities/Unit/Unit.cpp
# src/server/game/Spells/Auras/SpellAuraDefines.h
# src/server/game/Spells/Auras/SpellAuraEffects.cpp
This commit is contained in:
@@ -8209,10 +8209,10 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
|
||||
if (Player* modOwner = GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CRITICAL_CHANCE, crit_chance);
|
||||
|
||||
AuraEffectList const& critAuras = victim->GetAuraEffectsByType(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER);
|
||||
for (AuraEffectList::const_iterator i = critAuras.begin(); i != critAuras.end(); ++i)
|
||||
if ((*i)->GetCasterGUID() == GetGUID() && (*i)->IsAffectingSpell(spellProto))
|
||||
crit_chance += (*i)->GetAmount();
|
||||
AuraEffectList const& critChanceForCaster = victim->GetAuraEffectsByType(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER);
|
||||
for (AuraEffect const* aurEff : critChanceForCaster)
|
||||
if (aurEff->GetCasterGUID() == GetGUID() && aurEff->IsAffectingSpell(spellProto))
|
||||
crit_chance += aurEff->GetAmount();
|
||||
|
||||
return crit_chance > 0.0f ? crit_chance : 0.0f;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
|
||||
&AuraEffect::HandleAuraModIncreaseSpeed, //305 SPELL_AURA_MOD_MINIMUM_SPEED
|
||||
&AuraEffect::HandleUnused, //306 unused (4.3.4)
|
||||
&AuraEffect::HandleUnused, //307 unused (4.3.4)
|
||||
&AuraEffect::HandleNULL, //308 new aura for hunter traps
|
||||
&AuraEffect::HandleNoImmediateEffect, //308 SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER implemented in Unit::GetUnitCriticalChance and Unit::GetUnitSpellCriticalChance
|
||||
&AuraEffect::HandleNULL, //309 SPELL_AURA_MOD_RESILIENCE
|
||||
&AuraEffect::HandleNoImmediateEffect, //310 SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE implemented in Spell::CalculateDamageDone
|
||||
&AuraEffect::HandleNULL, //311 0 spells in 3.3.5
|
||||
|
||||
Reference in New Issue
Block a user