Corpses loaded from map dissapears
Before creating an issue, please ensure:
- [x] This is a bug in the software that resides in this repository, and not a support matter (use https://otland.net/forums/support.16/ for support)
- [x] This issue is reproducible without changes to the C++ code in this repository
Steps to reproduce (include any configuration/script required to reproduce)
- Place a corpse on a map
- Start server
- After x seconds corpses decays
Expected behaviour
If items are loaded from map they don't expire or at least the one with AID do not expire.
item->setLoadedFromMap() could be used:
bool Item::canDecay() const
{
if (isRemoved() || isLoadedFromMap()) {
return false;
}
if (getDecayTo() < 0 || getDecayTime() == 0) {
return false;
}
if (hasAttribute(ITEM_ATTRIBUTE_UNIQUEID)) {
return false;
}
return true;
}
Or maybe it's intended and there's other way of doing it, like special corpse item that do not decay etc.
Actual behaviour
Items decay no matter what (expect onces with UID)
Environment
Reproduction environment
I believe they shouldn't decay until moved/interacted with.
it has been years since cip uses different corpses ids for different purposes, we mainly have two types:
the ones that decay and the ones that don't, we use the latter to place on map as "decoration" or quest container
it has been years since cip uses different corpses ids for different purposes, we mainly have two types:
the ones that decay and the ones that don't, we use the latter to place on map as "decoration" or quest container
That's a thing they do too, but check frodo's shop there is a burning candle that spawns on server save. It will burn all day until moved, onces it moved it will burn out in 20minutes