public override void OnDoubleClick(Mobile from) { if (IsChildOf(from.Backpack)) { if (m_Owner == null || m_Owner == from) { if (!PersonalAttendant.CheckAttendant(from)) { from.CloseGump(typeof(InternalGump)); from.SendGump(new InternalGump(this)); } else { from.SendLocalizedMessage(1076053); // You already have an attendant. } } else { from.SendLocalizedMessage(501023); // You must be the owner to use this item. } } else { from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used. } }
public override void OnResponse(NetState sender, RelayInfo info) { if (m_Deed == null || m_Deed.Deleted) { return; } Mobile m = sender.Mobile; if (PersonalAttendant.CheckAttendant(m)) { m.SendLocalizedMessage(1076053); // You already have an attendant. return; } PersonalAttendant attendant = null; switch (info.ButtonID) { case 100: attendant = new AttendantMaleGuide(); break; case 101: attendant = new AttendantFemaleGuide(); break; case 102: attendant = new AttendantMaleHerald(); break; case 103: attendant = new AttendantFemaleHerald(); break; case 104: attendant = new AttendantMaleLuckyDealer(); break; case 105: attendant = new AttendantFemaleLuckyDealer(); break; case 106: attendant = new AttendantFortuneTeller(); break; } if (attendant != null) { PersonalAttendant.AddAttendant(m, attendant); attendant.BindedToPlayer = (m_Deed.Owner != null); attendant.SetControlMaster(m); attendant.ControlOrder = OrderType.Follow; attendant.ControlTarget = m; attendant.MoveToWorld(m.Location, m.Map); m_Deed.Delete(); } else if (info.ButtonID != 0) { sender.Mobile.SendLocalizedMessage(501311); // This option is currently disabled, while we evaluate it for game balance. } }
public AttendantUseEntry(PersonalAttendant attendant, int title) : base(title) { m_Attendant = attendant; }
public AttendantDismissEntry(PersonalAttendant attendant) : base(6228) { m_Attendant = attendant; }
public AttendantStopEntry(PersonalAttendant attendant) : base(6112) { m_Attendant = attendant; }
public AttendantFollowEntry(PersonalAttendant attendant) : base(6108) { m_Attendant = attendant; }