public override bool OnDragDropInto(Mobile from, Item item, Point3D p) { if (IsAccessibleTo(from) && (item is PlagueBeastInnard || item is PlagueBeastGland)) { Rectangle2D ir = ItemBounds.Table[item.ItemID]; int x, y; int cx = p.X + ir.X + ir.Width / 2; int cy = p.Y + ir.Y + ir.Height / 2; for (int i = Items.Count - 1; i >= 0; i--) { PlagueBeastComponent innard = Items[i] as PlagueBeastComponent; if (innard != null) { Rectangle2D r = ItemBounds.Table[innard.ItemID]; x = innard.X + r.X; y = innard.Y + r.Y; if (cx >= x && cx <= x + r.Width && cy >= y && cy <= y + r.Height) { innard.OnDragDrop(from, item); break; } } } return(base.OnDragDropInto(from, item, p)); } return(false); }
public override bool OnDropped(Mobile from, Item item, PlagueBeastComponent to) { if (!Opened && to.IsReceptacle && item.Hue == to.Hue) { to.Organ = this; m_Brains++; from.LocalOverheadMessage(MessageType.Regular, 0x34, 1071913); // You place the organ in the fleshy receptacle near the core. if (Owner != null) { Owner.PlaySound(0x1BA); if (Owner.IsBleeding) { from.LocalOverheadMessage(MessageType.Regular, 0x34, 1071922); // The plague beast is still bleeding from open wounds. You must seal any bleeding wounds before the core will open! return(true); } } if (m_Brains == 4) { FinishOpening(from); } return(true); } return(false); }
public override bool OnLifted(Mobile from, PlagueBeastComponent c) { if (c.IsBrain) { m_Brains--; } return(true); }
public override bool OnLifted(Mobile from, PlagueBeastComponent c) { if (c.IsBrain) { AddComponent(new PlagueBeastBlood(), -13, 25); return(true); } return(false); }
public override bool OnLifted(Mobile from, PlagueBeastComponent c) { base.OnLifted(from, c); if (c.IsBrain) { AddComponent(new PlagueBeastBlood(), -7, 24); return(true); } return(false); }
public void AddComponent(PlagueBeastComponent c, int x, int y) { Container pack = Parent as Container; if (pack != null) { pack.DropItem(c); } c.Organ = this; c.Location = new Point3D(X + x, Y + y, Z); c.Map = Map; m_Components.Add(c); }
public override bool OnLifted(Mobile from, PlagueBeastComponent c) { if (c.IsBrain) { AddComponent(new PlagueBeastBlood(), 47, 72); return(true); } else if (c.IsGland) { m_Gland = null; return(true); } return(c.IsGland); }
public override bool OnDropped(Mobile from, Item item, PlagueBeastComponent to) { if (to.Hue == 0x1 && m_Gland == null && item is PlagueBeastGland) { m_Gland = item; m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(3), new TimerCallback(FinishHealing)); from.SendAsciiMessage(0x3B2, "* You place the healthy gland inside the organ sac *"); item.Movable = false; if (Owner != null) { Owner.PlaySound(0x20); } return(true); } return(false); }
public virtual bool OnDropped(Mobile from, Item item, PlagueBeastComponent to) { return(false); }
public virtual bool OnLifted(Mobile from, PlagueBeastComponent c) { return(c.IsGland || c.IsBrain); }