*Mangos [7023] Remove not used useCharges for IsImmunedToSpell/IsImmunedToDamage. By DiSlord.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-04 16:45:32 -06:00
parent 2d319dd5b4
commit 13cfff2327
10 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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);
+3 -3
View File
@@ -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;
}
+1 -1
View File
@@ -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)
{
+2 -2
View File
@@ -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);
}
+1 -1
View File
@@ -57,7 +57,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;
+5 -5
View File
@@ -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;
+2 -2
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7022"
#define REVISION_NR "7024"
#endif // __REVISION_NR_H__