Core/Units: ported namings for UnitFlags and UnitFlags2 and added the check for forbidden flags in database

This commit is contained in:
Ovahlord committed 2025-03-11 18:06:35 +01:00
1 parent d4804d609d
commit 164289b3b2
18 files changed
+174 -99

No files matched your search

+1 -1
View File
@@ -6956,7 +6956,7 @@ SpellCastResult Spell::CheckRange(bool strict) const
if (m_caster->GetExactDistSq(target) > maxRange)
return SPELL_FAILED_OUT_OF_RANGE;
if (minRange > 0.0f && m_caster->GetExactDistSq(target) < minRange && !target->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_IGNORE_SPELL_MIN_RANGE_RESTRICTIONS))
if (minRange > 0.0f && m_caster->GetExactDistSq(target) < minRange && !target->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_ATTACKER_IGNORES_MINIMUM_RANGES))
return SPELL_FAILED_TOO_CLOSE;
if (m_caster->IsPlayer() && m_spellInfo->FacingCasterFlags.HasFlag(SpellFacingCasterFlags::Infront))