public void OnTarget(Mobile from, object obj) { IPoint3D p3D = obj as IPoint3D; if (p3D == null) { return; } Point3D m_pnt = from.Location; Map m_map = from.Map; int x = p3D.X, y = p3D.Y; Point3D p = new Point3D(x, y, m_map.GetAverageZ(x, y)); if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042010); return; } else if (!from.InRange(p3D, 4)) { from.SendMessage("The net is too cumbersome to deploy that far away."); return; } ArrayList netshere = NetHelper.CheckNet(p, m_map, 0); if (netshere.Count > 0) { from.SendMessage("This location is too close to another net. "); return; } ArrayList netsnear = NetHelper.CheckNet(p, m_map, 1); if ((netsnear.Count > 0)) { from.SendMessage("You can't place any more"); return; } if (this.BumpZ) { ++m_pnt.Z; } if (!from.Mounted) { from.Animate(32, 5, 1, true, false, 0); } from.SendMessage("You deploy the Fishing Net."); this.Consume(); Item item = new NetBuoy(from); item.MoveToWorld(p, m_map); }
public void OnTarget(Mobile from, object obj) { IPoint3D p3D = obj as IPoint3D; if (p3D == null) return; Point3D m_pnt = from.Location; Map m_map = from.Map; int x = p3D.X, y = p3D.Y; Point3D p = new Point3D(x, y, m_map.GetAverageZ(x, y)); if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042010); return; } else if (!from.InRange(p3D, 4)) { from.SendMessage("The net is too cumbersome to deploy that far away."); return; } ArrayList netshere = NetHelper.CheckNet(p, m_map, 0); if (netshere.Count > 0) { from.SendMessage("This location is too close to another net. "); return; } ArrayList netsnear = NetHelper.CheckNet(p, m_map, 1); if ((netsnear.Count > 0)) { from.SendMessage("You can't place any more"); return; } if (this.BumpZ) ++m_pnt.Z; if (!from.Mounted) from.Animate(32, 5, 1, true, false, 0); from.SendMessage("You deploy the Fishing Net."); this.Consume(); Item item = new NetBuoy(from); item.MoveToWorld(p, m_map); }
public static void init(NetBuoy netbuoy) { netbuoy.thisTimer = new NetHelper.CatchTimer(netbuoy, typeof(BobbingNetBouy), netbuoy.Owner); netbuoy.thisTimer.Start(); }