Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 • committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -14,7 +14,7 @@ namespace Server.Items
public override void OnDoubleClick(Mobile from)
{
if (from.BeginAction(typeof(RejuvinationAddonComponent)))
if (from.BeginAction<RejuvinationAddonComponent>())
{
from.FixedEffect(0x373A, 1, 16);
@ -38,19 +38,13 @@ namespace Server.Items
SendLocalizedMessageTo(from, 500803); // You feel as though you've slept for days!
}
Timer.DelayCall(TimeSpan.FromHours(2.0), new TimerStateCallback(ReleaseUseLock_Callback),
new object[] { from, random });
Timer.DelayCall(TimeSpan.FromHours(2.0), () => ReleaseUseLock_Callback(from, random));
}
}
public virtual void ReleaseUseLock_Callback(object state)
public virtual void ReleaseUseLock_Callback(Mobile from, int random)
{
object[] states = (object[])state;
Mobile from = (Mobile)states[0];
int random = (int)states[1];
from.EndAction(typeof(RejuvinationAddonComponent));
from.EndAction<RejuvinationAddonComponent>();
if (random == 4)
{