public override void GetContextMenuEntries(Mobile from, List <ContextMenuEntry> list) { if (Addon is ISiegeWeapon) { ISiegeWeapon weapon = (ISiegeWeapon)Addon; ((BaseSiegeWeapon)Addon).OnSingleClick(from); if (!weapon.FixedFacing) { list.Add(new RotateNextEntry(weapon)); list.Add(new RotatePreviousEntry(weapon)); } if (weapon.IsPackable) { list.Add(new BackpackEntry(from, weapon)); } if (weapon.IsDraggable) { // does it support dragging? XmlDrag a = (XmlDrag)XmlAttach.FindAttachment(weapon, typeof(XmlDrag)); if (a != null) { // is it currently being dragged? // only allow user to disconnect a siege wep if (a.DraggedBy != null && !a.DraggedBy.Deleted && a.DraggedBy == from) { list.Add(new ReleaseEntry(from, a)); } else { list.Add(new ConnectEntry(from, a)); } } } } base.GetContextMenuEntries(from, list); }
public override void GetContextMenuEntries(Mobile from, ArrayList list) { if (Addon is ISiegeWeapon) { ISiegeWeapon weapon = (ISiegeWeapon)Addon; if (!weapon.FixedFacing) { list.Add(new RotateNextEntry(weapon)); list.Add(new RotatePreviousEntry(weapon)); } if (weapon.IsPackable) { list.Add(new BackpackEntry(from, weapon)); } if (weapon.IsDraggable) { // does it support dragging? XmlDrag a = (XmlDrag)XmlAttach.FindAttachment(weapon, typeof(XmlDrag)); if (a != null) { // is it currently being dragged? if (a.DraggedBy != null && !a.DraggedBy.Deleted) { list.Add(new ReleaseEntry(from, a)); } else { list.Add(new ConnectEntry(from, a)); } } } } base.GetContextMenuEntries(from, list); }
public DragTarget(XmlDrag attachment) : base(30, false, TargetFlags.None) { m_attachment = attachment; }
public ConnectEntry(Mobile from, XmlDrag drag) : base(5119) { m_from = from; m_drag = drag; }
public ReleaseEntry(Mobile from, XmlDrag drag) : base(6118) { m_from = from; m_drag = drag; }