private void OnComplete(object o) { object[] objs = o as object[]; BaseCreature hatchling = objs[0] as BaseCreature; Mobile focus = objs[1] as Mobile; if (hatchling != null) { focus.PublicOverheadMessage(Server.Network.MessageType.Regular, 0x35, 1156496); // *The Hatchling safely burrows into the sand* Timer.DelayCall(TimeSpan.FromSeconds(1), hatchling.Delete); } if (focus != null && focus is PlayerMobile) { EmptyNestQuest quest = QuestHelper.GetQuest((PlayerMobile)focus, typeof(EmptyNestQuest)) as EmptyNestQuest; if (quest != null) { quest.Update(hatchling); // Quest Complete and crap can be handled in update } } Timer.DelayCall(TimeSpan.FromMinutes(1), () => { if (Egg != null && !Egg.Visible) { Egg.Visible = true; } }); IsHatching = false; }
public override void OnMovement(Mobile m, Point3D oldLocation) { if (m is PlayerMobile && m.Location != oldLocation && m.InRange(Location, 3) && (!FocusList.Contains(m) || 0.015 > Utility.RandomDouble())) { EmptyNestQuest quest = QuestHelper.GetQuest((PlayerMobile)m, typeof(EmptyNestQuest)) as EmptyNestQuest; if (quest != null && !quest.Completed) { if (Focus == null) { Focus = m; m.RevealingAction(); SpawnPoachers(m); DeadlineTimer = Timer.DelayCall(TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5), () => { DeadlineTimer.Stop(); if (Poachers != null && Poachers.Count > 0) { Delete(); } else { Focus = null; Hatchling = null; CooldownEnds = DateTime.MinValue; } }); DeadlineTimer.Start(); } else if (IsInCooldown) { CooldownEnds = DateTime.UtcNow + TimeSpan.FromMinutes(2); } } } }