diff options
author | Shocker <shocker@freakz.ro> | 2011-11-26 23:38:06 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-09-09 16:26:54 +0200 |
commit | 7d38a614bdd7b822b7eb38e3027258d72c9baa70 (patch) | |
tree | 888ce6bbbc296f1f48a984350c646681b038f98b /src | |
parent | 4ea21dab05391fb6362c3e8332903beadf7f2a4e (diff) |
Core/Spells: Rename AuraEffect::IsAffectedOnSpell to IsAffectingSpell
(cherry picked from commit ef9101ea83a577dbf605402b04047a91dfd2c4d6)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 40 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.h | 2 | ||||
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 8 |
4 files changed, 27 insertions, 27 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 8fb57bafe9e..091ea40b9f5 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1592,7 +1592,7 @@ void Unit::HandleEmoteCommand(Emote emoteId) AuraEffectList const& resIgnoreAurasAb = attacker->GetAuraEffectsByType(SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST); for (AuraEffect const* aurEff : resIgnoreAurasAb) { - if (aurEff->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL && aurEff->IsAffectedOnSpell(spellInfo)) + if (aurEff->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL && aurEff->IsAffectingSpell(spellInfo)) armor = std::floor(AddPct(armor, -aurEff->GetAmount())); } @@ -1691,7 +1691,7 @@ void Unit::HandleEmoteCommand(Emote emoteId) { ignoredResistance += attacker->GetTotalAuraModifier(SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST, [schoolMask, spellInfo](AuraEffect const* aurEff) -> bool { - if ((aurEff->GetMiscValue() & schoolMask) && aurEff->IsAffectedOnSpell(spellInfo)) + if ((aurEff->GetMiscValue() & schoolMask) && aurEff->IsAffectingSpell(spellInfo)) return true; return false; }); @@ -1777,7 +1777,7 @@ void Unit::HandleEmoteCommand(Emote emoteId) if (!(aurEff->GetMiscValue() & damageInfo.GetSchoolMask())) return false; - if (!aurEff->IsAffectedOnSpell(damageInfo.GetSpellInfo())) + if (!aurEff->IsAffectingSpell(damageInfo.GetSpellInfo())) return false; return true; @@ -2479,7 +2479,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spellInfo AuraEffectList const& ignore = GetAuraEffectsByType(SPELL_AURA_IGNORE_COMBAT_RESULT); for (AuraEffect const* aurEff : ignore) { - if (!aurEff->IsAffectedOnSpell(spellInfo)) + if (!aurEff->IsAffectingSpell(spellInfo)) continue; switch (aurEff->GetMiscValue()) @@ -4558,7 +4558,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; } @@ -4635,7 +4635,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 nullptr; @@ -4886,7 +4886,7 @@ int32 Unit::GetTotalAuraModifierByAffectMask(AuraType auraType, SpellInfo const* { return GetTotalAuraModifier(auraType, [affectedSpell](AuraEffect const* aurEff) -> bool { - if (aurEff->IsAffectedOnSpell(affectedSpell)) + if (aurEff->IsAffectingSpell(affectedSpell)) return true; return false; }); @@ -4896,7 +4896,7 @@ float Unit::GetTotalAuraMultiplierByAffectMask(AuraType auraType, SpellInfo cons { return GetTotalAuraMultiplier(auraType, [affectedSpell](AuraEffect const* aurEff) -> bool { - if (aurEff->IsAffectedOnSpell(affectedSpell)) + if (aurEff->IsAffectingSpell(affectedSpell)) return true; return false; }); @@ -4906,7 +4906,7 @@ int32 Unit::GetMaxPositiveAuraModifierByAffectMask(AuraType auraType, SpellInfo { return GetMaxPositiveAuraModifier(auraType, [affectedSpell](AuraEffect const* aurEff) -> bool { - if (aurEff->IsAffectedOnSpell(affectedSpell)) + if (aurEff->IsAffectingSpell(affectedSpell)) return true; return false; }); @@ -4916,7 +4916,7 @@ int32 Unit::GetMaxNegativeAuraModifierByAffectMask(AuraType auraType, SpellInfo { return GetMaxNegativeAuraModifier(auraType, [affectedSpell](AuraEffect const* aurEff) -> bool { - if (aurEff->IsAffectedOnSpell(affectedSpell)) + if (aurEff->IsAffectingSpell(affectedSpell)) return true; return false; }); @@ -6465,7 +6465,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin Unit const* owner = GetOwner() ? GetOwner() : this; DoneTotal += owner->GetTotalAuraModifier(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS, [spellProto](AuraEffect const* aurEff) -> bool { - if (!aurEff->IsAffectedOnSpell(spellProto)) + if (!aurEff->IsAffectingSpell(spellProto)) return false; switch (aurEff->GetMiscValue()) @@ -6637,7 +6637,7 @@ float Unit::SpellDamagePctDone(Unit* victim, SpellInfo const* spellProto, Damage 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()) @@ -6946,7 +6946,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui { TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_FROM_CASTER, [caster, spellProto](AuraEffect const* aurEff) -> bool { - if (aurEff->GetCasterGUID() == caster->GetGUID() && aurEff->IsAffectedOnSpell(spellProto)) + if (aurEff->GetCasterGUID() == caster->GetGUID() && aurEff->IsAffectingSpell(spellProto)) return true; return false; }); @@ -7086,7 +7086,7 @@ float Unit::SpellCritChanceTaken(Unit const* caster, SpellInfo const* spellInfo, AuraEffectList const& mOverrideClassScript = caster->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); for (AuraEffect const* aurEff : mOverrideClassScript) { - if (!aurEff->IsAffectedOnSpell(spellInfo)) + if (!aurEff->IsAffectingSpell(spellInfo)) continue; float modChance = 0.f; @@ -7234,7 +7234,7 @@ float Unit::SpellCritChanceTaken(Unit const* caster, SpellInfo const* spellInfo, { crit_chance += GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER, [caster, spellInfo](AuraEffect const* aurEff) -> bool { - if (aurEff->GetCasterGUID() == caster->GetGUID() && aurEff->IsAffectedOnSpell(spellInfo)) + if (aurEff->GetCasterGUID() == caster->GetGUID() && aurEff->IsAffectingSpell(spellInfo)) return true; return false; }); @@ -7340,7 +7340,7 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui AuraEffectList const& mOverrideClassScript= owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); for (AuraEffect const* aurEff : mOverrideClassScript) { - if (!aurEff->IsAffectedOnSpell(spellProto)) + if (!aurEff->IsAffectingSpell(spellProto)) continue; switch (aurEff->GetMiscValue()) @@ -7493,7 +7493,7 @@ float Unit::SpellHealingPctDone(Unit* victim, SpellInfo const* spellProto) const AuraEffectList const& mOverrideClassScript= owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); for (AuraEffect const* aurEff : mOverrideClassScript) { - if (!aurEff->IsAffectedOnSpell(spellProto)) + if (!aurEff->IsAffectingSpell(spellProto)) continue; switch (aurEff->GetMiscValue()) @@ -7582,7 +7582,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u { TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALING_RECEIVED, [caster, spellProto](AuraEffect const* aurEff) -> bool { - if (caster->GetGUID() == aurEff->GetCasterGUID() && aurEff->IsAffectedOnSpell(spellProto)) + if (caster->GetGUID() == aurEff->GetCasterGUID() && aurEff->IsAffectingSpell(spellProto)) return true; return false; }); @@ -7937,7 +7937,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType 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()) @@ -8045,7 +8045,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT // From caster spells TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_FROM_CASTER, [attacker, spellProto](AuraEffect const* aurEff) -> bool { - if (aurEff->GetCasterGUID() == attacker->GetGUID() && aurEff->IsAffectedOnSpell(spellProto)) + if (aurEff->GetCasterGUID() == attacker->GetGUID() && aurEff->IsAffectingSpell(spellProto)) return true; return false; }); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 119249b39a7..ca0770b6a08 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -480,7 +480,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster) Unit::AuraEffectList const& overrideClassScripts = caster->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); for (Unit::AuraEffectList::const_iterator itr = overrideClassScripts.begin(); itr != overrideClassScripts.end(); ++itr) { - if ((*itr)->IsAffectedOnSpell(m_spellInfo)) + if ((*itr)->IsAffectingSpell(m_spellInfo)) { // Glyph of Fear, Glyph of Frost nova and similar auras if ((*itr)->GetMiscValue() == 7801) @@ -842,7 +842,7 @@ float AuraEffect::GetCritChanceFor(Unit const* caster, Unit const* target) const return target->SpellCritChanceTaken(caster, GetSpellInfo(), GetSpellInfo()->GetSchoolMask(), GetBase()->GetCritChance(), GetSpellInfo()->GetAttackType(), true); } -bool AuraEffect::IsAffectedOnSpell(SpellInfo const* spell) const +bool AuraEffect::IsAffectingSpell(SpellInfo const* spell) const { if (!spell) return false; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index 27c1ef275ef..419f4abdef9 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -83,7 +83,7 @@ class TC_GAME_API AuraEffect bool IsPeriodic() const { return m_isPeriodic; } void SetPeriodic(bool isPeriodic) { m_isPeriodic = isPeriodic; } - bool IsAffectedOnSpell(SpellInfo const* spell) const; + bool IsAffectingSpell(SpellInfo const* spell) const; bool HasSpellClassMask() const { return GetSpellEffectInfo().SpellClassMask; } void SendTickImmune(Unit* target, Unit* caster) const; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 7f0dbe517dc..e4a923f51f3 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3933,7 +3933,7 @@ void Spell::finish(bool ok) Unit::AuraEffectList const& vIgnoreReset = unitCaster->GetAuraEffectsByType(SPELL_AURA_IGNORE_MELEE_RESET); for (Unit::AuraEffectList::const_iterator i = vIgnoreReset.begin(); i != vIgnoreReset.end(); ++i) { - if ((*i)->IsAffectedOnSpell(m_spellInfo)) + if ((*i)->IsAffectingSpell(m_spellInfo)) { found = true; break; @@ -5211,7 +5211,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint Unit::AuraEffectList const& ignore = unitCaster->GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_SHAPESHIFT); for (AuraEffect const* aurEff : ignore) { - if (!aurEff->IsAffectedOnSpell(m_spellInfo)) + if (!aurEff->IsAffectingSpell(m_spellInfo)) continue; checkForm = false; @@ -5237,7 +5237,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint Unit::AuraEffectList const& stateAuras = unitCaster->GetAuraEffectsByType(SPELL_AURA_ABILITY_IGNORE_AURASTATE); for (Unit::AuraEffectList::const_iterator j = stateAuras.begin(); j != stateAuras.end(); ++j) { - if ((*j)->IsAffectedOnSpell(m_spellInfo)) + if ((*j)->IsAffectingSpell(m_spellInfo)) { m_needComboPoints = false; if ((*j)->GetMiscValue() == 1) @@ -8158,7 +8158,7 @@ void Spell::PrepareTriggersExecutedOnHit() Unit::AuraEffectList const& targetTriggers = unitCaster->GetAuraEffectsByType(SPELL_AURA_ADD_TARGET_TRIGGER); for (AuraEffect const* aurEff : targetTriggers) { - if (!aurEff->IsAffectedOnSpell(m_spellInfo)) + if (!aurEff->IsAffectingSpell(m_spellInfo)) continue; SpellInfo const* auraSpellInfo = aurEff->GetSpellInfo(); |