mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user