mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-24 15:40:28 -04:00
Core/Spells: Begin unifying spell effect access api with master branch
* Introduce SpellInfo::GetEffects and SpellInfo::GetEffect functoins
This commit is contained in:
@@ -2352,12 +2352,12 @@ int32 Unit::GetMechanicResistChance(SpellInfo const* spellInfo) const
|
||||
return 0;
|
||||
|
||||
int32 resistMech = 0;
|
||||
for (uint8 eff = 0; eff < MAX_SPELL_EFFECTS; ++eff)
|
||||
for (SpellEffectInfo const& effect : spellInfo->GetEffects())
|
||||
{
|
||||
if (!spellInfo->Effects[eff].IsEffect())
|
||||
if (!effect.IsEffect())
|
||||
break;
|
||||
|
||||
int32 effectMech = spellInfo->GetEffectMechanic(eff);
|
||||
int32 effectMech = spellInfo->GetEffectMechanic(effect.EffectIndex);
|
||||
if (effectMech)
|
||||
{
|
||||
int32 temp = GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_MECHANIC_RESISTANCE, effectMech);
|
||||
@@ -7431,6 +7431,8 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
|
||||
case SPELL_AURA_PERIODIC_HEALTH_FUNNEL:
|
||||
DoneTotal = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (spellProto->Effects[i].Effect == SPELL_EFFECT_HEALTH_LEECH)
|
||||
DoneTotal = 0;
|
||||
|
||||
Reference in New Issue
Block a user