private void CheckDestination() { if (m_Escort == null || m_HasCompleted) // Completed by deserialization { StopTimer(); return; } MLQuestInstance instance = Instance; PlayerMobile pm = instance.Player; if (instance.Removed) { Abandon(); } else if (m_Objective.Destination.Contains(m_Escort)) { m_Escort.Say(1042809, pm.Name); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay. if (pm.Young || m_Escort.Region.IsPartOf("Haven Island")) { Titles.AwardFame(pm, 10, true); } else { VirtueHelper.AwardVirtue(pm, VirtueName.Compassion, (m_Escort is BaseEscortable && ((BaseEscortable)m_Escort).IsPrisoner) ? 400 : 200); } EndFollow(m_Escort); StopTimer(); m_HasCompleted = true; CheckComplete(); // Auto claim reward MLQuestSystem.OnDoubleClick(m_Escort, pm); } else if (pm.Map != m_Escort.Map || !pm.InRange(m_Escort, 30)) // TODO: verify range { if (m_LastSeenEscorter + BaseEscortable.AbandonDelay <= DateTime.UtcNow) { Abandon(); } } else { m_LastSeenEscorter = DateTime.UtcNow; } }
public override void OnDoubleClick(Mobile from) { if (!from.InRange(GetWorldLocation(), 2)) { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. } else if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042593); // That is not in your backpack. } else if (MLQuestSystem.Enabled && CanGiveMLQuest && from is PlayerMobile mobile) { MLQuestSystem.OnDoubleClick(this, mobile); } }