diff options
| -rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 38 | ||||
| -rwxr-xr-x | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 6 | ||||
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.h | 2 | ||||
| -rwxr-xr-x | src/server/game/Spells/Spell.cpp | 14 | 
4 files changed, 30 insertions, 30 deletions
| diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index b4f444f587c..75265e5dca1 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 67938498a4b..60e51a7c2ed 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -467,7 +467,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) @@ -1228,7 +1228,7 @@ bool AuraEffect::IsPeriodicTickCrit(Unit* target, Unit const* caster) const      Unit::AuraEffectList const& mPeriodicCritAuras= caster->GetAuraEffectsByType(SPELL_AURA_ABILITY_PERIODIC_CRIT);      for (Unit::AuraEffectList::const_iterator itr = mPeriodicCritAuras.begin(); itr != mPeriodicCritAuras.end(); ++itr)      { -        if ((*itr)->IsAffectedOnSpell(m_spellInfo) && caster->isSpellCrit(target, m_spellInfo, m_spellInfo->GetSchoolMask())) +        if ((*itr)->IsAffectingSpell(m_spellInfo) && caster->isSpellCrit(target, m_spellInfo, m_spellInfo->GetSchoolMask()))              return true;      }      // Rupture - since 3.3.3 can crit @@ -1240,7 +1240,7 @@ bool AuraEffect::IsPeriodicTickCrit(Unit* target, Unit const* caster) const      return false;  } -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 c34391471d7..9d1a74591c5 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -79,7 +79,7 @@ class 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;          void SendTickImmune(Unit* target, Unit* caster) const;          void PeriodicTick(AuraApplication * aurApp, Unit* caster) const; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c47d6d08990..06a6a347fef 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2814,7 +2814,7 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)              {                  Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);                  for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j) -                    if ((*j)->IsAffectedOnSpell(m_spellInfo)) +                    if ((*j)->IsAffectingSpell(m_spellInfo))                          maxTargets += (*j)->GetAmount();                  if (m_spellInfo->Id == 5246) //Intimidating Shout @@ -2834,7 +2834,7 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)              {                  Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);                  for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j) -                    if ((*j)->IsAffectedOnSpell(m_spellInfo)) +                    if ((*j)->IsAffectingSpell(m_spellInfo))                          maxTargets += (*j)->GetAmount();                  Trinity::RandomResizeList(gobjectList, maxTargets); @@ -3605,7 +3605,7 @@ void Spell::finish(bool ok)          Unit::AuraEffectList const& vIgnoreReset = m_caster->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; @@ -4533,7 +4533,7 @@ SpellCastResult Spell::CheckCast(bool strict)          Unit::AuraEffectList const& ignore = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_SHAPESHIFT);          for (Unit::AuraEffectList::const_iterator i = ignore.begin(); i != ignore.end(); ++i)          { -            if (!(*i)->IsAffectedOnSpell(m_spellInfo)) +            if (!(*i)->IsAffectingSpell(m_spellInfo))                  continue;              checkForm = false;              break; @@ -4559,7 +4559,7 @@ SpellCastResult Spell::CheckCast(bool strict)      Unit::AuraEffectList const& stateAuras = m_caster->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) @@ -6475,7 +6475,7 @@ void Spell::HandleLaunchPhase()      Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_ABILITY_CONSUME_NO_AMMO);      for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j)      { -        if ((*j)->IsAffectedOnSpell(m_spellInfo)) +        if ((*j)->IsAffectingSpell(m_spellInfo))              usesAmmo=false;      } @@ -7030,7 +7030,7 @@ void Spell::PrepareTriggersExecutedOnHit()      Unit::AuraEffectList const& targetTriggers = m_caster->GetAuraEffectsByType(SPELL_AURA_ADD_TARGET_TRIGGER);      for (Unit::AuraEffectList::const_iterator i = targetTriggers.begin(); i != targetTriggers.end(); ++i)      { -        if (!(*i)->IsAffectedOnSpell(m_spellInfo)) +        if (!(*i)->IsAffectingSpell(m_spellInfo))              continue;          SpellInfo const* auraSpellInfo = (*i)->GetSpellInfo();          uint32 auraSpellIdx = (*i)->GetEffIndex(); | 
