Your Lua script uses 10k and 20k IDs + boost ID as subId, so I adjusted code to make conditions with subId 10k - 25k not removed on death.
You don't have to edit anything in Lua script.
You have to edit C++ files and recompile server:
1. At end of
condition.cpp add:
C++:
bool Condition::isRemovableOnDeath() const
{
return getSubId() >= 10000 && getSubId() <= 25000;
}
2. In
conditon.h under:
C++:
bool isPersistent() const;
add:
C++:
bool isRemovableOnDeath() const;
3. In
player.cpp replace in 2 places - it's only in 2 places in that file, so you can "replace all":
C++:
if (condition->isPersistent()) {
with:
C++:
if (condition->isPersistent() && condition->isRemovableOnDeath()) {
EDIT:
Of course, it would be better, to add it as condition parameter. Then you could set in Lua, if given condition can be removed on death, but it would require much more changes in C++ files.
If I were you, I would use some AI IDE (Cursor, Warp, CLion - work well, but cost 15-20$; or Github Copilot which is free in Visual Studio) and tell it to add new condition parameter. AI is pretty good as simple code edits.