Core/Spells: Updated silence flags for 9.0 and rename unit flag to its new meaning

This commit is contained in:
Shauren
2023-02-26 00:58:48 +01:00
parent cbdb255958
commit 3400c5a52c
7 changed files with 20 additions and 13 deletions

View File

@@ -309,7 +309,7 @@ SpellInfo const* ScriptedAI::SelectSpell(Unit* target, uint32 school, uint32 mec
return nullptr;
// Silenced so we can't cast
if (me->HasUnitFlag(UNIT_FLAG_SILENCED))
if (me->IsSilenced(school ? SpellSchoolMask(school) : SPELL_SCHOOL_MASK_MAGIC))
return nullptr;
// Using the extended script system we first create a list of viable spells