mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
@@ -338,9 +338,12 @@ constexpr SpellSchoolMask GetMaskForSchool(SpellSchools school)
|
||||
|
||||
inline SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
|
||||
{
|
||||
for (SpellSchools school : EnumUtils::Iterate<SpellSchools>())
|
||||
if (mask & GetMaskForSchool(school))
|
||||
return school;
|
||||
// Do not use EnumUtils to iterate
|
||||
// this can cause some compilers to instantiate Trinity::Impl::EnumUtils<SpellSchools>
|
||||
// when compiling enuminfo_SharedDefines before their explicit specializations in that file
|
||||
for (uint16 i = 0; i < MAX_SPELL_SCHOOL; ++i)
|
||||
if (mask & (1 << i))
|
||||
return SpellSchools(i);
|
||||
|
||||
return SPELL_SCHOOL_NORMAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user