public virtual bool AcceptEscorter(Mobile m)
{
EDI dest = this.GetDestination();
if (dest == null)
{
return(false);
}
Mobile escorter = this.GetEscorter();
if (escorter != null || !m.Alive)
{
return(false);
}
BaseEscortable escortable = (BaseEscortable)m_EscortTable[m];
if (escortable != null && !escortable.Deleted && escortable.GetEscorter() == m)
{
this.Say("I see you already have an escort.");
return(false);
}
else if (m is PlayerMobile && (((PlayerMobile)m).LastEscortTime + m_EscortDelay) >= DateTime.UtcNow)
{
int minutes = (int)Math.Ceiling(((((PlayerMobile)m).LastEscortTime + m_EscortDelay) - DateTime.UtcNow).TotalMinutes);
this.Say("You must rest {0} minute{1} before we set out on this journey.", minutes, minutes == 1 ? "" : "s");
return(false);
}
else if (this.SetControlMaster(m))
{
this.m_LastSeenEscorter = DateTime.UtcNow;
if (m is PlayerMobile)
{
((PlayerMobile)m).LastEscortTime = DateTime.UtcNow;
}
this.Say("Lead on! Payment will be made when we arrive in {0}.", (dest.Name == "Ocllo" && m.Map == Map.Trammel) ? "Haven" : dest.Name);
m_EscortTable[m] = this;
this.StartFollow();
#region BBs Quests
// We have an escort, Remove bulletin board post
if (m_Message != null)
{
m_Message.Delete();
}
#endregion
return(true);
}
return(false);
}