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:
ariel-
2016-07-19 02:57:01 -03:00
committed by joschiwald
parent 6f176c0980
commit 8d45095e28
2 changed files with 5 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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