*Mangos [7023] Remove not used useCharges for IsImmunedToSpell/IsImmunedToDamage. By DiSlord.
--HG-- branch : trunk
This commit is contained in:
@@ -1703,7 +1703,7 @@ void Creature::Respawn()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Creature::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges)
|
bool Creature::IsImmunedToSpell(SpellEntry const* spellInfo)
|
||||||
{
|
{
|
||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
return false;
|
return false;
|
||||||
@@ -1711,7 +1711,7 @@ bool Creature::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges)
|
|||||||
if (GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))
|
if (GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return Unit::IsImmunedToSpell(spellInfo, useCharges);
|
return Unit::IsImmunedToSpell(spellInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Creature::IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const
|
bool Creature::IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const
|
||||||
|
|||||||
+1
-1
@@ -438,7 +438,7 @@ class TRINITY_DLL_SPEC Creature : public Unit
|
|||||||
bool isCanInteractWithBattleMaster(Player* player, bool msg) const;
|
bool isCanInteractWithBattleMaster(Player* player, bool msg) const;
|
||||||
bool isCanTrainingAndResetTalentsOf(Player* pPlayer) const;
|
bool isCanTrainingAndResetTalentsOf(Player* pPlayer) const;
|
||||||
bool IsOutOfThreatArea(Unit* pVictim) const;
|
bool IsOutOfThreatArea(Unit* pVictim) const;
|
||||||
bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false);
|
bool IsImmunedToSpell(SpellEntry const* spellInfo);
|
||||||
// redefine Unit::IsImmunedToSpell
|
// redefine Unit::IsImmunedToSpell
|
||||||
bool IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const;
|
bool IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const;
|
||||||
// redefine Unit::IsImmunedToSpellEffect
|
// redefine Unit::IsImmunedToSpellEffect
|
||||||
|
|||||||
+1
-1
@@ -19458,7 +19458,7 @@ void Player::HandleFallDamage(MovementInfo& movementInfo)
|
|||||||
// 14.57 can be calculated by resolving damageperc formular below to 0
|
// 14.57 can be calculated by resolving damageperc formular below to 0
|
||||||
if (z_diff >= 14.57f && !isDead() && !isGameMaster() &&
|
if (z_diff >= 14.57f && !isDead() && !isGameMaster() &&
|
||||||
!HasAuraType(SPELL_AURA_HOVER) && !HasAuraType(SPELL_AURA_FEATHER_FALL) &&
|
!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
|
//Safe fall, fall height reduction
|
||||||
int32 safe_fall = GetTotalAuraModifier(SPELL_AURA_SAFE_FALL);
|
int32 safe_fall = GetTotalAuraModifier(SPELL_AURA_SAFE_FALL);
|
||||||
|
|||||||
+3
-3
@@ -1020,8 +1020,8 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||||||
// Recheck immune (only for delayed spells)
|
// Recheck immune (only for delayed spells)
|
||||||
if( m_spellInfo->speed &&
|
if( m_spellInfo->speed &&
|
||||||
!(m_spellInfo->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
|
!(m_spellInfo->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
|
||||||
&& (unit->IsImmunedToDamage(GetSpellSchoolMask(m_spellInfo),true) ||
|
&& (unit->IsImmunedToDamage(GetSpellSchoolMask(m_spellInfo)) ||
|
||||||
unit->IsImmunedToSpell(m_spellInfo,true) ))
|
unit->IsImmunedToSpell(m_spellInfo)))
|
||||||
{
|
{
|
||||||
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_IMMUNE);
|
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_IMMUNE);
|
||||||
return;
|
return;
|
||||||
@@ -3593,7 +3593,7 @@ uint8 Spell::CanCast(bool strict)
|
|||||||
|
|
||||||
if(IsPositiveSpell(m_spellInfo->Id))
|
if(IsPositiveSpell(m_spellInfo->Id))
|
||||||
{
|
{
|
||||||
if(target->IsImmunedToSpell(m_spellInfo,false))
|
if(target->IsImmunedToSpell(m_spellInfo))
|
||||||
return SPELL_FAILED_TARGET_AURASTATE;
|
return SPELL_FAILED_TARGET_AURASTATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ HostilReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostilRe
|
|||||||
assert(target); // if the ref has status online the target must be there !
|
assert(target); // if the ref has status online the target must be there !
|
||||||
|
|
||||||
// some units are prefered in comparison to others
|
// 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)
|
if(iter != lastRef)
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -178,7 +178,7 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)
|
|||||||
m_type = TOTEM_STATUE; //Jewelery statue
|
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++)
|
/* for (int i=0;i<3;i++)
|
||||||
{
|
{
|
||||||
@@ -191,5 +191,5 @@ bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
return Creature::IsImmunedToSpell(spellInfo, useCharges);
|
return Creature::IsImmunedToSpell(spellInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -57,7 +57,7 @@ class Totem : public Creature
|
|||||||
void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {}
|
void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {}
|
||||||
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
|
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
|
||||||
|
|
||||||
bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false);
|
bool IsImmunedToSpell(SpellEntry const* spellInfo);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TotemType m_type;
|
TotemType m_type;
|
||||||
|
|||||||
+5
-5
@@ -1364,7 +1364,7 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Physical Immune check
|
// Physical Immune check
|
||||||
if(damageInfo->target->IsImmunedToDamage(SpellSchoolMask(damageInfo->damageSchoolMask),true))
|
if(damageInfo->target->IsImmunedToDamage(SpellSchoolMask(damageInfo->damageSchoolMask)))
|
||||||
{
|
{
|
||||||
damageInfo->HitInfo |= HITINFO_NORMALSWING;
|
damageInfo->HitInfo |= HITINFO_NORMALSWING;
|
||||||
damageInfo->TargetState = VICTIMSTATE_IS_IMMUNE;
|
damageInfo->TargetState = VICTIMSTATE_IS_IMMUNE;
|
||||||
@@ -2529,7 +2529,7 @@ SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool
|
|||||||
return SPELL_MISS_NONE;
|
return SPELL_MISS_NONE;
|
||||||
|
|
||||||
// Check for immune (use charges)
|
// Check for immune (use charges)
|
||||||
if (pVictim->IsImmunedToSpell(spell,true))
|
if (pVictim->IsImmunedToSpell(spell))
|
||||||
return SPELL_MISS_IMMUNE;
|
return SPELL_MISS_IMMUNE;
|
||||||
|
|
||||||
// All positive spells can`t miss
|
// All positive spells can`t miss
|
||||||
@@ -2539,7 +2539,7 @@ SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool
|
|||||||
return SPELL_MISS_NONE;
|
return SPELL_MISS_NONE;
|
||||||
|
|
||||||
// Check for immune (use charges)
|
// Check for immune (use charges)
|
||||||
if (pVictim->IsImmunedToDamage(GetSpellSchoolMask(spell),true))
|
if (pVictim->IsImmunedToDamage(GetSpellSchoolMask(spell)))
|
||||||
return SPELL_MISS_IMMUNE;
|
return SPELL_MISS_IMMUNE;
|
||||||
|
|
||||||
if(this == pVictim)
|
if(this == pVictim)
|
||||||
@@ -7857,7 +7857,7 @@ int32 Unit::SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit *pVi
|
|||||||
return AdvertisedBenefit;
|
return AdvertisedBenefit;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask, bool useCharges)
|
bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask)
|
||||||
{
|
{
|
||||||
//If m_immuneToSchool type contain this school type, IMMUNE damage.
|
//If m_immuneToSchool type contain this school type, IMMUNE damage.
|
||||||
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
||||||
@@ -7874,7 +7874,7 @@ bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask, bool useCharges)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges)
|
bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo)
|
||||||
{
|
{
|
||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+2
-2
@@ -1381,9 +1381,9 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
|||||||
|
|
||||||
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply);
|
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply);
|
||||||
void ApplySpellDispelImmunity(const SpellEntry * spellProto, DispelType 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
|
// redefined in Creature
|
||||||
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask, bool useCharges = false);
|
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask);
|
||||||
virtual bool IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const;
|
virtual bool IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const;
|
||||||
// redefined in Creature
|
// redefined in Creature
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7022"
|
#define REVISION_NR "7024"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|||||||
Reference in New Issue
Block a user