mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 07:38:36 +00:00
[Spells] Bug fix for AOE Harmony/Lull (#1472)
* Bug fix for AOE Harmony/Lull type spells. Fixed bug with SPA 30 SE_SE_ChangeFrenzyRad and SPA 86 SE_Harmony allowing those spells to affect NPC's above their level restrictions when cast as a 'Targeted AE' spell (ie. Harmony, Wake of Tranquility) when the targeted NPC was bellow level restricted range, but the NPC's next to them were above it. As coded now, the adjacent NPC's if over level limit will still get the buff applied to them BUT will not get any benefits from the buff. This bug was originally reported by: Isaaru * Live like behavior Implemented the live like behavior, if this case occurs on live, the buff is not applied to the targets over the level limit and "Your target looks unaffected" message is given. * code optimization code optimization
This commit is contained in:
@@ -7441,3 +7441,21 @@ void Client::BreakFeignDeathWhenCastOn(bool IsResisted)
|
||||
MessageString(Chat::SpellFailure,FD_CAST_ON);
|
||||
}
|
||||
}
|
||||
|
||||
bool Mob::HarmonySpellLevelCheck(int32 spell_id, Mob *target)
|
||||
{
|
||||
//'this' = caster of spell
|
||||
if (!target) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < EFFECT_COUNT; i++) {
|
||||
// not important to check limit on SE_Lull as it doesnt have one and if the other components won't land, then SE_Lull wont either
|
||||
if (spells[spell_id].effectid[i] == SE_ChangeFrenzyRad || spells[spell_id].effectid[i] == SE_Harmony) {
|
||||
if ((spells[spell_id].max[i] != 0 && target->GetLevel() > spells[spell_id].max[i]) || target->GetSpecialAbility(IMMUNE_PACIFY)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user