Rework regens to match modern clients

This commit is contained in:
Michael Cook (mackal)
2017-10-08 00:13:53 -04:00
parent 43f459b194
commit 8400994c57
31 changed files with 558 additions and 95 deletions
+13
View File
@@ -4234,6 +4234,19 @@ bool Mob::IsAffectedByBuff(uint16 spell_id)
return false;
}
bool Mob::IsAffectedByBuffByGlobalGroup(GlobalGroup group)
{
int buff_count = GetMaxTotalSlots();
for (int i = 0; i < buff_count; ++i) {
if (buffs[i].spellid == SPELL_UNKNOWN)
continue;
if (spells[buffs[i].spellid].spell_category == static_cast<int>(group))
return true;
}
return false;
}
// checks if 'this' can be affected by spell_id from caster
// returns true if the spell should fail, false otherwise
bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)