mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 06:59:46 -04:00
Core/Spells: Rename AuraEffect::IsAffectedOnSpell to IsAffectingSpell
This commit is contained in:
@@ -1509,7 +1509,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* victim, const uint32 damage, SpellInfo
|
||||
for (AuraEffectList::const_iterator j = ResIgnoreAurasAb.begin(); j != ResIgnoreAurasAb.end(); ++j)
|
||||
{
|
||||
if ((*j)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL
|
||||
&& (*j)->IsAffectedOnSpell(spellInfo))
|
||||
&& (*j)->IsAffectingSpell(spellInfo))
|
||||
armor = floor(AddPctN(armor, -(*j)->GetAmount()));
|
||||
}
|
||||
|
||||
@@ -1639,7 +1639,7 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
|
||||
|
||||
AuraEffectList const& ResIgnoreAurasAb = GetAuraEffectsByType(SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST);
|
||||
for (AuraEffectList::const_iterator j = ResIgnoreAurasAb.begin(); j != ResIgnoreAurasAb.end(); ++j)
|
||||
if (((*j)->GetMiscValue() & schoolMask) && (*j)->IsAffectedOnSpell(spellInfo))
|
||||
if (((*j)->GetMiscValue() & schoolMask) && (*j)->IsAffectingSpell(spellInfo))
|
||||
AddPctN(damageResisted, -(*j)->GetAmount());
|
||||
|
||||
AuraEffectList const& ResIgnoreAuras = GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST);
|
||||
@@ -1668,7 +1668,7 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
|
||||
if (!((*itr)->GetMiscValue() & schoolMask))
|
||||
continue;
|
||||
|
||||
if (((*itr)->GetAmount() > auraAbsorbMod) && (*itr)->IsAffectedOnSpell(spellInfo))
|
||||
if (((*itr)->GetAmount() > auraAbsorbMod) && (*itr)->IsAffectingSpell(spellInfo))
|
||||
auraAbsorbMod = float((*itr)->GetAmount());
|
||||
}
|
||||
RoundToInterval(auraAbsorbMod, 0.0f, 100.0f);
|
||||
@@ -2406,7 +2406,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spell)
|
||||
AuraEffectList const& ignore = GetAuraEffectsByType(SPELL_AURA_IGNORE_COMBAT_RESULT);
|
||||
for (AuraEffectList::const_iterator i = ignore.begin(); i != ignore.end(); ++i)
|
||||
{
|
||||
if (!(*i)->IsAffectedOnSpell(spell))
|
||||
if (!(*i)->IsAffectingSpell(spell))
|
||||
continue;
|
||||
switch ((*i)->GetMiscValue())
|
||||
{
|
||||
@@ -4250,7 +4250,7 @@ bool Unit::HasAuraTypeWithAffectMask(AuraType auratype, SpellInfo const* affecte
|
||||
{
|
||||
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
|
||||
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
|
||||
if ((*i)->IsAffectedOnSpell(affectedSpell))
|
||||
if ((*i)->IsAffectingSpell(affectedSpell))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -4310,7 +4310,7 @@ AuraEffect* Unit::IsScriptOverriden(SpellInfo const* spell, int32 script) const
|
||||
for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetMiscValue() == script)
|
||||
if ((*i)->IsAffectedOnSpell(spell))
|
||||
if ((*i)->IsAffectingSpell(spell))
|
||||
return (*i);
|
||||
}
|
||||
return NULL;
|
||||
@@ -4547,7 +4547,7 @@ int32 Unit::GetTotalAuraModifierByAffectMask(AuraType auratype, SpellInfo const*
|
||||
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
|
||||
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
|
||||
{
|
||||
if ((*i)->IsAffectedOnSpell(affectedSpell))
|
||||
if ((*i)->IsAffectingSpell(affectedSpell))
|
||||
modifier += (*i)->GetAmount();
|
||||
}
|
||||
return modifier;
|
||||
@@ -4560,7 +4560,7 @@ float Unit::GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellInfo cons
|
||||
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
|
||||
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
|
||||
{
|
||||
if ((*i)->IsAffectedOnSpell(affectedSpell))
|
||||
if ((*i)->IsAffectingSpell(affectedSpell))
|
||||
AddPctN(multiplier, (*i)->GetAmount());
|
||||
}
|
||||
return multiplier;
|
||||
@@ -4573,7 +4573,7 @@ int32 Unit::GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellInfo
|
||||
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
|
||||
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
|
||||
{
|
||||
if ((*i)->IsAffectedOnSpell(affectedSpell) && (*i)->GetAmount() > modifier)
|
||||
if ((*i)->IsAffectingSpell(affectedSpell) && (*i)->GetAmount() > modifier)
|
||||
modifier = (*i)->GetAmount();
|
||||
}
|
||||
|
||||
@@ -4587,7 +4587,7 @@ int32 Unit::GetMaxNegativeAuraModifierByAffectMask(AuraType auratype, SpellInfo
|
||||
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
|
||||
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
|
||||
{
|
||||
if ((*i)->IsAffectedOnSpell(affectedSpell) && (*i)->GetAmount() < modifier)
|
||||
if ((*i)->IsAffectingSpell(affectedSpell) && (*i)->GetAmount() < modifier)
|
||||
modifier = (*i)->GetAmount();
|
||||
}
|
||||
|
||||
@@ -9639,7 +9639,7 @@ bool Unit::HasAuraState(AuraStateType flag, SpellInfo const* spellProto, Unit co
|
||||
{
|
||||
AuraEffectList const& stateAuras = Caster->GetAuraEffectsByType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
|
||||
for (AuraEffectList::const_iterator j = stateAuras.begin(); j != stateAuras.end(); ++j)
|
||||
if ((*j)->IsAffectedOnSpell(spellProto))
|
||||
if ((*j)->IsAffectingSpell(spellProto))
|
||||
return true;
|
||||
}
|
||||
// Check per caster aura state
|
||||
@@ -10310,7 +10310,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
|
||||
AuraEffectList const& mOverrideClassScript= owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
||||
{
|
||||
if (!(*i)->IsAffectedOnSpell(spellProto))
|
||||
if (!(*i)->IsAffectingSpell(spellProto))
|
||||
continue;
|
||||
|
||||
switch ((*i)->GetMiscValue())
|
||||
@@ -10629,7 +10629,7 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
|
||||
// From caster spells
|
||||
AuraEffectList const& mOwnerTaken = victim->GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER);
|
||||
for (AuraEffectList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i)
|
||||
if ((*i)->GetCasterGUID() == GetGUID() && (*i)->IsAffectedOnSpell(spellProto))
|
||||
if ((*i)->GetCasterGUID() == GetGUID() && (*i)->IsAffectingSpell(spellProto))
|
||||
AddPctN(TakenTotalMod, (*i)->GetAmount());
|
||||
|
||||
// Mod damage from spell mechanic
|
||||
@@ -10883,7 +10883,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
|
||||
AuraEffectList const& mOverrideClassScript = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
||||
{
|
||||
if (!((*i)->IsAffectedOnSpell(spellProto)))
|
||||
if (!((*i)->IsAffectingSpell(spellProto)))
|
||||
continue;
|
||||
int32 modChance = 0;
|
||||
switch ((*i)->GetMiscValue())
|
||||
@@ -11027,7 +11027,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
|
||||
|
||||
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)->IsAffectedOnSpell(spellProto))
|
||||
if ((*i)->GetCasterGUID() == GetGUID() && (*i)->IsAffectingSpell(spellProto))
|
||||
crit_chance += (*i)->GetAmount();
|
||||
|
||||
crit_chance = crit_chance > 0.0f ? crit_chance : 0.0f;
|
||||
@@ -11131,7 +11131,7 @@ uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32
|
||||
AuraEffectList const& mOverrideClassScript= owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
||||
{
|
||||
if (!(*i)->IsAffectedOnSpell(spellProto))
|
||||
if (!(*i)->IsAffectingSpell(spellProto))
|
||||
continue;
|
||||
switch ((*i)->GetMiscValue())
|
||||
{
|
||||
@@ -11362,7 +11362,7 @@ uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32
|
||||
|
||||
AuraEffectList const& mHealingGet= victim->GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_RECEIVED);
|
||||
for (AuraEffectList::const_iterator i = mHealingGet.begin(); i != mHealingGet.end(); ++i)
|
||||
if (GetGUID() == (*i)->GetCasterGUID() && (*i)->IsAffectedOnSpell(spellProto))
|
||||
if (GetGUID() == (*i)->GetCasterGUID() && (*i)->IsAffectingSpell(spellProto))
|
||||
AddPctN(TakenTotalMod, (*i)->GetAmount());
|
||||
|
||||
heal = (int32(heal) + TakenTotal) * TakenTotalMod;
|
||||
@@ -11671,7 +11671,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT
|
||||
AuraEffectList const& mOverrideClassScript = owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
||||
{
|
||||
if (!(*i)->IsAffectedOnSpell(spellProto))
|
||||
if (!(*i)->IsAffectingSpell(spellProto))
|
||||
continue;
|
||||
|
||||
switch ((*i)->GetMiscValue())
|
||||
@@ -11747,7 +11747,7 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT
|
||||
// From caster spells
|
||||
AuraEffectList const& mOwnerTaken = victim->GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER);
|
||||
for (AuraEffectList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i)
|
||||
if ((*i)->GetCasterGUID() == GetGUID() && (*i)->IsAffectedOnSpell(spellProto))
|
||||
if ((*i)->GetCasterGUID() == GetGUID() && (*i)->IsAffectingSpell(spellProto))
|
||||
AddPctN(TakenTotalMod, (*i)->GetAmount());
|
||||
|
||||
// .. taken pct (special attacks)
|
||||
|
||||
Reference in New Issue
Block a user