From 29bfc12efbc4262912ad4255821e7d5cfc4c5465 Mon Sep 17 00:00:00 2001 From: DiSlord Date: Sun, 4 Jan 2009 23:15:24 +0300 Subject: [PATCH] [7023] Remove not used useCharges for IsImmunedToSpell/IsImmunedToDamage Signed-off-by: DiSlord --- src/game/Creature.cpp | 4 ++-- src/game/Creature.h | 2 +- src/game/MovementHandler.cpp | 2 +- src/game/Spell.cpp | 6 +++--- src/game/ThreatManager.cpp | 2 +- src/game/Totem.cpp | 4 ++-- src/game/Totem.h | 2 +- src/game/Unit.cpp | 10 +++++----- src/game/Unit.h | 4 ++-- src/shared/revision_nr.h | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 140d022f6..d278e7a35 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1536,7 +1536,7 @@ void Creature::Respawn() } } -bool Creature::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) +bool Creature::IsImmunedToSpell(SpellEntry const* spellInfo) { if (!spellInfo) return false; @@ -1544,7 +1544,7 @@ bool Creature::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) if (GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1))) return true; - return Unit::IsImmunedToSpell(spellInfo, useCharges); + return Unit::IsImmunedToSpell(spellInfo); } bool Creature::IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const diff --git a/src/game/Creature.h b/src/game/Creature.h index e97814db0..02aaae6bc 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -425,7 +425,7 @@ class MANGOS_DLL_SPEC Creature : public Unit bool isCanIneractWithBattleMaster(Player* player, bool msg) const; bool isCanTrainingAndResetTalentsOf(Player* pPlayer) const; bool IsOutOfThreatArea(Unit* pVictim) const; - bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false); + bool IsImmunedToSpell(SpellEntry const* spellInfo); // redefine Unit::IsImmunedToSpell bool IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const; // redefine Unit::IsImmunedToSpellEffect diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index 2a256db1b..fcf5a4661 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -248,7 +248,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data ) // 14.57 can be calculated by resolving damageperc formular below to 0 if (z_diff >= 14.57f && !target->isDead() && !target->isGameMaster() && !target->HasAuraType(SPELL_AURA_HOVER) && !target->HasAuraType(SPELL_AURA_FEATHER_FALL) && - !target->HasAuraType(SPELL_AURA_FLY) && !target->IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL,true) ) + !target->HasAuraType(SPELL_AURA_FLY) && !target->IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL) ) { //Safe fall, fall height reduction int32 safe_fall = target->GetTotalAuraModifier(SPELL_AURA_SAFE_FALL); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 6ce4145be..e164eee93 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1045,8 +1045,8 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) // Recheck immune (only for delayed spells) if( m_spellInfo->speed && ( - unit->IsImmunedToDamage(GetSpellSchoolMask(m_spellInfo),true) || - unit->IsImmunedToSpell(m_spellInfo,true) )) + unit->IsImmunedToDamage(GetSpellSchoolMask(m_spellInfo)) || + unit->IsImmunedToSpell(m_spellInfo))) { m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_IMMUNE); return; @@ -3621,7 +3621,7 @@ uint8 Spell::CanCast(bool strict) if(IsPositiveSpell(m_spellInfo->Id)) { - if(target->IsImmunedToSpell(m_spellInfo,false)) + if(target->IsImmunedToSpell(m_spellInfo)) return SPELL_FAILED_TARGET_AURASTATE; } diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp index e8526a2d8..7932d46c4 100644 --- a/src/game/ThreatManager.cpp +++ b/src/game/ThreatManager.cpp @@ -278,7 +278,7 @@ HostilReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostilRe assert(target); // if the ref has status online the target must be there ! // some units are prefered in comparison to others - if(!noPriorityTargetFound && (target->IsImmunedToDamage(pAttacker->GetMeleeDamageSchoolMask(), false) || target->hasNegativeAuraWithInterruptFlag(AURA_INTERRUPT_FLAG_DAMAGE)) ) + if(!noPriorityTargetFound && (target->IsImmunedToDamage(pAttacker->GetMeleeDamageSchoolMask()) || target->hasNegativeAuraWithInterruptFlag(AURA_INTERRUPT_FLAG_DAMAGE)) ) { if(iter != lastRef) { diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp index 6020ee1ea..504e3ce3e 100644 --- a/src/game/Totem.cpp +++ b/src/game/Totem.cpp @@ -159,7 +159,7 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto) m_type = TOTEM_STATUE; //Jewelery statue } -bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) +bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo) { for (int i=0;i<3;i++) { @@ -172,5 +172,5 @@ bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) continue; } } - return Creature::IsImmunedToSpell(spellInfo, useCharges); + return Creature::IsImmunedToSpell(spellInfo); } diff --git a/src/game/Totem.h b/src/game/Totem.h index be5ecaaa1..df4abaada 100644 --- a/src/game/Totem.h +++ b/src/game/Totem.h @@ -53,7 +53,7 @@ class Totem : public Creature void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {} void UpdateDamagePhysical(WeaponAttackType /*attType*/) {} - bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false); + bool IsImmunedToSpell(SpellEntry const* spellInfo); protected: TotemType m_type; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 7ee119f03..d14ce7dd5 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1189,7 +1189,7 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da } // Physical Immune check - if(damageInfo->target->IsImmunedToDamage(SpellSchoolMask(damageInfo->damageSchoolMask),true)) + if(damageInfo->target->IsImmunedToDamage(SpellSchoolMask(damageInfo->damageSchoolMask))) { damageInfo->HitInfo |= HITINFO_NORMALSWING; damageInfo->TargetState = VICTIMSTATE_IS_IMMUNE; @@ -2391,7 +2391,7 @@ SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool return SPELL_MISS_EVADE; // Check for immune (use charges) - if (pVictim->IsImmunedToSpell(spell,true)) + if (pVictim->IsImmunedToSpell(spell)) return SPELL_MISS_IMMUNE; // All positive spells can`t miss @@ -2400,7 +2400,7 @@ SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool return SPELL_MISS_NONE; // Check for immune (use charges) - if (pVictim->IsImmunedToDamage(GetSpellSchoolMask(spell),true)) + if (pVictim->IsImmunedToDamage(GetSpellSchoolMask(spell))) return SPELL_MISS_IMMUNE; // Try victim reflect spell @@ -7548,7 +7548,7 @@ int32 Unit::SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit *pVi return AdvertisedBenefit; } -bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask, bool useCharges) +bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask) { //If m_immuneToSchool type contain this school type, IMMUNE damage. SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL]; @@ -7565,7 +7565,7 @@ bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask, bool useCharges) return false; } -bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) +bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo) { if (!spellInfo) return false; diff --git a/src/game/Unit.h b/src/game/Unit.h index 65aed93e3..067c73bd9 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1313,9 +1313,9 @@ class MANGOS_DLL_SPEC Unit : public WorldObject void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply); void ApplySpellDispelImmunity(const SpellEntry * spellProto, DispelType type, bool apply); - virtual bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false); + virtual bool IsImmunedToSpell(SpellEntry const* spellInfo); // redefined in Creature - bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask, bool useCharges = false); + bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask); virtual bool IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const; // redefined in Creature diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 1b0b36a74..7e0b625b5 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7022" + #define REVISION_NR "7023" #endif // __REVISION_NR_H__ -- 2.11.4.GIT