mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 08:06:23 +00:00
fix(Core/Spells): Dungeon and world bosses are always subject to spell school lockouts. (#9638)
Fixes #9633
This commit is contained in:
@@ -2580,20 +2580,26 @@ void Creature::SetInCombatWithZone()
|
||||
void Creature::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs)
|
||||
{
|
||||
for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
|
||||
{
|
||||
if (idSchoolMask & (1 << i))
|
||||
{
|
||||
m_ProhibitSchoolTime[i] = World::GetGameTimeMS() + unTimeMs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Creature::IsSpellProhibited(SpellSchoolMask idSchoolMask) const
|
||||
{
|
||||
const CreatureTemplate* cinfo = GetCreatureTemplate();
|
||||
if (!(cinfo && cinfo->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH) && (isWorldBoss() || IsDungeonBoss()))
|
||||
return false;
|
||||
|
||||
for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
|
||||
{
|
||||
if (idSchoolMask & (1 << i))
|
||||
{
|
||||
if (m_ProhibitSchoolTime[i] >= World::GetGameTimeMS())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user