mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
WIP on auras
Lots to do still Normal buffing auras currently work for the most part
This commit is contained in:
@@ -4189,6 +4189,21 @@ void Mob::BuffFadeBySpellID(uint16 spell_id)
|
||||
CalcBonuses();
|
||||
}
|
||||
|
||||
void Mob::BuffFadeBySpellIDAndCaster(uint16 spell_id, uint16 caster_id)
|
||||
{
|
||||
bool recalc_bonus = false;
|
||||
auto buff_count = GetMaxTotalSlots();
|
||||
for (int i = 0; i < buff_count; ++i) {
|
||||
if (buffs[i].spellid == spell_id && buffs[i].casterid == caster_id) {
|
||||
BuffFadeBySlot(i, false);
|
||||
recalc_bonus = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (recalc_bonus)
|
||||
CalcBonuses();
|
||||
}
|
||||
|
||||
// removes buffs containing effectid, skipping skipslot
|
||||
void Mob::BuffFadeByEffect(int effectid, int skipslot)
|
||||
{
|
||||
@@ -4207,6 +4222,16 @@ void Mob::BuffFadeByEffect(int effectid, int skipslot)
|
||||
CalcBonuses();
|
||||
}
|
||||
|
||||
bool Mob::IsAffectedByBuff(uint16 spell_id)
|
||||
{
|
||||
int buff_count = GetMaxTotalSlots();
|
||||
for (int i = 0; i < buff_count; ++i)
|
||||
if (buffs[i].spellid == spell_id)
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user