diff options
-rw-r--r-- | src/game/Creature.cpp | 4 | ||||
-rw-r--r-- | src/game/Creature.h | 2 | ||||
-rw-r--r-- | src/game/Player.cpp | 2 | ||||
-rw-r--r-- | src/game/Spell.cpp | 6 | ||||
-rw-r--r-- | src/game/ThreatManager.cpp | 2 | ||||
-rw-r--r-- | src/game/Totem.cpp | 4 | ||||
-rw-r--r-- | src/game/Totem.h | 4 | ||||
-rw-r--r-- | src/game/Unit.cpp | 10 | ||||
-rw-r--r-- | src/game/Unit.h | 4 | ||||
-rw-r--r-- | src/shared/revision_nr.h | 2 |
10 files changed, 20 insertions, 20 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 5c5ccef3897..649f9385081 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1703,7 +1703,7 @@ void Creature::Respawn() } } -bool Creature::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) +bool Creature::IsImmunedToSpell(SpellEntry const* spellInfo) { if (!spellInfo) return false; @@ -1711,7 +1711,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 ff512fb5da0..b3ebe87de92 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -438,7 +438,7 @@ class TRINITY_DLL_SPEC Creature : public Unit bool isCanInteractWithBattleMaster(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/Player.cpp b/src/game/Player.cpp index cbf5c8dbfc5..c551a2b8dc8 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19458,7 +19458,7 @@ void Player::HandleFallDamage(MovementInfo& movementInfo) // 14.57 can be calculated by resolving damageperc formular below to 0 if (z_diff >= 14.57f && !isDead() && !isGameMaster() && !HasAuraType(SPELL_AURA_HOVER) && !HasAuraType(SPELL_AURA_FEATHER_FALL) && - !HasAuraType(SPELL_AURA_FLY) && !IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL,true) ) + !HasAuraType(SPELL_AURA_FLY) && !IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL) ) { //Safe fall, fall height reduction int32 safe_fall = GetTotalAuraModifier(SPELL_AURA_SAFE_FALL); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 20e10384a49..3ede2fe4f53 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1020,8 +1020,8 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) // Recheck immune (only for delayed spells) if( m_spellInfo->speed && !(m_spellInfo->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY) - && (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; @@ -3593,7 +3593,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 9586f1d4722..1af12bedc02 100644 --- a/src/game/ThreatManager.cpp +++ b/src/game/ThreatManager.cpp @@ -280,7 +280,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 2ac26f823d6..335c8e6df13 100644 --- a/src/game/Totem.cpp +++ b/src/game/Totem.cpp @@ -178,7 +178,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++) { @@ -191,5 +191,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 717499ff850..cca20886f76 100644 --- a/src/game/Totem.h +++ b/src/game/Totem.h @@ -56,8 +56,8 @@ class Totem : public Creature void UpdateMaxPower(Powers /*power*/) {} 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 65689a71e84..e2c5c9944ac 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1364,7 +1364,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; @@ -2529,7 +2529,7 @@ SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool return SPELL_MISS_NONE; // Check for immune (use charges) - if (pVictim->IsImmunedToSpell(spell,true)) + if (pVictim->IsImmunedToSpell(spell)) return SPELL_MISS_IMMUNE; // All positive spells can`t miss @@ -2539,7 +2539,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; if(this == pVictim) @@ -7857,7 +7857,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]; @@ -7874,7 +7874,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 238490d9428..b5fa89e04b8 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1381,9 +1381,9 @@ class TRINITY_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 1b0b36a740b..d1b84f35e7a 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 "7024" #endif // __REVISION_NR_H__ |