Core/Spells: Remove remaining raw spell attribute checks

(cherry picked from commit 7a4f3c2ba2054f1b3a4b349b802a3c02b3085157)
This commit is contained in:
Shauren
2026-07-09 12:51:06 +02:00
parent 76de08086f
commit 123f9755d3
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -4143,12 +4143,12 @@ void Unit::RemoveAurasByType(AuraType auraType, ObjectGuid casterGUID, Aura* exc
}
}
void Unit::RemoveAurasWithAttribute(uint32 flags)
void Unit::RemoveAurasWithAttribute(SpellAttr0 flags)
{
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
{
SpellInfo const* spell = iter->second->GetBase()->GetSpellInfo();
if (spell->Attributes & flags)
if (spell->HasAttribute(flags))
RemoveAura(iter);
else
++iter;
+1 -1
View File
@@ -1318,7 +1318,7 @@ class TC_GAME_API Unit : public WorldObject
void RemoveNotOwnSingleTargetAuras(bool onPhaseChange = false);
template <typename InterruptFlags>
void RemoveAurasWithInterruptFlags(InterruptFlags flag, SpellInfo const* source = nullptr);
void RemoveAurasWithAttribute(uint32 flags);
void RemoveAurasWithAttribute(SpellAttr0 flags);
void RemoveAurasWithFamily(SpellFamilyNames family, flag128 const& familyFlag, ObjectGuid casterGUID);
void RemoveAurasWithMechanic(uint64 mechanicMaskToRemove, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT, uint32 exceptSpellId = 0, bool withEffectMechanics = false);
void RemoveMovementImpairingAuras(bool withRoot);
+1 -1
View File
@@ -1905,7 +1905,7 @@ bool SpellInfo::IsRangedWeaponSpell() const
{
return (SpellFamilyName == SPELLFAMILY_HUNTER && !(SpellFamilyFlags[1] & 0x10000000)) // for 53352, cannot find better way
|| (EquippedItemSubClassMask & ITEM_SUBCLASS_MASK_WEAPON_RANGED)
|| (Attributes & SPELL_ATTR0_USES_RANGED_SLOT);
|| (HasAttribute(SPELL_ATTR0_USES_RANGED_SLOT));
}
bool SpellInfo::IsAutoRepeatRangedSpell() const