private void DoIncZ_Callback(object molehideinfo) { MoleHideInfo info = (MoleHideInfo)molehideinfo; info.User.Z++; info.Count--; if (info.Count >= 0) { Timer.DelayCall(TimeSpan.FromMilliseconds(100), new TimerStateCallback(DoIncZ_Callback), info); } else { info.User.EndAction(typeof(MoleHide)); } }
public override void HideEffects(Mobile from) { if (from.Hidden) { from.Z -= 10; from.Hidden = false; MoleHideInfo info = new MoleHideInfo(from.Location, from.Map, from); Timer.DelayCall( TimeSpan.FromMilliseconds( 100 ), new TimerStateCallback( DoIncZ_Callback ), info ); } else { MoleHideInfo info = new MoleHideInfo(from.Location, from.Map, from); Timer.DelayCall( TimeSpan.FromMilliseconds( 100 ), new TimerStateCallback( DoDecZ_Callback ), info ); } from.PlaySound( 0x244 ); }
public override void HideEffects(Mobile from) { if (from.Hidden) { from.Z -= 10; from.Hidden = false; MoleHideInfo info = new MoleHideInfo(from.Location, from.Map, from); Timer.DelayCall(TimeSpan.FromMilliseconds(100), new TimerStateCallback(DoIncZ_Callback), info); } else { MoleHideInfo info = new MoleHideInfo(from.Location, from.Map, from); Timer.DelayCall(TimeSpan.FromMilliseconds(100), new TimerStateCallback(DoDecZ_Callback), info); } from.PlaySound(0x244); }