Corpse.cs
This seems changed? Where do you change how long it takes for player corpses and bone to decay? Where do you change how long it takes for monster corpses to decay?Specifically(If Default):
Line 408 - Controls how long until the corpse turns into bones.
Line 409 - Controls how long until the bones decay away.
Personally changed mine from 7mins and 7mins (14 mins total from time of player death)
To 10mins and 10mins (20mins total from time of player death)
public static TimeSpan DefaultCorpseDecay => _DefaultCorpseDecay;
public static readonly TimeSpan _DefaultCorpseDecay = TimeSpan.FromMinutes(7);
public static CreateCorpseHandler CreateCorpseHandler { get => m_CreateCorpse; set => m_CreateCorpse = value; }
public virtual TimeSpan CorpseDecayTime => _DefaultCorpseDecay;
public void TurnToBones()
{
if (Deleted)
{
return;
}
ProcessDelta();
SendRemovePacket();
ItemID = Utility.Random(0xECA, 9); // bone graphic
Hue = 0;
ProcessDelta();
SetFlag(CorpseFlag.NoBones, true);
SetFlag(CorpseFlag.IsBones, true);
var delay = Owner?.CorpseDecayTime ?? Mobile.DefaultCorpseDecay;
m_DecayTime = DateTime.UtcNow + delay;
if (!TimerRegistry.UpdateRegistry(m_TimerID, this, delay))
{
TimerRegistry.Register(m_TimerID, this, delay, TimerPriority.FiveSeconds, c => c.DoDecay());
}
}
public void BeginDecay(TimeSpan delay)
{
m_DecayTime = DateTime.UtcNow + delay;
TimerRegistry.Register(m_TimerID, this, delay, TimerPriority.FiveSeconds, c => c.DoDecay());
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.