remove corpse owner on every corpse after every 10s

This commit is contained in:
ErikasKontenis
2019-11-13 21:26:42 +02:00
parent ae7672ee55
commit 93f6c328fc
3 changed files with 7 additions and 1 deletions

View File

@@ -712,6 +712,7 @@ bool Creature::dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreatur
if (corpse) {
g_game.internalAddItem(tile, corpse, INDEX_WHEREEVER, FLAG_NOLIMIT);
g_game.startDecay(corpse);
g_scheduler.addEvent(createSchedulerTask(10000, std::bind(&Game::RemoveCorpseOwner, &g_game, corpse)));
}
//scripting event - onDeath