mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Feature] Add a rule for spells to bypass stacking rules (#4716)
* define rule that allows for spells which always stack * Update spells.cpp --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
parent
805757ba87
commit
1598d2e17b
@ -529,6 +529,7 @@ RULE_INT(Spells, TargetedAOEMaxTargets, 4, "Max number of targets a Targeted AOE
|
||||
RULE_INT(Spells, PointBlankAOEMaxTargets, 0, "Max number of targets a Point-Blank AOE spell can cast on. Set to 0 for no limit.")
|
||||
RULE_INT(Spells, DefaultAOEMaxTargets, 0, "Max number of targets that an AOE spell which does not meet other descriptions can cast on. Set to 0 for no limit.")
|
||||
RULE_BOOL(Spells, AllowFocusOnSkillDamageSpells, false, "Allow focus effects 185, 459, and 482 to enhance SkillAttack spell effect 193")
|
||||
RULE_STRING(Spells, AlwaysStackSpells, "", "Comma-Seperated list of spell IDs to always stack with every other spell, except themselves.")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Combat)
|
||||
|
||||
@ -3135,6 +3135,17 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
||||
}
|
||||
}
|
||||
|
||||
const std::string& always_stack_spells = RuleS(Spells, AlwaysStackSpells);
|
||||
if (spellid1 != spellid2 && !always_stack_spells.empty()) {
|
||||
const auto& v = Strings::Split(always_stack_spells, ",");
|
||||
if (Strings::Contains(v, std::to_string(spellid1))) {
|
||||
return 0;
|
||||
}
|
||||
if (Strings::Contains(v, std::to_string(spellid2))) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
One of these is a bard song and one isn't and they're both beneficial so they should stack.
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user